/* ═══════════════════════════════════════════════════════════════
   HOUSE OF VIYARA — ADMIN PANEL STYLES (Brutalist Theme)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary-color: #000000;
    --bg-color: #f4f4f4;
    --card-bg: #ffffff;
    --accent-yellow: #FFD100;
    --accent-blue: #00E0FF;
    --accent-pink: #FF007A;
    --accent-green: #00FF94;
    --shadow-color: #000000;
    --text-color: #000000;
    --brutal-border: 4px solid #000000;
    --brutal-shadow: 6px 6px 0px #000000;
    --sidebar-width: 260px;
    --topbar-h: 70px;
}

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

body.admin-page, body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    font-size: 15px;
    font-weight: 600;
}

/* ── Login ── */
.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-card {
    background: var(--card-bg);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}

.admin-login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.admin-login-logo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background: var(--accent-yellow);
    border: var(--brutal-border);
    box-shadow: 4px 4px 0px #000;
    font-weight: 900;
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 12px;
}

.admin-login-logo p {
    color: #666;
    font-size: 0.9rem;
    font-weight: 700;
}

.admin-login-card h2 {
    font-size: 1.8rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.admin-login-sub {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95rem;
    font-weight: 600;
}

.afield { margin-bottom: 20px; }
.afield label { 
    display: block; 
    font-weight: 800; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 0.08em; 
    color: #000; 
    margin-bottom: 8px; 
}
.afield input {
    width: 100%;
    background: var(--bg-color);
    border: var(--brutal-border);
    padding: 14px 16px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    transition: all 0.1s;
}
.afield input:focus { 
    background: var(--accent-yellow);
    box-shadow: 4px 4px 0px #000;
}

.admin-login-hint { text-align: center; margin-top: 25px; }
.admin-login-hint a { color: #666; text-decoration: none; font-size: 0.85rem; font-weight: 700; }
.admin-login-hint a:hover { color: var(--accent-pink); }

/* ── Shell Layout ── */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--card-bg);
    border-right: var(--brutal-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.admin-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: var(--brutal-border);
}

.sidebar-logo-icon {
    width: 48px; height: 48px;
    background: var(--accent-yellow);
    border: 3px solid #000;
    box-shadow: 3px 3px 0px #000;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 0.9rem; color: #000; flex-shrink: 0;
}

.sidebar-logo-text strong { display: block; font-size: 0.95rem; font-weight: 900; text-transform: uppercase; }
.sidebar-logo-text span { font-size: 0.75rem; color: #666; font-weight: 700; }

.admin-nav { flex: 1; padding: 20px 16px; display: flex; flex-direction: column; gap: 8px; }

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 0;
    color: #000;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.1s;
    text-decoration: none;
    border: 3px solid transparent;
    background: transparent;
    width: 100%;
    text-align: left;
    text-transform: uppercase;
}

.admin-nav-item:hover { background: var(--accent-blue); border-color: #000; transform: translate(-2px, -2px); box-shadow: 4px 4px 0px #000; }
.admin-nav-item.active { background: var(--accent-yellow); border-color: #000; box-shadow: 4px 4px 0px #000; font-weight: 900; }
.admin-nav-item i { width: 20px; text-align: center; font-size: 1.1rem; }

.admin-sidebar-footer {
    padding: 20px 16px;
    border-top: var(--brutal-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 0;
    color: #000;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.1s;
    text-decoration: none;
    border: 3px solid transparent;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
    text-transform: uppercase;
}
.sidebar-footer-link:hover { background: var(--accent-pink); color: #fff; border-color: #000; transform: translate(-2px, -2px); box-shadow: 4px 4px 0px #000; }

/* ── Main Area ── */
.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    height: var(--topbar-h);
    background: var(--card-bg);
    border-bottom: var(--brutal-border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 30px;
    position: sticky; top: 0; z-index: 50;
}

.admin-sidebar-toggle {
    display: none;
    background: var(--accent-yellow); 
    border: 3px solid #000; 
    color: #000;
    font-size: 1.1rem; 
    cursor: pointer; 
    padding: 8px 12px;
    font-weight: 900;
    box-shadow: 3px 3px 0px #000;
}
.admin-sidebar-toggle:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0px #000; }
.admin-sidebar-toggle:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #000; }

.admin-topbar-title {
    font-weight: 900;
    font-size: 1.3rem;
    flex: 1;
    text-transform: uppercase;
}

.admin-topbar-actions { display: flex; gap: 12px; align-items: center; }

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* ── Buttons ── */
.admin-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px;
    border-radius: 0;
    font-family: inherit; font-weight: 900; font-size: 0.85rem;
    cursor: pointer; border: 3px solid #000; 
    transition: all 0.1s; white-space: nowrap;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px #000;
}
.admin-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px #000; }
.admin-btn:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #000; }
.admin-btn-primary { background: var(--accent-yellow); color: #000; }
.admin-btn-danger { background: var(--accent-pink); color: #fff; }
.admin-btn-ghost { background: var(--card-bg); color: #000; }
.admin-btn-success { background: var(--accent-green); color: #000; }
.admin-btn-warning { background: var(--accent-yellow); color: #000; }
.admin-btn-fire { background: #FF6B35; color: #fff; }
.admin-btn-outline-fire { background: #fff; color: #FF6B35; border-color: #FF6B35; }
.admin-btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.active-fire { background: #FF6B35 !important; color: #fff !important; border-color: #000 !important; }

/* ── Dashboard Stats ── */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    padding: 24px;
    display: flex; align-items: center; gap: 18px;
    transition: all 0.1s;
}
.stat-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0px #000; }

.stat-icon {
    width: 56px; height: 56px;
    border: 3px solid #000;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
    font-weight: 900;
}
.stat-green .stat-icon { background: var(--accent-green); }
.stat-blue .stat-icon  { background: var(--accent-blue); }
.stat-yellow .stat-icon{ background: var(--accent-yellow); }
.stat-purple .stat-icon{ background: #a855f7; color: #fff; }
.stat-pink .stat-icon  { background: var(--accent-pink); color: #fff; }

.stat-value { font-size: 1.8rem; font-weight: 900; }
.stat-label { color: #666; font-size: 0.8rem; font-weight: 700; margin-top: 4px; text-transform: uppercase; }

/* ── Quick Actions ── */
.admin-quick-actions { margin-bottom: 32px; }
.admin-quick-actions h3 { font-weight: 900; margin-bottom: 16px; font-size: 1rem; text-transform: uppercase; }
.quick-action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.quick-action-btn {
    background: var(--card-bg); border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    padding: 18px; cursor: pointer;
    color: #000; font-family: inherit; font-weight: 900; font-size: 0.85rem;
    display: flex; align-items: center; gap: 12px; transition: all 0.1s;
    text-transform: uppercase;
}
.quick-action-btn:hover { background: var(--accent-yellow); transform: translate(-2px, -2px); box-shadow: 8px 8px 0px #000; }
.quick-action-btn i { font-size: 1.1rem; }

/* ── Section Card ── */
.admin-section-card {
    background: var(--card-bg);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    overflow: hidden;
    margin-bottom: 28px;
}

.admin-section-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: var(--brutal-border);
    background: var(--accent-blue);
}
.admin-section-card-header h3 { font-weight: 900; font-size: 1rem; text-transform: uppercase; }
.admin-section-hint { padding: 14px 24px; color: #666; font-size: 0.9rem; border-bottom: var(--brutal-border); background: #fafafa; }

/* ── Table ── */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table thead { background: var(--bg-color); border-bottom: var(--brutal-border); }
.admin-table th { padding: 14px 18px; text-align: left; font-size: 0.75rem; font-weight: 900; color: #000; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; border-bottom: var(--brutal-border); }
.admin-table td { padding: 16px 18px; border-top: 3px solid #eee; vertical-align: middle; font-weight: 600; }
.admin-table tbody tr:hover { background: #fffde7; }
.admin-empty { text-align: center; color: #666; padding: 50px !important; font-weight: 700; }

.status-badge, .payment-badge {
    display: inline-block;
    padding: 6px 12px;
    border: 3px solid #000;
    font-size: 0.75rem; font-weight: 900;
    text-transform: uppercase;
}
.status-pending   { background: var(--accent-yellow); }
.status-confirmed { background: var(--accent-green); }
.status-shipped   { background: var(--accent-blue); }
.status-delivered { background: var(--accent-green); }
.status-cancelled { background: var(--accent-pink); color: #fff; }
.payment-paid     { background: var(--accent-green); }
.payment-unpaid   { background: var(--accent-pink); color: #fff; }

.order-id-cell { font-size: 0.8rem; font-family: monospace; color: #000; font-weight: 900; }
.slug-badge { background: var(--accent-blue); border: 3px solid #000; padding: 4px 10px; font-size: 0.8rem; font-weight: 800; }
.order-badge { background: var(--card-bg); border: 3px solid #000; padding: 4px 10px; font-size: 0.8rem; font-weight: 900; }
.order-items-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.order-item-pill { background: var(--bg-color); border: 2px solid #000; padding: 3px 8px; border-radius: 0; font-size: 0.72rem; font-weight: 700; }
.order-item-more { color: #666; font-size: 0.72rem; font-weight: 700; }

.table-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.admin-status-select {
    background: var(--card-bg);
    border: 3px solid #000;
    color: #000;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    outline: none;
}
.admin-status-select:focus { background: var(--accent-yellow); }

/* ── Filter Bar ── */
.admin-filter-bar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px;
    margin-bottom: 24px;
}
.admin-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tab {
    padding: 10px 16px;
    background: var(--card-bg);
    border: 3px solid #000;
    color: #000;
    font-family: inherit; font-size: 0.82rem; font-weight: 800;
    cursor: pointer; transition: all 0.1s;
    text-transform: uppercase;
    box-shadow: 3px 3px 0px #000;
}
.filter-tab:hover { background: var(--accent-blue); transform: translate(-1px, -1px); box-shadow: 4px 4px 0px #000; }
.filter-tab.active { background: var(--accent-yellow); font-weight: 900; }

.admin-search-input {
    background: var(--card-bg);
    border: var(--brutal-border);
    padding: 12px 18px;
    color: #000;
    font-family: inherit; font-size: 0.95rem; font-weight: 700;
    width: 260px; transition: all 0.1s;
    outline: none;
}
.admin-search-input:focus { background: var(--accent-yellow); box-shadow: 4px 4px 0px #000; }

/* ── Products Grid ── */
.admin-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.admin-product-card {
    background: var(--card-bg);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    overflow: hidden;
    transition: all 0.1s;
}
.admin-product-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0px #000; }

.apc-img-wrap { position: relative; height: 200px; overflow: hidden; border-bottom: var(--brutal-border); }
.apc-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.admin-product-card:hover .apc-img-wrap img { transform: scale(1.05); }

.apc-trending-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--accent-pink); color: #fff;
    padding: 6px 14px; border: 3px solid #000;
    font-size: 0.75rem; font-weight: 900; text-transform: uppercase;
    box-shadow: 3px 3px 0px #000;
}

.apc-body { padding: 18px; }
.apc-cat { font-size: 0.75rem; font-weight: 900; color: #666; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.apc-name { font-weight: 900; font-size: 1rem; margin-bottom: 10px; line-height: 1.3; }
.apc-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.apc-offer { font-weight: 900; font-size: 1.2rem; color: var(--accent-pink); }
.apc-original { text-decoration: line-through; color: #666; font-size: 0.9rem; font-weight: 700; }
.apc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Banners Grid ── */
.admin-banners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 22px;
    padding: 24px;
}

.admin-banner-card {
    background: var(--card-bg);
    border: var(--brutal-border);
    box-shadow: var(--brutal-shadow);
    overflow: hidden;
    transition: all 0.1s;
}
.admin-banner-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0px #000; }
.banner-inactive { opacity: 0.7; }

.abc-img-wrap { position: relative; height: 180px; overflow: hidden; border-bottom: var(--brutal-border); }
.abc-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.abc-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    padding: 16px;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.abc-title { font-weight: 900; font-size: 1.1rem; color: #fff; text-transform: uppercase; }
.abc-sub { font-size: 0.85rem; color: rgba(255,255,255,0.9); margin-top: 4px; font-weight: 600; }
.abc-cta {
    display: inline-block; margin-top: 10px;
    background: var(--accent-yellow); color: #000; border: 3px solid #000;
    padding: 4px 12px; font-size: 0.75rem; font-weight: 900; text-transform: uppercase;
}
.abc-status-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 6px 14px; border: 3px solid #000; font-size: 0.75rem; font-weight: 900; text-transform: uppercase;
    box-shadow: 3px 3px 0px #000;
}
.badge-active { background: var(--accent-green); }
.badge-inactive { background: var(--accent-pink); color: #fff; }
.abc-meta { display: flex; justify-content: space-between; padding: 12px 18px 8px; font-size: 0.8rem; color: #666; font-weight: 700; }
.abc-actions { display: flex; gap: 8px; padding: 0 18px 18px; flex-wrap: wrap; }

/* ── Modal ── */
.admin-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); z-index: 200;
}
.admin-modal-overlay.open { display: block; }

.admin-modal {
    display: none; position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--card-bg); border: var(--brutal-border);
    z-index: 201; width: 90%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 12px 12px 0px #000;
    transition: transform 0.1s, opacity 0.1s;
    opacity: 0;
}
.admin-modal.open { display: block; transform: translate(-50%, -50%) scale(1); opacity: 1; }
.admin-modal-body { padding: 34px; }
.admin-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: var(--accent-pink); border: 3px solid #000;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #fff; transition: all 0.1s;
    font-weight: 900; font-size: 1.2rem;
    box-shadow: 3px 3px 0px #000;
}
.admin-modal-close:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0px #000; }
.admin-modal-body h3 { font-size: 1.4rem; font-weight: 900; margin-bottom: 26px; text-transform: uppercase; }

/* ── Form ── */
.admin-form { display: flex; flex-direction: column; gap: 18px; }
.aform-group { display: flex; flex-direction: column; gap: 8px; }
.aform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.aform-group label { font-size: 0.75rem; font-weight: 900; color: #000; text-transform: uppercase; letter-spacing: 0.08em; }
.aform-input {
    background: var(--bg-color);
    border: var(--brutal-border);
    padding: 12px 16px;
    color: #000;
    font-family: inherit; font-size: 0.95rem; font-weight: 700;
    width: 100%; transition: all 0.1s;
    outline: none;
}
.aform-input:focus { background: var(--accent-yellow); box-shadow: 4px 4px 0px #000; }
textarea.aform-input { resize: vertical; min-height: 90px; }
.aform-check { display: flex; align-items: center; gap: 12px; }
.aform-check input[type="checkbox"] { width: 22px; height: 22px; cursor: pointer; accent-color: var(--accent-yellow); }
.aform-check label { font-size: 0.95rem; font-weight: 800; cursor: pointer; text-transform: none; letter-spacing: 0; }
.aform-actions { display: flex; gap: 12px; margin-top: 8px; }

/* ── Toast ── */
#toast-container {
    position: fixed; bottom: 30px; right: 30px;
    display: flex; flex-direction: column; gap: 12px; z-index: 9999;
}
.admin-toast {
    display: flex; align-items: center; gap: 12px;
    background: var(--card-bg); border: var(--brutal-border);
    padding: 16px 22px;
    font-weight: 900; font-size: 0.9rem;
    max-width: 360px; box-shadow: 8px 8px 0px #000;
    transform: translateX(150%); opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.admin-toast.show { transform: translateX(0); opacity: 1; }
.admin-toast-success { border-left: 6px solid var(--accent-green); }
.admin-toast-success i { color: var(--accent-green); font-size: 1.2rem; }
.admin-toast-error { border-left: 6px solid var(--accent-pink); }
.admin-toast-error i { color: var(--accent-pink); font-size: 1.2rem; }
.admin-toast-info { border-left: 6px solid var(--accent-blue); }
.admin-toast-info i { color: var(--accent-blue); font-size: 1.2rem; }

/* ── Loader / Empty / Error ── */
.admin-loader { text-align: center; padding: 80px; color: #666; font-size: 1rem; font-weight: 700; }
.admin-loader i { font-size: 2.2rem; display: block; margin-bottom: 14px; }
.admin-empty-state { text-align: center; padding: 60px 20px; color: #666; font-weight: 700; }
.admin-empty-state i { font-size: 2.8rem; display: block; margin-bottom: 16px; opacity: 0.6; }
.admin-error {
    background: #ffe6e6; border: var(--brutal-border); border-color: var(--accent-pink);
    padding: 34px; text-align: center; color: #000; font-weight: 700;
    box-shadow: var(--brutal-shadow);
}
.admin-error i { font-size: 2.4rem; color: var(--accent-pink); display: block; margin-bottom: 16px; }
.admin-error code { display: block; margin-top: 16px; font-size: 0.85rem; color: var(--accent-pink); background: #fff; padding: 12px; border: 3px solid var(--accent-pink); font-weight: 800; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-sidebar-toggle { display: flex; }
    .admin-main { margin-left: 0; }
    .admin-content { padding: 20px; }
    .aform-row { grid-template-columns: 1fr; }
    .admin-stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-filter-bar { flex-direction: column; align-items: flex-start; }
    .admin-search-input { width: 100%; }
    .admin-banners-grid { grid-template-columns: 1fr; padding: 16px; }
    .admin-products-grid { grid-template-columns: 1fr; }
    .admin-topbar { padding: 0 20px; }
}

@media (max-width: 500px) {
    .admin-stats-grid { grid-template-columns: 1fr; }
    .admin-login-card { padding: 30px 20px; }
}
