:root {
  --bg: #04050d;
  --text: #eaf0ff;
  --muted: #94a3bd;
  --cyan: #67e8f9;
  --violet: #a78bfa;
  --pink: #f0abfc;
  --amber: #fcd34d;
  --green: #86efac;
  --red: #fda4af;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(148, 163, 184, 0.38);
  --glass: rgba(8, 12, 28, 0.58);
  --glass-strong: rgba(8, 12, 28, 0.78);
  --radius: 8px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 7, 18, 0.66);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(103, 232, 249, 0.75);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.16);
}

input,
select {
  height: 38px;
  padding: 0 12px;
}

textarea {
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 12px;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h2 {
  font-size: 21px;
  font-weight: 750;
}

h3 {
  font-size: 15px;
  font-weight: 650;
}

.hidden {
  display: none !important;
}

.cosmos-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.view {
  position: relative;
  z-index: 1;
}

.view-login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-panel {
  width: min(400px, 100%);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(7, 10, 24, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
}

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

.brand-head h1 {
  font-size: 24px;
  background: linear-gradient(100deg, var(--cyan), var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-head.compact {
  gap: 10px;
  padding: 0;
}

.brand-name {
  font-weight: 750;
  background: linear-gradient(100deg, var(--cyan), var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-orbit {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(103, 232, 249, 0.4);
  border-radius: 50%;
  background: rgba(103, 232, 249, 0.08);
  color: var(--cyan);
  box-shadow: 0 0 24px rgba(103, 232, 249, 0.2);
}

.brand-orbit svg {
  width: 20px;
  height: 20px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 24px 0 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 7, 18, 0.6);
}

.auth-tab {
  height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.auth-tab.active {
  background: rgba(103, 232, 249, 0.14);
  color: var(--cyan);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.primary,
.ghost,
.icon-btn,
.danger-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-weight: 600;
  white-space: nowrap;
}

.primary {
  background: linear-gradient(100deg, #22d3ee, #8b5cf6 58%, #d946ef);
  color: #fff;
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.32);
}

.primary:hover {
  filter: brightness(1.1);
}

.ghost {
  border: 1px solid var(--line-strong);
  background: rgba(12, 18, 40, 0.55);
  color: var(--text);
}

.ghost:hover {
  border-color: rgba(103, 232, 249, 0.6);
  background: rgba(103, 232, 249, 0.1);
}

.danger-ghost {
  border: 1px solid rgba(253, 164, 175, 0.3);
  background: rgba(253, 164, 175, 0.1);
  color: var(--red);
}

.icon-btn {
  width: 38px;
  padding: 0;
}

#notify-btn {
  position: relative;
}

.notify-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f43f5e;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.wide {
  width: 100%;
  margin-top: 22px;
}

.form-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--red);
  font-size: 13px;
}

.view-app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-dock {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 18px;
  width: calc(100% - 28px);
  max-width: 1180px;
  margin: 14px auto 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 10, 24, 0.62);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px) saturate(140%);
}

.dock-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.nav-item svg {
  width: 16px;
  height: 16px;
}

.nav-item:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text);
}

.nav-item.active {
  background: linear-gradient(100deg, rgba(103, 232, 249, 0.18), rgba(167, 139, 250, 0.16));
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.22);
}

.dock-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #0b1020;
  font-weight: 800;
}

.user-chip strong,
.user-chip small {
  display: block;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip small {
  color: var(--muted);
  font-size: 11px;
}

.cosmic-workspace {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 170px 70px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 900px;
  margin-bottom: 16px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.panel {
  display: none;
  max-width: 900px;
}

.panel.active {
  display: block;
  animation: panel-in 0.35s ease;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.glass-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px) saturate(140%);
}

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

.chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.today-goal,
.today-stats {
  padding: 18px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  appearance: none;
  height: 6px;
  padding: 0;
  border: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.9);
}

#daily-progress-text {
  min-width: 44px;
  color: var(--cyan);
  font-weight: 700;
  text-align: right;
}

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

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stat-block {
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 7, 18, 0.5);
}

.stat-block span {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--cyan);
}

.stat-block small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 7, 18, 0.5);
}

.mini-task .dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
}

.mini-task span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.mini-task small {
  color: var(--muted);
  font-size: 11px;
}

.flow-tools,
.task-tools,
.team-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.select {
  width: auto;
  min-width: 130px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 12px;
  align-items: start;
}

.kanban-col {
  min-height: 240px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 10, 24, 0.48);
  backdrop-filter: blur(10px);
}

.kanban-col.over {
  border-color: rgba(103, 232, 249, 0.7);
  background: rgba(103, 232, 249, 0.08);
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.kanban-head strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted);
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}

.kanban-add {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.kanban-add:hover {
  color: var(--cyan);
  border-color: rgba(103, 232, 249, 0.5);
}

.task-card {
  position: relative;
  margin-bottom: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: var(--radius);
  background: rgba(13, 19, 42, 0.78);
  cursor: grab;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.task-card.dragging {
  opacity: 0.45;
}

.task-card .card-title {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  flex-wrap: wrap;
}

.card-meta svg {
  width: 13px;
  height: 13px;
}

.prio-low {
  border-left-color: #38bdf8;
}

.prio-medium {
  border-left-color: #fbbf24;
}

.prio-high {
  border-left-color: #fb7185;
}

.prio-urgent {
  border-left-color: #e879f9;
}

.priority-tag,
.team-tag,
.project-tag,
.due-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.priority-tag.high,
.priority-tag.urgent {
  color: var(--red);
}

.priority-tag.medium {
  color: var(--amber);
}

.task-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 10, 24, 0.48);
  overflow-x: auto;
  backdrop-filter: blur(10px);
}

.task-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.task-table th,
.task-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.task-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(8, 12, 28, 0.94);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.task-table tr:hover td {
  background: rgba(103, 232, 249, 0.05);
}

.task-table .task-title-cell {
  min-width: 240px;
  font-weight: 600;
}

.task-table .task-title-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.row-actions button:hover {
  color: var(--cyan);
  border-color: rgba(103, 232, 249, 0.5);
}

.quick-capture {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.quick-capture input {
  flex: 1;
}

.backlog-list,
.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.backlog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 12, 28, 0.6);
  backdrop-filter: blur(10px);
}

.backlog-item span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.backlog-item .created {
  color: var(--muted);
  font-size: 11px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.team-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 12, 28, 0.6);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.team-card:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 232, 249, 0.5);
}

.team-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.team-card .team-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.team-detail {
  display: none;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(8, 12, 28, 0.72);
  backdrop-filter: blur(14px);
}

.team-detail.open {
  display: block;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.member-row:last-child {
  border-bottom: 0;
}

.leader-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  color: var(--amber);
  font-size: 11px;
}

.invite-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.invite-row code {
  padding: 8px 12px;
  border: 1px dashed rgba(103, 232, 249, 0.5);
  border-radius: var(--radius);
  color: var(--cyan);
  font-size: 18px;
  letter-spacing: 2px;
}

.goal-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.goal-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 12, 28, 0.6);
  backdrop-filter: blur(10px);
}

.goal-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.45;
}

.goal-bar {
  height: 6px;
  margin: 10px 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.goal-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
}

.goal-card .goal-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.review-editor {
  margin-bottom: 16px;
  padding: 16px;
}

.review-form-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
}

.review-editor .primary {
  margin-top: 12px;
}

.review-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 12, 28, 0.6);
  backdrop-filter: blur(10px);
}

.review-item .review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.review-item p {
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  margin-bottom: 16px;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 10, 24, 0.5);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.admin-user-row:last-child {
  border-bottom: 0;
}

.admin-user-main {
  min-width: 0;
  flex: 1;
}

.admin-user-main strong,
.admin-user-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-main small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.chip-disabled {
  color: var(--red);
  border-color: rgba(253, 164, 175, 0.4);
  background: rgba(253, 164, 175, 0.08);
}

.timeline-rail {
  position: fixed;
  z-index: 5;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 92px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 10, 24, 0.58);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.timeline-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.timeline-days {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.timeline-item {
  position: relative;
  display: grid;
  place-items: center;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 7, 18, 0.55);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.timeline-item.active {
  border-color: rgba(103, 232, 249, 0.8);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.25);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--violet);
  opacity: 0.8;
}

.timeline-item[data-progress="100"]::after {
  background: var(--green);
}

.scene-hud {
  position: fixed;
  z-index: 5;
  left: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(7, 10, 24, 0.62);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.hud-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--progress, 0) * 1%), rgba(148, 163, 184, 0.18) 0);
}

.hud-ring::before {
  content: "";
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(7, 10, 24, 0.9);
}

.hud-ring span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  color: var(--cyan);
}

.hud-stats {
  display: flex;
  gap: 16px;
}

.hud-stats div span {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: var(--violet);
}

.hud-stats small {
  color: var(--muted);
  font-size: 11px;
}

.space-coords {
  position: fixed;
  z-index: 5;
  right: 16px;
  bottom: 12px;
  color: rgba(148, 163, 184, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  pointer-events: none;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 4, 12, 0.7);
  backdrop-filter: blur(8px);
}

.modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(9, 13, 30, 0.9);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.modal-grid .full {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.empty-state {
  padding: 26px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.reminder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 7, 18, 0.5);
  cursor: pointer;
}

.reminder-row span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-row small {
  color: var(--muted);
}

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(10, 15, 31, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.tool-divider {
  width: 1px;
  height: 26px;
  background: var(--line);
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  border: 2px solid transparent;
  background-clip: padding-box;
}

@media (max-width: 1240px) {
  .kanban {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

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

  .cosmic-workspace {
    padding-right: 132px;
  }

  .timeline-rail {
    right: 10px;
    width: 84px;
  }
}

@media (max-width: 900px) {
  html,
  body {
    overflow: auto;
  }

  .view-app {
    height: auto;
    min-height: 100vh;
  }

  .top-dock {
    flex-wrap: wrap;
    margin: 10px auto 0;
    padding: 10px;
  }

  .dock-nav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .dock-user {
    margin-left: auto;
  }

  .cosmic-workspace {
    padding: 18px 14px 90px;
    overflow: visible;
  }

  .timeline-rail {
    top: auto;
    right: 10px;
    bottom: 10px;
    transform: none;
    width: auto;
    padding: 8px 10px;
  }

  .timeline-label {
    display: none;
  }

  .timeline-days {
    flex-direction: row;
    overflow-x: auto;
  }

  .timeline-item {
    flex: 0 0 34px;
  }

  .scene-hud {
    left: 10px;
    bottom: 10px;
    padding: 10px 12px;
    gap: 12px;
  }

  .hud-ring {
    width: 52px;
    height: 52px;
  }

  .hud-ring::before {
    width: 42px;
    height: 42px;
  }

  .space-coords {
    display: none;
  }
}

@media (max-width: 620px) {
  .today-goal,
  .today-stats {
    padding: 14px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .review-form-row,
  .admin-create-form {
    grid-template-columns: 1fr;
  }

  .quick-capture,
  .team-actions,
  .flow-tools,
  .task-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .select {
    width: 100%;
  }

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

  .topbar-actions {
    display: none;
  }
}
