/* Brave Robotics — 深藏青 #14213D / 信号橙 #FCA311 / 纸白 #F5F6F8 */
:root {
  --ink: #14213D;
  --ink-soft: #4A5568;
  --accent: #FCA311;
  --accent-dark: #D98A00;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --line: #E2E6EC;
  --present: #2B8A3E;
  --absent: #C92A2A;
  --late: #E8590C;
  --excused: #5C7CFA;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

/* ---- 顶栏 ---- */
.topbar { background: var(--ink); color: #fff; }
.topbar-inner {
  max-width: 1000px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; gap: 8px; }
.brand-mark {
  background: var(--accent); color: var(--ink); font-size: 13px; font-weight: 800;
  padding: 3px 7px; border-radius: 6px; letter-spacing: 0.5px;
}
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav a { color: #E8ECF3; text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--accent); }
.lang-form { display: inline; margin: 0; }
.lang-btn {
  background: transparent; border: 1px solid #4A5A7A; color: #E8ECF3;
  border-radius: 6px; padding: 4px 10px; font-size: 13px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---- 页面 ---- */
.page { max-width: 1000px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 18px; margin: 6px 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.section-title { margin-top: 28px; }
.muted { color: var(--ink-soft); font-weight: 400; font-size: 0.9em; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; margin-bottom: 14px;
}
.card-eyebrow {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent-dark); font-weight: 700;
}
.empty { color: var(--ink-soft); text-align: center; padding: 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

/* ---- 统计 ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { text-align: center; }
.stat-num { font-size: 32px; font-weight: 800; }
.stat-label { color: var(--ink-soft); font-size: 13px; }

/* ---- 表格 ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--ink-soft); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.5px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.log-cell { max-width: 320px; color: var(--ink-soft); }

/* ---- 按钮 ---- */
.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff;
  color: var(--ink); border-radius: 8px; padding: 9px 16px; font-size: 14px;
  text-decoration: none; cursor: pointer; margin-top: 8px;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 14px; font-size: 16px; }

/* ---- 登录 ---- */
.login-card { max-width: 380px; margin: 48px auto; }
.login-card label { display: block; margin: 12px 0 4px; font-size: 14px; font-weight: 600; }
.login-card input, .att-note, textarea {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit;
}
textarea { resize: vertical; }
input:focus, textarea:focus, .chip:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

/* ---- 点名 ---- */
.att-row { display: grid; grid-template-columns: 180px 1fr 200px; gap: 12px; align-items: center; }
.att-name span { display: block; }
.att-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.att-choices input[type="radio"] { position: absolute; opacity: 0; }
.chip {
  border: 2px solid var(--line); border-radius: 999px; padding: 10px 18px;
  font-size: 14px; cursor: pointer; user-select: none; background: #fff;
}
input[type="radio"]:checked + .chip-present { background: var(--present); border-color: var(--present); color: #fff; }
input[type="radio"]:checked + .chip-absent  { background: var(--absent);  border-color: var(--absent);  color: #fff; }
input[type="radio"]:checked + .chip-late    { background: var(--late);    border-color: var(--late);    color: #fff; }
input[type="radio"]:checked + .chip-excused { background: var(--excused); border-color: var(--excused); color: #fff; }
input[type="radio"]:focus-visible + .chip { outline: 2px solid var(--ink); }

/* ---- 状态标签 ---- */
.tag { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px;
  font-weight: 700; color: #fff; }
.tag-present { background: var(--present); }
.tag-absent { background: var(--absent); }
.tag-late { background: var(--late); }
.tag-excused { background: var(--excused); }

/* ---- 提示 ---- */
.flash { border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.flash-success { background: #E6F4EA; color: var(--present); }
.flash-error { background: #FBEAEA; color: var(--absent); }

.footer { text-align: center; color: var(--ink-soft); font-size: 12px; padding: 20px; }

@media (max-width: 640px) {
  .att-row { grid-template-columns: 1fr; }
}

/* ---- 日历 ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; }
.cal-nav { display: flex; gap: 6px; }
.cal { padding: 8px; overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); min-width: 640px; }
.cal-week-head div { padding: 8px 6px; font-size: 12px; font-weight: 700;
  color: var(--ink-soft); text-transform: uppercase; text-align: center; }
.cal-cell { border: 1px solid var(--line); min-height: 92px; padding: 4px;
  margin: -1px 0 0 -1px; }
.cal-out { background: #FAFBFC; }
.cal-out .cal-date { color: #B7BFCB; }
.cal-today { background: #FFF7E6; }
.cal-today .cal-date { color: var(--accent-dark); font-weight: 800; }
.cal-date { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.cal-item { display: block; font-size: 11.5px; line-height: 1.3; border-radius: 5px;
  padding: 3px 5px; margin-bottom: 3px; text-decoration: none; color: var(--ink);
  background: #EDF0F5; border-left: 3px solid var(--ink-soft); }
a.cal-item:hover { filter: brightness(0.95); }
.cal-time { font-weight: 700; margin-right: 3px; }
.cal-completed { background: #E6F4EA; border-left-color: var(--present); }
.cal-scheduled, .cal-none { background: #EDF0F5; border-left-color: var(--excused); }
.cal-cancelled { background: #FBEAEA; border-left-color: var(--absent);
  text-decoration: line-through; color: var(--ink-soft); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin: 0 4px 0 8px; vertical-align: baseline; }
.dot-completed { background: var(--present); }
.dot-scheduled { background: var(--excused); }
.dot-cancelled { background: var(--absent); }

/* ---- 通用表单 ---- */
.form-card { max-width: 640px; }
.form-card p { margin: 0 0 14px; }
.form-card label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.form-card input[type="text"], .form-card input[type="time"], .form-card input[type="number"],
.form-card select, .form-card textarea {
  width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; font-family: inherit; background: #fff;
}
.form-card input[type="checkbox"] { width: auto; margin-right: 6px; }
.form-card ul { list-style: none; padding: 0; margin: 4px 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px; }
.form-card ul label { font-weight: 400; display: flex; align-items: center; }
.form-card .helptext { display: block; font-size: 12px; color: var(--ink-soft); }
.form-card .errorlist { color: var(--absent); font-size: 13px; list-style: none;
  padding: 0; margin: 0 0 4px; display: block; }

/* ---- 日历老师名 ---- */
.cal-teacher { display: block; font-size: 10.5px; opacity: 0.75; font-weight: 400; }
