:root {
    --bg-1: #0b1220;
    --bg-2: #141d31;
    --surface: rgba(255,255,255,.08);
    --surface-strong: rgba(255,255,255,.12);
    --border: rgba(255,255,255,.14);
    --text: #e9eefb;
    --muted: #9fb0d2;
    --primary: #6ea8fe;
    --success: #49d17d;
    --danger: #ff6b81;
    --warning: #ffce6b;
    --shadow: 0 20px 70px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(78, 115, 255, .25), transparent 28%),
        radial-gradient(circle at bottom right, rgba(0, 214, 201, .15), transparent 22%),
        linear-gradient(135deg, var(--bg-1), var(--bg-2));
}
.admin-shell { display: flex; min-height: 100vh; gap: 22px; padding: 22px; }
.glass-card {
    background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
    border: 1px solid var(--border);
    border-radius: 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}
.sidebar {
    width: 290px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.sidebar-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.brand-icon {
    width: 60px; height: 60px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(110,168,254,.4), rgba(255,255,255,.12));
    font-size: 24px;
}
.brand-title { font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.brand-subtitle { color: var(--muted); font-size: 12px; }
.sidebar-nav { display: grid; gap: 10px; }
.nav-link {
    display: flex; gap: 12px; align-items: center; text-decoration: none;
    color: var(--text); padding: 14px 16px; border-radius: 16px;
    transition: .22s ease;
    border: 1px solid transparent;
}
.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.12);
    transform: translateY(-1px);
}
.nav-link i { width: 18px; text-align: center; }
.sidebar-footer { display: grid; gap: 16px; }
.user-card {
    display: flex; align-items: center; gap: 14px; padding: 14px;
    background: rgba(255,255,255,.06); border-radius: 18px;
}
.avatar {
    width: 44px; height: 44px; border-radius: 14px; display:flex; align-items:center; justify-content:center;
    background: rgba(255,255,255,.14);
}
.user-name { font-weight: 700; }
.user-role { color: var(--muted); font-size: 12px; }
.logout-btn {
    text-decoration:none; color: white; background: linear-gradient(135deg, #ff6b81, #ff7d66);
    padding: 14px 18px; border-radius: 16px; text-align: center; font-weight: 700;
}
.main-content { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.topbar {
    padding: 22px 24px; display: flex; justify-content: space-between; align-items: center;
}
.page-title { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.page-subtitle { margin-top: 4px; color: var(--muted); }
.btn-glass {
    background: rgba(255,255,255,.10); color: #fff; border: 1px solid rgba(255,255,255,.15);
    border-radius: 14px; padding: 12px 16px; font-weight: 700;
}
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stat-card { padding: 22px; position: relative; overflow:hidden; }
.stat-card::after {
    content:''; position:absolute; right:-40px; top:-40px; width:130px; height:130px; border-radius:40px;
    background: rgba(255,255,255,.06); transform: rotate(25deg);
}
.stat-icon { width: 56px; height:56px; border-radius:18px; display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:18px; }
.bg-blue { background: rgba(110,168,254,.22); color: #b8d2ff; }
.bg-green { background: rgba(73,209,125,.22); color: #bbf3cb; }
.bg-orange { background: rgba(255,206,107,.20); color: #ffe3a8; }
.bg-pink { background: rgba(255,107,129,.20); color: #ffc3ce; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 34px; font-weight: 800; margin-top: 8px; }
.content-grid { display:grid; grid-template-columns: 1.35fr .95fr; gap: 18px; }
.section-card { padding: 22px; }
.section-header { display:flex; justify-content:space-between; align-items:center; margin-bottom: 18px; }
.section-title { margin:0; font-size: 20px; font-weight: 800; }
.metric-list { display:grid; gap: 14px; }
.metric-item { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; background: rgba(255,255,255,.06); border-radius:16px; }
.metric-item span:last-child { font-weight: 800; }
.chart-placeholder {
    min-height: 260px; border-radius: 20px; border: 1px dashed rgba(255,255,255,.12);
    display:flex; align-items:center; justify-content:center; color: var(--muted);
    background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.table-shell, .form-shell { padding: 22px; }
.toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.btn-primary-soft {
    background: linear-gradient(135deg, #6ea8fe, #4d8cff); color:#fff; border:none; border-radius:16px; padding: 12px 18px; font-weight: 700;
    box-shadow: 0 12px 34px rgba(77,140,255,.28);
}
.btn-outline-soft {
    background: rgba(255,255,255,.06); color:#fff; border:1px solid rgba(255,255,255,.12); border-radius:14px; padding: 11px 16px; font-weight:700;
}
.table-responsive { overflow: auto; }
.table.dataTable {
    width:100% !important; color:#fff; border-collapse: separate; border-spacing:0 10px;
}
.table.dataTable thead th { color:#cfd8f6; border-bottom:none !important; font-size:12px; text-transform: uppercase; letter-spacing:.08em; }
.table.dataTable tbody tr { background: rgba(255,255,255,.06); }
.table.dataTable tbody td { border-top:none !important; border-bottom:none !important; padding: 16px 12px; vertical-align: middle; }
.table.dataTable tbody tr td:first-child { border-top-left-radius: 16px; border-bottom-left-radius: 16px; }
.table.dataTable tbody tr td:last-child { border-top-right-radius: 16px; border-bottom-right-radius: 16px; }
.column-filter {
    width:100%; min-width: 100px; background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12);
    color:#fff; border-radius:12px; padding:9px 12px; outline: none;
}
.column-filter::placeholder { color:#96a6cb; }
.form-label { font-weight: 700; color: #dbe5ff; margin-bottom: 8px; }
.form-control, .form-select {
    background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); color:#fff;
    min-height: 48px; border-radius: 14px;
}
.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,.11); color:#fff; border-color: rgba(110,168,254,.6); box-shadow: 0 0 0 .25rem rgba(110,168,254,.12);
}
textarea.form-control { min-height: 120px; }
.form-section-title { font-size: 18px; font-weight: 800; margin: 16px 0 14px; }
.form-card { padding: 22px; }
.form-actions { display:flex; gap:12px; margin-top: 20px; }
.select2-container--bootstrap4 .select2-selection {
    min-height: 48px !important; border-radius: 14px !important; border: 1px solid rgba(255,255,255,.14) !important;
    background: rgba(255,255,255,.08) !important; display:flex !important; align-items:center !important;
}
.select2-container--bootstrap4 .select2-selection__rendered,
.select2-container--bootstrap4 .select2-results__option,
.select2-container--bootstrap4 .select2-search__field { color:#111; }
.select2-container--bootstrap4.select2-container--open .select2-selection,
.select2-container--bootstrap4.select2-container--focus .select2-selection { box-shadow: 0 0 0 .25rem rgba(110,168,254,.12) !important; }
.flatpickr-calendar { border-radius: 18px; overflow:hidden; }
.note-editor.note-frame {
    border-radius: 18px; overflow:hidden; border: 1px solid rgba(255,255,255,.12);
}
.note-toolbar { background:#eff4ff; }
.note-editing-area { background:#fff; }
.form-switch .form-check-input {
    width: 54px; height: 30px; border-radius: 999px; cursor:pointer;
}
.action-btns { display:flex; gap: 8px; }
.action-btn {
    width: 40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; text-decoration:none;
    background: rgba(255,255,255,.08); color:#fff; border:1px solid rgba(255,255,255,.12);
}
.sortable-list { display:grid; gap:12px; padding-left:0; list-style:none; }
.sortable-item {
    padding:14px 16px; border-radius:16px; background: rgba(255,255,255,.06); display:flex; justify-content:space-between; align-items:center;
}
.footer-note { text-align:center; color: var(--muted); padding: 8px; font-size: 13px; }
.login-body {
    min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
}
.login-card {
    width:min(100%, 1140px); display:grid; grid-template-columns: 1.1fr .9fr; gap: 24px; padding: 24px;
}
.login-showcase, .login-form { padding: 34px; }
.login-title { font-size: 48px; font-weight: 800; line-height:1.05; letter-spacing:-.05em; }
.login-text { color: var(--muted); max-width: 520px; margin: 18px 0 24px; }
.feature-grid { display:grid; grid-template-columns: repeat(2,1fr); gap:14px; }
.feature-box { padding: 18px; border-radius: 20px; background: rgba(255,255,255,.06); }
.kpi-chip { display:inline-flex; align-items:center; gap:10px; border-radius:999px; padding:10px 14px; background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.10); }
@media (max-width: 1200px) {
    .stat-grid { grid-template-columns: repeat(2,1fr); }
    .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 992px) {
    .admin-shell { flex-direction: column; }
    .sidebar { width: 100%; }
    .login-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .stat-grid { grid-template-columns: 1fr; }
    .topbar { flex-direction:column; align-items:flex-start; gap:16px; }
}
