/* ===================================
   PANTAUAN HARGA PASAR - STYLE
   Kota Jember, Jawa Timur
   =================================== */

:root {
    /* Color Palette */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;

    --rose-50: #fff1f2;
    --rose-100: #ffe4e6;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;

    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;

    --violet-50: #f5f3ff;
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Popular Pastel Palette */
    --pastel-blush: #FADADD;
    --pastel-blue: #A7D8F3;
    --pastel-mint: #B8E0D2;
    --pastel-lavender: #E6E0F8;
    --pastel-yellow: #FFF5BA;
    --pastel-peach: #FFDAB9;
    --pastel-cream: #FFF8E7;

    /* Layout */
    --container-max: 1280px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--pastel-cream);
    color: var(--slate-800);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Background Plus Pattern Layer (Paling Belakang / z-index: -100) */
.background-plus-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -100;
    background-color: var(--pastel-cream);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23A7D8F3' fill-opacity='0.45'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    mask-image: radial-gradient(circle at center, white 10%, transparent 90%);
    -webkit-mask-image: radial-gradient(circle at center, white 10%, transparent 90%);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================
   HEADER (PASTEL PALETTE)
   =================================== */
.header {
    background: linear-gradient(135deg, #A7D8F3 0%, #B8E0D2 50%, #E6E0F8 100%);
    color: #1e293b;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.header-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: none;
    background: transparent;
    padding: 0;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary-600);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.header-subtitle {
    font-size: 0.8rem;
    color: #334155;
    font-weight: 600;
    margin-top: 1px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    background: transparent;
    border: none;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
}

.badge-dot {
    width: 7px;
    height: 7px;
    background: var(--emerald-600);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

/* Live Status Indicator (Satu Garis & Kontras Tinggi) */
.live-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    transition: var(--transition-normal);
}

.live-status.online {
    background: rgba(16, 185, 129, 0.22);
    color: #047857;
    border: 1px solid rgba(5, 150, 105, 0.4);
}

.live-status.offline {
    background: rgba(244, 63, 94, 0.22);
    color: #be123c;
    border: 1px solid rgba(225, 29, 72, 0.4);
}

.live-status.loading {
    background: rgba(245, 158, 11, 0.22);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.4);
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.live-status.online .live-dot { background: #047857; }
.live-status.offline .live-dot { background: #be123c; }
.live-status.loading .live-dot { background: #b45309; }

/* Login Admin Button (Pastel Style - Black Text) */
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #B8E0D2 0%, #A7D8F3 100%);
    color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn-login svg {
    color: #000000 !important;
    stroke: #000000 !important;
}

.btn-login:hover {
    background: linear-gradient(135deg, #A7D8F3 0%, #B8E0D2 100%);
    color: #000000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tabs */
.header-tabs {
    display: flex;
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.tab-btn.active {
    background: rgba(255,255,255,0.15);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ===================================
   TAB CONTENT
   =================================== */
.tab-content {
    display: none;
    padding: 16px 0;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================
   INFO BANNER
   =================================== */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 14px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-banner .info-icon {
    flex-shrink: 0;
    color: var(--primary-500);
    margin-top: 2px;
}

.info-banner strong {
    color: var(--primary-800);
    font-size: 0.9rem;
}

.info-banner p {
    font-size: 0.82rem;
    color: var(--slate-600);
    margin-top: 3px;
    line-height: 1.5;
}

.info-banner-warning {
    background: var(--amber-50);
    border-color: var(--amber-400);
}

.info-banner-warning .info-icon {
    color: var(--amber-500);
}

.info-banner-warning strong {
    color: var(--amber-600);
}

/* Live Data Banner */
.info-banner-live {
    background: linear-gradient(135deg, rgba(184, 224, 210, 0.45) 0%, rgba(255, 248, 231, 0.8) 100%);
    border-color: rgba(5, 150, 105, 0.3);
}

.info-banner-live .info-icon {
    color: var(--emerald-500);
}

.info-banner-live strong {
    color: var(--emerald-600);
}

.live-banner-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.live-banner-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.last-update {
    font-size: 0.72rem;
    color: var(--slate-500);
    font-weight: 500;
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: var(--emerald-500);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.btn-refresh:hover {
    background: var(--emerald-600);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-refresh:active {
    transform: translateY(0);
}

.pasar-info {
    font-size: 0.78rem;
    color: var(--emerald-600);
    font-weight: 600;
    margin-top: 4px;
}

/* Bapokting Cell Live Indicator */
.bapokting-cell {
    position: relative;
}

.bapokting-live {
    color: var(--emerald-600);
    font-weight: 700;
}

/* ===================================
   IFRAME SECTION
   =================================== */
.iframe-container {
    position: relative;
    width: 100%;
    min-height: 700px;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--slate-200);
}

.iframe-container iframe {
    width: 100%;
    height: 700px;
    border: none;
    display: block;
}

.iframe-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: white;
    z-index: 5;
}

.iframe-loading p {
    font-size: 0.9rem;
    color: var(--slate-500);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--slate-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.iframe-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: white;
    z-index: 10;
    padding: 40px;
    text-align: center;
}

.iframe-error svg {
    color: var(--rose-400);
}

.iframe-error h3 {
    font-size: 1.25rem;
    color: var(--slate-800);
}

.iframe-error p {
    font-size: 0.9rem;
    color: var(--slate-500);
    max-width: 480px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary-600);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
}

.btn-secondary:hover {
    background: var(--slate-200);
    transform: translateY(-1px);
}

/* ===================================
   STATS CARDS
   =================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--slate-100);
    transition: var(--transition-normal);
    animation: fadeInUp 0.5s ease backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-card-1 .stat-icon {
    background: var(--primary-50);
    color: var(--primary-600);
}

.stat-card-2 .stat-icon {
    background: var(--rose-50);
    color: var(--rose-500);
}

.stat-card-3 .stat-icon {
    background: var(--emerald-50);
    color: var(--emerald-500);
}

.stat-card-4 .stat-icon {
    background: var(--amber-50);
    color: var(--amber-500);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--slate-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* ===================================
   TABLE SECTION
   =================================== */
.table-section {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--slate-100);
    animation: fadeInUp 0.5s ease 0.25s backwards;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 10px;
    flex-wrap: wrap;
    gap: 12px;
}

.table-title h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-900);
}

.table-date {
    font-size: 0.78rem;
    color: var(--slate-500);
    margin-top: 1px;
}

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.search-box svg {
    color: var(--slate-400);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--slate-800);
    width: 180px;
}

.search-box input::placeholder {
    color: var(--slate-400);
}

.filter-select {
    padding: 8px 14px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--slate-700);
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}

.filter-select:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-700);
    background: #f1f5f9;
    border-top: 1px solid var(--slate-200);
    border-bottom: 2px solid var(--slate-200);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

tbody td {
    padding: 10px 14px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--slate-100);
    transition: background var(--transition-fast);
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: var(--primary-50);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Kategori Cell Styles */
.kategori-cell {
    vertical-align: top;
    background: white;
    border-right: 1px solid var(--slate-200);
    padding: 10px 12px !important;
}

.kategori-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #E6E0F8, #d4ccf0);
    color: var(--slate-700);
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Price Value Styles */
.price-value {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.price-na {
    color: var(--slate-300);
    font-style: italic;
}

.het-value {
    font-weight: 700;
    color: var(--primary-700);
}

.commodity-name {
    font-weight: 600;
    color: var(--slate-800);
}

.price-value {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* ===================================
   SOURCE INFO
   =================================== */
.source-info {
    margin-top: 12px;
    padding: 10px 16px;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--slate-200);
    border-left: 4px solid var(--primary-500);
}

.source-info a {
    color: var(--primary-600);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.source-info a:hover {
    color: var(--primary-800);
    text-decoration: underline;
}

.source-note {
    font-size: 0.78rem;
    color: var(--slate-500);
    margin-top: 2px;
}

/* ===================================
   FOOTER (PASTEL PALETTE)
   =================================== */
.footer {
    background: linear-gradient(135deg, #E6E0F8 0%, #FADADD 100%);
    color: #334155;
    text-align: center;
    padding: 14px 0;
    margin-top: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.8);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-actions {
        width: 100%;
    }

    .search-box {
        flex: 1;
    }

    .search-box input {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header-tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.75rem;
    }

    .error-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===================================
   LOGIN BUTTON & MODAL
   =================================== */
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    backdrop-filter: blur(8px);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: linear-gradient(135deg, #FFF8E7 0%, #F5F0FF 100%);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    margin: auto;
    animation: slideUp 0.25s ease-out;
}

.modal-header {
    padding: 18px 24px;
    background: linear-gradient(135deg, #A7D8F3 0%, #B8E0D2 100%);
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
}

.modal-close {
    background: none;
    border: none;
    color: #334155;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: #0f172a;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-700);
}

.form-group input {
    padding: 10px 14px;
    border: 1.5px solid var(--slate-200);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-group input:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-error {
    background: var(--rose-50);
    color: var(--rose-600);
    border: 1px solid var(--rose-200);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 500;
}

.btn-submit-login {
    background: var(--primary-600);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-submit-login:hover {
    background: var(--primary-700);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ADMIN INLINE EDITING & READONLY BAPOKTING */
.bapokting-readonly {
    background: rgba(241, 245, 249, 0.7);
    color: var(--slate-600);
    cursor: not-allowed;
    user-select: none;
    font-size: 0.85rem;
}

.admin-edit-cell {
    padding: 6px !important;
}

.admin-edit-input {
    width: 100%;
    min-width: 90px;
    padding: 6px 10px;
    border: 1.5px solid var(--slate-200);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    color: var(--slate-800);
    background: var(--slate-50);
    outline: none;
    transition: var(--transition-fast);
}

.admin-edit-input:focus {
    background: white;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.admin-edit-input.saved-success {
    border-color: var(--emerald-500);
    background: var(--emerald-50);
}

/* FLOATING TOAST NOTIFICATION */
#adminToast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--slate-900);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.25s ease-out;
}

.btn-toggle-kategori {
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    padding: 8px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-toggle-kategori:hover {
    background: var(--slate-200);
    color: var(--slate-900);
}

/* HIDE KATEGORI COLUMN STYLES */
table.hide-kategori-column .th-kategori,
table.hide-kategori-column .kategori-cell {
    display: none !important;
}

.btn-add-commodity {
    background: var(--emerald-600);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-add-commodity:hover {
    background: var(--emerald-700);
}

/* ACTION BUTTONS (DROPDOWN TEXT-ONLY - ULTRA COMPACT) */
.action-cell {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    width: 60px;
    padding: 4px 6px !important;
}

.action-dropdown-select {
    padding: 3px 6px;
    background: #f1f5f9;
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
    font-family: inherit;
    width: 58px;
    text-align: center;
}

.action-dropdown-select:hover {
    background: var(--primary-100);
    color: var(--primary-800);
    border-color: var(--primary-400);
}

