
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --text: #1b1f24;
  --muted: #6b7280;
  --line: #e6e8ec;
  --brand: #3b6ef6;
  --brand-soft: #eaf0ff;
  --danger: #ef4444;
  --ok: #10b981;
  --warn: #f59e0b;

  --c-course: #3b6ef6;
  --c-task: #f59e0b;
  --c-exam: #ef4444;
  --c-activity: #10b981;
  --c-personal: #8b5cf6;
  --c-other: #64748b;

  
  --cc-1: #2f6feb;
  --cc-2: #0e9f6e;
  --cc-3: #7c5cf0;
  --cc-4: #d97706;
  --cc-5: #0e8fa8;
  --cc-6: #db2777;
  --cc-7: #65a30d;
  --cc-8: #e11d48;
  --cc-9: #4f46e5;
  --cc-10: #b45309;
  --cc-11: #0891b2;
  --cc-12: #9333ea;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
  --sidebar-w: 210px;
  
  --sidebar-w-collapsed: 62px;
  --sidebar-w-expanded: 210px;
  --tabbar-h: 58px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1c2029;
    --text: #e8eaed;
    --muted: #9aa2af;
    --line: #262b34;
    --brand: #6b93ff;
    --brand-soft: #1b2440;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 28px -16px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; min-height: 36px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer;
  transition: background .15s, border-color .15s, transform .06s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); background: var(--brand); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--danger); border-color: var(--line); }
.btn-danger:hover { background: rgba(239, 68, 68, .08); }
.btn-block { width: 100%; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }

.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer; font-size: 15px;
}
.icon-btn:hover { background: var(--surface-2); }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.tiny { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.only-desk { display: inline; }
.only-mobile { display: none; }

input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  padding: 9px 11px; min-height: 38px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}


[hidden] { display: none !important; }


input[type='checkbox'], input[type='radio'] {
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  flex: none;
  align-self: flex-start;
  accent-color: var(--brand);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
textarea { min-height: 72px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }


.t-course { --c: var(--c-course); }
.t-task { --c: var(--c-task); }
.t-exam { --c: var(--c-exam); }
.t-activity { --c: var(--c-activity); }
.t-personal { --c: var(--c-personal); }
.t-other { --c: var(--c-other); }

@media (max-width: 799px) {
  .only-desk { display: none; }
  .only-mobile { display: inline-grid; }
}
