/* ============================================================
   Jalpooree Foods - Staff Admin Panel Stylesheet
   Modern, Clean, High-End Enterprise Quality Design
   ============================================================ */

:root {
    --brand-red: #d72717;
    --brand-red-hover: #b91c1c;
    --brand-red-light: #fef2f2;
    --brand-red-border: #fecaca;
    
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;

    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-card: #e2e8f0;
    --border-hover: #cbd5e1;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
    background-color: var(--bg-page);
    color: var(--slate-700);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   TOP NAVBAR (PROPER EXECUTIVE DESKTOP HEADER)
   ============================================================ */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.navbar {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: relative;
    gap: 16px;
    box-sizing: border-box;
}

.header-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-wrap {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}

.header-divider {
    width: 1px;
    height: 22px;
    background: var(--border-card);
    display: inline-block;
}

.admin-portal-badge {
    background: var(--brand-red-light);
    color: var(--brand-red);
    border: 1px solid var(--brand-red-border);
    font-size: 0.70rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

/* Nav Container & Clusters */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.nav-links-cluster {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.admin-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--slate-700);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.admin-nav-link i {
    color: var(--slate-400);
    font-size: 0.84rem;
    transition: color 0.15s ease;
}

.admin-nav-link:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.admin-nav-link:hover i {
    color: var(--brand-red);
}

.nav-badge-count {
    background: #0f172a;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1;
}

.nav-actions-cluster {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: 0.79rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

/* Desktop Responsive Adjustments (861px - 1300px) */
@media (max-width: 1300px) {
    .navbar {
        padding: 0 16px;
        gap: 10px;
    }

    .nav-container {
        gap: 8px;
    }

    .admin-nav-link {
        padding: 5px 8px;
        font-size: 0.78rem;
        gap: 4px;
    }

    .header-cta {
        padding: 5px 9px;
        font-size: 0.76rem;
        gap: 4px;
    }

    .nav-actions-cluster {
        gap: 6px;
    }
}

@media (max-width: 1120px) {
    .header-cta.default span,
    .header-cta.user-portal span {
        display: none;
    }

    .header-cta.default,
    .header-cta.user-portal {
        padding: 6px 9px;
    }
}

.header-cta.distributor-portal {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.header-cta.distributor-portal:hover {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
}

.header-cta.user-portal {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.header-cta.user-portal:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.header-cta.default {
    background: #ffffff;
    color: var(--slate-700);
    border: 1px solid var(--border-hover);
}

.header-cta.default:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.header-cta.logout {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.header-cta.logout:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--slate-900);
    text-decoration: none;
    cursor: pointer;
    padding: 6px;
}

/* Base rule: Mobile elements are NEVER displayed on desktop */
.mobile-dropdown-menu,
.mobile-header-actions,
.mobile-header-product-btn,
.mobile-header-logout-btn {
    display: none;
}

@media (max-width: 860px) {
    .navbar {
        height: 60px;
        padding: 10px 16px;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
    }

    .header-brand-group {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .header-divider,
    .admin-portal-badge {
        display: none;
    }

    .nav-container {
        display: none;
    }

    /* Mobile Header Action Controls (Products + Quick Logout) */
    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }

    .mobile-header-product-btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        position: static;
        transform: none;
        background: #ecfdf5;
        border: 1.5px solid #a7f3d0;
        color: #059669;
        font-size: 0.78rem;
        font-weight: 700;
        padding: 5px 10px;
        border-radius: 20px;
        cursor: pointer;
        outline: none;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-header-product-btn i {
        font-size: 0.85rem;
    }

    .mobile-header-product-btn .mhp-badge {
        background: #059669;
        color: #ffffff;
        font-size: 0.68rem;
        padding: 1px 6px;
        border-radius: 10px;
        font-weight: 700;
        line-height: 1.2;
    }

    .mobile-header-logout-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: #fef2f2;
        border: 1.5px solid #fecaca;
        color: #dc2626;
        border-radius: 50%;
        font-size: 0.82rem;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.15s ease;
        box-shadow: 0 1px 3px rgba(220, 38, 38, 0.1);
    }

    .mobile-header-logout-btn:active {
        background: #dc2626;
        color: #ffffff;
        border-color: #dc2626;
    }

    .admin-dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100vh - 70px) !important;
        overflow-y: auto !important;
        border-radius: 0 0 16px 16px !important;
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15) !important;
        z-index: 1000 !important;
    }

    .adm-list-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 14px !important;
    }

    /* Mobile Dropdown Menu (Exactly 2 Options) */
    .mobile-dropdown-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-bottom: 1px solid var(--border-card);
        padding: 14px 16px;
        gap: 10px;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        z-index: 99;
        flex-direction: column;
    }

    .mobile-dropdown-menu.active {
        display: flex;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        background: var(--slate-50);
        border: 1px solid var(--border-card);
        border-radius: var(--radius-md);
        text-decoration: none;
        transition: all 0.15s ease;
    }

    .mobile-menu-item:hover, .mobile-menu-item:active {
        background: #ffffff;
        border-color: var(--brand-red);
        box-shadow: var(--shadow-sm);
    }

    .mobile-menu-item.highlight {
        background: #eff6ff;
        border-color: #bfdbfe;
    }

    .mobile-menu-item.highlight:hover {
        background: #dbeafe;
        border-color: #93c5fd;
    }

    .mmi-icon {
        width: 38px;
        height: 38px;
        border-radius: var(--radius-sm);
        background: #ffffff;
        color: var(--slate-700);
        border: 1px solid var(--border-card);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .mobile-menu-item.highlight .mmi-icon {
        color: #2563eb;
        border-color: #bfdbfe;
    }

    .mmi-content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .mmi-title {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--slate-900);
    }

    .mmi-desc {
        font-size: 0.72rem;
        color: var(--slate-500);
    }

    .mobile-menu-item.distributor {
        background: #fffbeb;
        border-color: #fde68a;
    }

    .mobile-menu-item.distributor .mmi-icon {
        color: #b45309;
        border-color: #fde68a;
    }

    .mobile-menu-item.distributor:hover {
        background: #fef3c7;
    }

    .mobile-menu-item.logout {
        background: #fef2f2;
        border-color: #fecaca;
    }

    .mobile-menu-item.logout .mmi-icon {
        color: #dc2626;
        border-color: #fecaca;
        background: #ffffff;
    }

    .mobile-menu-item.logout .mmi-title {
        color: #dc2626;
    }

    .mobile-menu-item.logout .mmi-desc {
        color: #ef4444;
    }

    .mobile-menu-item.logout .mmi-arrow {
        color: #dc2626;
    }

    .mobile-menu-item.logout:hover,
    .mobile-menu-item.logout:active {
        background: #fee2e2;
        border-color: #f87171;
    }

    .mmi-arrow {
        color: var(--slate-400);
        font-size: 0.85rem;
    }
}

.footer-logout-link {
    color: #dc2626 !important;
    font-weight: 600;
}

.footer-logout-link:hover {
    text-decoration: underline;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.portal-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* ============================================================
   LOGIN CARD / ACCESS GATE
   ============================================================ */
.login-screen-wrap {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 32px 28px;
    text-align: center;
}

.login-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-red-light);
    color: var(--brand-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.login-badge {
    background: #f1f5f9;
    color: var(--slate-600);
    border: 1px solid var(--border-card);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.login-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 4px;
}

.login-subtitle {
    font-size: 0.82rem;
    color: var(--slate-500);
    line-height: 1.45;
    margin: 0 0 20px;
}

.login-input-wrap {
    position: relative;
    margin-bottom: 14px;
}

.login-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    font-size: 0.95rem;
}

.login-input {
    width: 100%;
    border: 1.5px solid var(--border-hover);
    border-radius: var(--radius-md);
    padding: 10px 12px 10px 38px;
    font-size: 0.92rem;
    color: var(--slate-900);
    outline: none;
    transition: all 0.2s ease;
}

.login-input:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(215, 39, 23, 0.12);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--slate-600);
    margin-bottom: 18px;
    cursor: pointer;
    text-align: left;
}

.login-btn {
    width: 100%;
    background: var(--brand-red);
    color: #ffffff;
    border: none;
    padding: 11px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.login-btn:hover {
    background: var(--brand-red-hover);
}

.login-footer-link {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-card);
    font-size: 0.78rem;
}

.login-footer-link a {
    color: var(--brand-red);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ============================================================
   ALERT BANNERS
   ============================================================ */
.alert-box {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.alert-box.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-box.danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ============================================================
   ADMIN EXECUTIVE DASHBOARD HERO & KPI METRICS
   ============================================================ */
.admin-dashboard-hero {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-left {
    flex: 1;
    min-width: 280px;
}

.hero-pill {
    background: var(--brand-red-light);
    color: var(--brand-red);
    border: 1px solid var(--brand-red-border);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.hero-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--slate-900);
    margin: 0 0 4px;
    line-height: 1.25;
}

.hero-desc {
    font-size: 0.84rem;
    color: var(--slate-600);
    margin: 0;
    line-height: 1.45;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.kpi-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--brand-red-light);
    color: var(--brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kpi-icon-box.verified {
    background: #ecfdf5;
    color: #059669;
}

.kpi-icon-box.info {
    background: #eff6ff;
    color: #2563eb;
}

.kpi-icon-box.warning {
    background: #fffbeb;
    color: #d97706;
}

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

.kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.kpi-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-900);
}

/* Mobile Responsive Overrides: Strict Zero-Overflow & 2x2 KPI Grid */
@media (max-width: 768px) {
    .portal-content {
        padding: 14px 12px 36px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .admin-dashboard-hero {
        padding: 16px 14px !important;
        margin-bottom: 14px !important;
        gap: 12px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .hero-left {
        min-width: 0 !important;
        width: 100% !important;
    }

    .hero-title {
        font-size: 1.2rem !important;
    }

    .hero-actions {
        width: 100% !important;
        gap: 8px !important;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        flex: 1 1 auto !important;
        justify-content: center !important;
        padding: 8px 10px !important;
        font-size: 0.78rem !important;
    }

    .admin-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .kpi-card {
        min-width: 0 !important;
        padding: 10px 8px !important;
        gap: 8px !important;
        align-items: center !important;
        border-radius: var(--radius-md) !important;
        box-shadow: var(--shadow-sm) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .kpi-icon-box {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.95rem !important;
        border-radius: var(--radius-sm) !important;
        flex-shrink: 0 !important;
    }

    .kpi-info {
        min-width: 0 !important;
        flex: 1 !important;
        overflow: hidden !important;
    }

    .kpi-label {
        font-size: 0.58rem !important;
        font-weight: 600 !important;
        color: var(--slate-500) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.2px !important;
        line-height: 1.15 !important;
        margin-bottom: 2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .kpi-value {
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        color: var(--slate-900) !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .admin-card {
        padding: 16px 12px !important;
        margin-bottom: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .table-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
    }
}

/* ============================================================
   ADMIN SECTIONS & CARDS
   ============================================================ */
.admin-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px 24px;
    margin-bottom: 22px;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-card);
    flex-wrap: wrap;
    gap: 10px;
}

.admin-card-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--slate-900);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.admin-card-header h2 i {
    color: var(--brand-red);
}

.admin-card-subtitle {
    font-size: 0.8rem;
    color: var(--slate-500);
}

/* ============================================================
   CONTAINER QR GENERATOR SECTION
   ============================================================ */
.qr-generator-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 22px;
    align-items: center;
    background: var(--slate-50);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 20px;
}

.qr-box-inner {
    text-align: center;
}

.qr-image-frame {
    width: 154px;
    height: 154px;
    background: #ffffff;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    padding: 5px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.qr-target-text {
    font-size: 0.72rem;
    color: var(--slate-500);
    margin-top: 6px;
    font-weight: 500;
}

.qr-info-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 6px;
}

.qr-info-content p {
    font-size: 0.82rem;
    color: var(--slate-600);
    line-height: 1.45;
    margin: 0 0 16px;
}

.qr-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--brand-red);
    color: #ffffff;
    border: 1px solid var(--brand-red);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-primary:hover {
    background: var(--brand-red-hover);
    border-color: var(--brand-red-hover);
}

.btn-secondary {
    background: #ffffff;
    color: var(--slate-700);
    border: 1px solid var(--border-hover);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

@media (max-width: 680px) {
    .qr-generator-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .qr-actions-row {
        justify-content: center;
    }
}

/* ============================================================
   VENDOR FORM STYLES
   ============================================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

@media (min-width: 861px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px 20px;
    }
    .form-group.col-span-2 {
        grid-column: span 2;
    }
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate-700);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label i {
    color: var(--slate-400);
    font-size: 0.82rem;
}

.form-input, .form-textarea {
    width: 100%;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.86rem;
    color: var(--slate-900);
    background: #ffffff;
    outline: none;
    transition: all 0.15s ease;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(215, 39, 23, 0.12);
}

.form-input.code-input {
    text-transform: uppercase;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.form-textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions-row {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   VENDOR DIRECTORY TABLE
   ============================================================ */
.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}

.data-table th {
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 2px solid var(--border-card);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-card);
    color: var(--slate-700);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #fbfcfe;
}

.table-code-badge {
    font-family: monospace;
    font-weight: 700;
    background: #0f172a;
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.78rem;
    display: inline-block;
}

.btn-table-action {
    background: #ffffff;
    border: 1px solid var(--border-hover);
    color: var(--slate-700);
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-table-action:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.btn-table-action.danger {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

.btn-table-action.danger:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

/* ============================================================
   CHANGE PASSWORD GRID
   ============================================================ */
.password-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    align-items: end;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border-card);
    background: #ffffff;
    padding: 16px 0;
    margin-top: auto;
    font-size: 0.75rem;
    color: var(--slate-500);
}

.footer-content {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a:hover {
    color: var(--brand-red);
}

/* ============================================================
   PRODUCT PRICING MANAGEMENT SYSTEM (10 CORE PRODUCTS)
   ============================================================ */

.admin-nav-link.highlight-pricing {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.admin-nav-link.highlight-pricing:hover {
    background: #d1fae5;
    color: #065f46;
}

.admin-nav-link.highlight-pricing i {
    color: #059669;
}

.admin-nav-link.highlight-pricing .nav-badge-count {
    background: #059669;
}

.header-tools-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.product-price-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.product-price-card:hover {
    transform: translateY(-2px);
    border-color: #a7f3d0;
    box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.product-card-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-cat-pill {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--slate-600);
    background: var(--slate-100);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.product-stock-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.product-stock-pill.in-stock {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.product-stock-pill.out-of-stock {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.product-card-visual {
    display: flex;
    align-items: center;
    gap: 14px;
}

.product-img-box {
    width: 68px;
    height: 68px;
    background: #f8fafc;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    flex-shrink: 0;
}

.product-thumb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.product-meta {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-num {
    font-size: 0.72rem;
    background: #0f172a;
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 700;
}

.product-sub {
    font-size: 0.8rem;
    color: var(--slate-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 12px;
}

.ppi-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ppi-label {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--slate-600);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ppi-input-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 8px;
    height: 38px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ppi-input-wrap:focus-within {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.ppi-input-wrap.secondary {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.ppi-symbol {
    font-weight: 700;
    color: #059669;
    font-size: 0.95rem;
    margin-right: 4px;
}

.ppi-field {
    border: none;
    outline: none;
    width: 100%;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--slate-900);
    background: transparent;
}

.ppi-field-text, .ppi-select {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate-800);
    height: 38px;
    width: 100%;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ppi-field-text:focus, .ppi-select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--slate-100);
    font-size: 0.75rem;
    color: var(--slate-500);
}

.btn-card-edit {
    background: transparent;
    border: 1px solid var(--border-card);
    color: var(--slate-700);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-card-edit:hover {
    background: var(--slate-100);
    color: var(--slate-900);
    border-color: var(--slate-400);
}

.pricing-save-sticky-bar {
    margin-top: 20px;
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pssb-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #065f46;
    font-size: 0.88rem;
    font-weight: 500;
}

.pssb-info i {
    font-size: 1.2rem;
    color: #059669;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 24px;
    position: relative;
}

.modal-card.wide-modal {
    max-width: 1060px;
    width: 96%;
    max-height: 92vh;
    padding: 24px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-card);
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-group h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--slate-400);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: var(--slate-900);
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-card);
}

@media (max-width: 680px) {
    .product-pricing-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .pricing-save-sticky-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pricing-save-sticky-bar button {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   ADMIN HEADER PRODUCTS DROPDOWN (ALL 10 PRODUCTS)
   ============================================================ */
.admin-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

.nav-chevron {
    font-size: 0.68rem;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}

.admin-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 530px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.14), 0 6px 12px -2px rgba(0, 0, 0, 0.05);
    z-index: 500;
    overflow: hidden;
    animation: fadeInDropdown 0.18s ease-out;
}

.admin-dropdown-menu.active {
    display: block;
}

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

.adm-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-card);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.adm-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.adm-header-title strong {
    font-size: 0.92rem;
    color: var(--slate-900);
    display: block;
    line-height: 1.2;
}

.adm-header-sub {
    font-size: 0.72rem;
    color: var(--slate-500);
    display: block;
}

.adm-all-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: #059669;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.adm-all-link:hover {
    text-decoration: underline;
}

.adm-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    max-height: 380px;
    overflow-y: auto;
}

.adm-product-card {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.adm-product-card:hover {
    background: #ecfdf5;
    border-color: #a7f3d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.1);
}

.adm-p-img {
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border: 1px solid var(--slate-200);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    flex-shrink: 0;
}

.adm-p-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.adm-p-details {
    flex: 1;
    min-width: 0;
}

.adm-p-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.adm-p-num {
    font-size: 0.65rem;
    background: #0f172a;
    color: #fff;
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 700;
}

.adm-p-name {
    font-size: 0.82rem;
    color: var(--slate-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.adm-p-cat {
    font-size: 0.68rem;
    color: var(--slate-500);
    display: block;
    line-height: 1.2;
}

.adm-p-pricing {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
}

.adm-p-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: #059669;
}

.adm-p-mrp {
    font-size: 0.68rem;
    color: var(--slate-400);
    text-decoration: line-through;
}

.adm-p-unit {
    font-size: 0.68rem;
    color: var(--slate-500);
    background: var(--slate-100);
    padding: 0 4px;
    border-radius: 3px;
}

.adm-p-edit-btn {
    background: none;
    border: none;
    color: var(--slate-400);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.adm-product-card:hover .adm-p-edit-btn {
    color: #059669;
}

.adm-footer {
    padding: 10px 14px;
    background: #f8fafc;
    border-top: 1px solid var(--border-card);
}

/* Distributor Shareable Link Banners (Header Dropdown & Modal) */
.adm-distributor-share-banner {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.adsb-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.adsb-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.adsb-url {
    font-size: 0.76rem;
    color: #92400e;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.adsb-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-adsb {
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-adsb.copy {
    background: #ffffff;
    color: #92400e;
    border-color: #fde68a;
}

.btn-adsb.copy:hover {
    background: #fef3c7;
    color: #78350f;
}

.btn-adsb.whatsapp {
    background: #25d366;
    color: #ffffff;
}

.btn-adsb.whatsapp:hover {
    background: #1eb857;
}

.btn-adsb.view {
    background: #ffffff;
    color: #b45309;
    border-color: #fde68a;
}

.btn-adsb.view:hover {
    background: #d97706;
    color: #ffffff;
}

/* Modal Distributor Share Banner */
.modal-distributor-share-banner {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.mdsb-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mdsb-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #b45309;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.mdsb-desc {
    font-size: 0.8rem;
    color: #78350f;
}

.mdsb-link {
    font-size: 0.82rem;
    color: #92400e;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #fde68a;
    display: inline-block;
    word-break: break-all;
}

.mdsb-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Admin Toast Notification */
.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    font-size: 0.84rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.admin-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.card-highlight-pulse {
    animation: pulseGlow 2.5s ease-out;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.4);
        border-color: #059669;
    }
    50% {
        box-shadow: 0 0 0 8px rgba(5, 150, 105, 0.2);
        border-color: #059669;
    }
    100% {
        box-shadow: none;
        border-color: var(--border-card);
    }
}

