/* ============================================================
   AKURE DELIGHT — Admin Panel Styles
   ============================================================ */

:root {
    --primary:   #e63946;
    --secondary: #f4a261;
    --dark:      #1d1d2c;
    --sidebar-w: 250px;
    --topbar-h:  60px;
    --radius:    12px;
    --shadow:    0 2px 16px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; }

body.admin-body {
    font-family: 'Poppins', sans-serif;
    background: #f0f2f5;
    margin: 0;
    color: #2d3748;
    overflow-x: hidden;
}

.fw-700 { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }

/* ── SIDEBAR ── */
.admin-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    overflow-y: auto;
    transition: transform .3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 700;
    font-size: .95rem;
    color: #fff;
    line-height: 1.2;
}

.brand-sub {
    font-size: .65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--secondary);
}

.sidebar-nav { flex: 1; padding: .75rem 0; }

.nav-section {
    padding: 1.1rem 1.25rem .4rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4a5568;
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.25rem;
    color: #a0aec0;
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all .18s;
    position: relative;
}

.admin-sidebar .nav-link i {
    font-size: 1rem;
    width: 20px;
    flex-shrink: 0;
}

.admin-sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.06);
    border-left-color: rgba(255,255,255,.2);
}

.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(230,57,70,.15);
    border-left-color: var(--primary);
}

.admin-sidebar .nav-link .badge {
    margin-left: auto;
    font-size: .65rem;
}

.sidebar-divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    margin: .5rem 1.25rem;
}

/* ── MAIN WRAPPER ── */
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .3s ease;
}

/* ── TOPBAR ── */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-h);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

/* ── CONTENT AREA ── */
.admin-content {
    flex: 1;
    padding: 1.5rem;
}

/* ── STAT CARDS ── */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-card.secondary { border-left-color: var(--secondary); }
.stat-card.success   { border-left-color: #38a169; }
.stat-card.info      { border-left-color: #3182ce; }
.stat-card.warning   { border-left-color: #d69e2e; }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon.primary  { background: rgba(230,57,70,.12);  color: var(--primary); }
.stat-icon.secondary{ background: rgba(244,162,97,.12); color: var(--secondary); }
.stat-icon.success  { background: rgba(56,161,105,.12); color: #38a169; }
.stat-icon.info     { background: rgba(49,130,206,.12); color: #3182ce; }
.stat-icon.warning  { background: rgba(214,158,46,.12); color: #d69e2e; }

.stat-num  { font-size: 1.8rem; font-weight: 800; line-height: 1; color: #2d3748; }
.stat-lbl  { font-size: .8rem;  color: #718096; margin-top: .2rem; }

/* ── CARDS ── */
.admin-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-card-header h6 {
    margin: 0;
    font-weight: 700;
    font-size: .95rem;
    color: #2d3748;
}

.admin-card-body { padding: 1.25rem; }

/* ── TABLES ── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.admin-table th {
    background: #f7fafc;
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #718096;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.admin-table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f0f4f8;
    vertical-align: middle;
    color: #4a5568;
}

.admin-table tbody tr:hover { background: #f7fafc; }
.admin-table tbody tr:last-child td { border-bottom: 0; }

/* ── ITEM IMAGE THUMB ── */
.item-thumb {
    width: 48px; height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #f0ebe3;
}

/* ── STATUS BADGES ── */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-preparing { background: #ede9fe; color: #5b21b6; }
.badge-ready     { background: #d1fae5; color: #065f46; }
.badge-delivered { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-paid      { background: #d1fae5; color: #065f46; }
.badge-failed    { background: #fee2e2; color: #991b1b; }
.badge-refunded  { background: #ede9fe; color: #5b21b6; }
.badge-active    { background: #d1fae5; color: #065f46; }
.badge-inactive  { background: #f1f5f9; color: #64748b; }

.btn-outline-purple {
    color: #5b21b6; border-color: #7c3aed;
    background: transparent;
}
.btn-outline-purple:hover {
    background: #7c3aed; color: #fff; border-color: #7c3aed;
}

/* ── FORMS ── */
.form-label { font-weight: 600; font-size: .85rem; color: #4a5568; margin-bottom: .4rem; }

.form-control, .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: .6rem .9rem;
    font-size: .875rem;
    font-family: inherit;
    color: #2d3748;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230,57,70,.1);
    outline: none;
}

.form-text { font-size: .78rem; color: #718096; }

/* ── BUTTONS ── */
.btn {
    font-family: inherit;
    font-weight: 600;
    border-radius: 10px;
    transition: all .18s;
}

.btn-primary   { background: var(--primary);   border-color: var(--primary);   color: #fff; }
.btn-primary:hover { background: #c1121f; border-color: #c1121f; color: #fff; }
.btn-secondary { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.btn-success   { background: #38a169; border-color: #38a169; color: #fff; }
.btn-danger    { background: #e53e3e; border-color: #e53e3e; color: #fff; }

.btn-outline-primary   { border: 1.5px solid var(--primary);   color: var(--primary);   background: transparent; }
.btn-outline-primary:hover { background: var(--primary);   color: #fff; }
.btn-outline-secondary { border: 1.5px solid #e2e8f0; color: #4a5568; background: #fff; }
.btn-outline-secondary:hover { background: #f7fafc; border-color: #cbd5e0; }
.btn-outline-danger    { border: 1.5px solid #e53e3e; color: #e53e3e; background: transparent; }
.btn-outline-danger:hover { background: #e53e3e; color: #fff; }

.btn-sm { padding: .35rem .75rem; font-size: .8rem; border-radius: 8px; }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }

/* ── MODALS ── */
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-header  { border-bottom: 1px solid #e2e8f0; padding: 1.25rem 1.5rem; }
.modal-footer  { border-top: 1px solid #e2e8f0; padding: 1rem 1.5rem; }
.modal-body    { padding: 1.5rem; }
.modal-title   { font-weight: 700; font-size: 1rem; }

/* ── IMAGE PREVIEW ── */
.img-preview-box {
    width: 100%; height: 160px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: #f7fafc;
    position: relative;
    cursor: pointer;
    transition: border-color .2s;
}
.img-preview-box:hover { border-color: var(--primary); }
.img-preview-box img { width:100%; height:100%; object-fit:cover; display:none; }
.img-preview-box .placeholder { text-align:center; color:#a0aec0; pointer-events:none; }
.img-preview-box .placeholder i { font-size:2.5rem; display:block; margin-bottom:.5rem; }

/* ── COLOR PICKER WRAPPER ── */
.color-field {
    display: flex;
    align-items: center;
    gap: .75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: .45rem .9rem;
    background: #fff;
}
.color-field input[type="color"] {
    width: 36px; height: 36px;
    border: 0; background: none; padding: 0;
    cursor: pointer; border-radius: 6px;
}
.color-field input[type="text"] {
    border: 0; outline: 0; flex: 1;
    font-size: .875rem; font-family: inherit;
    color: #2d3748;
}

/* ── SETTINGS TABS ── */
.settings-tabs .nav-link {
    color: #718096;
    font-weight: 600;
    font-size: .875rem;
    padding: .6rem 1.2rem;
    border-radius: 10px;
    border: 0;
    transition: all .18s;
}
.settings-tabs .nav-link.active,
.settings-tabs .nav-link:hover {
    background: var(--primary);
    color: #fff;
}

/* ── TOGGLE SWITCH ── */
.form-switch .form-check-input {
    width: 2.4em;
    cursor: pointer;
}
.form-switch .form-check-input:checked {
    background-color: #38a169;
    border-color: #38a169;
}

/* ── CHART PLACEHOLDER ── */
.mini-chart {
    height: 60px;
    background: linear-gradient(180deg, rgba(230,57,70,.08) 0%, rgba(230,57,70,0) 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* ── SEARCH BOX ── */
.search-box {
    position: relative;
}
.search-box input {
    padding-left: 2.4rem;
    border-radius: 50px !important;
}
.search-box i {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: .9rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 1039;
    }
    .sidebar-overlay.show { display: block; }
}

@media (max-width: 576px) {
    .admin-content { padding: 1rem; }
    .stat-card { padding: 1rem; }
    .stat-num { font-size: 1.5rem; }
}

/* ── UTILITIES ── */
.text-primary { color: var(--primary) !important; }
.bg-primary   { background: var(--primary) !important; }
.cursor-pointer { cursor: pointer; }
.empty-state { text-align:center; padding:3rem 1rem; color:#a0aec0; }
.empty-state i { font-size:3.5rem; display:block; margin-bottom:1rem; }

/* Scrollbar */
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
