:root {
  --bg: #0d0f14;
  --surface: #141720;
  --surface2: #1c2030;
  --surface3: #242840;
  --border: #2a2f45;
  --border2: #353c5a;
  --text: #e8eaf2;
  --text2: #9298b5;
  --text3: #5c6280;
  --accent: #5b7fff;
  --accent2: #7c5bff;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --orange: #f97316;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; }

/* LAYOUT */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 230px; min-width: 230px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 0; overflow-y: auto; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 56px; min-height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; gap: 16px; justify-content: space-between; }
.content { flex: 1; overflow-y: auto; padding: 24px; }

/* SIDEBAR */
.logo { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--text); }
.logo-sub { font-size: 11px; color: var(--text3); font-weight: 400; letter-spacing: .5px; text-transform: uppercase; margin-top: 2px; }
.nav-section { padding: 16px 12px 8px; }
.nav-label { font-size: 10px; font-weight: 600; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; padding: 0 8px 8px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text2); font-size: 13.5px; font-weight: 500; transition: all .15s; margin-bottom: 2px; text-decoration: none; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: rgba(91,127,255,.15); color: var(--accent); }
.nav-item .icon { font-size: 16px; width: 20px; text-align: center; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; }
.stat-card.blue::before { background: var(--accent); }
.stat-card.green::before { background: var(--green); }
.stat-card.yellow::before { background: var(--yellow); }
.stat-card.red::before { background: var(--red); }
.stat-card.cyan::before { background: var(--cyan); }
.stat-card.pink::before { background: var(--pink); }
.stat-label { font-size: 11.5px; color: var(--text3); font-weight: 500; letter-spacing: .3px; margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-sub { font-size: 11px; color: var(--text3); margin-top: 5px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-open { background: rgba(91,127,255,.15); color: var(--accent); }
.badge-progress { background: rgba(6,182,212,.15); color: var(--cyan); }
.badge-hold { background: rgba(245,158,11,.15); color: var(--yellow); }
.badge-completed { background: rgba(34,197,94,.15); color: var(--green); }
.badge-pending { background: rgba(249,115,22,.15); color: var(--orange); }
.badge-cancelled { background: rgba(239,68,68,.15); color: var(--red); }
.badge-noresponse { background: rgba(156,163,175,.12); color: var(--text2); }
.badge-track { background: rgba(34,197,94,.12); color: var(--green); }
.badge-delayed { background: rgba(239,68,68,.15); color: var(--red); }

/* CARDS, TABLES, BUTTONS... ALL FROM DEMO HTML STYLE */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--surface2); color: var(--text2); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; cursor: pointer; }
tbody tr:hover { background: var(--surface2); }
td { padding: 11px 14px; font-size: 13px; color: var(--text); white-space: nowrap; }
td.mono { font-family: var(--mono); font-size: 12px; color: var(--text2); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: none; cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 500; transition: all .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.btn-danger { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.3); }

/* GRID LAYOUTS */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; margin-bottom: 20px; }

.progress-bar { height: 6px; background: var(--surface3); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .4s; }

/* MODAL STYLES... */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; backdrop-filter: blur(4px); display: none; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 680px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: var(--surface2); border: none; color: var(--text2); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.modal-body { padding: 20px 24px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 600; color: var(--text2); }
input, select, textarea { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 9px 12px; font-family: var(--font); font-size: 13px; outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

/* TAGS */
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--surface3); color: var(--text2); }

/* SCHEME TABS */
.scheme-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.scheme-tab { padding: 7px 16px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--border); color: var(--text2); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .15s; }
.scheme-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.notification { position: fixed; bottom: 24px; right: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 18px; color: var(--text); font-size: 13px; font-weight: 500; box-shadow: var(--shadow); z-index: 2000; transform: translateY(20px); opacity: 0; transition: all .3s; pointer-events: none; }
.notification.show { transform: translateY(0); opacity: 1; }
