/* assets/css/style.css */

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

:root {
    --primary: #FF6B00;
    --primary-dark: #CC5500;
    --primary-light: #FF8C38;
    --secondary: #0A0A0F;
    --surface: #12121A;
    --surface2: #1A1A26;
    --surface3: #222235;
    --border: #2E2E45;
    --text: #F0F0FF;
    --text-muted: #8888AA;
    --success: #00D68F;
    --warning: #FFB800;
    --danger: #FF4757;
    --info: #00B4D8;
    --sidebar-w: 260px;
    --header-h: 70px;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--secondary);
    color: var(--text);
    min-height: 100vh;
}

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

/* ─── AUTH PAGES ─────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--secondary);
}

.auth-hero {
    background: linear-gradient(135deg, #0A0A0F 0%, #1a0a00 50%, #FF6B00 200%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,107,0,0.15) 0%, transparent 70%);
    top: -100px; right: -100px;
}

.auth-hero::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,107,0,0.1) 0%, transparent 70%);
    bottom: -50px; left: -50px;
}

.auth-hero-logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 56px;
    color: var(--primary);
    letter-spacing: 4px;
    margin-bottom: 16px;
    position: relative; z-index:1;
}

.auth-hero-tagline {
    font-size: 18px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    position: relative; z-index:1;
    max-width: 320px;
}

.auth-hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    position: relative; z-index:1;
}

.auth-stat { text-align: center; }
.auth-stat-num {
    font-family: 'Bebas Neue', cursive;
    font-size: 36px;
    color: var(--primary);
    display: block;
}
.auth-stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: var(--surface);
}

.auth-form-box {
    width: 100%;
    max-width: 420px;
}

.auth-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 40px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.auth-subtitle { color: var(--text-muted); margin-bottom: 36px; }

.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--surface3);
    box-shadow: 0 0 0 4px rgba(255,107,0,0.12);
}

.form-control option { background: var(--surface2); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 16px;
    letter-spacing: 0.5px;
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,0,0.4); }

.btn-secondary {
    background: var(--surface3);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface2); border-color: var(--primary); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #cc3547; }

.btn-success { background: var(--success); color: #000; }
.btn-success:hover { background: #00b87c; }

.btn-info { background: var(--info); color: #000; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-icon { padding: 8px; border-radius: 8px; }

.auth-link { color: var(--primary); font-weight: 600; }
.auth-link:hover { text-decoration: underline; }

.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.alert-danger { background: rgba(255,71,87,0.15); border: 1px solid rgba(255,71,87,0.3); color: #ff8a95; }
.alert-success { background: rgba(0,214,143,0.15); border: 1px solid rgba(0,214,143,0.3); color: #00D68F; }
.alert-warning { background: rgba(255,184,0,0.15); border: 1px solid rgba(255,184,0,0.3); color: #FFB800; }

/* ─── LAYOUT ──────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ─────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-text {
    font-family: 'Bebas Neue', cursive;
    font-size: 28px;
    color: var(--primary);
    letter-spacing: 2px;
    line-height: 1;
}

.sidebar-logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-top: 2px;
}

.sidebar-logo-icon {
    width: 44px; height: 44px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.sidebar-role-badge {
    margin: 16px;
    padding: 8px 12px;
    background: rgba(255,107,0,0.1);
    border: 1px solid rgba(255,107,0,0.2);
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }

.sidebar-section {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 8px 6px;
    font-weight: 700;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    cursor: pointer;
}

.sidebar-item:hover, .sidebar-item.active {
    background: rgba(255,107,0,0.12);
    color: var(--primary);
}

.sidebar-item.active { font-weight: 700; }

.sidebar-item .icon { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }

.sidebar-bottom {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    background: var(--surface2);
    margin-bottom: 10px;
}

.sidebar-avatar {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }

/* ─── MAIN CONTENT ───────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }

.topbar {
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title { font-size: 20px; font-weight: 700; }
.topbar-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar-clock {
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 16px;
    background: var(--surface2);
    border-radius: 8px;
    border: 1px solid var(--border);
    font-weight: 600;
    font-family: monospace;
}

.page-content { padding: 28px; flex: 1; }

/* ─── STAT CARDS ─────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle at top right, var(--accent-color, rgba(255,107,0,0.08)) 0%, transparent 70%);
}

.stat-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.stat-card-value {
    font-family: 'Bebas Neue', cursive;
    font-size: 36px;
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-card-change {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.change-up { color: var(--success); }
.change-down { color: var(--danger); }

.stat-orange .stat-card-icon { background: rgba(255,107,0,0.15); color: var(--primary); }
.stat-green .stat-card-icon { background: rgba(0,214,143,0.15); color: var(--success); }
.stat-blue .stat-card-icon { background: rgba(0,180,216,0.15); color: var(--info); }
.stat-yellow .stat-card-icon { background: rgba(255,184,0,0.15); color: var(--warning); }
.stat-red .stat-card-icon { background: rgba(255,71,87,0.15); color: var(--danger); }

/* ─── CHARTS ─────────────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-title { font-size: 16px; font-weight: 700; }
.chart-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.chart-wrap { position: relative; }

/* ─── TABLES ─────────────────────────────────── */
.table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 28px;
}

.table-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.table-card-title { font-size: 16px; font-weight: 700; }

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead th {
    background: var(--surface2);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ─── BADGES ─────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: rgba(0,214,143,0.15); color: var(--success); border: 1px solid rgba(0,214,143,0.2); }
.badge-warning { background: rgba(255,184,0,0.15); color: var(--warning); border: 1px solid rgba(255,184,0,0.2); }
.badge-danger { background: rgba(255,71,87,0.15); color: var(--danger); border: 1px solid rgba(255,71,87,0.2); }
.badge-info { background: rgba(0,180,216,0.15); color: var(--info); border: 1px solid rgba(0,180,216,0.2); }
.badge-orange { background: rgba(255,107,0,0.15); color: var(--primary); border: 1px solid rgba(255,107,0,0.2); }

/* ─── PRODUCT GRID ───────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.product-img {
    width: 100%;
    height: 180px;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    position: relative;
}

.product-stock-badge {
    position: absolute;
    top: 10px; right: 10px;
    font-size: 11px;
}

.product-body { padding: 16px; }
.product-category { font-size: 11px; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 6px; }
.product-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.product-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-family: 'Bebas Neue', cursive; font-size: 22px; color: var(--primary); letter-spacing: 1px; }
.product-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* ─── FORMS ──────────────────────────────────── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 28px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title { font-family: 'Bebas Neue', cursive; font-size: 32px; letter-spacing: 2px; }
.section-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb-sep { color: var(--border); }

/* ─── SEARCH & FILTER ────────────────────────── */
.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.search-box input {
    width: 100%;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px 10px 40px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus { border-color: var(--primary); }
.search-box .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }

/* ─── MODAL ──────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; padding: 4px; border-radius: 6px; transition: color 0.2s; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer { padding: 20px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

/* ─── CART ──────────────────────────────────── */
.cart-badge {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-icon { font-size: 28px; width: 48px; height: 48px; background: var(--surface2); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; flex: 1; }
.cart-item-price { font-size: 13px; color: var(--primary); font-weight: 700; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.qty-btn:hover { background: var(--primary); border-color: var(--primary); }
.qty-num { font-weight: 700; min-width: 24px; text-align: center; }

/* ─── EMPTY STATE ────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon { font-size: 60px; margin-bottom: 16px; }
.empty-state-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ─── PAGINATION ─────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 20px; }
.page-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; text-decoration: none; }
.page-btn:hover, .page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1024px) {
    .charts-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .page-content { padding: 16px; }
}

/* ─── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── MISC ──────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-1 { flex: 1; }
