:root {
    --sidebar-w: 260px;
    --primary: #5b5ce2;
    --primary-dark: #4546bd;
    --ink: #1f2937;
    --muted: #7c8498;
    --bg: #f5f6fb;
    --surface: #fff;
    --border: #e7e9f2;
    --shadow: 0 8px 24px rgba(35, 42, 72, .06);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); }
a { color: var(--primary); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, #171a3b 0%, #202452 100%); color: #aeb3d0; flex-shrink: 0; display: flex; flex-direction: column; }
.brand { min-height: 78px; padding: 18px 22px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; gap: 11px; align-items: center; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand small { color: #aeb3d0; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; margin-top: 4px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #7778f5, #4c4dcc); box-shadow: 0 6px 15px rgba(91,92,226,.35); }
.sidebar-label { padding: 25px 22px 9px; color: #777da8; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-label-spaced { padding-top: 28px; }
.sidebar-nav { display: flex; flex-direction: column; }
.nav-link { margin: 2px 12px; padding: 11px 12px; border-radius: 9px; color: #aeb3d0; text-decoration: none; display: flex; gap: 12px; align-items: center; font-size: 14px; transition: .18s ease; }
.nav-link i { width: 19px; text-align: center; font-size: 16px; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(117,118,242,.2); }
.nav-link.active { box-shadow: inset 3px 0 0 #8586ff; }
.sidebar-footer { margin-top: auto; padding: 14px 12px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-status { display: flex; gap: 8px; align-items: center; padding: 9px 12px 13px; color: #7fc9a5; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #5ed394; box-shadow: 0 0 0 3px rgba(94,211,148,.14); }
.main-content { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { min-height: 78px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 30px; display: flex; align-items: center; gap: 24px; }
.website-selector { display: flex; align-items: center; gap: 9px; min-width: 230px; }
.selector-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.website-selector .form-select { width: 160px; border: 0; color: var(--ink); font-weight: 600; padding-left: 0; box-shadow: none; }
.topbar-search { flex: 1; max-width: 390px; }
.topbar-search form { position: relative; }
.topbar-search i { position: absolute; z-index: 2; left: 13px; top: 10px; color: #a5abc0; }
.topbar-search .form-control { padding-left: 36px; background: #f7f8fc; border: 1px solid transparent; }
.topbar-search .form-control:focus { background: #fff; border-color: #cfd1fa; box-shadow: 0 0 0 3px rgba(91,92,226,.1); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; border-radius: 50%; background: linear-gradient(135deg,#7778f5,#4c4dcc); }
.user-details { display: flex; flex-direction: column; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { color: var(--muted); font-size: 11px; margin-top: 2px; }
.content-area { flex: 1; padding: 38px clamp(18px, 3.5vw, 52px); }
.content-area > .container-fluid { max-width: 1320px; padding: 0; }
.dashboard h2, .content-area h2 { color: #20233f; font-weight: 750; letter-spacing: -.035em; }
.dashboard h2 { font-size: clamp(23px, 2.3vw, 30px); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.page-subtitle { color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.card, .stat-card { border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); background: var(--surface); }
.card-header { padding: 16px 20px; color: #303552; background: transparent; border-bottom: 1px solid var(--border); }
.card-body { padding: 22px; }
.card-footer { border-top-color: var(--border); }
.stat-card { min-height: 140px; padding: 18px 20px; position: relative; overflow: hidden; }
.stat-card:after { content: ""; width: 70px; height: 70px; position: absolute; right: -20px; bottom: -26px; border-radius: 50%; background: rgba(91,92,226,.08); }
.stat-card-primary { color: #fff; background: linear-gradient(135deg, #5b5ce2, #4546bd); border-color: transparent; box-shadow: 0 10px 24px rgba(91,92,226,.2); }
.stat-card-primary .stat-label, .stat-card-primary .stat-value { color: #fff; }
.stat-card-primary:after { background: rgba(255,255,255,.1); }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 15px; color: var(--primary); border-radius: 10px; background: #f0f0ff; }
.stat-card-primary .stat-icon { color: #fff; background: rgba(255,255,255,.16); }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.stat-value { margin-top: 6px; color: #292d50; font-size: 25px; font-weight: 750; }
.stat-value-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.dashboard-card { height: 100%; overflow: hidden; }
.card-header-flex { display: flex; align-items: center; justify-content: space-between; }
.card-header-flex strong, .card-header-flex small { display: block; }
.card-header-flex small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
.card-header-icon { color: #c4c6ee; font-size: 20px; }
.activity-table td { padding: 15px 20px; }
.activity-table td:nth-child(2) span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.activity-time { width: 135px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.table { --bs-table-bg: transparent; vertical-align: middle; }
.table thead th { color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; border-bottom-width: 1px; }
.table td, .table th { padding: 14px 16px; border-color: var(--border); }
.list-group-item { padding: 14px 18px; border-color: var(--border); }
.list-group-item-action:hover { color: var(--primary-dark); background: #f8f8ff; }
.btn { border-radius: 8px; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: #cfd1fa; --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); }
.form-control, .form-select { border-radius: 8px; border-color: #dfe2ed; padding: 10px 12px; }
.form-label { color: #525873; font-size: 13px; font-weight: 600; }
.alert { border: 0; border-radius: 10px; }
.menu-toggle, .sidebar-close { border: 0; color: var(--ink); background: transparent; font-size: 22px; }
.sidebar-backdrop { display: none; }
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 16px; background: radial-gradient(circle at 10% 10%, #7778f5 0, transparent 32%), linear-gradient(135deg,#171a3b,#303274); }
.auth-wrapper { width: 100%; max-width: 450px; }
.auth-card { padding: 38px 36px; border: 1px solid rgba(255,255,255,.55); border-radius: 18px; background: rgba(255,255,255,.97); box-shadow: 0 24px 70px rgba(10,14,48,.3); }
.auth-card h1, .auth-card h2, .auth-card h3 { color: #20233f; font-weight: 750; letter-spacing: -.03em; }
.auth-card h1 { font-size: 28px; line-height: 1.15; }
.auth-card .table { margin-bottom: 24px; }
.auth-card .btn-lg { padding: 12px 20px; }
@media (max-width: 991.98px) {
    .sidebar { position: fixed; z-index: 1045; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-open .sidebar-backdrop { display: block; position: fixed; z-index: 1040; inset: 0; background: rgba(12,15,38,.5); }
    .topbar { padding: 0 18px; gap: 14px; }
    .menu-toggle { display: inline-block; }
    .content-area { padding: 24px 18px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 575.98px) {
    .topbar { min-height: 68px; }
    .website-selector { min-width: 0; }
    .selector-label, .topbar-search { display: none; }
    .website-selector .form-select { width: 145px; }
    .user-details { display: none; }
    .content-area { padding: 20px 14px; }
    .auth-card { padding: 30px 22px; }
}
