/* Pinecone — desktop-environment theme.
   Deep-navy space backdrop, floating glass windows, cyan accent. */
:root {
  --page: #070b17;
  --surface: rgba(11, 20, 38, 0.88);
  --surface-solid: #0c1526;
  --surface-2: #101c34;
  --border: rgba(76, 195, 255, 0.16);
  --border-strong: rgba(76, 195, 255, 0.38);
  --ink: #e8eefb;
  --ink-2: #a9b8d4;
  --muted: #64748f;
  --grid: #1a2742;
  --accent: #4cc3ff;
  --accent-deep: #1d6fb8;
  --accent-soft: rgba(76, 195, 255, 0.14);
  --good: #34d399;
  --warning: #fbbf24;
  --critical: #f87171;
  --violet: #a78bfa;
  --dot-min: #fbbf24;
  --dot-max: #34d399;
  --dot-close: #f87171;
  --ladder-1: #1d6fb8;
  --ladder-2: #2b8ad2;
  --ladder-3: #4cc3ff;
  --ladder-4: #8edbff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --------------------------------------------------------- animated backdrop */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
.nebula-1 {
  width: 640px; height: 640px;
  left: -160px; top: -220px;
  background: radial-gradient(circle, rgba(29, 111, 184, 0.55), transparent 65%);
  animation: drift-1 46s ease-in-out infinite alternate;
}
.nebula-2 {
  width: 720px; height: 720px;
  right: -220px; bottom: -260px;
  background: radial-gradient(circle, rgba(103, 76, 210, 0.4), transparent 65%);
  animation: drift-2 58s ease-in-out infinite alternate;
}
@keyframes drift-1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes drift-2 { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-160px, -100px) scale(0.95); } }
@media (prefers-reduced-motion: reduce) {
  .nebula { animation: none; }
  .pulse { animation: none; }
}

/* ------------------------------------------------------------------- layout */
.desk-body { height: 100vh; display: flex; flex-direction: column; }

.cmdbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: rgba(8, 14, 28, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.cmd-caret { color: var(--accent); font-size: 18px; font-weight: 700; }
.cmd-input {
  flex: 1;
  background: rgba(13, 24, 46, 0.9);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
  padding: 8px 14px;
}
.cmd-input:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(76, 195, 255, 0.12); }
.cmd-input::placeholder { color: var(--muted); }
.cmdbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.whoami { color: var(--ink-2); font-weight: 600; padding: 0 2px; }

.desk { flex: 1; display: flex; min-height: 0; position: relative; z-index: 1; }

/* ------------------------------------------------------------------ sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: rgba(8, 14, 28, 0.78);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  overflow-y: auto;
}
.sidebar-foot { color: var(--muted); font-size: 12px; padding: 12px 10px 2px; }

.profile {
  background: linear-gradient(180deg, rgba(29, 111, 184, 0.14), rgba(13, 24, 46, 0.6));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  margin-bottom: 14px;
}
.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #041018;
  font-weight: 800;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.avatar-sm { width: 38px; height: 38px; font-size: 14px; margin-bottom: 0; flex-shrink: 0; }
.profile-name { font-weight: 700; font-size: 15px; }
.studio-link { display: block; font-size: 13px; margin: 2px 0 8px; }

.rank-badge {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: #8edbff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}
.rank-badge-admin {
  background: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.4);
  color: var(--violet);
}
.rank-badge-table { font-size: 11px; padding: 1px 8px; }

.xp-block { margin-top: 10px; }
.xp-bar { height: 8px; background: var(--grid); border-radius: 999px; overflow: hidden; }
.xp-bar-lg { height: 12px; }
.xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  box-shadow: 0 0 10px rgba(76, 195, 255, 0.5);
}
.xp-label { font-size: 12px; color: var(--ink-2); margin-top: 6px; }

.nav { flex: 1; }
.nav-group {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin: 14px 10px 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--ink-2);
}
.nav-item:hover { background: var(--accent-soft); color: var(--ink); }
.nav-badge {
  margin-left: auto;
  background: var(--critical);
  color: #1a0505;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 0 7px;
  line-height: 18px;
}

/* ------------------------------------------------------------------ desktop */
.desktop { flex: 1; position: relative; min-width: 0; overflow: hidden; }

.taskbar {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: flex;
  gap: 8px;
  z-index: 90;
  flex-wrap: wrap;
  max-width: calc(100% - 24px);
}
.taskbar-chip {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.taskbar-chip:hover { color: var(--ink); box-shadow: 0 0 14px rgba(76, 195, 255, 0.25); }

/* ------------------------------------------------------------------ windows */
.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 380px;
  min-height: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.window.win-focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(76, 195, 255, 0.25), 0 0 24px rgba(76, 195, 255, 0.14),
              0 24px 70px rgba(0, 0, 0, 0.6);
}
.window.win-opening { opacity: 0; transform: scale(0.96) translateY(8px); }

.win-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: rgba(14, 26, 50, 0.9);
  border-bottom: 1px solid var(--border);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.win-titlebar:active { cursor: grabbing; }
.win-title {
  color: #8edbff;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-dots { display: flex; gap: 8px; flex-shrink: 0; }
.win-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
}
.dot-min { background: var(--dot-min); }
.dot-max { background: var(--dot-max); }
.dot-close { background: var(--dot-close); }
.win-dot:hover { filter: brightness(1.25); box-shadow: 0 0 8px currentColor; }

.win-body { flex: 1; overflow: auto; padding: 16px; position: relative; }
.win-loading { color: var(--muted); text-align: center; padding: 40px; }

.win-resize {
  position: absolute;
  right: 0; bottom: 0;
  width: 16px; height: 16px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 55%, rgba(76, 195, 255, 0.45) 56%, transparent 62%,
                    transparent 70%, rgba(76, 195, 255, 0.45) 71%, transparent 77%);
}

/* ---------------------------------------------------------------- task canvas */
.task-canvas {
  position: relative;
  width: 1600px;
  height: 1000px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    radial-gradient(circle, rgba(76, 195, 255, 0.10) 1px, transparent 1.5px) 0 0 / 26px 26px,
    linear-gradient(180deg, rgba(9, 16, 32, 0.7), rgba(7, 12, 24, 0.7));
}
.canvas-empty {
  position: absolute;
  top: 120px; left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  border: 1px dashed var(--grid);
  border-radius: 12px;
  padding: 22px 30px;
  white-space: nowrap;
}

.float-task {
  position: absolute;
  width: 220px;
  background: linear-gradient(180deg, #12203c, #0d1729);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 12px 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  cursor: grab;
  user-select: none;
}
.float-task:active { cursor: grabbing; }
.float-task.ft-dragging { opacity: 0.85; box-shadow: 0 22px 44px rgba(0, 0, 0, 0.6); }
.float-task.ft-admin { border-color: rgba(167, 139, 250, 0.55); }
.float-task.ft-overdue { border-color: rgba(248, 113, 113, 0.65); }
.float-task.ft-done { opacity: 0.55; border-color: rgba(52, 211, 153, 0.45); }
.float-task.ft-done .ft-title { text-decoration: line-through; color: var(--ink-2); }

.ft-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ft-grip { flex: 1; text-align: center; color: var(--muted); font-size: 10px; letter-spacing: 2px; }
.ft-check input { width: 15px; height: 15px; accent-color: var(--good); cursor: pointer; }
.ft-del {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}
.ft-del:hover { color: var(--critical); }
.ft-title { font-weight: 700; font-size: 13.5px; }
.ft-desc { color: var(--ink-2); font-size: 12.5px; margin-top: 3px; }
.ft-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- buttons */
.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--ink);
}
.btn:hover { border-color: var(--border-strong); box-shadow: 0 0 12px rgba(76, 195, 255, 0.15); }
.btn-primary {
  background: linear-gradient(180deg, #2585d6, var(--accent-deep));
  border-color: var(--border-strong);
  color: #eaf7ff;
}
.btn-secondary { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; margin-top: 16px; }

.btn-clockin {
  background: linear-gradient(180deg, #2585d6, var(--accent-deep));
  border-color: var(--border-strong);
  color: #eaf7ff;
}
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 195, 255, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(76, 195, 255, 0); }
}

/* ------------------------------------------------------------------- chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.chip-good { background: rgba(52, 211, 153, 0.13); color: var(--good); }
.chip-warning { background: rgba(251, 191, 36, 0.13); color: var(--warning); }
.chip-critical { background: rgba(248, 113, 113, 0.14); color: var(--critical); }
.chip-accent { background: var(--accent-soft); color: #8edbff; }
.chip-muted { background: var(--grid); color: var(--ink-2); }
.chip-admin { background: rgba(167, 139, 250, 0.14); color: var(--violet); }

/* ------------------------------------------------------------------- cards */
.card {
  background: rgba(13, 24, 46, 0.72);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px;
}
.card-list { display: flex; flex-direction: column; gap: 10px; }
.card-title { font-size: 15px; margin-bottom: 12px; }
.section-title { font-size: 15px; margin: 22px 0 10px; }
.section-title .muted { font-weight: 400; font-size: 12.5px; }
.panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.panel-hint { color: var(--muted); margin-bottom: 12px; }
.panel-toolbar .panel-hint { margin-bottom: 0; }
.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 26px;
  border: 1px dashed var(--grid);
  border-radius: 12px;
}
.muted { color: var(--muted); }

/* ---------------------------------------------------------------- releases */
.release-card { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.release-title { font-weight: 700; }
.release-desc { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.release-meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.release-actions { display: flex; gap: 8px; align-items: flex-start; }

/* ---------------------------------------------------------------- messages */
.contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.contact-card:hover { border-color: var(--border-strong); box-shadow: 0 0 14px rgba(76, 195, 255, 0.12); }
.contact-main { min-width: 0; flex: 1; display: block; }
.contact-name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-preview {
  color: var(--muted);
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-wrap { display: flex; flex-direction: column; min-height: 100%; }
.thread { flex: 1; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.bubble-row { display: flex; gap: 8px; align-items: flex-end; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
  max-width: 75%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  padding: 9px 13px;
}
.bubble-row.mine .bubble {
  background: linear-gradient(180deg, #1c66a8, #17538a);
  border-color: var(--border-strong);
  border-radius: 12px 12px 4px 12px;
}
.bubble-body { white-space: pre-wrap; }
.bubble-time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.bubble-row.mine .bubble-time { color: rgba(232, 238, 251, 0.6); }

.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; }

/* ----------------------------------------------------------------- notices */
.notice-card { border-left: 3px solid var(--grid); }
.notice-pinned { border-left-color: var(--accent); }
.notice-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.notice-title { font-weight: 700; }
.notice-when { color: var(--muted); font-size: 12px; }
.notice-body { color: var(--ink-2); }

/* ---------------------------------------------------------------- position */
.position-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; align-items: start; }
.rank-hero-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.rank-hero-name {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(90deg, #8edbff, #4cc3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rank-hero-sub { color: var(--ink-2); margin-bottom: 12px; }
.rank-hero-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.rank-hero-cols h3 { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.perk-list { list-style: none; }
.perk-list li { padding: 3px 0; font-size: 13px; }
.perk-list-duty li { color: var(--ink-2); }

.week-table { width: 100%; border-collapse: collapse; text-align: center; }
.week-table th, .week-table td { padding: 6px 4px; font-size: 13px; }
.week-table thead th { color: var(--muted); font-weight: 600; }
.week-table tbody th { text-align: left; color: var(--ink-2); font-weight: 600; }
.today-col { background: rgba(76, 195, 255, 0.08); border-radius: 6px; }

.cell-good { color: var(--good); font-weight: 700; }
.cell-miss { color: var(--critical); font-weight: 700; }
.cell-pending { color: var(--muted); font-weight: 700; font-size: 18px; }
.cell-muted { color: var(--grid); }
.legend-row { display: flex; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }

.xp-guide { list-style: none; }
.xp-guide li { padding: 4px 0; color: var(--ink-2); }
.xp-guide strong { color: var(--ink); display: inline-block; min-width: 48px; }

.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ladder-card { position: relative; border-top: 3px solid; }
.ladder-1 { border-top-color: var(--ladder-1); }
.ladder-2 { border-top-color: var(--ladder-2); }
.ladder-3 { border-top-color: var(--ladder-3); }
.ladder-4 { border-top-color: var(--ladder-4); }
.ladder-current { outline: 2px solid var(--accent); outline-offset: -1px; box-shadow: 0 0 18px rgba(76, 195, 255, 0.18); }
.ladder-locked { opacity: 0.5; }
.ladder-tier { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.ladder-name { font-weight: 800; font-size: 17px; }
.ladder-xp { color: var(--ink-2); font-size: 13px; margin-bottom: 8px; }
.ladder-facts { list-style: none; font-size: 12.5px; color: var(--ink-2); }
.ladder-facts li { padding: 2px 0; }
.ladder-flag { margin-top: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); }
.ladder-flag-done { color: var(--good); }
.ladder-flag-locked { color: var(--muted); }

/* ------------------------------------------------------------- stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.stat-tile { border-color: var(--border-strong); }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.stat-value { font-size: 30px; font-weight: 800; line-height: 1.25; }
.stat-denom { font-size: 17px; color: var(--muted); font-weight: 600; }
.stat-sub { font-size: 12px; color: var(--ink-2); }
.stat-alert { color: var(--critical); }

/* ------------------------------------------------------------ data tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--grid);
  font-size: 13.5px;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(76, 195, 255, 0.04); }
.data-table thead th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.week-grid td, .week-grid th { text-align: center; }
.week-grid td:first-child, .week-grid th:first-child { text-align: left; }
.xp-pos { color: var(--good); font-weight: 700; }
.xp-neg { color: var(--critical); font-weight: 700; }

/* ------------------------------------------------------------ admin panels */
.inline-form { display: inline-block; }
.actions-cell { text-align: right; white-space: nowrap; }
.actions-cell .btn, .actions-cell .inline-form { margin-left: 4px; }
.row-inactive td { opacity: 0.45; }
.btn-danger { color: var(--critical); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.4); }
.clockin-grid td, .clockin-grid th { vertical-align: top; }
.day-col { text-align: center; }
.clockin-grid .day-col .inline-form { display: block; margin-top: 5px; }

/* ---------------------------------------------------------------- training */
.chip-warn { background: rgba(251, 191, 36, 0.14); color: var(--warning); border: 1px solid rgba(251, 191, 36, 0.3); }
.training-progress { display: flex; gap: 40px; margin-bottom: 14px; }
.module-card { width: 100%; text-align: left; display: flex; gap: 14px; align-items: center; cursor: pointer; color: var(--ink); font: inherit; }
.module-card:hover { border-color: var(--border-strong); box-shadow: 0 0 14px rgba(76, 195, 255, 0.12); }
.module-main { flex: 1; min-width: 0; }
.module-title { font-weight: 800; font-size: 15px; display: block; }
.module-summary { color: var(--ink-2); font-size: 13px; display: block; white-space: normal; }
.module-chips { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.module-detail-head { margin-bottom: 8px; }
.grade-total-row td { border-top: 1px solid var(--border-strong); padding-top: 10px; }
.crit-input { width: 90px; text-align: right; }
.criteria-add-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.criteria-add-form input[name="name"] { flex: 1; }
.module-material { margin-bottom: 14px; }
.module-material summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.module-material summary:hover { text-decoration: underline; }
.module-content { color: var(--ink-2); font-size: 13px; line-height: 1.65; margin-top: 12px; overflow-wrap: break-word; }
.module-content h2, .module-content h3, .module-content h4 { color: var(--ink); margin: 18px 0 8px; line-height: 1.3; }
.module-content h2 { font-size: 17px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.module-content h3 { font-size: 15px; color: var(--accent); }
.module-content h4 { font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.5px; }
.module-content p { margin: 8px 0; }
.module-content ul, .module-content ol { margin: 8px 0 8px 22px; }
.module-content li { margin: 4px 0; }
.module-content li p { margin: 2px 0; }
.module-content strong { color: var(--ink); }
.module-content img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); margin: 10px 0; display: block; }
.module-content pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow-x: auto; margin: 10px 0; }
.module-content code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; color: var(--accent); }
.module-content pre code { color: var(--ink-2); }
.module-content blockquote { border-left: 3px solid var(--warning); padding: 4px 12px; margin: 10px 0; background: rgba(251, 191, 36, 0.06); border-radius: 0 8px 8px 0; }
.module-content a { word-break: break-all; }

/* ----------------------------------------------------------- studio header */
.studio-header { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.studio-header-main { flex: 1; min-width: 240px; }
.studio-header-name { font-size: 18px; font-weight: 800; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.studio-header-sub { color: var(--ink-2); font-size: 13px; margin: 2px 0 10px; }
.studio-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; margin-top: 6px; }
.clockin-day { font-weight: 700; display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.clockin-plans { color: var(--ink-2); font-size: 13px; white-space: pre-wrap; }

/* ------------------------------------------------------------------- forms */
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; color: var(--ink-2); }
.label-optional { color: var(--muted); font-weight: 400; }
.check-label { display: flex; align-items: center; gap: 8px; }
input, textarea, select {
  width: 100%;
  font: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  padding: 9px 12px;
}
input:focus, textarea:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(76, 195, 255, 0.1); }
input[type="checkbox"] { width: auto; }
textarea { resize: vertical; }
select option { background: var(--surface-solid); color: var(--ink); }
::-webkit-calendar-picker-indicator { filter: invert(0.7); }

/* ------------------------------------------------------------------ modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.66);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(76, 195, 255, 0.12), 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: 22px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 { font-size: 17px; margin-bottom: 4px; }
.modal-sub { color: var(--muted); font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ------------------------------------------------------------------ toasts */
.toasts {
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}
.toast {
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  border: 1px solid;
  background: var(--surface-solid);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.toast-success { border-color: rgba(52, 211, 153, 0.5); color: var(--good); }
.toast-error { border-color: rgba(248, 113, 113, 0.5); color: var(--critical); }
.toast-info { border-color: var(--border-strong); color: #8edbff; }

/* -------------------------------------------------------------- help window */
.help-list { list-style: none; }
.help-list li { padding: 6px 0; border-bottom: 1px solid var(--grid); color: var(--ink-2); }
.help-list li:last-child { border-bottom: none; }
.help-list code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 8px;
  color: #8edbff;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px;
  margin-right: 8px;
}

/* ------------------------------------------------------------------- login */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  overflow: hidden;
}
.login-card {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 0 46px rgba(76, 195, 255, 0.12), 0 30px 90px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  padding: 36px;
  width: 100%;
  max-width: 380px;
}
.login-brand { font-size: 34px; }
.login-card h1 { font-size: 22px; margin: 8px 0 4px; }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.login-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: var(--critical);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 6px;
}
