/* ============================================================
   THE UK PANTRY — MAIN STYLES
   ============================================================ */

/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    --navy: #1A2A3A;
    --red: #8B1A2B;
    --red-light: #A8283C;
    --gold: #C5A05E;
    --gold-light: #E8D5A3;
    --cream: #F8F6F0;
    --charcoal: #2C2C2C;
    --slate: #5A6A7A;
    --stone: #D4CFC5;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(26, 42, 58, 0.06);
    --shadow-md: 0 8px 32px rgba(26, 42, 58, 0.10);
    --shadow-lg: 0 16px 48px rgba(26, 42, 58, 0.14);
    --radius: 4px;
    --radius-lg: 8px;
    --transition: all 0.25s ease;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --success: #2E7D5E;
    --warning: #C87A3A;
    --info: #3A6B8C;
}

/* ============================================================
   ADMIN STYLES
   ============================================================ */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius);
    border: 1px solid #E8E3D8;
    border-left: 4px solid var(--red);
    transition: var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow-sm);
}
.stat-card .number {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--navy);
}
.stat-card .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate);
    font-family: var(--font-sans);
}
.stat-card .sub {
    font-size: 0.75rem;
    color: var(--red);
    font-weight: 600;
    font-family: var(--font-sans);
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid #E8E3D8;
    padding-bottom: 0;
    flex-wrap: wrap;
}
.admin-tabs button {
    padding: 10px 24px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--slate);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    font-family: var(--font-sans);
    cursor: pointer;
    background: transparent;
}
.admin-tabs button:hover {
    color: var(--navy);
}
.admin-tabs button.active {
    color: var(--red);
    border-bottom-color: var(--red);
}

.admin-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}
.admin-panel.active {
    display: block;
}

/* Customer Search */
.customer-search {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--cream);
    border-radius: var(--radius);
    border: 1px solid #E8E3D8;
}
.customer-search input {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px;
    border: 1px solid #D4CFC5;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    transition: var(--transition);
    background: var(--white);
}
.customer-search input:focus {
    border-color: var(--red);
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 26, 43, 0.12);
}
.customer-search .search-hint {
    font-size: 0.75rem;
    color: var(--slate);
    font-family: var(--font-sans);
}
.customer-search .search-hint strong {
    color: var(--navy);
}
.customer-search .clear-btn {
    color: var(--slate);
    padding: 4px 12px;
    font-size: 0.8rem;
    transition: var(--transition);
}
.customer-search .clear-btn:hover {
    color: var(--red);
}

/* Status Dropdown */
.status-dropdown {
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border: 1.5px solid #D4CFC5;
    background: var(--white);
    color: var(--charcoal);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235A6A7A'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    min-width: 110px;
}
.status-dropdown:hover {
    border-color: var(--red);
}
.status-dropdown:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(139, 26, 43, 0.12);
}
.status-dropdown.status-pending {
    border-color: #FFB74D;
    background-color: #FFF3E0;
    color: #E65100;
}
.status-dropdown.status-packing {
    border-color: #64B5F6;
    background-color: #E3F2FD;
    color: #0D47A1;
}
.status-dropdown.status-shipping {
    border-color: #81C784;
    background-color: #E8F5E9;
    color: #1B5E20;
}
.status-dropdown.status-delivered {
    border-color: #AB47BC;
    background-color: #F3E5F5;
    color: #4A148C;
}

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

@media (max-width: 640px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .customer-search {
        flex-direction: column;
        align-items: stretch;
    }
    .customer-search input {
        min-width: auto;
    }
}