:root {
  --bg: #120d17;
  --bg-2: #1b1322;
  --panel: rgba(37, 24, 44, 0.92);
  --panel-2: rgba(51, 34, 61, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.035);
  --text: #f7eef9;
  --muted: #b9a9c8;
  --line: rgba(228, 190, 255, 0.12);
  --accent: #c88bff;
  --accent-2: #ff9fd1;
  --danger: #ff8da8;
  --success: #91e7c1;
  --shadow: 0 24px 55px rgba(8, 4, 12, 0.45);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 159, 209, 0.14), transparent 26%),
    radial-gradient(circle at top left, rgba(200, 139, 255, 0.18), transparent 30%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
label { display: block; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.95rem; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(13, 10, 19, 0.84);
  color: var(--text);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.015);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(200, 139, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(200, 139, 255, 0.14);
}
textarea { resize: vertical; }
button {
  border: none;
  cursor: pointer;
  font: inherit;
}
.shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 2rem 1.2rem;
  background: linear-gradient(180deg, rgba(18, 11, 24, 0.95), rgba(22, 15, 31, 0.9));
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(12px);
}
.brand { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.01em; }
.theme-note {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  color: #ffd7ef;
  background: rgba(255, 159, 209, 0.12);
  border: 1px solid rgba(255, 159, 209, 0.18);
}
.nav { display: grid; gap: 0.45rem; }
.nav-link {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  color: var(--muted);
  transition: 140ms ease;
}
.nav-link.active, .nav-link:hover {
  background: linear-gradient(180deg, rgba(200, 139, 255, 0.13), rgba(255, 159, 209, 0.08));
  color: var(--text);
  transform: translateY(-1px);
}
.sidebar-footer { margin-top: auto; display: grid; gap: 0.75rem; }
.content { padding: 2rem; }
.page-head, .section-head, .project-topline, .project-actions, .button-row, .filter-row, .detail-list div, .active-timer-banner, .row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.page-head { margin-bottom: 1.4rem; }
h1, h2 { margin: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.05rem; }
.card {
  background: linear-gradient(180deg, rgba(43, 29, 52, 0.95), rgba(25, 17, 35, 0.95));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.metric-grid, .dashboard-grid, .project-list-grid, .detail-grid {
  display: grid;
  gap: 1rem;
}
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1rem; }
.dashboard-grid { grid-template-columns: 1.1fr 0.9fr; }
.project-list-grid, .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.metric-card { display: grid; gap: 0.5rem; }
.metric-value { font-size: 2rem; font-weight: 700; }
.meter {
  width: 100%;
  height: 10px;
  background: rgba(9, 6, 15, 0.9);
  border-radius: 999px;
  overflow: hidden;
}
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.stack-form, .stack-list { display: grid; gap: 0.9rem; }
.compact-form p { margin: 0; }
.primary-btn, .ghost-btn, .danger-btn, .filter-chip {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: 140ms ease;
}
.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}
.ghost-btn, .filter-chip {
  background: rgba(19, 13, 26, 0.88);
  color: var(--text);
  border: 1px solid var(--line);
}
.danger-btn {
  background: rgba(255, 141, 168, 0.14);
  color: #ffd6df;
  border: 1px solid rgba(255, 141, 168, 0.26);
}
.primary-btn:hover, .ghost-btn:hover, .danger-btn:hover, .filter-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.filter-chip.active { background: var(--panel-2); }
.full { width: 100%; }
.muted { color: var(--muted); }
.tiny { font-size: 0.84rem; }
.project-list, .project-card, .project-tile { display: grid; gap: 0.9rem; }
.project-tile { position: relative; overflow: hidden; }
.project-tile::after {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,159,209,0.12), transparent 65%);
  pointer-events: none;
}
.project-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.92rem; }
.next-action-line { color: #f3e8fb; }
.status-chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid transparent;
}
.status-chip.active { background: rgba(200, 139, 255, 0.14); color: #f2dcff; }
.status-chip.waiting { background: rgba(255, 214, 156, 0.12); color: #ffe8bf; }
.status-chip.review { background: rgba(159, 209, 255, 0.12); color: #d7eeff; }
.status-chip.done { background: rgba(145, 231, 193, 0.12); color: #dfffee; }
.status-chip.urgent { background: rgba(255, 141, 168, 0.12); color: #ffdbe4; }
.deadline-pill {
  background: rgba(200, 139, 255, 0.13);
  color: #f0ddff;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.row-link {
  background: var(--panel-soft);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 0.9rem 1rem;
  border-radius: 18px;
}
.done-row { opacity: 0.65; }
.empty-state {
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--line);
  padding: 1rem;
  border-radius: 16px;
}
.description-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  color: #f2e6fb;
}
.detail-list { display: grid; gap: 0.75rem; }
.detail-list div { padding-bottom: 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.active-timer-banner {
  margin-bottom: 1rem;
  background: linear-gradient(180deg, rgba(200, 139, 255, 0.16), rgba(255, 159, 209, 0.1));
  border: 1px solid rgba(200, 139, 255, 0.22);
  border-radius: 18px;
  padding: 0.85rem 1rem;
}
.messages { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.message {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(200, 139, 255, 0.12);
  border: 1px solid rgba(200, 139, 255, 0.2);
}
.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 4rem);
}
.auth-card, .form-card { max-width: 720px; }
.auth-card { width: 100%; max-width: 480px; }
.top-gap { margin-top: 1rem; }
#calendar { min-height: 650px; }
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .metric-grid, .dashboard-grid, .project-list-grid, .detail-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .page-head, .section-head, .project-topline, .project-actions, .button-row, .filter-row, .detail-list div, .active-timer-banner, .row-link {
    align-items: flex-start;
    flex-direction: column;
  }
}
