﻿:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-rgb: 255, 255, 255;
  --panel-muted: #f8fafc;
  --panel-border: rgba(255, 255, 255, 0.8);
  --line: #e7ebf3;
  --text: #1f2937;
  --text-strong: #0f172a;
  --muted: #6b7280;
  --note: #475569;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
  --brand: #4338ca;
  --brand-strong: #2563eb;
  --brand-soft: #eef2ff;
  --brand-line: #a5b4fc;
  --cyan-soft: #ecfeff;
  --cyan-text: #0e7490;
  --completed-soft: #e2e8f0;
  --task-high-bg: #fff5f5;
  --task-medium-bg: #fffbeb;
  --task-low-bg: #f0fdf4;
  --task-completed-bg: #f8fafc;
  --slot-border: #cbd5e1;
  --slot-hover-border: #818cf8;
  --insert-line: #111827;
  --body-gradient: linear-gradient(180deg, #f8faff 0%, #f3f6fb 100%);
  --day-header-gradient: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --hover-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  --schedule-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
  --column-width: 250px;
  --column-gap: 16px;
  --el-bg-color: var(--panel);
  --el-bg-color-overlay: var(--panel);
  --el-fill-color-blank: var(--panel);
  --el-fill-color-light: var(--panel-muted);
  --el-border-color: var(--line);
  --el-border-color-light: var(--line);
  --el-text-color-primary: var(--text);
  --el-text-color-regular: var(--text);
  --el-text-color-secondary: var(--muted);
  --el-disabled-bg-color: var(--panel-muted);
  --el-disabled-text-color: var(--muted);
  --el-mask-color: rgba(15, 23, 42, 0.42);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root[data-theme="dark"] {
    --bg: #0f172a;
    --panel: #172033;
    --panel-rgb: 23, 32, 51;
    --panel-muted: #111827;
    --panel-border: rgba(148, 163, 184, 0.18);
    --line: #334155;
    --text: #e5e7eb;
    --text-strong: #f8fafc;
    --muted: #94a3b8;
    --note: #cbd5e1;
    --danger: #fb7185;
    --warning: #fbbf24;
    --success: #4ade80;
    --brand: #c4b5fd;
    --brand-strong: #93c5fd;
    --brand-soft: rgba(99, 102, 241, 0.22);
    --brand-line: rgba(129, 140, 248, 0.55);
    --cyan-soft: rgba(8, 145, 178, 0.18);
    --cyan-text: #67e8f9;
    --completed-soft: #253047;
    --task-high-bg: rgba(127, 29, 29, 0.42);
    --task-medium-bg: rgba(113, 63, 18, 0.38);
    --task-low-bg: rgba(20, 83, 45, 0.36);
    --task-completed-bg: #1e293b;
    --slot-border: #475569;
    --slot-hover-border: #818cf8;
    --insert-line: #f8fafc;
    --body-gradient: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    --day-header-gradient: linear-gradient(180deg, rgba(23,32,51,0.98), rgba(23,32,51,0.92));
    --shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
    --hover-shadow: 0 12px 22px rgba(0, 0, 0, 0.36);
    --schedule-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    --el-color-primary-light-9: rgba(59, 130, 246, 0.18);
    --el-color-success-light-9: rgba(34, 197, 94, 0.18);
    --el-color-warning-light-9: rgba(245, 158, 11, 0.18);
    --el-color-danger-light-9: rgba(239, 68, 68, 0.18);
    --el-mask-color: rgba(0, 0, 0, 0.62);
    color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--body-gradient);
  color: var(--text);
}

[v-cloak] { display: none; }

.app-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: 100vh;
  gap: 20px;
  padding: 20px;
}

.summary-panel {
  position: sticky;
  top: 20px;
  align-self: start;
  background: rgba(var(--panel-rgb), 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.summary-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
}

.summary-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.toolbar,
.auth-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.account-menu {
  position: relative;
}

.avatar-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.22);
  cursor: pointer;
  user-select: none;
}

.avatar-button.is-guest {
  background: var(--panel);
  color: var(--brand);
  border-color: var(--line);
}

.auth-card {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(var(--panel-rgb), 0.98);
  width: min(420px, calc(100vw - 40px));
  margin-bottom: 0;
  box-shadow: var(--shadow);
}

.auth-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.auth-title {
  font-weight: 800;
}

.auth-status {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.account-setting-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}

.auth-card .account-setting-actions .el-button {
  width: auto;
  min-width: 0;
  margin-left: 0;
  padding: 4px 0;
  font-weight: 700;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.auth-mode-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.auth-mode-button.active {
  color: var(--brand-strong);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.auth-card .el-input,
.auth-card .el-button {
  width: 100%;
}

.locked-hint {
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.5;
}

.feedback-dialog {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-history {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.feedback-history-header,
.feedback-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.feedback-history h3 {
  margin: 0;
  font-size: 1rem;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.feedback-item,
.feedback-reply-source {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-muted);
  padding: 12px;
}

.feedback-content,
.feedback-reply,
.feedback-table-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.feedback-content {
  margin-top: 8px;
}

.feedback-reply {
  margin-top: 10px;
  color: var(--note);
}

.feedback-table-text {
  max-height: 7.5em;
  overflow: auto;
}

.feedback-reply-dialog {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.toolbar-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.summary-section {
  margin-top: 20px;
}

.summary-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  font-size: 1rem;
}

.summary-section .summary-subtitle {
  margin-bottom: 10px;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: var(--panel);
  margin-bottom: 12px;
}

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

.summary-card-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.summary-empty,
.empty-column {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 8px 0;
}

.summary-task,
.task-card {
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.summary-task {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--panel-muted);
}

.summary-task:hover,
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
  border-color: var(--line);
}

.task-main {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.task-title {
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.task-card .task-title,
.schedule-card .task-title,
.ddl-card .task-title,
.schedule-drag-preview .task-title,
.summary-task .task-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-scroll .task-card .task-title {
  -webkit-line-clamp: 2;
}

.task-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-note-preview {
  margin-top: 6px;
  color: var(--note);
  font-size: 0.88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.schedule-card .task-note-preview,
.ddl-card .task-note-preview {
  -webkit-line-clamp: 1;
}

.timeline-scroll .task-card .task-note-preview {
  -webkit-line-clamp: 2;
}

.summary-task[draggable="true"] {
  cursor: grab;
  touch-action: none;
}

.summary-task[draggable="true"]:active {
  cursor: grabbing;
}

.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 6px;
  flex-shrink: 0;
}

.priority-high { background: var(--danger); }
.priority-medium { background: var(--warning); }
.priority-low { background: var(--success); }

.timeline-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-header {
  background: rgba(var(--panel-rgb), 0.92);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-title {
  flex: 1 1 360px;
  min-width: 0;
}

.timeline-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.priority-tags {
  justify-content: flex-end;
}

.timeline-title h2 {
  margin: 0;
  font-size: 1.3rem;
}

.timeline-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
}

.timeline-columns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--column-width);
  gap: var(--column-gap);
  align-items: start;
  min-height: calc(100vh - 150px);
}

.day-column {
  background: rgba(var(--panel-rgb), 0.95);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.day-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--day-header-gradient);
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.day-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.day-label {
  font-weight: 800;
  font-size: 1rem;
  margin: 0 0 6px;
}

.day-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
}

.column-task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.task-card {
  padding: 12px;
  background: var(--panel);
  border-left: 5px solid transparent;
}

.task-card.priority-high { border-left-color: var(--danger); background: var(--task-high-bg); }
.task-card.priority-medium { border-left-color: var(--warning); background: var(--task-medium-bg); }
.task-card.priority-low { border-left-color: var(--success); background: var(--task-low-bg); }
.task-card.completed {
  opacity: 0.7;
  background: var(--panel-muted);
}

.task-time {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-strong);
  white-space: nowrap;
}

.task-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.meta-chip {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.subject-chip {
  background: var(--cyan-soft);
  color: var(--cyan-text);
}

.completed-badge {
  background: var(--completed-soft);
  color: var(--note);
}

.dialog-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.dialog-footer .left-actions,
.dialog-footer .right-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


.page-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.feedback-quick-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-quick-action .el-button {
  min-width: 72px;
  font-weight: 800;
}

.page-nav-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
}

.page-nav-button.active {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
}

.daily-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.daily-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(var(--panel-rgb), 0.94);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--schedule-shadow);
  padding: 12px 14px;
}

.daily-tools-title {
  font-weight: 800;
  font-size: 0.95rem;
}

.daily-tools-subtitle {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 4px;
}

.daily-tools-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.schedule-slot {
  position: relative;
  border: 1px dashed var(--slot-border);
  background: var(--panel-muted);
  border-radius: 16px;
  padding: 10px;
  margin-top: 10px;
  min-height: 100px;
}

.schedule-slot:hover {
  border-color: var(--slot-hover-border);
  background: var(--brand-soft);
}

.schedule-slot.is-drag-target {
  border-color: var(--insert-line);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.slot-title {
  font-weight: 800;
  font-size: 0.92rem;
}

.slot-time,
.slot-capacity {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.schedule-card-list {
  position: relative;
}

.schedule-insert-line {
  position: relative;
  width: calc(100% - 4px);
  height: 4px;
  margin: 10px 2px 2px;
  border-radius: 999px;
  background: var(--insert-line);
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 0 2px rgba(var(--panel-rgb), 0.9);
}

.schedule-insert-line::before,
.schedule-insert-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--insert-line);
  transform: translateY(-50%);
}

.schedule-insert-line::before {
  left: -2px;
}

.schedule-insert-line::after {
  right: -2px;
}

.schedule-card {
  position: relative;
  padding: 10px 12px;
  border-radius: 14px;
  border-left: 5px solid transparent;
  background: var(--panel);
  margin-top: 8px;
  cursor: pointer;
  box-shadow: var(--schedule-shadow);
}

.schedule-card[draggable="true"] {
  cursor: grab;
  touch-action: none;
}

.schedule-card[draggable="true"]:active {
  cursor: grabbing;
}

.schedule-card.is-dragging {
  opacity: 0.48;
  outline: 2px solid var(--insert-line);
}

.summary-task.is-dragging,
.ddl-card.is-dragging {
  opacity: 0.48;
  outline: 2px solid var(--insert-line);
}

body.is-schedule-touch-dragging,
body.is-schedule-touch-dragging * {
  user-select: none;
}

.schedule-drag-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2600;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid transparent;
  background: var(--panel);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22), 0 0 0 2px var(--insert-line);
  opacity: 0.98;
  pointer-events: none;
  touch-action: none;
  will-change: transform;
}

.schedule-drag-preview.priority-high {
  border-left-color: var(--danger);
  background: var(--task-high-bg);
}

.schedule-drag-preview.priority-medium {
  border-left-color: var(--warning);
  background: var(--task-medium-bg);
}

.schedule-drag-preview.priority-low {
  border-left-color: var(--success);
  background: var(--task-low-bg);
}

.schedule-drag-preview.completed {
  filter: grayscale(0.4);
}

.schedule-drag-preview .task-note-preview {
  -webkit-line-clamp: 2;
}

.schedule-card.priority-high { border-left-color: var(--danger); background: var(--task-high-bg); }
.schedule-card.priority-medium { border-left-color: var(--warning); background: var(--task-medium-bg); }
.schedule-card.priority-low { border-left-color: var(--success); background: var(--task-low-bg); }

.schedule-card.completed {
  filter: grayscale(0.85);
  opacity: 0.62;
  background: var(--task-completed-bg);
}

.schedule-check {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
}

.slot-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.slot-editor-hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.slot-week-tabs {
  margin-bottom: -4px;
}

.slot-editor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-editor-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 140px 140px auto;
  gap: 10px;
  align-items: center;
}

.ddl-dock {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: rgba(var(--panel-rgb), 0.94);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.ddl-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.ddl-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ddl-card {
  flex: 0 0 230px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px;
  cursor: grab;
  touch-action: none;
  border-left: 5px solid transparent;
}

.ddl-card.priority-high { border-left-color: var(--danger); }
.ddl-card.priority-medium { border-left-color: var(--warning); }
.ddl-card.priority-low { border-left-color: var(--success); }

.guide-layer {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: auto;
}

.guide-layer.is-target-clickable {
  pointer-events: none;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}

.guide-layer.is-target-clickable .guide-backdrop {
  pointer-events: none;
}

.guide-highlight {
  position: fixed;
  z-index: 3001;
  border: 2px solid var(--brand-strong);
  border-radius: 18px;
  box-shadow:
    0 0 0 9999px rgba(15, 23, 42, 0.48),
    0 0 0 6px rgba(37, 99, 235, 0.16),
    0 16px 36px rgba(15, 23, 42, 0.24);
  pointer-events: none;
  transition: top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.guide-popover {
  position: fixed;
  z-index: 3002;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 18px;
  pointer-events: auto;
}

.guide-kicker {
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.guide-popover h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.1rem;
  line-height: 1.35;
}

.guide-popover p {
  margin: 10px 0 14px;
  color: var(--note);
  font-size: 0.92rem;
  line-height: 1.65;
}

.guide-progress {
  display: grid;
  grid-template-columns: repeat(var(--guide-step-count), minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}

.guide-progress span {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.guide-progress span.active,
.guide-progress span.done {
  background: var(--brand-strong);
}

.guide-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.guide-actions > div {
  display: flex;
  gap: 8px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  gap: 18px;
  padding: 20px;
}

.admin-sidebar,
.admin-panel {
  background: rgba(var(--panel-rgb), 0.94);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.admin-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  min-height: calc(100vh - 40px);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-nav-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 11px 12px;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.admin-nav-button.active {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand);
}

.admin-sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-main,
.admin-timeline {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-panel {
  border-radius: 22px;
  padding: 18px;
}

.admin-panel-header,
.admin-timeline-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-panel h2,
.admin-timeline-toolbar h2 {
  margin: 0;
  font-size: 1.2rem;
}

.admin-panel p,
.admin-timeline-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.admin-timeline-toolbar .admin-selector-row {
  margin: 0;
}

.admin-name-editor,
.admin-name-display {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-name-editor .el-input {
  max-width: 180px;
}

.admin-name-display span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.admin-readonly-board {
  padding: 0;
  min-height: 0;
  grid-template-columns: 300px minmax(0, 1fr);
}

.admin-readonly-board .summary-panel {
  top: 20px;
}

.admin-readonly-board .summary-task,
.admin-readonly-board .task-card,
.admin-readonly-board .schedule-card,
.admin-readonly-board .ddl-card {
  cursor: default;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .admin-shell,
  .admin-readonly-board {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
    max-height: none;
  }

  .admin-sidebar {
    position: static;
    min-height: auto;
  }

  .timeline-columns {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  :root {
    --column-width: 220px;
    --column-gap: 12px;
  }

  .app-shell {
    padding: 12px;
    gap: 12px;
  }

  .admin-shell {
    padding: 12px;
    gap: 12px;
  }

  .summary-panel,
  .timeline-header,
  .day-column {
    border-radius: 18px;
  }

  .timeline-header-actions {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .auth-card {
    right: 0;
  }

  .priority-tags {
    justify-content: flex-start;
  }

  .daily-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-tools-actions {
    justify-content: flex-start;
  }

  .guide-popover {
    max-width: calc(100vw - 24px);
    border-radius: 16px;
    padding: 16px;
  }

  .guide-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .guide-actions > div {
    justify-content: flex-end;
  }

  .slot-editor-row {
    grid-template-columns: 1fr;
  }

}
