/* ==========================================================================
   面试排期工作台 · 极简紧凑单屏 (Single Screen 100vh) Safari 样式表
   ========================================================================== */

:root {
  /* 基础色彩体系 (Apple Clean Aesthetic) */
  --bg-app: #f4f5f7;
  --bg-card: #ffffff;
  --bg-card-subtle: #f9fafb;
  --bg-hover: #f1f3f5;
  --bg-active: #e5e7eb;
  
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --text-light: #ffffff;

  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --border-focus: #3b82f6;

  /* 一面主题色 (清新极速蓝) */
  --r1-primary: #2563eb;
  --r1-bg: #eff6ff;
  --r1-border: #bfdbfe;
  --r1-text: #1e40af;
  --r1-badge: #dbeafe;

  /* 二面主题色 (浓郁皇家深紫 / 重紫 · 高区分度) */
  --r2-primary: #7e22ce;
  --r2-bg: #f5f0ff;
  --r2-border: #a855f7;
  --r2-text: #4c1d95;
  --r2-badge: #7e22ce;
  --r2-badge-text: #ffffff;

  /* 试听主题色 (璀璨鲜艳金 / 亮金) */
  --trial-primary: #d97706;
  --trial-bg: #fefce8;
  --trial-border: #facc15;
  --trial-text: #854d0e;
  --trial-badge: #fde047;

  /* 状态与辅助色 */
  --accent-today-header: #0284c7;
  --accent-today-col: rgba(2, 132, 199, 0.04);
  --success-color: #10b981;
  --danger-color: #ef4444;
  --danger-bg: #fee2e2;
  --lunch-bg: #f8fafc;
  --lunch-text: #64748b;

  /* 阴影与圆角 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 3px 6px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 16px -3px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.15);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --transition-fast: 0.12s ease;
}

/* 暗黑模式 */
[data-theme="dark"] {
  --bg-app: #0f172a;
  --bg-card: #1e293b;
  --bg-card-subtle: #182234;
  --bg-hover: #334155;
  --bg-active: #475569;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --border-color: #334155;
  --border-light: #1e293b;
  --border-focus: #60a5fa;

  --r1-primary: #60a5fa;
  --r1-bg: #1e3a8a33;
  --r1-border: #1d4ed8;
  --r1-text: #93c5fd;
  --r1-badge: #1e3a8a88;

  --r2-primary: #c084fc;
  --r2-bg: rgba(126, 34, 206, 0.28);
  --r2-border: #a855f7;
  --r2-text: #f5f3ff;
  --r2-badge: #9333ea;
  --r2-badge-text: #ffffff;

  --trial-primary: #facc15;
  --trial-bg: rgba(234, 179, 8, 0.16);
  --trial-border: #eab308;
  --trial-text: #fef08a;
  --trial-badge: rgba(234, 179, 8, 0.32);

  --accent-today-header: #38bdf8;
  --accent-today-col: rgba(56, 189, 248, 0.06);
  --lunch-bg: #141d2e;
  --lunch-text: #64748b;
}

/* 页面重置：严格锁定单屏 100vh 无纵向滚动条 */
html, body {
  width: 100%;
  height: 100%;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.3;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

/* 主容器 */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* 顶部极简紧凑导航 (34px 高度) */
.app-header {
  flex-shrink: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  gap: 6px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  z-index: 20;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-icon {
  font-size: 16px;
  line-height: 1;
}

.brand-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  white-space: nowrap;
}

/* 周导航控制器 */
.nav-controls-wrapper {
  position: relative;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.week-nav-capsule {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  height: 23px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.btn-capsule-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.btn-capsule-arrow:hover {
  background: var(--bg-hover);
  color: var(--r1-primary);
}

.btn-capsule-arrow:active {
  background: var(--bg-active);
}

.current-week-display {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  height: 100%;
  cursor: pointer;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.current-week-display:hover {
  background: var(--bg-hover);
}

.btn-calendar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  margin-left: 1px;
  transition: color var(--transition-fast);
}

.current-week-display:hover .btn-calendar-icon {
  color: var(--r1-primary);
}

/* 自定义轻量月历弹层 */
.mini-calendar-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  padding: 10px;
  width: 220px;
  z-index: 100;
  animation: fadeIn 0.12s ease-out;
}

.mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mini-cal-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.mini-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.mini-cal-day {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.mini-cal-day:hover {
  background: var(--bg-hover);
  color: var(--r1-primary);
}

.mini-cal-day.is-other-month {
  color: var(--text-muted);
  opacity: 0.35;
}

.mini-cal-day.is-selected-week {
  background: var(--r1-bg);
  color: var(--r1-primary);
  font-weight: 600;
}

.mini-cal-day.is-today-circle {
  border: 1px solid var(--accent-today-header);
  font-weight: 700;
}

.week-range-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.week-date-span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.date-picker-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* 统计药丸 */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-stats-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--text-secondary);
  height: 22px;
}

.stat-pill .stat-label {
  font-weight: 500;
}

.stat-pill .stat-num {
  font-weight: 700;
  color: var(--text-primary);
}

.stat-round1 {
  background: var(--r1-bg);
  border-color: var(--r1-border);
  color: var(--r1-text);
}
.stat-round1 .stat-num {
  color: var(--r1-primary);
}

.stat-round2 {
  background: var(--r2-bg);
  border-color: var(--r2-border);
  color: var(--r2-text);
}
.stat-round2 .stat-num {
  color: var(--r2-primary);
}

.stat-trial {
  background: var(--trial-bg);
  border-color: var(--trial-border);
  color: var(--trial-text);
}
.stat-trial .stat-num {
  color: var(--trial-primary);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}
.dot-r1 { background-color: var(--r1-primary); }
.dot-r2 { background-color: var(--r2-primary); }
.dot-trial { background-color: #eab308; }

/* 头部右侧操作区 */
.header-right {
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 125px;
  height: 23px;
  padding: 0 18px 0 20px;
  font-size: 10.5px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: width var(--transition-fast);
}

.search-box input:focus {
  width: 160px;
  border-color: var(--border-focus);
  background: var(--bg-card);
}

.search-icon {
  position: absolute;
  left: 5px;
  color: var(--text-muted);
  pointer-events: none;
}

.btn-clear {
  position: absolute;
  right: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
}

/* 视图切换按钮 */
.view-toggle-group {
  display: flex;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1px;
}

.toggle-btn {
  border: none;
  background: transparent;
  padding: 2px 6px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 3px;
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* 保存指示器 */
.save-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  padding: 2px 4px;
}

.save-indicator.saved .save-dot {
  background: var(--success-color);
  box-shadow: 0 0 4px var(--success-color);
}

.save-indicator.saving .save-dot {
  background: #f59e0b;
  animation: pulse 1s infinite;
}

.save-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* 基础通用按钮体系 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
  line-height: 1;
  transition: background var(--transition-fast);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-primary {
  background: var(--r1-primary);
  color: var(--text-light);
  border-color: var(--r1-primary);
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger-color);
  border-color: #fecaca;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-icon-small {
  padding: 2px 4px;
  height: 22px;
}

.btn-today {
  padding: 1px 6px;
  height: 22px;
  font-size: 10.5px;
  font-weight: 600;
}

/* 下拉菜单 */
.action-dropdown-wrapper {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  min-width: 190px;
  z-index: 50;
  display: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

.dropdown-item.text-danger {
  color: var(--danger-color);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 3px 0;
}

/* ==========================================================================
   月看板视图样式 (全月网格排期)
   ========================================================================== */
.month-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.month-grid-wrapper {
  flex: 1;
  min-height: 0;
  height: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.month-grid-header {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 28px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.month-weekday-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-color);
}

.month-weekday-label:last-child {
  border-right: none;
}

.month-grid-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr;
  overflow-y: auto;
}

.month-day-cell {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  min-height: 0;
  position: relative;
  transition: background var(--transition-fast);
  overflow: hidden;
}

.month-day-cell:nth-child(6n) {
  border-right: none;
}

.month-day-cell.is-other-month {
  background: var(--bg-card-subtle);
  opacity: 0.45;
}

.month-day-cell.is-today {
  background: var(--accent-today-col);
}

.month-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.month-day-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 3px;
  transition: background var(--transition-fast);
}

.month-day-num:hover {
  background: var(--bg-hover);
  color: var(--r1-primary);
}

.month-day-cell.is-today .month-day-num {
  background: var(--accent-today-header);
  color: #fff;
}

.month-count-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.month-count-badge.has-interviews {
  background: var(--r1-bg);
  color: var(--r1-primary);
  border-color: var(--r1-border);
}

.month-slots-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.month-slot-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.month-slot-chip.round1 {
  background: var(--r1-bg);
  color: var(--r1-text);
  border-color: var(--r1-border);
}

.month-slot-chip.round2 {
  background: var(--r2-bg);
  color: var(--r2-text);
  border-color: var(--r2-border);
  font-weight: 600;
}

.month-slot-chip.round2 .month-chip-type {
  background: var(--r2-badge);
  color: #fff;
  border-radius: 2px;
  padding: 0 3px;
  font-weight: 700;
}

.month-slot-chip.trial {
  background: var(--trial-bg);
  color: var(--trial-text);
  border-color: var(--trial-border);
}

.month-slot-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.month-chip-time {
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
}

.month-chip-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.month-chip-type {
  font-size: 8px;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

.month-add-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0;
  cursor: pointer;
  border: 1px dashed var(--border-color);
  border-radius: 3px;
  padding: 1px;
  margin-top: 1px;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.month-day-cell:hover .month-add-quick-btn {
  opacity: 1;
}

/* ==========================================================================
   主体排期区域 (Flex 自适应填满 100vh 空间，绝无滚动条)
   ========================================================================== */
.main-content-view {
  flex: 1;
  min-height: 0; /* 核心：允许内部子容器 flex 压缩 */
  padding: 2px 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.schedule-grid-wrapper {
  flex: 1;
  min-height: 0;
  height: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.schedule-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* 表头高度固定且紧凑 (~24px) */
.schedule-table thead {
  height: 24px;
}

.header-row th {
  padding: 2px 1px;
  text-align: center;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-weight: 600;
  height: 24px;
}

.header-row th:last-child {
  border-right: none;
}

.time-col-header {
  width: 50px;
  color: var(--text-muted);
  font-size: 10.5px;
}

.day-col-header {
  cursor: pointer;
}

.day-col-header:hover {
  background: var(--bg-hover);
}

.day-col-header.is-today {
  background: var(--accent-today-col);
}

.day-header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.day-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.day-date {
  font-size: 10px;
  color: var(--text-secondary);
}

.is-today .day-name, .is-today .day-date {
  color: var(--accent-today-header);
  font-weight: 700;
}

.today-tag-small {
  font-size: 9px;
  padding: 0 4px;
  background: var(--accent-today-header);
  color: #fff;
  border-radius: 3px;
  font-weight: 600;
}

/* 表格主体：13 行均分 100vh 空间，精准扣除 24px 表头，绝无滚动条与多余溢出 */
.schedule-table tbody {
  height: calc(100% - 24px);
}

.schedule-table tbody tr {
  height: calc((100% - 24px) / 13);
}

.schedule-table tbody tr.lunch-break-row {
  height: calc((100% - 24px) / 13);
}

.time-cell {
  width: 50px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 0 1px;
}

.time-cell.time-cell-pending {
  color: var(--r1-primary);
  font-weight: 700;
  letter-spacing: 0.2px;
  background: rgba(37, 99, 235, 0.05);
}

[data-theme="dark"] .time-cell.time-cell-pending {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.09);
}

.slot-cell {
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 1px 2px;
  vertical-align: middle;
  background: var(--bg-card);
  transition: background var(--transition-fast);
}

.slot-cell.is-pending-slot {
  background: rgba(37, 99, 235, 0.015);
}

[data-theme="dark"] .slot-cell.is-pending-slot {
  background: rgba(59, 130, 246, 0.025);
}

.slot-cell:last-child {
  border-right: none;
}

.slot-cell.is-today-col {
  background-color: var(--accent-today-col);
}

/* 待跟进列专属样式 */
.followup-col-header {
  background: rgba(2, 132, 199, 0.06) !important;
  border-left: 1px dashed var(--border-color);
}

.followup-header-content .day-name {
  color: #0284c7;
}

.followup-header-content .day-date {
  color: #0369a1;
  font-weight: 500;
}

[data-theme="dark"] .followup-col-header {
  background: rgba(56, 189, 248, 0.08) !important;
}

[data-theme="dark"] .followup-header-content .day-name {
  color: #38bdf8;
}

.slot-cell.is-followup-col {
  background: rgba(2, 132, 199, 0.02);
  border-left: 1px dashed var(--border-color);
}

[data-theme="dark"] .slot-cell.is-followup-col {
  background: rgba(56, 189, 248, 0.035);
}

/* 空闲槽样式 */
.slot-cell.is-empty {
  cursor: pointer;
}

.slot-cell.is-empty:hover {
  background-color: rgba(59, 130, 246, 0.06);
}

/* 拖拽放置指示区 */
.slot-cell.drag-over {
  background: rgba(59, 130, 246, 0.15) !important;
  outline: 2px dashed var(--r1-primary);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}

[data-theme="dark"] .slot-cell.drag-over {
  background: rgba(96, 165, 250, 0.2) !important;
  outline: 2px dashed #60a5fa;
}

.empty-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-height: 25px;
  min-height: 20px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 9.5px;
  opacity: 0;
  border: 1px dashed transparent;
}

.slot-cell.is-empty:hover .empty-placeholder {
  opacity: 1;
  color: var(--r1-primary);
  border-color: var(--r1-border);
}

/* 午休行与午休文字单元格 */
.lunch-break-cell {
  background: var(--lunch-bg);
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 0;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--lunch-text);
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.time-cell-lunch {
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  color: var(--lunch-text);
  font-weight: 600;
}

/* 面试卡片 (紧凑单行自适应微排版) */
.interview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  max-height: 25px;
  min-height: 20px;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  gap: 2px;
  line-height: 1.1;
  user-select: none;
  -webkit-user-select: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast), box-shadow var(--transition-fast);
}

.interview-card:active {
  cursor: grabbing;
}

.interview-card.is-dragging {
  opacity: 0.35;
  transform: scale(0.95);
  box-shadow: var(--shadow-lg);
}

.interview-card.round1 {
  background: var(--r1-bg);
  border-color: var(--r1-border);
}

.interview-card.round1 .card-name {
  color: var(--r1-text);
}

.interview-card.round1 .round-badge {
  background: var(--r1-badge);
  color: var(--r1-primary);
  border: 1px solid var(--r1-border);
}

.interview-card.round2 {
  background: var(--r2-bg);
  border-color: var(--r2-border);
  box-shadow: 0 1px 3px rgba(126, 34, 206, 0.14);
}

.interview-card.round2 .card-name {
  color: var(--r2-text);
  font-weight: 700;
}

.interview-card.round2 .round-badge {
  background: var(--r2-badge);
  color: var(--r2-badge-text);
  border: 1px solid #6b21a8;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 2px rgba(107, 33, 168, 0.25);
}

.interview-card.trial {
  background: var(--trial-bg);
  border-color: var(--trial-border);
  box-shadow: 0 1px 3px rgba(234, 179, 8, 0.18);
}

.interview-card.trial .card-name {
  color: var(--trial-text);
  font-weight: 700;
}

.interview-card.trial .round-badge {
  background: var(--trial-badge);
  color: var(--trial-text);
  border: 1px solid var(--trial-border);
  font-weight: 700;
}

/* 不合适主题色 (全置灰 · 划线标示) */
.interview-card.unsuitable {
  background: #f1f3f5;
  border-color: #d1d5db;
  box-shadow: none;
  opacity: 0.82;
}

.interview-card.unsuitable .card-name {
  color: #6b7280;
  text-decoration: line-through;
  text-decoration-color: #9ca3af;
}

.interview-card.unsuitable .card-job {
  color: #9ca3af;
}

.interview-card.unsuitable .round-badge {
  background: #e5e7eb;
  color: #6b7280;
  border: 1px solid #d1d5db;
  font-weight: 600;
}

[data-theme="dark"] .interview-card.unsuitable {
  background: #1e293b;
  border-color: #475569;
  opacity: 0.75;
}

[data-theme="dark"] .interview-card.unsuitable .card-name {
  color: #94a3b8;
  text-decoration-color: #64748b;
}

[data-theme="dark"] .interview-card.unsuitable .card-job {
  color: #64748b;
}

[data-theme="dark"] .interview-card.unsuitable .round-badge {
  background: #334155;
  color: #94a3b8;
  border-color: #475569;
}

.card-main-info {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.card-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-job {
  font-size: 10px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.85;
}

.round-badge {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  padding: 0 3px;
  border-radius: 2px;
  line-height: 1.2;
  cursor: pointer;
}

.round-badge:hover {
  filter: brightness(0.95);
}

/* 搜索匹配 */
.slot-cell.search-dim {
  opacity: 0.2;
}

.slot-cell.search-match .interview-card {
  box-shadow: 0 0 0 2px #f59e0b;
}

/* ==========================================================================
   当日聚焦视图样式
   ========================================================================== */
.day-view {
  gap: 8px;
}

.day-view-header {
  flex-shrink: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.day-view-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.day-view-title-area h2 {
  font-size: 14px;
  font-weight: 700;
}

.today-badge {
  background: var(--accent-today-header);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
}

.day-view-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.day-timeline-card, .day-side-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.card-header {
  flex-shrink: 0;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 11px;
  font-weight: 700;
}

.card-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.day-timeline-list {
  padding: 6px 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-slot-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 12px;
}

.timeline-slot-row.is-empty {
  border-style: dashed;
  background: var(--bg-card-subtle);
  cursor: pointer;
}

.timeline-slot-row.is-r1 {
  background: var(--r1-bg);
  border-color: var(--r1-border);
}

.timeline-slot-row.is-r2 {
  background: var(--r2-bg);
  border-color: var(--r2-border);
}

.timeline-slot-row.is-r2 .timeline-name {
  color: var(--r2-text);
  font-weight: 700;
}

.timeline-slot-row.is-r2 .round-badge {
  background: var(--r2-badge);
  color: var(--r2-badge-text);
  border: 1px solid #6b21a8;
  font-weight: 700;
}

.timeline-slot-row.is-trial {
  background: var(--trial-bg);
  border-color: var(--trial-border);
}

.timeline-slot-row.is-trial .timeline-name {
  color: var(--trial-text);
  font-weight: 700;
}

.timeline-slot-row.is-trial .round-badge {
  background: var(--trial-badge);
  color: var(--trial-text);
  border: 1px solid var(--trial-border);
  font-weight: 700;
}

.timeline-slot-row.is-unsuitable {
  background: #f1f3f5;
  border-color: #d1d5db;
  opacity: 0.85;
}

.timeline-slot-row.is-unsuitable .timeline-name {
  color: #6b7280;
  text-decoration: line-through;
}

.timeline-slot-row.is-unsuitable .round-badge {
  background: #e5e7eb;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

[data-theme="dark"] .timeline-slot-row.is-unsuitable {
  background: #1e293b;
  border-color: #475569;
  opacity: 0.8;
}

[data-theme="dark"] .timeline-slot-row.is-unsuitable .timeline-name {
  color: #94a3b8;
}

[data-theme="dark"] .timeline-slot-row.is-unsuitable .round-badge {
  background: #334155;
  color: #94a3b8;
  border-color: #475569;
}

.timeline-time {
  font-size: 12px;
  font-weight: 700;
  width: 48px;
}

.timeline-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-name {
  font-weight: 700;
}

.day-focus-cards {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 180px;
}

.focus-card-item {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 11px;
}

.focus-card-item.round1 { background: var(--r1-bg); border-color: var(--r1-border); }
.focus-card-item.round2 { background: var(--r2-bg); border-color: var(--r2-border); }
.focus-card-item.trial { background: var(--trial-bg); border-color: var(--trial-border); color: var(--trial-text); }
.focus-card-item.unsuitable { background: #f1f3f5; border-color: #d1d5db; opacity: 0.8; }
.focus-card-item.unsuitable .round-badge { background: #e5e7eb; color: #6b7280; border: 1px solid #d1d5db; }
[data-theme="dark"] .focus-card-item.unsuitable { background: #1e293b; border-color: #475569; opacity: 0.75; }
[data-theme="dark"] .focus-card-item.unsuitable .round-badge { background: #334155; color: #94a3b8; border-color: #475569; }

.memo-header {
  border-top: 1px solid var(--border-color);
}

.memo-area {
  padding: 8px 10px;
  flex: 1;
  display: flex;
  min-height: 0;
}

.memo-area textarea {
  width: 100%;
  height: 100%;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.4;
  resize: none;
  outline: none;
  font-family: inherit;
}

/* ==========================================================================
   底部极简状态栏 (18px 高度)
   ========================================================================== */
.app-footer {
  flex-shrink: 0;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  font-size: 9.5px;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-tip {
  display: flex;
  align-items: center;
  gap: 2px;
}

kbd {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 0 3px;
  font-size: 8.5px;
  font-family: inherit;
  font-weight: 600;
}

/* ==========================================================================
   编辑弹窗 (Modal)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-modal);
  width: 560px;
  max-width: 94vw;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-title-icon {
  font-size: 15px;
  line-height: 1;
}

.modal-title-group h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row-compact {
  display: flex;
  gap: 10px;
}

.flex-1 {
  flex: 1;
}

.flex-2 {
  flex: 1.6;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.required {
  color: var(--danger-color);
}

.form-input {
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input.text-lg {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
}

.form-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
  height: 150px;
  max-height: 340px;
  line-height: 1.6;
  font-family: inherit;
  font-size: 12px;
  padding: 8px 10px;
}

.type-toggle-pills, .job-toggle-pills {
  display: flex;
  gap: 6px;
  height: 48px;
}

.type-pill-label, .job-pill-label {
  flex: 1;
  display: flex;
  cursor: pointer;
  height: 100%;
}

.type-pill-label input, .job-pill-label input {
  display: none;
}

.type-pill, .job-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
}

.type-pill:hover, .job-pill:hover {
  background: var(--bg-hover);
  border-color: #cbd5e1;
}

.pill-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.pill-desc {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 2px;
}

.type-pill-label input:checked + .type-pill.pill-r1 {
  background: var(--r1-primary);
  color: #fff;
  border-color: var(--r1-primary);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.35);
}

.type-pill-label input:checked + .type-pill.pill-r2 {
  background: #7e22ce;
  color: #fff;
  font-weight: 700;
  border-color: #6b21a8;
  box-shadow: 0 1px 4px rgba(126, 34, 206, 0.35);
}

[data-theme="dark"] .type-pill-label input:checked + .type-pill.pill-r2 {
  background: #9333ea;
  color: #fff;
  border-color: #a855f7;
  box-shadow: 0 1px 4px rgba(147, 51, 234, 0.45);
}

.type-pill-label input:checked + .type-pill.pill-trial {
  background: #eab308;
  color: #78350f;
  font-weight: 700;
  border-color: #ca8a04;
  box-shadow: 0 1px 4px rgba(234, 179, 8, 0.35);
}

[data-theme="dark"] .type-pill-label input:checked + .type-pill.pill-trial {
  background: #facc15;
  color: #422006;
  border-color: #fde047;
  box-shadow: 0 1px 4px rgba(250, 204, 21, 0.4);
}

/* 岗位 DC / IoT 选中样式 */
.job-pill-label input:checked + .job-pill {
  background: #0284c7;
  color: #fff;
  font-weight: 700;
  border-color: #0369a1;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.35);
}

[data-theme="dark"] .job-pill-label input:checked + .job-pill {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

.modal-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-unsuitable {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-color: var(--border-color);
  font-weight: 500;
}

.btn-unsuitable:hover {
  background: var(--bg-active);
  color: var(--text-primary);
  border-color: #9ca3af;
}

.btn-unsuitable.is-active {
  background: #64748b;
  color: #ffffff;
  border-color: #475569;
}

[data-theme="dark"] .btn-unsuitable {
  background: #334155;
  color: #cbd5e1;
  border-color: #475569;
}

[data-theme="dark"] .btn-unsuitable:hover {
  background: #475569;
  color: #ffffff;
}

.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
}

[data-theme="dark"] .toast {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--border-color);
}

/* 隐藏深浅色模式图标 */
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
:root:not([data-theme="dark"]) .sun-icon { display: none; }
:root:not([data-theme="dark"]) .moon-icon { display: block; }

/* 复制与粘贴高亮微动效 */
@keyframes cellCopyPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 2px var(--r1-primary); }
  50% { transform: scale(0.96); box-shadow: 0 0 0 3px #38bdf8; }
  100% { transform: scale(1); box-shadow: none; }
}

@keyframes cellPasteFlash {
  0% { background-color: rgba(16, 185, 129, 0.35) !important; transform: scale(1.02); }
  50% { background-color: rgba(16, 185, 129, 0.2) !important; }
  100% { background-color: transparent; transform: scale(1); }
}

.copy-flash {
  animation: cellCopyPulse 0.35s ease-out forwards;
}

.paste-flash {
  animation: cellPasteFlash 0.45s ease-out forwards;
}

/* ==========================================================================
   悬停即现备注浮动气泡 (Apple Clean Floating HUD)
   ========================================================================== */
.hover-note-tooltip {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  background: rgba(17, 24, 39, 0.94);
  color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 12px;
  width: max-content;
  min-width: 190px;
  max-width: 380px;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
  line-height: 1.4;
  user-select: none;
  -webkit-user-select: none;
}

.hover-note-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

[data-theme="dark"] .hover-note-tooltip {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.6);
}

.hover-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 5px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hover-note-candidate {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.hover-job {
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
}

.hover-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.2;
}

.hover-badge-r1 {
  background: var(--r1-primary);
  color: #ffffff;
}

.hover-badge-r2 {
  background: var(--r2-badge);
  color: #ffffff;
}

.hover-badge-trial {
  background: #facc15;
  color: #854d0e;
}

.hover-badge-unsuitable {
  background: #6b7280;
  color: #ffffff;
}

.hover-note-time {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.hover-note-content {
  font-size: 11.5px;
  color: #f8fafc;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.45;
}

.empty-note-text {
  color: #94a3b8;
  font-style: italic;
  font-size: 11px;
}

.hover-note-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 9px;
  color: #94a3b8;
}

.hover-note-footer kbd {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0 3px;
  font-size: 8px;
}

/* ==========================================================================
   内部登录鉴权安全锁 (Login Lock Gate)
   ========================================================================== */
.login-gate-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.login-gate-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-gate-header {
  text-align: center;
  margin-bottom: 22px;
}

.login-lock-icon-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.35);
}

.login-gate-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.login-gate-subtitle {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.login-gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0.7;
}

.login-form-input {
  width: 100%;
  height: 38px;
  padding: 0 10px 0 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: all 0.15s ease;
}

.login-form-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-toggle-pwd {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 12px;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.btn-toggle-pwd:hover {
  opacity: 1;
}

.login-error-msg {
  font-size: 11.5px;
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 7px 10px;
  border-radius: 6px;
  text-align: center;
  font-weight: 500;
  animation: shake 0.35s ease;
}

.btn-login-submit {
  width: 100%;
  height: 40px;
  margin-top: 4px;
  background: #2563eb;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25);
}

.btn-login-submit:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.login-gate-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 10.5px;
  color: #94a3b8;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

/* 抖动动画 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake-card {
  animation: shake 0.4s ease;
}

/* 顶部用户身份与退出胶囊 */
.user-auth-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
}

.user-auth-avatar {
  font-size: 11px;
}

.user-auth-name {
  font-weight: 600;
  color: var(--text-primary);
}

.btn-logout-link {
  background: none;
  border: none;
  color: var(--danger-color);
  font-size: 10.5px;
  cursor: pointer;
  padding: 0 2px;
  margin-left: 2px;
  border-left: 1px solid var(--border-color);
  padding-left: 6px;
  font-weight: 500;
}

.btn-logout-link:hover {
  text-decoration: underline;
}

/* 暗黑模式适配 */
[data-theme="dark"] .login-gate-card {
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .login-gate-title {
  color: #f8fafc;
}

[data-theme="dark"] .login-gate-subtitle {
  color: #94a3b8;
}

[data-theme="dark"] .login-form-label {
  color: #cbd5e1;
}

[data-theme="dark"] .login-form-input {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .login-form-input:focus {
  border-color: #3b82f6;
  background: #1e293b;
}

[data-theme="dark"] .login-gate-footer {
  border-top-color: #334155;
  color: #64748b;
}



