:root {
  --bg: #08111f;
  --bg-2: #0d1728;
  --bg-3: #09111f;
  --panel: rgba(10, 18, 33, 0.82);
  --panel-2: rgba(14, 24, 44, 0.9);
  --panel-3: rgba(17, 29, 52, 0.95);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(139, 167, 214, 0.18);
  --line-strong: rgba(139, 167, 214, 0.28);
  --text: #ecf3ff;
  --muted: #92a6c9;
  --muted-2: #6f84aa;
  --primary: #6f8cff;
  --primary-2: #60c7ff;
  --accent: #77f2c7;
  --accent-2: #f6c66b;
  --danger: #ff8f97;
  --danger-soft: rgba(255, 143, 151, 0.14);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

body[data-theme="light"] {
  --bg: #edf4ff;
  --bg-2: #f5f8ff;
  --bg-3: #e9f1ff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-2: rgba(246, 250, 255, 0.96);
  --panel-3: rgba(255, 255, 255, 0.98);
  --panel-soft: rgba(33, 53, 92, 0.065);
  --line: rgba(96, 122, 170, 0.22);
  --line-strong: rgba(96, 122, 170, 0.34);
  --text: #122448;
  --muted: #566c8d;
  --muted-2: #7287aa;
  --primary: #4e69e9;
  --primary-2: #2aa8f1;
  --accent: #1bbf96;
  --accent-2: #d79b2e;
  --danger: #db5e6c;
  --danger-soft: rgba(219, 94, 108, 0.12);
  --shadow: 0 28px 60px rgba(40, 71, 121, 0.16);
}

* {
  box-sizing: border-box;
}

html,
:root {
  color-scheme: dark;
}

html[data-theme="light"],
body[data-theme="light"] {
  color-scheme: light;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(111, 140, 255, 0.18), transparent 26%),
    radial-gradient(circle at 100% 0%, rgba(96, 199, 255, 0.16), transparent 22%),
    radial-gradient(circle at 100% 100%, rgba(119, 242, 199, 0.1), transparent 20%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 38%, var(--bg-3) 100%);
}

body[data-theme="light"] {
  background:
    radial-gradient(circle at 0% 0%, rgba(111, 140, 255, 0.18), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(96, 199, 255, 0.14), transparent 24%),
    radial-gradient(circle at 100% 100%, rgba(119, 242, 199, 0.1), transparent 20%),
    linear-gradient(160deg, #eef4ff 0%, #f8fbff 40%, #eaf1ff 100%);
}

body {
  padding: 24px;
}

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.app-shell {
  max-width: 1580px;
  margin: 0 auto;
  min-height: calc(100vh - 48px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: var(--shadow);
  border-radius: 34px;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

body[data-theme="light"] .app-shell {
  border-color: rgba(96, 122, 170, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.9));
}

.topbar {
  display: grid;
  grid-template-columns: 280px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  background: rgba(6, 13, 24, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

body[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 247, 255, 0.9));
  border-bottom-color: rgba(96, 122, 170, 0.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  display: grid;
  place-items: center;
  box-shadow: 0 14px 32px rgba(96, 199, 255, 0.22);
  overflow: hidden;
}

.brand-mark img {
  width: 30px;
  height: 30px;
  display: block;
}

.brand small,
.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
}

.brand strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.center-search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

body[data-theme="light"] .center-search {
  border-color: rgba(96, 122, 170, 0.18);
  background: rgba(96, 122, 170, 0.08);
}

.search-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 6px rgba(111, 140, 255, 0.08);
}

.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn,
.chip-btn,
.action-dot {
  border-radius: 14px;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.btn {
  height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

body[data-theme="light"] .btn {
  border-color: rgba(96, 122, 170, 0.18);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(77, 102, 150, 0.08);
}

.btn:hover,
.chip-btn:hover,
.action-dot:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn.primary,
.chip-btn.primary {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 14px 28px rgba(111, 140, 255, 0.28);
}

.btn.subtle {
  background: rgba(255, 255, 255, 0.03);
}

.btn:disabled,
.chip-btn:disabled,
.action-dot:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

body[data-theme="light"] .btn:disabled,
body[data-theme="light"] .chip-btn:disabled,
body[data-theme="light"] .action-dot:disabled {
  border-color: rgba(96, 122, 170, 0.16);
  background: rgba(234, 241, 252, 0.96);
  color: rgba(18, 36, 72, 0.68);
}

body[data-theme="light"] .btn.primary:disabled,
body[data-theme="light"] .chip-btn.primary:disabled {
  opacity: 1;
  border: 1px solid rgba(78, 105, 233, 0.22);
  background: linear-gradient(135deg, rgba(198, 216, 255, 0.98), rgba(221, 236, 255, 1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #3450a5;
  -webkit-text-fill-color: #3450a5;
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-actions,
.auth-user-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-user-panel[hidden],
.auth-actions[hidden] {
  display: none !important;
}

.auth-user-meta {
  display: grid;
  gap: 2px;
}

.auth-user-meta strong {
  font-size: 14px;
}

.auth-user-meta span {
  color: var(--muted);
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) minmax(280px, 340px);
  gap: 20px;
  padding: 20px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar {
  padding: 18px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.sidebar-title {
  margin-top: 8px;
  font-size: 20px;
}

.nav-group {
  display: grid;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.nav-item.active {
  color: white;
  border-color: rgba(111, 140, 255, 0.28);
  background: linear-gradient(135deg, rgba(111, 140, 255, 0.18), rgba(96, 199, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .nav-item.active {
  color: var(--text);
}

body[data-theme="light"] .nav-item {
  background: rgba(96, 122, 170, 0.04);
  border-color: rgba(96, 122, 170, 0.08);
}

.nav-item span:last-child {
  color: var(--muted-2);
  font-size: 12px;
}

.focus-score {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(111, 140, 255, 0.22), rgba(119, 242, 199, 0.08));
  border: 1px solid rgba(111, 140, 255, 0.24);
}

.focus-score h3,
.section-title,
.hero-title,
.big-number,
.block-name,
.day-title {
  margin: 0;
  letter-spacing: -0.04em;
}

.focus-score h3 {
  font-size: 15px;
}

.score-ring {
  margin-top: 18px;
  height: 180px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(8, 17, 31, 1) 0 44%, transparent 45%),
    conic-gradient(from 220deg, var(--accent) 0 32%, rgba(255, 255, 255, 0.08) 32% 100%);
  position: relative;
  overflow: hidden;
}

body[data-theme="light"] .score-ring {
  background:
    radial-gradient(circle at center, rgba(243, 247, 255, 1) 0 44%, transparent 45%),
    conic-gradient(from 220deg, var(--accent) 0 32%, rgba(96, 122, 170, 0.14) 32% 100%);
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.05), rgba(7, 16, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .score-ring::after {
  background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.88), rgba(236, 242, 255, 0.98));
  border-color: rgba(96, 122, 170, 0.1);
}

.score-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-center strong {
  font-size: 34px;
  display: block;
}

.score-center span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.mini-card,
.kpi,
.metric-row,
.schedule-item,
.recent-item,
.quick-action,
.break-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body[data-theme="light"] .mini-card,
body[data-theme="light"] .kpi,
body[data-theme="light"] .metric-row,
body[data-theme="light"] .schedule-item,
body[data-theme="light"] .recent-item,
body[data-theme="light"] .quick-action,
body[data-theme="light"] .break-chip,
body[data-theme="light"] .task-time,
body[data-theme="light"] .timeline-card,
body[data-theme="light"] .subpanel {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(96, 122, 170, 0.14);
}

.mini-card {
  padding: 14px;
  border-radius: 18px;
}

.mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.rhythm-panel {
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.metric-row,
.schedule-item,
.recent-item,
.quick-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  min-width: 0;
}

.metric-row strong,
.schedule-item strong,
.recent-item strong {
  display: block;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.metric-row span,
.schedule-item span,
.recent-item span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.time-row {
  cursor: text;
}

.time-input {
  width: 96px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  outline: none;
}

.time-input::-webkit-calendar-picker-indicator {
  opacity: 0.8;
}

.inline-alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(119, 242, 199, 0.12);
  border: 1px solid rgba(119, 242, 199, 0.18);
  color: #b6ffe7;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.inline-alert[data-state="warning"] {
  background: rgba(246, 198, 107, 0.14);
  border-color: rgba(246, 198, 107, 0.22);
  color: #ffe2ad;
}

body[data-theme="light"] .inline-alert {
  color: #116f59;
}

body[data-theme="light"] .inline-alert[data-state="warning"] {
  color: #8a6208;
}

.badge {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(111, 140, 255, 0.18), rgba(96, 199, 255, 0.12));
  color: white;
  font-weight: 800;
}

body[data-theme="light"] .badge {
  border: 1px solid rgba(78, 105, 233, 0.2);
  background: linear-gradient(135deg, rgba(195, 214, 255, 0.98), rgba(175, 202, 255, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 6px 16px rgba(78, 105, 233, 0.12);
  color: #2f4fba;
  -webkit-text-fill-color: #2f4fba;
}

.badge-time {
  min-width: 72px;
  line-height: 1.05;
}

body[data-theme="light"] .schedule-item .badge,
body[data-theme="light"] .recent-item .badge,
body[data-theme="light"] .metric-row .badge {
  background: linear-gradient(135deg, rgba(188, 208, 255, 0.99), rgba(167, 194, 255, 0.99));
  color: #2746aa;
  -webkit-text-fill-color: #2746aa;
}

.main {
  display: grid;
  gap: 20px;
  align-content: start;
  min-width: 0;
}

.hero {
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 199, 255, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(16, 30, 52, 0.96), rgba(11, 21, 38, 0.96));
}

body[data-theme="light"] .hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 199, 255, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 255, 0.96));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.hero-card,
.subpanel,
.timeline,
.right-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.hero-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 0% 0%, rgba(111, 140, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(16, 28, 50, 0.96), rgba(12, 21, 38, 0.96));
}

body[data-theme="light"] .hero-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(111, 140, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.96));
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.hero-title {
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 0.95;
  margin-top: 10px;
}

.status-pill,
.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(119, 242, 199, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.status-pill {
  background: rgba(119, 242, 199, 0.12);
  color: #b6ffe7;
  cursor: pointer;
}

.status-pill.is-disabled {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.status-pill.is-blocked {
  background: var(--danger-soft);
  border-color: rgba(255, 143, 151, 0.18);
  color: #ffd1d5;
}

.status-pill.is-unavailable {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
}

body[data-theme="light"] .status-pill {
  color: #107b5e;
}

body[data-theme="light"] .status-pill.is-disabled,
body[data-theme="light"] .status-pill.is-unavailable {
  background: rgba(234, 241, 252, 0.92);
  border-color: rgba(96, 122, 170, 0.14);
  color: rgba(18, 36, 72, 0.72);
}

body[data-theme="light"] .status-pill.is-blocked {
  color: #a34a56;
}

.session-chip {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.big-number {
  margin-top: 20px;
  display: block;
  width: 100%;
  font-size: clamp(38px, 5.1vw, 88px);
  line-height: 0.88;
  font-weight: 900;
  letter-spacing: -0.06em;
  white-space: nowrap;
  overflow: hidden;
}

.progress {
  margin-top: 16px;
}

.bar {
  height: 12px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

body[data-theme="light"] .bar {
  background: rgba(96, 122, 170, 0.1);
}

.bar > span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.hero-note {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.hero-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  min-width: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  min-width: 0;
}

.chip-btn {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

body[data-theme="light"] .chip-btn {
  border-color: rgba(96, 122, 170, 0.16);
  background: rgba(255, 255, 255, 0.88);
}

.hero-meta {
  display: grid;
  gap: 6px;
}

.hero-meta strong {
  color: var(--text);
}

.hero-side {
  display: grid;
  gap: 18px;
}

.subpanel,
.right-card {
  padding: 18px;
  min-width: 0;
  overflow: hidden;
}

.subpanel {
  min-height: 156px;
}

.subpanel-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.subpanel-title {
  margin-top: 8px;
  font-size: 19px;
}

.kpi-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kpi {
  padding: 14px;
  border-radius: 18px;
}

.kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
}

.action-card {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.timeline {
  padding: 22px;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.day-title {
  font-size: 26px;
}

.break-panel {
  padding: 16px;
  margin-bottom: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.break-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.break-quote {
  max-width: 62%;
  color: var(--muted);
  line-height: 1.6;
  text-align: right;
}

.break-stack {
  display: grid;
  gap: 10px;
}

.break-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  border-radius: 18px;
}

.break-chip strong {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
}

.break-chip-time {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(246, 198, 107, 0.14);
  color: #ffe2ad;
  font-size: 12px;
  font-weight: 700;
}

body[data-theme="light"] .break-chip-time {
  color: #996d0d;
}

.break-chip-text {
  color: var(--muted);
  line-height: 1.5;
}

.timeline-list {
  display: grid;
  gap: 14px;
}

.timeline-item {
  position: relative;
}

.timeline-item.is-dragging {
  opacity: 0.42;
}

.timeline-item.drag-target .timeline-card {
  border-color: rgba(111, 140, 255, 0.42);
  box-shadow: 0 0 0 1px rgba(111, 140, 255, 0.24);
}

.timeline-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.timeline-card:hover {
  transform: translateY(-1px);
}

.timeline-card.is-active {
  box-shadow: 0 18px 28px rgba(111, 140, 255, 0.16);
  background: linear-gradient(180deg, rgba(111, 140, 255, 0.1), rgba(255, 255, 255, 0.04));
}

.timeline-card.is-complete {
  opacity: 0.85;
}

.task-time {
  text-align: center;
  padding: 14px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.task-time strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.task-time span,
.muted {
  color: var(--muted);
}

.task-info small {
  display: inline-block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}

.block-name {
  font-size: 19px;
}

.task-meta {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.tag {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.tag.is-done {
  background: rgba(119, 242, 199, 0.12);
  border-color: rgba(119, 242, 199, 0.18);
  color: #b6ffe7;
}

.tag.is-skipped {
  background: rgba(246, 198, 107, 0.12);
  border-color: rgba(246, 198, 107, 0.18);
  color: #ffe2ad;
}

.tag.is-active {
  background: rgba(111, 140, 255, 0.16);
  border-color: rgba(111, 140, 255, 0.22);
  color: #d9e3ff;
}

.tag.is-passed {
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .tag.is-done {
  color: #117b5f;
}

body[data-theme="light"] .tag.is-skipped {
  color: #996d0d;
}

body[data-theme="light"] .tag.is-active {
  color: #3456d7;
}

.action-dot {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.rightbar {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.section-title {
  font-size: 16px;
  margin-top: 8px;
}

.review-progress strong {
  display: block;
  font-size: 15px;
}

.review-score-inline {
  margin-left: 6px;
  color: var(--text);
}

.progress-note {
  margin-top: 10px;
  font-size: 13px;
}

.history-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  line-height: 1.6;
}

.quick-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.quick-action {
  width: 100%;
  justify-content: flex-start;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.quick-action i {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--primary-2);
  font-style: normal;
  font-weight: 900;
  flex: 0 0 auto;
}

.overlay-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 6, 16, 0.64);
  backdrop-filter: blur(10px);
}

.composer-dialog,
.auth-dialog {
  width: min(680px, 100%);
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
}

.auth-dialog {
  width: min(460px, 100%);
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.composer-form {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.9fr;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field-wide {
  grid-column: span 3;
}

.composer-form input,
.composer-form select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
}

.composer-form input:focus,
.composer-form select:focus,
.time-input:focus {
  box-shadow: 0 0 0 3px rgba(111, 140, 255, 0.18);
}

.composer-actions {
  grid-column: span 3;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.composer-actions .btn,
.auth-actions-row .btn {
  min-width: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.composer-actions .btn.primary,
.auth-actions-row .btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  -webkit-text-fill-color: #fff;
}

body[data-theme="light"] .composer-actions .btn.primary,
body[data-theme="light"] .auth-actions-row .btn.primary {
  border: 1px solid rgba(78, 105, 233, 0.16);
  background: linear-gradient(135deg, #4e69e9, #2aa8f1);
  box-shadow: 0 14px 28px rgba(78, 105, 233, 0.2);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.preset-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-status {
  grid-column: span 3;
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  line-height: 1.6;
}

.auth-status.is-success {
  background: rgba(119, 242, 199, 0.12);
  border-color: rgba(119, 242, 199, 0.18);
  color: #b6ffe7;
}

.auth-status.is-error {
  background: var(--danger-soft);
  border-color: rgba(255, 143, 151, 0.18);
  color: #ffd1d5;
}

.auth-actions-row {
  justify-content: space-between;
}

@media (max-width: 1320px) {
  .layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .rightbar {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .rightbar {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    padding: 12px;
  }

  .app-shell {
    min-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .layout,
  .topbar {
    padding: 14px;
  }

  .task-row,
  .timeline-card {
    grid-template-columns: 1fr;
  }

  .task-actions {
    justify-content: flex-start;
  }

  .kpi-grid,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .hero-footer,
  .break-panel-head,
  .dialog-head {
    align-items: flex-start;
  }

  .hero-footer,
  .hero-head,
  .break-panel-head,
  .subpanel-top,
  .timeline-head,
  .dialog-head {
    flex-direction: column;
  }

  .hero-title {
    font-size: clamp(24px, 7vw, 34px);
  }

  .big-number {
    font-size: clamp(42px, 16vw, 72px);
    white-space: normal;
  }

  .break-quote {
    max-width: none;
    text-align: left;
  }

  .composer-form {
    grid-template-columns: 1fr;
  }

  .form-field-wide,
  .composer-actions,
  .auth-status {
    grid-column: span 1;
  }
}
