/* ==========================================================================
   NatureWell - Admin Panel Stylesheet (Dashboard & Login)
   Pure CSS - Ultra Responsive from Smartwatch (280px) to 8K Displays
   ========================================================================== */

:root {
    --admin-sidebar-bg: #092116;
    --admin-sidebar-active: #147a46;
    --admin-sidebar-text: #94a3b8;
    --admin-sidebar-hover: #103322;
    --admin-bg: #f4f7f5;
    --admin-card-bg: #ffffff;
    --admin-text-main: #102219;
    --admin-text-sub: #64748b;
    --admin-border: #e2e8f0;

    --status-processing-bg: #fef3c7;
    --status-processing-text: #d97706;
    --status-shipped-bg: #dcfce7;
    --status-shipped-text: #15803d;
    --status-delivered-bg: #e0f2fe;
    --status-delivered-text: #0284c7;
    --status-cancelled-bg: #fee2e2;
    --status-cancelled-text: #dc2626;
}

/* ==========================================================================
   Admin Login Page Layout (1:1 with admin login.png)
   ========================================================================== */
.admin-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #092216 url('../images/login background.png') center/cover no-repeat;
    position: relative;
    padding: clamp(1rem, 0.8rem + 1.5vw, 2.5rem);
}

.admin-login-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8, 28, 18, 0.85) 0%, rgba(9, 34, 22, 0.45) 50%, rgba(8, 28, 18, 0.82) 100%);
    backdrop-filter: blur(2px);
}

.admin-login-wrapper {
    position: relative;
    z-index: 10;
    width: min(96vw, 1320px);
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: clamp(1.5rem, 1rem + 2vw, 4rem);
    align-items: center;
}

/* Left Brand Showcase */
.login-brand-side {
    display: flex;
    flex-direction: column;
    gap: clamp(1.2rem, 0.8rem + 1.2vw, 2.5rem);
    color: #ffffff;
}

.login-brand-logo {
    max-width: clamp(240px, 180px + 10vw, 420px);
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.35));
}

.login-brand-hero {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.login-brand-hero h1 {
    font-size: clamp(1.8rem, 1.4rem + 2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.login-brand-hero .sub {
    font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.35rem);
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.login-brand-hero .sub::before,
.login-brand-hero .sub::after {
    content: '';
    display: inline-block;
    height: 1.5px;
    width: clamp(25px, 20px + 1vw, 55px);
    background: rgba(255, 255, 255, 0.4);
}

.login-trust-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(0.5rem, 0.3rem + 0.4vw, 1rem);
    padding-top: clamp(1rem, 0.8rem + 0.8vw, 1.8rem);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: clamp(0.7rem, 0.62rem + 0.25vw, 0.88rem);
    color: rgba(255, 255, 255, 0.9);
}

.trust-badge-item svg {
    width: clamp(14px, 12px + 0.3vw, 18px);
    height: clamp(14px, 12px + 0.3vw, 18px);
    fill: var(--gold-light);
    flex-shrink: 0;
}

/* Right Elevated Form Card */
.login-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-radius: clamp(16px, 12px + 1vw, 28px);
    padding: clamp(1.5rem, 1.2rem + 1.8vw, 3.2rem);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 0.65rem + 0.8vw, 1.4rem);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-card-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
}

.login-card-logo {
    height: clamp(38px, 32px + 1vw, 56px);
    width: auto;
    object-fit: contain;
    margin-bottom: 0.2rem;
}

.login-card-head h2 {
    font-size: clamp(1.3rem, 1.15rem + 0.8vw, 2rem);
    font-weight: 700;
    color: var(--admin-text-main);
}

.login-card-head p {
    font-size: var(--font-sm);
    color: var(--admin-text-sub);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 1rem;
    width: 18px;
    height: 18px;
    color: var(--admin-text-sub);
    pointer-events: none;
}

.admin-input {
    width: 100%;
    background: #f8faf9;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: clamp(0.65rem, 0.5rem + 0.4vw, 0.95rem) 1rem;
    padding-left: 2.8rem;
    font-size: var(--font-sm);
    color: var(--admin-text-main);
    transition: all var(--transition-fast);
}

.admin-input:focus {
    background: #ffffff;
    border-color: #15803d;
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

.password-toggle-btn {
    position: absolute;
    right: 0.9rem;
    color: var(--admin-text-sub);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: var(--admin-text-main);
}

.login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-xs);
    color: var(--admin-text-sub);
}

.remember-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.forgot-link {
    color: #15803d;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-admin-login {
    background: #11603c;
    color: #ffffff;
    font-size: var(--font-sm);
    font-weight: 600;
    padding: clamp(0.7rem, 0.55rem + 0.5vw, 1rem);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(17, 96, 60, 0.3);
    transition: all var(--transition-fast);
}

.btn-admin-login:hover {
    background: #0d4d30;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(17, 96, 60, 0.4);
}

.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    gap: 0.75rem;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}

.security-box {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    border-radius: var(--radius-sm);
    padding: clamp(0.6rem, 0.45rem + 0.3vw, 0.85rem) 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: var(--font-xs);
    color: #065f46;
}

.security-box svg {
    width: 18px;
    height: 18px;
    fill: #10b981;
    flex-shrink: 0;
    margin-top: 1px;
}

.login-version-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ==========================================================================
   Admin Dashboard Layout (1:1 with admin dashboard.png)
   ========================================================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--admin-bg);
}

/* Dark Green Sidebar */
.admin-sidebar {
    width: clamp(230px, 190px + 4vw, 290px);
    background: var(--admin-sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform var(--transition-base), width var(--transition-base);
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    padding: clamp(1rem, 0.8rem + 0.5vw, 1.4rem);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-brand-img {
    height: clamp(34px, 28px + 0.6vw, 46px);
    width: auto;
    object-fit: contain;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-group-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    padding: 0 0.75rem;
    margin-bottom: 0.4rem;
}

.sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--admin-sidebar-text);
    font-size: var(--font-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar-nav-item:hover {
    background: var(--admin-sidebar-hover);
    color: #fff;
}

.sidebar-nav-item.active {
    background: var(--admin-sidebar-active);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(20, 122, 70, 0.35);
}

.sidebar-item-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.sidebar-item-left svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.sidebar-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    padding: 1rem 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sidebar-footer-leaf {
    width: 26px;
    height: 26px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
}

/* Main Admin Workspace */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex overflow */
}

/* Top Admin Header */
.admin-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
    padding: clamp(0.6rem, 0.45rem + 0.4vw, 0.95rem) clamp(1rem, 0.8rem + 1vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.admin-sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: var(--bg-muted);
    align-items: center;
    justify-content: center;
    color: var(--admin-text-main);
}

.admin-search-wrap {
    position: relative;
    width: min(100%, 460px);
}

.admin-search-input {
    width: 100%;
    background: #f8faf9;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem 0.5rem 2.4rem;
    font-size: var(--font-sm);
    color: var(--admin-text-main);
}

.admin-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--admin-text-sub);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 0.4rem + 0.5vw, 1.25rem);
}

.admin-notify-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: #f1f5f3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-text-main);
}

.admin-notify-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.admin-user-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #147a46;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
}

.admin-user-name {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--admin-text-main);
    line-height: 1.2;
}

.admin-user-role {
    font-size: 0.72rem;
    color: var(--admin-text-sub);
}

/* Dashboard Content Wrapper */
.dashboard-container {
    padding: clamp(1rem, 0.8rem + 1vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 0.8rem + 1vw, 1.8rem);
}

/* Greeting & Date Filter Bar */
.dashboard-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-heading h2 {
    font-size: var(--font-xl);
    font-weight: 700;
    color: var(--admin-text-main);
}

.dashboard-heading p {
    font-size: var(--font-sm);
    color: var(--admin-text-sub);
}

.date-range-badge {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.9rem;
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--admin-text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: var(--shadow-sm);
}

/* 4 KPI Stat Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(170px, 140px + 6vw, 260px), 1fr));
    gap: clamp(0.75rem, 0.5rem + 0.6vw, 1.35rem);
}

.kpi-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    padding: clamp(0.9rem, 0.7rem + 0.6vw, 1.4rem);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.kpi-icon-wrap {
    width: clamp(42px, 36px + 0.8vw, 54px);
    height: clamp(42px, 36px + 0.8vw, 54px);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

.kpi-icon-orders { background: #16a34a; }
.kpi-icon-sales { background: #0284c7; }
.kpi-icon-customers { background: #9333ea; }
.kpi-icon-products { background: #ea580c; }

.kpi-icon-wrap svg {
    width: clamp(20px, 18px + 0.4vw, 26px);
    height: clamp(20px, 18px + 0.4vw, 26px);
    fill: currentColor;
}

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

.kpi-label {
    font-size: var(--font-xs);
    color: var(--admin-text-sub);
    font-weight: 500;
}

.kpi-value {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--admin-text-main);
    line-height: 1.2;
}

.kpi-trend {
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-up { color: #16a34a; }
.trend-down { color: #dc2626; }

/* Dashboard Mid Layout (Overview + Right Sidebar Panel) */
.dashboard-mid-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: clamp(1rem, 0.8rem + 1vw, 1.8rem);
}

.card-box {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: clamp(0.9rem, 0.75rem + 0.7vw, 1.4rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-box-title {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--admin-text-main);
}

.card-box-subtitle {
    font-size: var(--font-xs);
    color: var(--admin-text-sub);
}

/* Canvas / SVG Sales Chart */
.chart-container {
    position: relative;
    width: 100%;
    height: clamp(190px, 160px + 6vw, 280px);
}

.chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Top Products Table / List */
.top-products-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.top-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-sm);
    background: #f8faf9;
    gap: 0.6rem;
}

.top-product-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.top-prod-rank {
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--admin-text-sub);
    width: 18px;
}

.top-prod-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-light);
    padding: 2px;
}

.top-prod-details h5 {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--admin-text-main);
    line-height: 1.25;
}

.top-prod-details span {
    font-size: 0.72rem;
    color: #15803d;
    font-weight: 700;
}

.top-prod-sold {
    font-size: var(--font-xs);
    color: var(--admin-text-sub);
    font-weight: 500;
}

/* Quick Actions 2x2 Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}

.quick-action-btn {
    background: #f8faf9;
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-sm);
    padding: clamp(0.6rem, 0.5rem + 0.3vw, 0.9rem);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--admin-text-main);
    transition: all var(--transition-fast);
}

.quick-action-btn:hover {
    background: #ffffff;
    border-color: #15803d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.qa-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qa-add { background: #dcfce7; color: #15803d; }
.qa-orders { background: #e0f2fe; color: #0284c7; }
.qa-users { background: #f3e8ff; color: #9333ea; }
.qa-reports { background: #ffedd5; color: #ea580c; }

/* Payment Configuration Card (PayMaya) */
.payment-config-box {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.payment-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.paymaya-logo-img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.badge-active-pill {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
}

.pay-input-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--admin-text-sub);
    margin-bottom: 0.2rem;
}

.pay-input-small {
    width: 100%;
    background: #f8faf9;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    color: var(--admin-text-main);
}

.payment-toggles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--admin-text-main);
}

/* Custom Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: 0.2s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #16a34a;
}

input:checked + .slider:before {
    transform: translateX(14px);
}

.system-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--admin-text-sub);
    margin-top: 0.4rem;
    border-top: 1px solid var(--border-light);
    padding-top: 0.6rem;
}

.status-dot-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

/* Bottom Grid (Orders Table & Category Distribution) */
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(1rem, 0.8rem + 1vw, 1.8rem);
}

/* Data Table */
.data-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-xs);
    text-align: left;
}

.admin-table th {
    padding: 0.65rem 0.75rem;
    background: #f8faf9;
    color: var(--admin-text-sub);
    font-weight: 600;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text-main);
}

.status-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.68rem;
}

.status-Completed, .status-completed { background: #dcfce7; color: #15803d; }
.status-Processing, .status-processing { background: var(--status-processing-bg); color: var(--status-processing-text); }
.status-Pending, .status-pending { background: #fef3c7; color: #b45309; }
.status-Shipped, .status-shipped { background: var(--status-shipped-bg); color: var(--status-shipped-text); }
.status-Delivered, .status-delivered { background: var(--status-delivered-bg); color: var(--status-delivered-text); }
.status-Cancelled, .status-cancelled { background: var(--status-cancelled-bg); color: var(--status-cancelled-text); }
.status-Failed, .status-failed { background: var(--status-cancelled-bg); color: var(--status-cancelled-text); }

.btn-table-action {
    background: #f1f5f3;
    color: #147a46;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-xs);
}

.btn-table-action:hover {
    background: #147a46;
    color: #fff;
}

/* Performance Metrics 2x2 */
.performance-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.perf-box {
    background: #f8faf9;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.perf-box h6 {
    font-size: 0.7rem;
    color: var(--admin-text-sub);
}

.perf-box .val {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--admin-text-main);
}

/* Top Categories Progress Bars */
.category-bars-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cat-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cat-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-xs);
    font-weight: 600;
}

.bar-track {
    width: 100%;
    height: 7px;
    background: #f1f5f3;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.fill-barley { background: #16a34a; }
.fill-supplements { background: #0284c7; }
.fill-skincare { background: #9333ea; }
.fill-coffee { background: #ea580c; }
.fill-personal { background: #64748b; }
.fill-others { background: #94a3b8; }

/* ==========================================================================
   Responsive Architecture: Smartwatch (280px) to 8K Ultra-Displays (7680px)
   ========================================================================== */

/* 4K, 8K Smart TV & Projector Scaling */
@media (min-width: 2160px) {
    :root {
        font-size: 18px;
    }
    .admin-main {
        max-width: 2600px;
        margin: 0 auto;
    }
}

@media (min-width: 3840px) {
    :root {
        font-size: 24px;
    }
    .admin-main {
        max-width: 4400px;
        margin: 0 auto;
    }
}

@media (min-width: 7680px) {
    :root {
        font-size: 34px;
    }
    .admin-main {
        max-width: 7800px;
        margin: 0 auto;
    }
}

/* Standard Laptops & Desktops */
@media (max-width: 1200px) {
    .dashboard-mid-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
    .performance-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (iPad, Galaxy Tab) */
@media (max-width: 900px) {
    .admin-login-wrapper {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
    .login-brand-side {
        display: none;
    }
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
        z-index: 999;
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-sidebar-toggle {
        display: flex;
    }
}

/* Mobile Phones (iPhone, Android - <= 640px) */
@media (max-width: 640px) {
    .dashboard-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .admin-form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .admin-modal {
        max-width: 96vw;
        border-radius: 12px;
    }
    .admin-modal-header {
        padding: 0.85rem 1rem;
    }
    .admin-modal-body {
        padding: 1rem;
        gap: 0.85rem;
    }
    .admin-modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    .admin-modal-footer button {
        width: 100%;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .performance-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Small Mobile Phones (<= 420px) */
@media (max-width: 420px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .admin-topbar {
        padding: 0.5rem 0.75rem;
    }
    .dashboard-container {
        padding: 0.75rem 0.5rem;
    }
    .admin-search-wrap {
        display: none;
    }
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    .performance-metrics-grid {
        grid-template-columns: 1fr;
    }
    .admin-user-info {
        display: none;
    }
}

/* Smartwatch Screens (Apple Watch, Galaxy Watch <= 320px and down to 280px) */
@media (max-width: 320px) {
    :root {
        font-size: 12px;
    }
    .admin-layout {
        overflow-x: hidden;
    }
    .admin-modal-backdrop {
        padding: 0.25rem;
    }
    .admin-modal {
        max-width: 98vw;
        max-height: 96vh;
        border-radius: 8px;
    }
    .admin-modal-header h3 {
        font-size: 0.9rem;
    }
    .admin-preset-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .data-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-table {
        min-width: 320px;
        font-size: 0.72rem;
    }
    .admin-table th, .admin-table td {
        padding: 0.35rem 0.45rem;
    }
    .stock-stepper button {
        padding: 0.15rem 0.35rem;
        font-size: 0.75rem;
    }
    .stock-stepper span {
        padding: 0.15rem 0.35rem;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   Admin Modals, Dynamic Drawers & Real-Time Alerts
   ========================================================================== */
.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(9, 33, 22, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 2vw, 2rem);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.admin-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.admin-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px -10px rgba(9, 33, 22, 0.35);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal form {
    display: flex;
    flex-direction: column;
    max-height: calc(90vh - 65px);
    overflow: hidden;
    flex: 1;
}

.admin-modal-backdrop.active .admin-modal {
    transform: scale(1);
}

.admin-modal-lg {
    max-width: 880px;
}

.admin-modal-header {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafcfb;
    flex-shrink: 0;
}

.admin-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #102219;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    transition: all 0.2s ease;
}

.admin-modal-close:hover {
    color: #dc2626;
    background: #fee2e2;
}

.admin-modal-body {
    padding: 1.4rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.admin-modal-footer {
    padding: 1rem 1.4rem;
    border-top: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #fafcfb;
    flex-shrink: 0;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.admin-form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.admin-form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.admin-form-control:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.admin-img-preview-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-img-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.admin-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.admin-preset-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px;
    background: #ffffff;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-preset-item.selected,
.admin-preset-item:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}

.admin-preset-item img {
    width: 100%;
    height: 48px;
    object-fit: contain;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-danger {
    background: #ef4444;
    border: 1px solid #dc2626;
    color: #ffffff;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

.stock-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.stock-stepper button {
    border: none;
    background: #f8fafc;
    color: #334155;
    padding: 0.25rem 0.55rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s;
}

.stock-stepper button:hover {
    background: #e2e8f0;
}

.stock-stepper span {
    padding: 0.25rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
}

/* Toast Notifications */
.admin-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-toast {
    background: #092116;
    color: #ffffff;
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    font-size: 0.88rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInToast 0.3s ease-out;
    border-left: 4px solid #16a34a;
}

@keyframes slideInToast {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Real-time Indicator pulse */
.live-pulse {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
