:root {
  --tc-bg: #f4f7fb;
  --tc-surface: #fff;
  --tc-surface-soft: #f8fbff;
  --tc-text: #1f2d3d;
  --tc-muted: #5f6f82;
  --tc-hint: #8b99a9;
  --tc-border: #dfe7f1;
  --tc-border-strong: #c2d1e3;
  --tc-navy: #082f5f;
  --tc-navy-2: #0d3f79;
  --tc-navy-lt: #eaf2ff;
  --tc-gold: #b98a2f;
  --tc-gold-lt: #fff6dd;
  --tc-green: #20724f;
  --tc-green-lt: #e8f6ef;
  --tc-red: #b33434;
  --tc-red-lt: #fff0f0;
  --tc-amber: #9b6712;
  --tc-amber-lt: #fff4dc;
  --tc-blue: #1167aa;
  --tc-blue-lt: #e7f3ff;
  --tc-radius: 10px;
  --tc-radius-sm: 6px;
  --tc-font: -apple-system, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --tc-shadow: 0 4px 18px rgba(8, 47, 95, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--tc-font);
  font-size: 16px;
  background: var(--tc-bg);
  color: var(--tc-text);
  line-height: 1.55;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.tc-login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(at 30% 20%, rgba(83, 74, 183, 0.08), transparent 50%),
    radial-gradient(at 70% 80%, rgba(186, 117, 23, 0.06), transparent 50%),
    var(--tc-bg);
  padding: 24px;
}
.tc-login-card {
  width: 100%; max-width: 440px;
  background: var(--tc-surface);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow);
  padding: 40px 36px;
}
.tc-login-brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.tc-login-brand img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(8,47,95,0.16);
}
.tc-login-brand .tc-name { font-size: 18px; font-weight: 700; color: var(--tc-navy); letter-spacing: 0.5px; }
.tc-login-title { font-size: 22px; font-weight: 600; margin-bottom: 6px; color: var(--tc-text); }
.tc-login-kicker { font-size: 14px; color: var(--tc-muted); margin-bottom: 28px; }

.tc-field { margin-bottom: 18px; }
.tc-field label {
  display: block; font-size: 13px; color: var(--tc-muted);
  margin-bottom: 6px; font-weight: 500;
}
.tc-input {
  width: 100%; height: 50px;
  border: 1px solid var(--tc-border); border-radius: var(--tc-radius-sm);
  padding: 0 16px; font-size: 17px; font-family: var(--tc-font);
  background: var(--tc-surface-soft); color: var(--tc-text);
  outline: none; transition: border 0.15s, background 0.15s;
}
.tc-input:focus { border-color: var(--tc-navy); background: var(--tc-surface); }
.tc-input.tc-empno { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 4px; }

.tc-btn {
  height: 50px; width: 100%;
  border: none; border-radius: var(--tc-radius-sm);
  background: var(--tc-navy); color: #fff;
  font-size: 17px; font-weight: 500; font-family: var(--tc-font);
  cursor: pointer; transition: background 0.15s, opacity 0.15s;
  box-shadow: 0 4px 12px rgba(8,47,95,0.16);
}
.tc-btn:hover { background: var(--tc-navy-2); }
.tc-btn:active { opacity: 0.88; }
.tc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tc-btn-secondary { background: transparent; color: var(--tc-navy); border: 1px solid var(--tc-navy); }
.tc-btn-ghost { background: transparent; color: var(--tc-muted); }
.tc-btn-sm { height: 38px; font-size: 14px; padding: 0 16px; width: auto; }

.tc-error {
  font-size: 13px; color: var(--tc-red);
  background: var(--tc-red-lt);
  padding: 10px 14px; border-radius: var(--tc-radius-sm);
  margin-bottom: 14px; display: none;
}
.tc-error.tc-show { display: block; }
.tc-login-hint {
  margin-top: 22px; font-size: 12px; color: var(--tc-hint); text-align: center; line-height: 1.7;
}

.tc-app { min-height: 100vh; display: flex; flex-direction: column; }
.tc-header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  background: var(--tc-surface);
  border-bottom: 1px solid var(--tc-border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  flex-wrap: wrap;
}
.tc-header-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tc-header-brand img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(8,47,95,0.12);
}
.tc-header-brand .tc-title { font-size: 16px; font-weight: 700; color: var(--tc-navy); }

.tc-course-select {
  flex: 1; min-width: 280px; max-width: 480px;
  height: 44px; padding: 0 14px;
  border: 1px solid var(--tc-border-strong); border-radius: var(--tc-radius-sm);
  background: var(--tc-surface-soft); font-size: 15px; font-family: var(--tc-font);
  color: var(--tc-text); cursor: pointer; outline: none;
}
.tc-course-select:focus { border-color: var(--tc-navy); }
.tc-course-select:disabled { opacity: 0.5; cursor: not-allowed; }

.tc-header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tc-icon-btn {
  width: 44px; height: 44px;
  background: var(--tc-surface-soft);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--tc-muted);
  position: relative;
}
.tc-icon-btn:active { background: var(--tc-border); }
.tc-icon-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--tc-red); color: #fff;
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.tc-user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--tc-surface-soft);
  border: 1px solid var(--tc-border);
  border-radius: 22px; cursor: pointer;
}
.tc-user-chip .tc-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--tc-navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.tc-user-chip .tc-uinfo { font-size: 13px; line-height: 1.3; }
.tc-user-chip .tc-uinfo .tc-uname { font-weight: 500; }
.tc-user-chip .tc-uinfo .tc-uno { font-family: ui-monospace, monospace; color: var(--tc-muted); font-size: 11px; }

.tc-main {
  flex: 1; overflow: auto;
  padding: 24px;
}
.tc-empty-state {
  max-width: 480px; margin: 80px auto;
  background: var(--tc-surface);
  border: 1px dashed var(--tc-border-strong);
  border-radius: var(--tc-radius);
  padding: 56px 32px; text-align: center;
}
.tc-empty-state .tc-emoji { font-size: 48px; margin-bottom: 16px; opacity: 0.75; }
.tc-empty-state .tc-title-md { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.tc-empty-state .tc-desc { font-size: 14px; color: var(--tc-muted); line-height: 1.7; }

.tc-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(40, 40, 60, 0.42);
  z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.tc-modal-overlay.tc-show { display: flex; }
.tc-modal {
  width: 100%; max-width: 460px;
  background: var(--tc-surface); border-radius: var(--tc-radius);
  box-shadow: 0 16px 60px rgba(0,0,0,0.18);
  overflow: hidden;
}
.tc-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--tc-border);
  display: flex; align-items: center; justify-content: space-between;
}
.tc-modal-header .tc-mtitle { font-size: 16px; font-weight: 600; }
.tc-modal-close {
  background: transparent; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 6px;
  font-size: 20px; color: var(--tc-muted);
}
.tc-modal-close:active { background: var(--tc-border); }
.tc-modal-body { padding: 22px; }
.tc-modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--tc-border);
  display: flex; gap: 10px; justify-content: flex-end;
}
.tc-pwd-hint {
  font-size: 12px; color: var(--tc-muted); margin-top: 6px;
}
.tc-pwd-must {
  background: var(--tc-amber-lt); color: var(--tc-amber);
  padding: 10px 14px; border-radius: var(--tc-radius-sm);
  font-size: 13px; margin-bottom: 16px;
  border: 1px solid #f0d8b0;
}

.tc-toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(40, 40, 50, 0.94); color: #fff;
  padding: 12px 22px; border-radius: 22px;
  font-size: 14px; z-index: 200;
  opacity: 0; pointer-events: none;
  transition: all 0.25s;
}
.tc-toast.tc-show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 768px) {
  body { font-size: 15px; }
  .tc-header { padding: 12px 16px; gap: 10px; }
  .tc-course-select { min-width: 0; }
  .tc-user-chip .tc-uinfo { display: none; }
  .tc-main { padding: 16px; }
  .tc-login-card { padding: 28px 24px; }
}

.tc-att-wrap { max-width: 1200px; margin: 0 auto; }

.tc-att-header {
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--tc-shadow);
}
.tc-att-title {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.tc-att-classname {
  font-size: 18px; font-weight: 700; color: var(--tc-navy);
}
.tc-att-orgtag {
  font-size: 11px; padding: 2px 10px;
  background: var(--tc-navy-lt); color: var(--tc-navy);
  border-radius: 10px; font-weight: 500;
}
.tc-att-meta {
  font-size: 13px; color: var(--tc-muted);
  padding: 8px 12px;
  background: var(--tc-surface-soft);
  border-radius: var(--tc-radius-sm);
}

.tc-att-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tc-att-batch { display: flex; gap: 6px; }
.tc-att-spacer { flex: 1; }

.tc-table-wrap {
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  overflow: hidden;
  box-shadow: var(--tc-shadow);
  margin-bottom: 14px;
  overflow-x: auto;
}
.tc-table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tc-table-wrap thead th {
  background: var(--tc-navy); color: #fff;
  padding: 12px 14px; text-align: left;
  font-weight: 500; font-size: 13px;
  white-space: nowrap;
}
.tc-table-wrap tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--tc-border);
  vertical-align: middle;
}
.tc-table-wrap tbody tr:hover { background: #f9fbff; }
.tc-table-wrap tbody tr:last-child td { border-bottom: none; }
.tc-table-wrap .empty-row td {
  text-align: center; padding: 30px;
  color: var(--tc-hint);
}
.tc-cell-id {
  font-size: 11px; color: var(--tc-muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  white-space: nowrap;
}
.tc-cell-name { font-weight: 500; color: var(--tc-text); }
.tc-cell-jp { font-size: 11px; color: var(--tc-hint); }
.tc-cell-note input {
  width: 100%; font-size: 12px; padding: 5px 8px;
  border: 1px solid var(--tc-border); border-radius: 4px;
  font-family: var(--tc-font); color: var(--tc-text);
  background: var(--tc-surface-soft);
  outline: none; transition: border 0.15s, background 0.15s;
}
.tc-cell-note input:focus { border-color: var(--tc-navy); background: var(--tc-surface); }

.tc-stag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  margin-right: 4px;
  border: 1px solid var(--tc-border);
  background: var(--tc-surface-soft);
  color: var(--tc-muted);
  opacity: 0.55;
  transition: all 0.15s;
  user-select: none;
}
.tc-stag:hover { opacity: 0.85; border-color: var(--tc-border-strong); }
.tc-stag-on { opacity: 1; }
.tc-stag-出席.tc-stag-on { background: var(--tc-green-lt); color: var(--tc-green); border-color: var(--tc-green); }
.tc-stag-迟到.tc-stag-on { background: var(--tc-amber-lt); color: var(--tc-amber); border-color: var(--tc-amber); }
.tc-stag-早退.tc-stag-on { background: var(--tc-amber-lt); color: var(--tc-amber); border-color: var(--tc-amber); border-style: dashed; }
.tc-stag-请假.tc-stag-on { background: var(--tc-blue-lt); color: var(--tc-blue); border-color: var(--tc-blue); }
.tc-stag-缺席.tc-stag-on { background: var(--tc-red-lt); color: var(--tc-red); border-color: var(--tc-red); }

.tc-att-stats {
  background: var(--tc-surface);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 18px 22px;
  box-shadow: var(--tc-shadow);
}
.tc-att-stats-title {
  font-size: 14px; font-weight: 600; color: var(--tc-navy);
  margin-bottom: 14px;
}
.tc-att-statsbar {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 768px) {
  .tc-att-statsbar { grid-template-columns: repeat(4, 1fr); }
}
.tc-astat {
  text-align: center;
  padding: 12px 4px;
  background: var(--tc-surface-soft);
  border-radius: var(--tc-radius-sm);
}
.tc-astat .tc-anum { font-size: 22px; font-weight: 600; line-height: 1.1; color: var(--tc-text); }
.tc-astat .tc-albl { font-size: 11px; color: var(--tc-muted); margin-top: 4px; }
.tc-ast-good { background: var(--tc-green-lt); }
.tc-ast-good .tc-anum { color: var(--tc-green); }
.tc-ast-bad { background: var(--tc-red-lt); }
.tc-ast-bad .tc-anum { color: var(--tc-red); }

.tc-att-alerts { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.tc-att-alert {
  font-size: 12px; padding: 8px 12px;
  background: var(--tc-amber-lt); color: var(--tc-amber);
  border-radius: var(--tc-radius-sm);
  border-left: 3px solid var(--tc-amber);
}
.tc-att-alert-ok {
  margin-top: 12px;
  font-size: 13px; padding: 10px 14px;
  background: var(--tc-green-lt); color: var(--tc-green);
  border-radius: var(--tc-radius-sm);
  border-left: 3px solid var(--tc-green);
}

/* ===== 语校模式时段格子 + 评价 ===== */
.tc-att-orgtag.tag-eli { background: #eaf2ff; color: var(--tc-navy); }
.tc-att-orgtag.tag-sun { background: var(--tc-amber-lt); color: var(--tc-amber); }
.tc-att-modetag {
  font-size: 11px; padding: 3px 10px;
  background: var(--tc-surface-soft); color: var(--tc-muted);
  border: 1px solid var(--tc-border);
  border-radius: 10px; font-weight: 500;
}

.tc-period-cell {
  text-align: center; font-size: 18px; font-weight: 600;
  cursor: pointer; user-select: none;
  transition: background 0.15s;
  border-radius: 4px;
}
.tc-period-cell:hover { background: var(--tc-navy-lt); }
.tc-p-○ { color: var(--tc-green); }
.tc-p-△ { color: var(--tc-amber); }
.tc-p-× { color: var(--tc-red); }
.tc-p-empty { color: var(--tc-hint); font-weight: 400; font-size: 14px; }

.tc-cell-eval { font-size: 12px; }
.tc-eval-text {
  display: inline-block;
  max-width: 180px;
  vertical-align: middle;
  color: var(--tc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tc-btn-xs {
  height: 22px; font-size: 11px; padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--tc-border);
  background: var(--tc-surface-soft); color: var(--tc-muted);
  cursor: pointer; font-family: var(--tc-font);
  vertical-align: middle;
  line-height: 20px;
  display: inline-block;
}
.tc-btn-xs:hover { border-color: var(--tc-border-strong); }
.tc-btn-xs.tc-btn-secondary { background: var(--tc-navy-lt); color: var(--tc-navy); border-color: var(--tc-navy); }

