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

:root {
    --blue:       #1560BD;
    --blue-dark:  #0e4fa0;
    --blue-light: #e8f1fd;
    --blue-mid:   #4a90d9;
    --accent:     #ADD8E6;
    --white:      #ffffff;
    --bg:         #f4f7fc;
    --sidebar-w:  260px;
    --radius:     14px;
    --radius-sm:  8px;
    --shadow:     0 2px 16px rgba(21,96,189,0.10);
    --shadow-lg:  0 8px 40px rgba(21,96,189,0.18);
    --green:      #22c55e;
    --orange:     #f59e0b;
    --red:        #ef4444;
    --text:       #1e293b;
    --text-muted: #64748b;
    --border:     #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c7d7f0; border-radius: 10px; }

/* ── AUTH ── */
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 60%, var(--accent) 100%);
    padding: 20px;
}
.auth-box {
    background: var(--white); border-radius: 20px;
    padding: 44px 40px; width: 100%; max-width: 440px;
    box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo img { max-height: 64px; margin-bottom: 10px; }
.auth-logo h1 { color: var(--blue); font-size: 1.7rem; font-weight: 800; letter-spacing: -.5px; }
.auth-logo p { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }
.auth-tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 28px; }
.auth-tabs button {
    flex: 1; padding: 9px; border: none; background: none; cursor: pointer;
    font-size: .9rem; font-weight: 500; color: var(--text-muted);
    border-radius: 8px; transition: all .2s;
}
.auth-tabs button.active { background: var(--white); color: var(--blue); font-weight: 700; box-shadow: var(--shadow); }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit;
    background: var(--white); color: var(--text); transition: border .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,96,189,.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius-sm); border: none;
    cursor: pointer; font-size: .9rem; font-weight: 600; font-family: inherit;
    transition: all .2s; text-decoration: none; white-space: nowrap;
}
.btn-primary   { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(21,96,189,.3); }
.btn-danger    { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-success   { background: var(--green); color: var(--white); }
.btn-success:hover { background: #16a34a; }
.btn-secondary { background: var(--bg); color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-outline   { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn-sm { padding: 6px 14px; font-size: .82rem; }
.btn-full { width: 100%; }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.alert-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-info    { background: var(--blue-light); color: var(--blue); border: 1px solid #bfdbfe; }

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

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-w); background: var(--blue);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; height: 100vh;
    box-shadow: 4px 0 24px rgba(21,96,189,.25); z-index: 100;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-brand img { max-height: 36px; }
.sidebar-brand .brand-text h2 { color: #fff; font-size: 1rem; font-weight: 700; }
.sidebar-brand .brand-text span { color: rgba(255,255,255,.6); font-size: .72rem; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav .nav-section { padding: 16px 20px 6px; font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 20px; color: rgba(255,255,255,.75);
    text-decoration: none; font-size: .9rem; font-weight: 500;
    transition: all .2s; border-left: 3px solid transparent; margin: 1px 0;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.15); color: #fff; border-left-color: var(--accent); font-weight: 600; }
.sidebar-nav a .nav-icon { font-size: 1rem; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-nav a .nav-badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 20px; padding: 1px 7px; font-size: .7rem; font-weight: 700; }

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.12);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.3); flex-shrink: 0; }
.sidebar-user .u-name { color: #fff; font-size: .85rem; font-weight: 600; }
.sidebar-user .u-role { color: rgba(255,255,255,.55); font-size: .72rem; }
.sidebar-logout { padding: 0 12px 16px; }
.sidebar-logout a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px; background: rgba(255,255,255,.08); border-radius: var(--radius-sm);
    color: rgba(255,255,255,.7); text-decoration: none; font-size: .85rem;
    transition: background .2s;
}
.sidebar-logout a:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ── MAIN ── */
.main-content { margin-left: var(--sidebar-w); flex: 1; padding: 36px 40px; max-width: calc(100vw - var(--sidebar-w)); }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.75rem; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.page-header p { color: var(--text-muted); margin-top: 4px; font-size: .95rem; }

/* ── CARDS ── */
.card {
    background: var(--white); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px;
    border: 1px solid rgba(226,232,240,.8);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-header h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.card-header .card-actions { display: flex; gap: 8px; }

/* ── GRIDS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── STAT CARDS ── */
.stat-card {
    background: var(--white); border-radius: var(--radius);
    padding: 22px 24px; box-shadow: var(--shadow);
    border: 1px solid rgba(226,232,240,.8);
    display: flex; align-items: center; gap: 16px;
}
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-light); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-card .stat-num { font-size: 1.8rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-card .stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 3px; font-weight: 500; }

/* ── SERVICE CARDS ── */
.svc-card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
    box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.svc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.svc-card-header { padding: 18px 20px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.svc-card-icon { font-size: 1.8rem; }
.svc-card-title { font-weight: 700; font-size: 1rem; color: var(--text); }
.svc-card-type { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.svc-card-body { padding: 14px 20px; }
.svc-card-footer { padding: 12px 20px; background: var(--bg); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }

/* ── OFFER CARDS ── */
.offer-card {
    background: var(--white); border-radius: var(--radius);
    border: 2px solid var(--border); overflow: hidden;
    box-shadow: var(--shadow); transition: all .2s; position: relative;
}
.offer-card:hover { border-color: var(--blue); box-shadow: var(--shadow-lg); }
.offer-card.unavailable { opacity: .7; }
.offer-card-top { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%); padding: 24px; color: #fff; }
.offer-card-top .offer-icon { font-size: 2.5rem; margin-bottom: 10px; }
.offer-card-top h3 { font-size: 1.15rem; font-weight: 700; }
.offer-card-top p { font-size: .82rem; opacity: .85; margin-top: 4px; }
.offer-card-body { padding: 20px; }
.spec-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-light); color: var(--blue); border-radius: 20px; padding: 4px 12px; font-size: .78rem; font-weight: 600; }
.specs-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.offer-price { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.offer-price .old { text-decoration: line-through; color: var(--text-muted); font-size: .9rem; }
.offer-price .free { color: var(--green); font-weight: 800; font-size: 1.2rem; }
.slot-bar-wrap { margin-bottom: 16px; }
.slot-bar-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-muted); margin-bottom: 5px; }
.slot-bar { background: var(--bg); border-radius: 20px; height: 8px; overflow: hidden; }
.slot-bar-fill { height: 100%; border-radius: 20px; transition: width .4s; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-green  { background: #dcfce7; color: #16a34a; }
.badge-orange { background: #fef3c7; color: #d97706; }
.badge-red    { background: #fee2e2; color: #dc2626; }
.badge-blue   { background: var(--blue-light); color: var(--blue); }
.badge-gray   { background: #f1f5f9; color: #64748b; }

/* ── STATUS ── */
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border); }
.status-row:last-child { border-bottom: none; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 10px; flex-shrink: 0; }
.dot-green  { background: var(--green); box-shadow: 0 0 6px rgba(34,197,94,.5); }
.dot-orange { background: var(--orange); box-shadow: 0 0 6px rgba(245,158,11,.5); }
.dot-red    { background: var(--red); box-shadow: 0 0 6px rgba(239,68,68,.5); }

/* ── NOTIFS ── */
.notif-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-item .notif-msg { font-size: .9rem; color: var(--text); }
.notif-item .notif-date { font-size: .75rem; color: var(--text-muted); margin-top: 3px; }
.notif-unread .notif-msg { font-weight: 600; color: var(--blue); }

/* ── AVATAR ── */
.avatar-wrap { position: relative; display: inline-block; }
.avatar-wrap img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--blue); }
.avatar-wrap .avatar-edit { position: absolute; bottom: 2px; right: 2px; background: var(--blue); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .75rem; border: 2px solid #fff; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead th { background: var(--bg); color: var(--text-muted); padding: 10px 14px; text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbff; }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1000; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: 18px; padding: 28px; width: 100%; max-width: 520px; box-shadow: 0 24px 80px rgba(0,0,0,.2); max-height: 90vh; overflow-y: auto; }
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.modal-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 20px; }
.modal-section { padding: 16px 0; border-bottom: 1px solid var(--border); }
.modal-section:last-of-type { border-bottom: none; }
.modal-section-title { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── DISCORD BANNER ── */
.discord-banner {
    background: linear-gradient(135deg, #5865F2 0%, #7289da 100%);
    border-radius: var(--radius); padding: 16px 20px;
    display: flex; align-items: center; gap: 14px; color: #fff;
    margin-bottom: 16px;
}
.discord-banner .dc-icon { font-size: 1.8rem; flex-shrink: 0; }
.discord-banner h4 { font-size: .95rem; font-weight: 700; }
.discord-banner p { font-size: .82rem; opacity: .85; margin-top: 2px; }
.discord-banner a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ── TABS ── */
.tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tab-btn { flex: 1; padding: 9px 16px; border: none; background: none; cursor: pointer; font-size: .88rem; font-weight: 500; color: var(--text-muted); border-radius: 8px; transition: all .2s; font-family: inherit; }
.tab-btn.active { background: var(--white); color: var(--blue); font-weight: 700; box-shadow: var(--shadow); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── ADMIN PANEL ── */
.admin-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.admin-tab { padding: 12px 20px; border: none; background: none; cursor: pointer; font-size: .9rem; font-weight: 500; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .2s; font-family: inherit; white-space: nowrap; }
.admin-tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* ── MISC ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .85rem; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.empty-state p { font-size: .9rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    :root { --sidebar-w: 70px; }
    .sidebar-brand .brand-text, .sidebar-nav a span:not(.nav-icon), .sidebar-user .u-name, .sidebar-user .u-role, .sidebar-logout span { display: none; }
    .sidebar-nav a { justify-content: center; padding: 12px; }
    .sidebar-nav .nav-section { display: none; }
    .sidebar-user { justify-content: center; }
    .main-content { padding: 20px 16px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
