:root {
  color-scheme: dark;
  --bg: #07101b;
  --bg2: #0b1626;
  --panel: rgba(15, 23, 42, 0.92);
  --panel-2: #122034;
  --line: #21324d;
  --soft-line: rgba(148, 163, 184, 0.18);
  --text: #e6edf8;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #34d399;
  --danger: #fb7185;
  --warning: #f59e0b;
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at top, #13233c 0%, var(--bg) 35%, #050b13 100%); color: var(--text); font-family: Inter, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { display: grid; grid-template-columns: 320px 1fr; min-height: 100vh; }
.sidebar { padding: 24px; border-right: 1px solid var(--soft-line); background: rgba(5,11,20,.7); backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.main-content { padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.brand-card, .panel { background: var(--panel); border: 1px solid var(--soft-line); border-radius: var(--radius); padding: 18px; box-shadow: 0 16px 30px rgba(0,0,0,.18); }
.brand-card h1 { margin: 4px 0 10px; font-size: 30px; line-height: 1.1; }
.brand-card p, .eyebrow, .muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--accent); }
.nav-tabs { display: grid; gap: 8px; }
.nav-tab, .view-mode, .ghost, button { border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(17,24,39,.95), rgba(11,20,36,.95)); color: var(--text); padding: 12px 14px; }
.nav-tab.active, .view-mode.active { border-color: rgba(96,165,250,.8); box-shadow: inset 0 0 0 1px rgba(96,165,250,.25); }
.quick-actions { display: grid; gap: 10px; }
.quick-actions button:first-child, .calendar-controls button:not(.ghost), .form-grid button[type='submit'] { background: linear-gradient(135deg, #2563eb, #0ea5e9); border: 0; }
.ghost { background: transparent; color: var(--muted); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 18px; }
.panel-header.small h3 { font-size: 15px; color: var(--muted); }
.panel-divider { margin: 16px 0; border-top: 1px solid var(--soft-line); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.stat-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.stat-card strong { font-size: 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar h2 { margin: 4px 0 0; font-size: 28px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.status-pill { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.25); color: #b7ffdf; }
.view { display: none; }
.view.active { display: block; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.dashboard-card.wide { grid-column: 1 / -1; }
.hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.stack-list, .card-list, .bar-list, .task-pool { display: flex; flex-direction: column; gap: 10px; }
.list-card, .task-card, .project-card, .category-card, .block-card-lite { background: var(--panel-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.list-card strong, .task-card strong, .project-card strong, .category-card strong { display: block; margin-bottom: 4px; }
.list-card small, .task-card small, .project-card small, .category-card small { color: var(--muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: rgba(148,163,184,.15); color: var(--text); font-size: 12px; }
.bar-item { display: grid; gap: 6px; }
.bar-item .bar-track { height: 10px; border-radius: 999px; background: rgba(148,163,184,.14); overflow: hidden; }
.bar-item .bar-fill { height: 100%; border-radius: inherit; }
.two-column { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.form-panel { align-self: start; position: sticky; top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid.compact { grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: #0a1220; color: var(--text); padding: 11px 12px; }
textarea { min-height: 90px; resize: vertical; }
.filter-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.calendar-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.calendar-sidebar { align-self: start; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; }
.calendar-main { min-width: 0; }
.calendar-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.calendar-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.calendar-conflicts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.conflict-pill { padding: 8px 10px; border-radius: 12px; background: rgba(251,113,133,.13); border: 1px solid rgba(251,113,133,.3); color: #ffd5dd; font-size: 12px; }
.calendar-scroller { overflow: auto; border-radius: 16px; border: 1px solid var(--soft-line); background: rgba(5,10,18,.35); }
.calendar-grid { min-width: 880px; }
.calendar-header { display: grid; position: sticky; top: 0; z-index: 4; background: rgba(8, 14, 24, 0.97); border-bottom: 1px solid var(--soft-line); }
.calendar-header .time-col, .calendar-body .time-col { width: 72px; }
.calendar-header .day-head { padding: 14px 10px; border-left: 1px solid var(--soft-line); }
.calendar-header .day-head strong { display: block; }
.calendar-header .day-head span { color: var(--muted); font-size: 12px; }
.calendar-body { display: grid; position: relative; }
.time-lane { position: relative; border-right: 1px solid var(--soft-line); background: rgba(255,255,255,.02); }
.time-label { position: absolute; left: 12px; transform: translateY(-50%); color: var(--muted); font-size: 11px; }
.day-column { position: relative; border-left: 1px solid var(--soft-line); min-height: 960px; }
.hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(148,163,184,.14); }
.half-line { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(148,163,184,.06); }
.day-column.drag-over { background: rgba(96,165,250,.08); }
.calendar-block { position: absolute; left: 6px; right: 6px; border-radius: 14px; padding: 10px 10px 18px; color: white; box-shadow: 0 10px 18px rgba(0,0,0,.2); overflow: hidden; user-select: none; }
.calendar-block .block-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.calendar-block .block-meta { font-size: 11px; opacity: .88; }
.calendar-block.fixed { opacity: .88; border: 1px dashed rgba(255,255,255,.35); }
.calendar-block.event { border: 1px solid rgba(255,255,255,.22); }
.calendar-block.conflict { outline: 2px solid rgba(251,113,133,.95); }
.calendar-block .resize-handle { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.35); cursor: ns-resize; }
.task-card { cursor: grab; }
.task-card.dragging { opacity: .45; }
.calendar-note { color: var(--muted); font-size: 12px; }
.inline-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.inline-actions button { padding: 8px 10px; font-size: 12px; }
.color-dot { width: 12px; height: 12px; border-radius: 999px; display: inline-block; margin-right: 8px; }
.empty-state { border: 1px dashed var(--soft-line); border-radius: 16px; padding: 18px; color: var(--muted); text-align: center; }
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--soft-line); }
  .calendar-layout, .two-column, .dashboard-grid { grid-template-columns: 1fr; }
  .form-panel, .calendar-sidebar { position: static; }
  .hero-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
