/* =============================================================
   Design Tokens — Admin Web
   所有颜色、间距、圆角、阴影和动画参数均在此定义。
   新增样式应通过 var(--xxx) 引用；不得在其他位置硬编码已有 token
   对应的原始值。旧别名保留在文件末尾，现有选择器无需修改。
   ============================================================= */
:root {

  /* -- 品牌色（森林绿）----------------------------------------- */
  --color-brand:           #236847;   /* 主操作、链接、强调 */
  --color-brand-hover:     #1b5439;   /* hover 深化 */
  --color-brand-active:    #164430;   /* pressed / active */
  --color-brand-subtle:    #e8f2ec;   /* chip 背景、tag 背景 */
  --color-brand-emphasis:  #10b981;   /* 排班表分组头、强绿 */

  /* -- 侧边栏暗色表面 ------------------------------------------ */
  --color-sidebar-bg:      #1f3028;
  --color-sidebar-text:    #e9f0eb;
  --color-sidebar-muted:   #9db2a5;
  --color-sidebar-border:  #3b5246;
  --color-sidebar-active:  #315441;
  --color-sidebar-nav:     #b7c9bd;

  /* -- 中性文字 ------------------------------------------------- */
  --color-text-primary:    #1e2923;   /* 标题、正文 */
  --color-text-secondary:  #718078;   /* 辅助文字、label */
  --color-text-placeholder:#9ca3af;   /* 占位符、弱提示 */
  --color-text-inverse:    #ffffff;   /* 深色背景上的文字 */
  --color-text-link:       #236847;   /* 行内链接 */

  /* -- 中性表面 ------------------------------------------------- */
  --color-surface-page:    #ffffff;   /* 卡片、弹窗、表格底色 */
  --color-surface-wash:    #f5f7f5;   /* 页面背景 */
  --color-surface-raised:  #fafcfb;   /* 表头、斑马行、轻抬升 */
  --color-surface-overlay: #f3f7f4;   /* 名字列固定背景、hover 行 */

  /* -- 边框与分割线 --------------------------------------------- */
  --color-border:          #dfe6e1;   /* 默认边框 */
  --color-border-subtle:   #edf1ee;   /* 表格行分割线 */
  --color-border-strong:   #c6d9cc;   /* 强调边框、分组行顶边 */

  /* -- 反馈色：成功 --------------------------------------------- */
  --color-success:         #2ca276;
  --color-success-text:    #236847;
  --color-success-subtle:  #f3faf5;
  --color-success-border:  #c9dfd7;

  /* -- 反馈色：警告 --------------------------------------------- */
  --color-warning:         #a56b12;
  --color-warning-text:    #78350f;
  --color-warning-subtle:  #fff5df;
  --color-warning-border:  #ead5ad;

  /* -- 反馈色：危险 / 错误 -------------------------------------- */
  --color-danger:          #b63b32;
  --color-danger-text:     #b63b32;
  --color-danger-subtle:   #fff0ee;
  --color-danger-border:   #efc5c0;

  /* -- 反馈色：信息 --------------------------------------------- */
  --color-info:            #2e6592;
  --color-info-subtle:     #eaf2fb;

  /* -- 排班表 Chip 色板 ----------------------------------------- */
  /* 用 --shift-color 覆盖单个 chip 背景时以此为基础参考。        */
  --shift-pharm-bg:        linear-gradient(135deg,#3b82f6 0%,#2563eb 100%);
  --shift-pharm-text:      #ffffff;
  --shift-nurse-bg:        linear-gradient(135deg,#f59e0b 0%,#d97706 100%);
  --shift-nurse-text:      #ffffff;
  --shift-common-bg:       #F9E8C8;
  --shift-common-text:     #78350f;
  --shift-special-bg:      linear-gradient(135deg,#8b5cf6 0%,#7c3aed 100%);
  --shift-special-text:    #ffffff;
  --shift-rest-bg:         #f3f4f6;
  --shift-rest-text:       rgba(107,114,128,0.3);

  /* -- 字体族 --------------------------------------------------- */
  --font-family-base: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;

  /* -- 字号阶梯 ------------------------------------------------- */
  --font-size-xs:    10px;   /* 版本号、极小标注 */
  --font-size-sm:    11px;   /* 表头、辅助文字、tag */
  --font-size-base:  13px;   /* 桌面正文（移动端 14px，见 body） */
  --font-size-md:    14px;   /* 移动端正文、弹窗正文 */
  --font-size-lg:    16px;   /* 品牌名、panel 标题 */
  --font-size-xl:    18px;   /* 弹窗标题 */
  --font-size-2xl:   21px;   /* 桌面页标题 */
  --font-size-hero:  25px;   /* 大数字、metric-value */

  /* -- 字重 ----------------------------------------------------- */
  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  /* -- 行高 ----------------------------------------------------- */
  --line-height-tight: 1.25;
  --line-height-snug:  1.4;
  --line-height-base:  1.5;

  /* -- 间距阶梯（4px 基准）------------------------------------- */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* -- 圆角 ----------------------------------------------------- */
  --radius-sm:   4px;     /* 小 tag、badge、tooltip */
  --radius-md:   6px;     /* 按钮、输入框、chip */
  --radius-lg:   8px;     /* 表头、toolbar 分区 */
  --radius-xl:   12px;    /* 弹窗、Toast */
  --radius-2xl:  16px;    /* 排班板滚动容器 */
  --radius-full: 9999px;  /* 圆形 avatar、pill badge */

  /* -- 阴影 ----------------------------------------------------- */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(22,42,31,0.10);
  --shadow-lg: 0 10px 30px rgba(22,42,31,0.14);
  --shadow-xl: 0 20px 60px rgba(17,24,39,0.15), 0 0 0 1px rgba(0,0,0,0.05);

  /* -- 动画时长与缓动 ------------------------------------------- */
  --ease-default:  cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.15s;   /* hover、chip 微动 */
  --duration-base: 0.2s;    /* Toast、backdrop */
  --duration-slow: 0.3s;    /* modal slide-in */
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1); /* macOS 弹性反馈 */

  /* -- 旧别名（向后兼容，勿删除；现有选择器依赖这些名称）------- */
  --ink:        var(--color-text-primary);
  --muted:      var(--color-text-secondary);
  --line:       var(--color-border);
  --paper:      var(--color-surface-page);
  --wash:       var(--color-surface-wash);
  --green:      var(--color-brand);
  --green-soft: var(--color-brand-subtle);
  --amber:      var(--color-warning);
  --red:        var(--color-danger);
}
* { box-sizing:border-box; }
body { margin:0; min-width:1080px; background:var(--wash); color:var(--ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; font-size:14px; }
button,input,select { font:inherit; }
button { border:0; cursor:pointer; }
.request-filter { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }.request-filter button { min-height:36px; padding:0 12px; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--muted); }.request-filter button.active { border-color:var(--green); background:var(--green-soft); color:var(--green); font-weight:700; }.request-status-filter { padding-top:14px; border-top:1px solid var(--line); }.request-status-filter button { display:inline-flex; align-items:center; gap:7px; }.request-status-filter button strong { min-width:20px; padding:2px 5px; border-radius:10px; background:#eef2ef; color:var(--ink); font-size:11px; }.request-status-filter button.active strong { background:#fff; color:var(--green); }.request-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }.request-search { width:min(360px,100%); min-height:40px; padding:9px 11px; border:1px solid var(--line); background:#fff; }
.app-shell { display:flex; min-height:100vh; }
.app-shell.locked { display:none; }
/* --- 现代化超轻量登录界面 (Zero External Assets) --- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 84px;
  background: radial-gradient(circle at 15% 20%, rgba(35,104,71,0.08) 0%, transparent 45%),
              radial-gradient(circle at 85% 80%, rgba(16,185,129,0.06) 0%, transparent 45%),
              #f4f7f5;
  position: relative;
  overflow: hidden;
}
.login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(31,48,40,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.login-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  max-width: 920px;
  width: 100%;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(22,42,31,0.12), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(223,230,225,0.8);
  overflow: hidden;
}
.login-hero {
  background: linear-gradient(145deg, #1f3028 0%, #15241d 100%);
  color: #e9f0eb;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.login-hero::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.login-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #a8d5be;
  width: fit-content;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.login-hero-title h2 {
  margin: 24px 0 12px;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.login-hero-title p {
  margin: 0;
  font-size: 13px;
  color: #9db2a5;
  line-height: 1.6;
}
.login-hero-features {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}
.hero-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.feature-icon {
  font-size: 16px;
  line-height: 1;
  padding-top: 2px;
}
.hero-feature-item strong {
  display: block;
  font-size: 13px;
  color: #f3f7f4;
}
.hero-feature-item small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #8c9e93;
}
.login-box {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}
.login-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}
.login-brand .brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8f2ec;
  color: var(--color-brand);
  font-size: 16px;
  font-weight: 700;
}
.login-brand strong {
  display: block;
  font-size: 16px;
  color: #1e2923;
}
.login-brand span {
  display: block;
  margin-top: 2px;
  color: #718078;
  font-size: 11px;
}
.login-header h1 {
  margin: 0;
  font-size: 22px;
  color: #111827;
  font-weight: 700;
}
.login-header p {
  margin: 6px 0 20px;
  color: #6b7280;
  font-size: 13px;
}
.login-error {
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.login-field label {
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}
.login-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  font-size: 14px;
  transition: all 0.18s ease;
}
.login-field input:focus {
  outline: none;
  border-color: var(--color-brand);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(35,104,71,0.15);
}
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 22px;
}
.remember-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.remember-login input[type="checkbox"] {
  accent-color: var(--color-brand);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.login-submit {
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #236847 0%, #175438 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(35,104,71,0.28);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-submit:hover {
  background: linear-gradient(135deg, #1e5c3e 0%, #12442d 100%);
  box-shadow: 0 6px 18px rgba(35,104,71,0.36);
  transform: translateY(-1px);
}
.login-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(35,104,71,0.2);
}
.btn-arrow {
  font-size: 16px;
  transition: transform 0.18s ease;
}
.login-submit:hover .btn-arrow {
  transform: translateX(3px);
}
.login-hint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #e5e7eb;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.hint-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9ca3af;
  margin-top: 5px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .login-hero {
    padding: 28px 24px;
  }
  .login-box {
    padding: 28px 24px;
  }
  .login-hero-features {
    display: none;
  }
}
.sidebar { position:sticky; top:0; height:100vh; width:244px; flex:0 0 244px; display:flex; flex-direction:column; overflow-y:auto; padding:24px 16px 18px; background:var(--color-sidebar-bg); color:var(--color-sidebar-text); }
.brand { display:flex; gap:11px; align-items:center; padding:0 10px 30px; }.brand-mark { width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--color-sidebar-muted); color:var(--color-sidebar-text); font-weight:700; }.brand strong { display:block; font-size:16px; }.brand span,.admin-profile span { display:block; margin-top:4px; color:var(--color-sidebar-muted); font-size:12px; }
.workspace-label { padding:0 10px 8px; color:var(--color-sidebar-muted); font-size:11px; }.period-select { display:flex; justify-content:space-between; padding:11px 10px; border:1px solid var(--color-sidebar-border); color:var(--color-sidebar-text); font-size:12px; }
.nav-list { display:grid; gap:5px; margin-top:24px; }.nav-item { display:flex; gap:12px; align-items:center; padding:12px 11px; background:transparent; color:var(--color-sidebar-nav); text-align:left; }.nav-item:hover,.nav-item.active { background:var(--color-sidebar-active); color:var(--color-sidebar-text); }.nav-icon { width:18px; color:var(--color-sidebar-muted); font-size:17px; text-align:center; }.nav-item em { min-width:20px; margin-left:auto; padding:3px 6px; border-radius:var(--radius-full); background:var(--color-danger); color:var(--color-text-inverse); font-size:11px; font-style:normal; text-align:center; }.nav-item em.soft { background:var(--color-sidebar-border); }.sidebar-bottom { margin-top:auto; }.admin-profile { display:flex; align-items:center; gap:9px; padding:16px 8px; border-top:1px solid var(--color-sidebar-border); }.avatar { width:30px; height:30px; display:grid; place-items:center; background:var(--color-brand-subtle); color:var(--color-brand); font-size:12px; }.admin-profile strong { font-size:13px; }.admin-profile button { margin-left:auto; background:transparent; color:var(--color-sidebar-muted); font-size:17px; }.version { padding:0 8px; color:var(--color-sidebar-muted); font-size:11px; }.version.error { color:var(--color-danger-border); }
.main-content { flex:1; min-width:0; }.topbar { height:68px; display:flex; align-items:center; justify-content:space-between; padding:0 38px; border-bottom:1px solid var(--line); background:var(--paper); }.breadcrumbs { display:flex; gap:12px; color:var(--muted); }.breadcrumbs b { color:#bac6bf; font-weight:400; }.breadcrumbs strong { color:var(--ink); font-weight:600; }.top-actions { display:flex; gap:12px; align-items:center; }.mobile-release { display:none; }.icon-btn,.outline-btn { background:transparent; color:var(--muted); }.icon-btn { position:relative; font-size:20px; }.icon-btn i { position:absolute; top:-5px; right:-7px; min-width:15px; padding:2px 4px; border-radius:10px; background:var(--red); color:#fff; font-size:10px; font-style:normal; }.refresh-btn { width:36px; height:36px; border:1px solid var(--line); color:var(--green); font-size:23px; line-height:1; }.refresh-btn:disabled { opacity:.5; cursor:wait; }.outline-btn { padding:7px 12px; border:1px solid var(--line); color:var(--ink); }
.content { max-width:1440px; margin:0 auto; padding:30px 38px 50px; }.page-heading { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:26px; }.page-heading h1 { margin:0; font-size:26px; letter-spacing:0; }.page-heading p { margin:7px 0 0; color:var(--muted); }.primary-btn,.secondary-btn { padding:10px 16px; }.primary-btn { background:var(--green); color:#fff; }.secondary-btn { border:1px solid var(--line); background:#fff; color:var(--ink); }.button-row { display:flex; gap:10px; }
.metric-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }.metric,.panel { border:1px solid var(--line); background:var(--paper); }.metric { padding:20px; }.metric-label { color:var(--muted); }.metric-value { margin-top:12px; font-size:30px; font-weight:700; }.metric-note { margin-top:8px; color:var(--muted); font-size:12px; }.metric-note.warn { color:var(--amber); }.panel-grid { display:grid; grid-template-columns:1.18fr .82fr; gap:16px; margin-top:16px; }.panel { padding:20px; }.panel h2 { margin:0; font-size:16px; }.panel-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }.text-btn { background:transparent; color:var(--green); }.alert-list,.request-list { display:grid; gap:11px; }.alert-row,.request-row { display:flex; justify-content:space-between; gap:20px; padding:13px 0; border-bottom:1px solid #edf1ee; }.alert-row:last-child,.request-row:last-child { border-bottom:0; }.alert-main strong,.request-main strong { display:block; font-weight:600; }.alert-main span,.request-main span { display:block; margin-top:5px; color:var(--muted); font-size:12px; }.status { align-self:flex-start; padding:4px 8px; color:var(--amber); background:#fff5df; font-size:12px; white-space:nowrap; }.status.green { color:var(--green); background:var(--green-soft); }.status.red { color:var(--red); background:#fff0ee; }
.dashboard-check-summary { margin-top:16px; }.dashboard-check-boxes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }.dashboard-check-box { min-height:82px; display:flex; flex-direction:column; justify-content:space-between; padding:13px 14px; border:1px solid var(--line); border-radius:6px; background:#fafcfb; }.dashboard-check-box.is-ok { border-color:#c8dfd0; background:#f2f8f4; }.dashboard-check-box.has-issue { border-color:#efd1cd; background:#fff7f5; }.dashboard-check-name { color:var(--muted); font-size:12px; line-height:1.4; }.dashboard-check-result { font-size:18px; line-height:1.25; }.dashboard-check-box.is-ok .dashboard-check-result { color:var(--green); }.dashboard-check-box.has-issue .dashboard-check-result { color:var(--red); }
.toolbar { display:flex; justify-content:space-between; gap:16px; margin-bottom:16px; }.search { width:280px; padding:10px 12px; border:1px solid var(--line); background:#fff; }.filter { padding:10px 12px; border:1px solid var(--line); background:#fff; }.table-wrap { overflow:auto; border:1px solid var(--line); background:#fff; }.data-table { width:100%; border-collapse:collapse; }.data-table th,.data-table td { padding:14px 16px; border-bottom:1px solid #edf1ee; text-align:left; white-space:nowrap; }.data-table th { background:#fafcfb; color:var(--muted); font-size:12px; font-weight:500; }.data-table tr:last-child td { border-bottom:0; }.person { display:flex; gap:10px; align-items:center; }.person-mark { width:30px; height:30px; display:grid; place-items:center; background:var(--green-soft); color:var(--green); font-size:12px; }.tag { display:inline-block; padding:4px 8px; background:#f0f4f1; color:#53645a; font-size:12px; }.tag.pharm { background:#eaf2fb; color:#2e6592; }.tag.special { background:#fff5df; color:#95620e; }.link-btn { background:transparent; color:var(--green); }.subtle { color:var(--muted); }
.data-table tbody tr:nth-child(even) td { background:#fbfcfb; }
.danger-copy { color:var(--red) !important; font-weight:600; }
.sync-notice { margin-bottom:10px; padding:8px 12px; border:1px solid #e8d4a7; background:#fffaf0; color:var(--amber); font-size:12px; }
.schedule-read-gate,.schedule-history-panel { margin-bottom:12px; border:1px solid var(--line); background:#fff; }
.schedule-read-gate { display:flex; align-items:center; gap:14px; padding:18px; border-left:4px solid var(--green); background:#f5faf7; }
.schedule-read-gate strong { font-size:15px; }.schedule-read-gate span { flex:1; color:var(--muted); font-size:12px; }
.schedule-history-panel { padding:10px 12px; }.schedule-history-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }.schedule-history-heading strong,.schedule-history-heading span { display:block; }.schedule-history-heading span { margin-top:2px; color:var(--muted); font-size:11px; }.schedule-history-count { color:var(--green) !important; white-space:nowrap; }.schedule-history-tabs { display:flex; gap:3px; max-width:100%; overflow-x:auto; padding-bottom:3px; border-bottom:1px solid var(--line); scrollbar-width:thin; }.schedule-history-tab { min-width:58px; padding:6px 10px 5px; border:1px solid transparent; border-bottom:0; background:#f3f6f4; color:var(--muted); font-size:11px; white-space:nowrap; }.schedule-history-tab small { display:block; margin-top:1px; font-size:9px; }.schedule-history-tab.is-active { position:relative; z-index:1; margin-bottom:-1px; border-color:var(--line); background:#fff; color:var(--green); font-weight:600; }.schedule-history-change-line { display:flex; flex-wrap:wrap; gap:0 8px; min-height:24px; padding:5px 2px; color:var(--muted); font-size:11px; line-height:1.35; }.schedule-history-published-at { color:var(--ink); white-space:nowrap; }.schedule-history-change-summary { min-width:0; }.schedule-history-preview { border-top:1px solid var(--line); padding-top:7px; }.schedule-history-preview-head { display:flex; justify-content:space-between; gap:8px; margin-bottom:5px; font-size:11px; }.schedule-history-preview-head span,.schedule-history-preview-state { color:var(--muted); font-size:11px; }.schedule-history-preview-state { padding:10px 0; }.schedule-history-preview-state.is-error { color:var(--red, #a33); }.schedule-history-preview-scroll { overflow-x:auto; }.schedule-history-preview table { width:100%; min-width:700px; border-collapse:collapse; font-size:11px; }.schedule-history-preview th,.schedule-history-preview td { border:1px solid #e4e9e5; padding:4px 6px; text-align:center; white-space:nowrap; }.schedule-history-preview thead th { background:#f3f6f4; color:var(--muted); }.schedule-history-preview thead small { display:block; font-weight:400; font-size:10px; }.schedule-history-preview tbody th { text-align:left; background:#fafcfb; }.schedule-history-shift { display:inline-block; min-width:36px; padding:3px 5px; background:#e1f1e7; color:#24653c; }.schedule-history-shift.is-rest { background:#f5e5e8; color:#8e6870; }
.schedule-history-review-layout { display:grid; grid-template-columns:minmax(0,1fr) 370px; gap:12px; align-items:start; }.schedule-history-board { min-width:760px !important; border-collapse:separate !important; border-spacing:2px !important; background:transparent !important; }.schedule-history-board th,.schedule-history-board td { border:0 !important; padding:4px 5px !important; }.schedule-history-board thead th { height:42px; padding:7px 5px !important; border-radius:7px; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.04); }.schedule-history-board tbody td,.schedule-history-board tbody th { background:#fff; border-radius:7px; }.schedule-history-board tbody tr:nth-child(even) td,.schedule-history-board tbody tr:nth-child(even) th { background:#fbfcfb; }.schedule-history-board .quota-col { width:48px; min-width:48px; }.schedule-history-board .name-col { width:100px; min-width:100px; }.schedule-history-board .quota-cell { text-align:center; }.schedule-history-board .name-cell { text-align:left; }.schedule-history-board .schedule-name-sequence { margin-right:4px; color:#8b978f; font-size:10px; }.schedule-history-board .shift-chip { display:block; min-height:24px; padding:5px 3px; border-radius:6px; background:var(--shift-color,#e1f1e7); color:#24653c; font-size:11px; text-align:center; }.schedule-history-board .shift-chip.rest { background:#f5e5e8; color:#8e6870; }.schedule-history-checks { display:grid; gap:8px; min-width:0; }.schedule-history-check-heading { display:flex; justify-content:space-between; align-items:center; padding:4px 2px; color:var(--muted); font-size:11px; }.schedule-history-check-heading strong { color:var(--ink); font-size:13px; }.schedule-history-checks .schedule-review-card { margin:0; }.schedule-history-checks .schedule-review-card summary { min-height:44px; padding:7px 9px; }.schedule-history-checks .schedule-review-content { padding:0 7px 7px; }.schedule-history-checks .data-table th,.schedule-history-checks .data-table td { padding:6px 7px; font-size:11px; }.schedule-history-checks .status { padding:3px 5px; font-size:10px; }
@media (max-width:1200px) { .schedule-history-review-layout { grid-template-columns:1fr; }.schedule-history-checks { grid-template-columns:repeat(2,minmax(0,1fr)); }.schedule-history-check-heading { grid-column:1 / -1; } }
.name-drag-notice { margin-bottom:10px; padding:8px 12px; border:1px solid #b9d5c2; background:var(--green-soft); color:var(--green); font-size:12px; }
.name-lock-btn.unlocked { border-color:var(--green); background:var(--green-soft); color:var(--green); }
.name-rotate-btn:disabled{opacity:.45;cursor:not-allowed}
.group-title-actions{display:flex;align-items:center;gap:7px}.group-title .group-count{color:var(--muted);font-size:12px}
.employee-table th,.employee-table td { padding:8px 12px; }
.employee-table .person { gap:8px; }
.employee-table .person-mark { width:26px; height:26px; }
.employee-table .tag { padding:3px 6px; }
.schedule-toolbar { display:grid; gap:8px; margin-bottom:12px; }.schedule-toolbar-primary,.schedule-toolbar-secondary { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:8px; border:1px solid var(--line); background:#fff; }.schedule-toolbar-primary { background:#f7faf8; }.schedule-toolbar-secondary { justify-content:flex-start; }.schedule-week-tabs { display:flex; max-width:100%; overflow:auto; }.schedule-cell-operation { display:flex; align-items:center; gap:8px; }.toolbar-label { color:var(--muted); font-size:11px; }.schedule-cell-operation-modes { display:flex; }.schedule-cell-operation-modes button { min-height:34px; padding:7px 12px; border:1px solid var(--line); background:#fff; color:var(--muted); font-size:12px; }.schedule-cell-operation-modes button+button { margin-left:-1px; }.schedule-cell-operation-modes button.active { position:relative; z-index:1; border-color:var(--green); background:var(--green); color:#fff; }.schedule-swap-cancel { min-height:34px; padding:7px 11px; }.schedule-swap-cancel:disabled { opacity:.5; cursor:not-allowed; }.schedule-status { display:inline-flex; align-items:center; gap:6px; margin-right:auto; color:var(--muted); font-size:12px; white-space:nowrap; }.status-dot { width:8px; height:8px; border-radius:50%; background:#b9c4bd; }.status-dot.is-ready { background:#2ca276; }.schedule-export-actions { display:flex; flex-wrap:wrap; gap:8px; }.schedule-more { position:relative; }.schedule-more summary { padding:8px 11px; border:1px solid var(--line); background:#fff; color:var(--muted); cursor:pointer; list-style:none; }.schedule-more summary::-webkit-details-marker { display:none; }.schedule-more-menu { position:absolute; right:0; z-index:8; display:grid; min-width:150px; gap:4px; padding:6px; border:1px solid var(--line); background:#fff; box-shadow:0 8px 22px rgba(22,42,31,.12); }.schedule-more-menu button { width:100%; text-align:left; }.schedule-mode-banner { display:flex; align-items:baseline; gap:12px; margin-bottom:10px; padding:11px 14px; border-left:4px solid #a9b5ad; background:#f4f6f4; color:var(--ink); }.schedule-mode-banner strong { font-size:13px; }.schedule-mode-banner span { color:var(--muted); font-size:12px; line-height:1.5; }.schedule-mode-banner.is-draft { border-color:#c98516; background:#fff7e8; }.schedule-mode-banner.is-draft strong { color:#8a5700; }.schedule-mode-banner.is-published { border-color:#2ca276; background:#edf8f1; }.schedule-mode-banner.is-published strong { color:#176c4d; }.schedule-mode-banner.is-uncreated { border-color:#a9b5ad; background:#f4f6f4; }.schedule-toolbar.is-draft .schedule-toolbar-primary { border-color:#e3bd77; background:#fffaf0; }.schedule-toolbar.is-published .schedule-toolbar-primary { border-color:#a9d0b7; background:#f3faf5; }
/* 方案三：现代 SaaS 风格排班表 */
.schedule-board-scroll { display:block; width:100%; overflow-x:auto; border:0; border-radius:16px; background:#fafbfc; padding:2px; max-width:100%; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; }
.schedule-board-table { min-width:0; }
.schedule-board-table { border-collapse:separate; border-spacing:2px; background:transparent; overflow:hidden; width:100%; table-layout:fixed; }
.schedule-board-scroll { touch-action:pan-x pan-y; }
.schedule-week-tabs button { position:relative; }
.schedule-week-review-badge { position:absolute; top:2px; right:3px; min-width:15px; height:15px; padding:0 4px; border-radius:8px; background:#d65b4a; color:#fff; font-size:9px; font-weight:700; line-height:15px; text-align:center; }
.schedule-table th,.schedule-table td { border:0; }
.schedule-board-table th { height:48px; padding:10px 12px; background:#fff; color:#4b5563; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; border-radius:8px 8px 0 0; box-shadow:0 1px 3px rgba(0,0,0,0.04); text-align:center; }
.schedule-board-table th small { display:block; margin-top:5px; color:#9ca3af; font-size:10px; font-weight:600; text-transform:none; }
.schedule-board-table .quota-col { width:104px; min-width:104px; text-align:center; }
.schedule-board-table .quota-legend-col { padding:5px 4px; }
.schedule-quota-legend { display:grid; justify-items:start; gap:3px; width:max-content; margin:0 auto; color:#4b5563; font-size:10px; font-weight:700; line-height:1.1; text-align:left; text-transform:none; letter-spacing:0; }
.schedule-quota-legend-item { display:flex; align-items:center; gap:4px; white-space:nowrap; }
.schedule-quota-legend-item i { display:block; width:8px; height:8px; border-radius:2px; flex:0 0 auto; }
.schedule-quota-legend-item.annual i { border:1px solid #b9d9cc; background:#f1f8f4; }
.schedule-quota-legend-item.holiday i { border:1px solid #e7c98f; background:#fff7e8; }
.schedule-board-table .name-col { width:116px; min-width:116px; text-align:left; padding-left:10px; }
.schedule-board-table th.quota-col,.schedule-board-table td.quota-cell { position:sticky; left:0; z-index:6; }
.schedule-board-table th.name-col,.schedule-board-table td.name-cell { position:sticky; left:104px; }
.schedule-board-table th.name-col,.schedule-board-table td.name-cell { z-index:5; }
.schedule-board-table td { height:48px; }
.schedule-board-table td { padding:3px; background:#fff; border-radius:6px; transition:background 0.15s ease; vertical-align:middle; }
.schedule-board-table tbody tr:hover td { background:#f9fafb; }
.schedule-board-table td.name-cell { background:#fff; font-size:13px; font-weight:600; color:#111827; padding-left:10px; }
.schedule-board-table tbody tr:hover td.name-cell { background:#f9fafb; }
.schedule-board-table td.quota-cell { background:#fff; padding:3px 4px; }
.schedule-board-table tbody tr:hover td.quota-cell { background:#f9fafb; }
.schedule-quota-values { display:flex; align-items:center; justify-content:center; gap:3px; width:100%; }
.schedule-quota-value { display:inline-flex; align-items:center; justify-content:center; min-width:25px; min-height:22px; padding:2px 3px; border:1px solid transparent; border-radius:5px; font-size:11px; font-weight:700; line-height:1; white-space:nowrap; }
.schedule-quota-value.annual { border-color:#b9d9cc; background:#f1f8f4; color:#176c4d; }
.schedule-quota-value.holiday { border-color:#e7c98f; background:#fff7e8; color:#8a5700; }
.schedule-quota-value.half-day { border-color:#c9d8ed; background:#eef4fb; color:#2c6195; }
.schedule-quota-unrecorded { color:var(--muted); font-size:12px; white-space:nowrap; }
.schedule-history-balance-summary { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:baseline; padding:7px 2px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; line-height:1.4; }
.schedule-history-balance-summary strong { color:var(--ink); white-space:nowrap; }
.schedule-board-group .schedule-group-row th { height:34px; padding:8px 14px; background:linear-gradient(135deg,#10b981 0%,#059669 100%); color:#fff; font-size:12px; font-weight:700; letter-spacing:0.02em; border-radius:8px; box-shadow:0 2px 8px rgba(16,185,129,0.25); text-align:left; }
.schedule-group-row th span { font-weight:700; }
.schedule-group-row th em { float:right; color:rgba(255,255,255,0.8); font-size:11px; font-style:normal; font-weight:400; }
.schedule-cell { height:44px; }
.schedule-cell { width:100%; display:flex; align-items:stretch; justify-content:center; position:relative; }
.shift-chip { width:100%; height:100%; display:flex; align-items:center; justify-content:center; border:0; border-radius:6px; padding:6px 8px; font-size:12px; font-weight:700; letter-spacing:0.01em; box-shadow:0 1px 3px rgba(0,0,0,0.08); transition:all 0.2s cubic-bezier(0.4,0,0.2,1); position:relative; overflow:hidden; white-space:nowrap; line-height:1.1; }

.shift-chip.common { background:#F9E8C8; color:#78350f; }
.shift-chip.nurse { background:linear-gradient(135deg,#f59e0b 0%,#d97706 100%); color:#fff; }
.shift-chip.special { background:linear-gradient(135deg,#8b5cf6 0%,#7c3aed 100%); color:#fff; }
.shift-chip.rest { background:#f3f4f6; color:#6b7280; box-shadow:inset 0 0 0 1px #e5e7eb; }
.shift-chip.rest .shift-label { opacity:.3; }
.shift-chip.quota-rest { background:linear-gradient(135deg,#d97706 0%,#b45309 100%); color:#fff; box-shadow:0 1px 3px rgba(180,83,9,0.3); }
.shift-chip.quota-rest .shift-label { opacity:1; }
.shift-chip.half { outline:none; }
.shift-chip.italic { font-style:italic; letter-spacing:0.02em; }
.shift-chip.italic::after { margin-left:4px; color:#d4a72c; content:'斜'; font-size:.72em; font-style:normal; font-weight:700; }
.schedule-cell.editable { cursor:pointer; }
.schedule-cell.editable{touch-action:pan-x pan-y}
.schedule-cell.editable:hover { background:transparent; }
.schedule-cell.editable:hover .shift-chip { transform:translateY(-2px) scale(1.02); box-shadow:0 6px 16px rgba(0,0,0,0.15); }
.schedule-cell.swap-selected { outline:0; background:transparent; }
.schedule-cell.swap-selected .shift-chip { transform:scale(1.05); box-shadow:0 0 0 4px rgba(16,185,129,0.3),0 8px 24px rgba(16,185,129,0.4); animation:pulse-selection 1.5s ease-in-out infinite; }
@keyframes pulse-selection { 0%,100% { box-shadow:0 0 0 4px rgba(16,185,129,0.3),0 8px 24px rgba(16,185,129,0.4); } 50% { box-shadow:0 0 0 6px rgba(16,185,129,0.2),0 12px 32px rgba(16,185,129,0.3); } }
.schedule-cell.swap-selected::after { content:'已选'; position:absolute; top:-24px; right:4px; padding:2px 6px; background:#10b981; color:#fff; font-size:9px; border-radius:4px; font-weight:600; box-shadow:0 2px 4px rgba(16,185,129,0.3); }
.schedule-table.compact { min-width:780px; }
.required-panel { margin-top:16px; padding:18px; border:1px solid var(--line); background:#fff; }.required-table td,.required-table th { padding:10px 12px; }.required-table .status { white-space:normal; line-height:1.35; }
.shift-chip.italic { font-style:italic; }
.optional-shift-summary-panel .required-table td { min-width:176px; white-space:normal; }
.optional-quota-legend { display:flex; flex-wrap:wrap; gap:6px; margin-top:7px; }
.optional-shift-person { display:inline-flex; align-items:center; flex-wrap:wrap; gap:5px; min-height:26px; }
.optional-shift-person strong { margin-right:2px; white-space:nowrap; }
.optional-quota-tag { display:inline-flex; align-items:center; min-height:20px; padding:2px 6px; border:1px solid transparent; border-radius:3px; font-size:11px; font-weight:600; line-height:1; white-space:nowrap; }
.optional-quota-tag.holiday { border-color:#ead5ad; background:#fff6e5; color:#966115; }
.optional-quota-tag.other { border-color:#c9dfd7; background:#edf7f3; color:#286247; }
.optional-quota-tag.half-day { border-color:#d7cdea; background:#f5f1fb; color:#65518d; }
.half-day-summary-table th:first-child,.half-day-summary-table td:first-child { width:30%; }
.half-day-summary-table td { vertical-align:middle; }
.half-day-summary-value { font-weight:700; }
.half-day-summary-value.generated { color:var(--green); }
.half-day-summary-value.consumed { color:var(--red); }
.half-day-summary-value small { display:block; margin-top:3px; color:var(--amber); font-size:10px; font-weight:500; }
.half-day-summary-balance { color:var(--ink); }
.schedule-review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:10px; align-items:start; }
@media (min-width:1100px) { .schedule-review-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.schedule-workspace { display:grid; grid-template-columns:minmax(0,2.2fr) minmax(300px,.8fr); gap:14px; align-items:start; }
.schedule-workspace-board, .schedule-workspace-reviews { min-width:0; }
.schedule-workspace-reviews .schedule-review-grid { grid-template-columns:1fr; margin-top:0; }
.schedule-workspace-reviews .schedule-review-card { margin:0; }
@media (min-width:1201px) {
  .schedule-workspace-reviews {
    position:sticky;
    top:84px;
    align-self:start;
    max-height:calc(100vh - 100px);
    overflow-y:auto;
    scrollbar-width:thin;
  }
}
@media (max-width:1200px) {
  .schedule-workspace { grid-template-columns:1fr; }
  .schedule-workspace-reviews .schedule-review-grid { grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:10px; }
}
.schedule-review-card { min-width:0; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface-page); box-shadow:var(--shadow-xs); overflow:hidden; transition:border-color var(--duration-fast) var(--ease-default),box-shadow var(--duration-fast) var(--ease-default),transform var(--duration-fast) var(--ease-default); }
.schedule-review-card:hover { border-color:var(--color-border-strong); box-shadow:var(--shadow-sm); transform:translateY(-1px); }
.schedule-review-card[open] { border-color:var(--color-brand-muted); box-shadow:var(--shadow-sm); }
.schedule-review-card summary { display:flex; align-items:center; gap:10px; min-height:58px; padding:9px 12px; cursor:pointer; list-style:none; user-select:none; }
.schedule-review-card summary::-webkit-details-marker { display:none; }
.schedule-review-title { display:grid; min-width:0; gap:3px; }
.schedule-review-title strong { color:var(--color-text-primary); font-size:13px; line-height:1.25; }
.schedule-review-title small { overflow:hidden; color:var(--color-text-secondary); font-size:11px; line-height:1.25; text-overflow:ellipsis; white-space:nowrap; }
.schedule-review-summary { margin-left:auto; padding:4px 7px; border:1px solid var(--color-success-border); border-radius:var(--radius-full); background:var(--color-success-subtle); color:var(--color-success-text); font-size:11px; line-height:1.2; text-align:right; white-space:nowrap; }
.schedule-review-card.has-issue .schedule-review-summary { border-color:var(--color-warning-border); background:var(--color-warning-subtle); color:var(--color-warning-text); }
.schedule-review-disclosure { position:relative; width:24px; height:24px; flex:0 0 24px; border:1px solid var(--color-border); border-radius:var(--radius-full); background:var(--color-surface-overlay); transition:transform var(--duration-fast) var(--ease-default),background var(--duration-fast) var(--ease-default); }
.schedule-review-disclosure::before,.schedule-review-disclosure::after { content:''; position:absolute; top:11px; left:7px; width:9px; height:1.5px; background:var(--color-text-secondary); transition:transform var(--duration-fast) var(--ease-default); }
.schedule-review-disclosure::after { transform:rotate(90deg); }
.schedule-review-card[open] .schedule-review-disclosure { background:var(--color-brand-subtle); }
.schedule-review-card[open] .schedule-review-disclosure::after { transform:rotate(0deg); }
.schedule-review-content { display:grid; grid-template-rows:0fr; opacity:0; transition:grid-template-rows .22s var(--ease-default),opacity .18s var(--ease-default); }
.schedule-review-content > * { min-height:0; overflow:hidden; }
.schedule-review-card[open] .schedule-review-content { grid-template-rows:1fr; padding:0 10px 10px; opacity:1; }
.schedule-review-card .table-wrap { border:1px solid var(--color-border); border-radius:var(--radius-md); box-shadow:none; }
.schedule-review-card .required-table th,.schedule-review-card .required-table td { padding:6px 7px; font-size:11px; }
.schedule-review-card .required-table th { white-space:nowrap; }
.schedule-review-card .optional-quota-legend { margin:0 0 7px; gap:4px; }
.schedule-review-card .optional-quota-tag { min-height:18px; padding:2px 5px; font-size:10px; }
.schedule-review-shortcut { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; border:1px solid #c9dfd7; border-radius:8px; background:#f4faf7; }
.schedule-review-shortcut > div { min-width:0; display:grid; gap:4px; }
.schedule-review-shortcut strong { color:#1f3028; font-size:14px; }
.schedule-review-shortcut span { color:#72857c; font-size:12px; line-height:1.4; }
.schedule-review-shortcut .primary-btn { flex:0 0 auto; white-space:nowrap; }
.schedule-review-card .optional-shift-person { min-height:24px; gap:4px; font-size:11px; }
.schedule-review-card .half-day-summary-value small { margin-top:2px; }
.schedule-review-card .empty { padding:20px 12px; font-size:12px; }
.schedule-review-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin:0 0 8px; color:var(--color-text-secondary); font-size:11px; }
.schedule-review-actions label { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.schedule-review-actions input { width:46px; min-height:28px; padding:4px 5px; border:1px solid var(--color-border); border-radius:var(--radius-sm); background:var(--color-surface-page); color:var(--color-text-primary); text-align:center; }
.schedule-review-actions .secondary-btn { min-height:28px; padding:4px 8px; font-size:11px; }
.required-shift-review { grid-column:span 1; }
.nurse-position-review { grid-column:span 1; }
.optional-shift-summary-panel,.half-day-rest-reconciliation,.consecutive-warning-panel { grid-column:span 1; margin-top:0; padding:0; }
.schedule-table tbody tr:nth-child(even):not(.schedule-group-row) td { background:#fbfcfb; }
.schedule-table .schedule-group-row th { background:#eef5f0; }
.period-tabs { display:flex; gap:0; }.period-tabs button { min-width:58px; padding:7px 12px 6px; border:1px solid var(--line); background:#fff; color:var(--muted); line-height:1.2; }.period-tabs button + button { border-left:0; }.period-tabs button small { display:block; margin-top:3px; font-size:10px; white-space:nowrap; }.period-tabs button.active { background:var(--green); border-color:var(--green); color:#fff; }
.overview-note { display:flex; gap:18px; align-items:center; margin:0 0 16px; padding:12px 14px; border-left:3px solid var(--green); background:var(--green-soft); }.overview-note strong { white-space:nowrap; }.overview-note span { color:var(--muted); }
.rotation-table tbody tr:nth-child(even) td { background:#fbfcfb; }
.rotation-table tbody tr:nth-child(even) td.rotation-slot.current { background:#f3faf5; }
.rotation-panel,.forecast-panel,.prep-panel { margin-top:16px; padding:18px; border:1px solid var(--line); background:#fff; }.rotation-legend { display:flex; gap:18px; align-items:center; margin:-4px 0 12px; color:var(--muted); font-size:12px; }.legend-dot { display:inline-block; width:8px; height:8px; margin-right:5px; border-radius:50%; background:#c9d4cc; }.legend-dot.current { background:var(--green); }.rotation-panel .table-wrap { overflow:auto; }.rotation-table { min-width:1180px; width:100%; border-collapse:collapse; table-layout:fixed; }.rotation-table th,.rotation-table td { min-width:132px; padding:8px 10px; border:1px solid var(--line); text-align:left; vertical-align:top; }.rotation-table th { background:#fafcfb; color:var(--muted); font-size:12px; }.rotation-table th small { display:block; margin-top:3px; color:var(--ink); font-size:11px; }.rotation-table .rotation-name { width:116px; min-width:116px; }.rotation-person { white-space:nowrap; }.rotation-person .tag { margin-right:6px; }.rotation-slot { background:#fff; }.rotation-slot.current { background:#f3faf5; }.rotation-slot strong { display:block; min-height:18px; color:var(--ink); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.rotation-slot span { display:block; margin-top:3px; color:var(--muted); font-size:10px; }.forecast-list,.prep-grid { display:grid; gap:0; }.forecast-row { display:grid; grid-template-columns:120px 90px 120px 1fr; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid #edf1ee; }.forecast-row:last-child { border-bottom:0; }.prep-grid { grid-template-columns:repeat(2,1fr); column-gap:24px; }.prep-row { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid #edf1ee; }.prep-row:nth-last-child(-n+2) { border-bottom:0; }.prep-row strong,.prep-row span { display:block; }.prep-row strong { font-size:13px; }.prep-row div span { margin-top:4px; color:var(--muted); font-size:12px; }.month-strip { display:flex; justify-content:space-around; margin-top:16px; padding:10px; border:1px solid var(--line); background:#fafcfb; color:var(--muted); }.month-strip strong { color:var(--ink); }
.empty { padding:50px; color:var(--muted); text-align:center; }
.toast { position:fixed; left:50%; bottom:28px; z-index:20; padding:10px 16px; transform:translate(-50%,20px); opacity:0; background:#1f3028; color:#fff; transition:.2s; pointer-events:none; }.toast.show { transform:translate(-50%,0); opacity:1; }
.loading { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; gap:12px; padding:24px; background:rgba(12,18,15,.72); color:#fff; font-size:16px; font-weight:600; text-align:center; opacity:0; visibility:hidden; transition:opacity .18s,visibility .18s; pointer-events:none; }.loading.show { opacity:1; visibility:visible; pointer-events:auto; }.loading-spinner { width:24px; height:24px; flex:0 0 24px; border:3px solid rgba(255,255,255,.35); border-top-color:#fff; border-radius:50%; animation:loading-spin .8s linear infinite; } body.is-loading { overflow:hidden; } @keyframes loading-spin { to { transform:rotate(360deg); } }
.publishing-overlay { position:fixed; inset:0; z-index:1100; display:flex; align-items:center; justify-content:center; gap:12px; padding:24px; background:rgba(0,0,0,.78); color:#fff; font-size:16px; font-weight:600; text-align:center; opacity:0; visibility:hidden; transition:opacity .18s,visibility .18s; pointer-events:none; }.publishing-overlay.show { opacity:1; visibility:visible; pointer-events:auto; }
.modal-backdrop { position:fixed; inset:0; z-index:30; display:grid; place-items:center; padding:24px; background:rgba(18,30,23,.42); }.modal { width:min(520px,100%); max-height:calc(100dvh - 48px); overflow:auto; padding:24px; border:1px solid var(--line); background:#fff; box-shadow:0 18px 50px rgba(22,42,31,.18); }.modal h2 { margin:0; font-size:20px; }.modal p { margin:8px 0 20px; color:var(--muted); line-height:1.5; }.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.form-field { display:grid; gap:7px; }.form-field.full { grid-column:1 / -1; }.form-field label { color:var(--muted); font-size:12px; }.form-field input,.form-field select { width:100%; padding:10px 11px; border:1px solid var(--line); background:#fff; }.color-field { grid-column:1 / -1; margin:0; padding:0; border:0; }.color-field legend { padding:0; color:var(--muted); font-size:12px; }.color-swatch-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:8px; }.color-swatch-option { display:flex; align-items:center; gap:7px; min-height:38px; padding:5px 8px; border:1px solid var(--line); background:#fff; color:var(--ink); cursor:pointer; font-size:12px; }.color-swatch-option:has(input:checked) { border-color:var(--green); box-shadow:0 0 0 2px rgba(39,94,66,.16); }.color-swatch-option input { position:absolute; opacity:0; }.color-swatch-option input:focus-visible + .color-swatch { outline:3px solid #155b9a; outline-offset:2px; }.color-swatch { width:22px; height:22px; flex:0 0 22px; border:1px solid rgba(37,53,44,.2); }.color-field-note { margin:7px 0 0; color:var(--muted); font-size:11px; }.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }.modal-close { float:right; padding:0 5px; background:transparent; color:var(--muted); font-size:22px; }.danger-btn { padding:10px 16px; background:#fff0ee; color:var(--red); }.schedule-cell.editable .inline-actions { display:flex; gap:8px; align-items:center; }
.leave-table td { min-width:112px; }.leave-table td:first-child { min-width:150px; }.compact-leave-table td:nth-child(2) { min-width:480px; white-space:normal; }.leave-balance { display:inline-flex; gap:5px; align-items:center; margin:2px 8px 2px 0; padding:5px 7px; background:#f0f4f1; color:#53645a; font-size:12px; }.leave-balance strong { color:var(--ink); }.balance-debt,.balance-debt strong { color:var(--red); font-weight:700; }.leave-log-count { margin-top:12px; }.log-table-wrap { max-height:420px; overflow:auto; }.log-table-wrap .data-table th,.log-table-wrap .data-table td { padding:10px 12px; }.amount-positive { color:var(--green); font-weight:600; }.amount-negative { color:var(--red); font-weight:600; }
.financial-toolbar { justify-content:flex-start; }.financial-toolbar .filter { min-width:180px; }.financial-panel { margin-top:16px; }.financial-issues td,.financial-ledger td { vertical-align:top; }.financial-issues code,.financial-ledger code { color:#53645a; font-size:11px; white-space:normal; }.financial-object { font-size:20px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.financial-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; color:var(--muted); font-size:12px; }.financial-pagination label { display:flex; align-items:center; gap:6px; }.financial-pagination .filter { min-width:76px; padding:7px 8px; }
.debt-toolbar { justify-content:flex-start; }.debt-toolbar .filter { min-width:180px; }.debt-panel { margin-top:16px; }.debt-ledger { min-width:1120px; }.debt-ledger td { vertical-align:top; }.debt-ledger .subtle { display:block; margin-top:4px; }.debt-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; color:var(--muted); font-size:12px; }.debt-pagination label { display:flex; align-items:center; gap:6px; }.debt-pagination .filter { min-width:76px; padding:7px 8px; }
.debt-manual-panel { margin-top:16px; }.debt-entry-form { display:grid; grid-template-columns:repeat(3, minmax(150px, 1fr)); gap:12px; align-items:end; }.debt-entry-form label { display:grid; gap:6px; color:var(--muted); font-size:12px; }.debt-entry-form select, .debt-entry-form input, .debt-settlement-form input { width:100%; }.debt-entry-form .debt-reason-field { grid-column:span 2; }.debt-settlement-form { display:flex; gap:8px; margin-top:8px; min-width:230px; }.debt-settlement-form label { flex:1; }
@media (max-width:760px) { .debt-entry-form { grid-template-columns:1fr; }.debt-entry-form .debt-reason-field { grid-column:auto; }.debt-settlement-form { min-width:200px; flex-wrap:wrap; } }
.leave-table td.balance-zero { color:#aab5ae; opacity:.62; }.leave-table td.balance-zero strong { color:inherit; font-weight:500; }.leave-table td.balance-zero:hover { color:var(--ink); opacity:1; }
.check-field { display:flex; gap:8px; align-items:center; padding:10px 0; color:var(--ink); }.check-field input { width:16px; height:16px; accent-color:var(--green); }.check-field-note { display:grid; gap:0; }.check-field-note .check-field { padding-bottom:3px; }.check-field-note span { padding-left:24px; color:var(--muted); font-size:11px; line-height:1.45; }
.modal:has(.date-compensation-modal) { width:min(980px,calc(100vw - 48px)); max-height:calc(100dvh - 32px); padding:18px 20px; }
.date-compensation-modal > p { margin:6px 0 12px; font-size:12px; line-height:1.4; }
.date-compensation-modal .form-grid { gap:9px 12px; }
.date-compensation-modal .form-field { gap:4px; }
.date-compensation-modal .form-field input,.date-compensation-modal .form-field select { padding:7px 9px; }
.date-compensation-modal #loadDateCompensationEmployees { justify-self:start; padding:7px 10px; font-size:12px; }
.date-compensation-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px 12px; }
.date-compensation-row { min-width:0; margin:0; padding:0; border:0; }
.date-compensation-row legend { width:100%; overflow:hidden; padding:0; color:var(--ink); font-size:12px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.date-compensation-options { display:flex; gap:4px; margin-top:5px; }
.date-compensation-option { display:flex; flex:1 1 0; align-items:center; justify-content:center; min-height:28px; padding:3px 5px; border:1px solid var(--line); background:#fff; color:var(--muted); cursor:pointer; font-size:11px; line-height:1; }
.date-compensation-option:has(input:checked) { border-color:var(--green); background:var(--green-soft); color:var(--green); font-weight:600; }
.date-compensation-option input { position:absolute; opacity:0; width:1px; height:1px; }
.date-compensation-option input:focus-visible + span { outline:2px solid #155b9a; outline-offset:2px; }
.modal:has(.date-compensation-modal) .modal-actions { margin-top:14px; }
@media (min-width:1201px) {
  .content:has(.schedule-overview-panel) { padding-top:18px; }
  .content:has(.schedule-overview-panel) .page-heading { margin-bottom:12px; }
  .content:has(.schedule-overview-panel) .page-heading h1 { font-size:22px; }
  .content:has(.schedule-overview-panel) .page-heading p { margin-top:4px; font-size:12px; }
  .content:has(.schedule-overview-panel) .schedule-toolbar { margin-bottom:10px; }
  .content:has(.schedule-overview-panel) .period-tabs button,
  .content:has(.schedule-overview-panel) .schedule-toolbar > .button-row button { padding:7px 10px; font-size:12px; }
  .schedule-overview-panel { margin-top:0; padding:8px; }
  .schedule-overview-panel .schedule-group-row th { height:19px; padding:2px 6px; font-size:11px; }
  .schedule-overview-panel + .forecast-panel { margin-top:10px; padding:10px 12px; }
  .schedule-overview-panel + .forecast-panel .panel-head { margin-bottom:6px; }
  .schedule-overview-panel + .forecast-panel .panel-head h2 { font-size:14px; }
  .schedule-overview-panel + .forecast-panel .subtle { font-size:11px; }
  .schedule-overview-panel + .forecast-panel .secondary-btn { padding:6px 10px; font-size:12px; }
  .schedule-overview-panel + .forecast-panel .forecast-row { padding:6px 0; font-size:12px; }
  .schedule-overview-panel + .forecast-panel .tag { padding:2px 6px; font-size:11px; }
}
@media (max-width:1200px) { .content { padding-left:26px; padding-right:26px; }.topbar { padding:0 26px; }.metric-grid { grid-template-columns:repeat(2,1fr); } }
.schedule-table th { height:42px; padding:0 2px; font-size:13px; white-space:nowrap; }
.schedule-table th strong { margin-top:3px; font-size:13px; }
.schedule-table .name-col { width:64px; padding-left:7px; }
.schedule-table td { height:30px; padding:0; }
.schedule-table td.name-cell { padding-left:7px; font-size:13px; }
.schedule-note { margin-top:1px; font-size:8px; }
.schedule-group-row th { height:27px; padding:3px 7px; background:#eef5f0; color:var(--green); font-size:12px; text-align:left; }
.print-only { display:none; }
#printRoot { display:none; }
.week-card-list { display:grid; gap:10px; }.week-card { border:1px solid var(--line); background:#fff; }.week-card summary { display:flex; align-items:center; gap:16px; padding:13px 16px; cursor:pointer; list-style:none; }.week-card summary::-webkit-details-marker { display:none; }.week-card summary::before { content:'+'; width:18px; color:var(--green); font-size:18px; }.week-card[open] summary::before { content:'−'; }.week-card summary strong { min-width:82px; font-size:15px; }.week-card summary span { color:var(--muted); }.week-card summary em { margin-left:auto; padding:4px 8px; background:#f0f4f1; color:var(--muted); font-size:11px; font-style:normal; }.week-card:first-child summary em { background:var(--green-soft); color:var(--green); }.week-card-body { padding:0 12px 12px; }.week-table-title { padding:10px 4px 6px; color:var(--ink); font-size:13px; font-weight:600; }.week-card-body .group-schedule { border:1px solid var(--line); }.week-card-body .schedule-groups { display:block; }.week-card-body .schedule-table { table-layout:fixed; }
.swap-notice { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-top:10px; padding:11px 12px; border:1px solid #e8d4a7; background:#fffaf0; }.swap-notice strong { display:block; font-size:12px; }.swap-notice span { display:block; margin-top:4px; color:var(--muted); font-size:11px; }.swap-notice.previewing { border-color:#c58d2c; background:#fff0c9; animation:swap-flash .9s ease-in-out infinite alternate; }.swap-notice .button-row { flex:0 0 auto; }.swap-notice .secondary-btn,.swap-notice .primary-btn { padding:7px 10px; font-size:12px; }
.swap-timeline { display:flex; gap:8px; margin-top:6px; flex-wrap:wrap; color:var(--muted); font-size:11px; line-height:1.4; }.swap-timeline span { padding-right:8px; border-right:1px solid var(--line); }.swap-timeline span:last-child { border-right:0; }
.swap-affected-preview { display:flex; gap:6px; margin-top:7px; flex-wrap:wrap; color:#355d46; font-size:11px; line-height:1.5; }.swap-affected-preview span { padding:4px 6px; border:1px solid #cfe0d4; background:#f3faf4; }
.request-review-actions { display:flex; flex:0 0 auto; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.modal:has(.swap-preview-boards) { width:min(1180px,calc(100vw - 48px)); }.swap-preview-boards { display:grid; gap:16px; margin-top:16px; }.swap-preview-board { border:1px solid #d7e2da; background:#fff; }.swap-preview-board-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:10px 12px; border-bottom:1px solid #d7e2da; background:#f4f8f5; }.swap-preview-board h3 { margin:0; font-size:14px; }.swap-preview-board-heading span { color:var(--green); font-size:11px; font-weight:600; }.swap-preview-table-wrap { border:0; }.swap-preview-board .data-table { min-width:820px; table-layout:fixed; }.swap-preview-board th,.swap-preview-board td { min-width:105px; padding:8px 9px; white-space:normal; overflow-wrap:anywhere; }.swap-preview-board thead th { height:54px; text-align:center; vertical-align:middle; }.swap-preview-board thead th:first-child,.swap-preview-board tbody th { position:sticky; left:0; z-index:2; min-width:116px; width:116px; text-align:left; box-shadow:1px 0 0 var(--line); }.swap-preview-board thead th:first-child { z-index:3; background:#fafcfb; }.swap-preview-board tbody th { font-weight:600; }.swap-preview-board th small { display:block; margin-top:4px; color:var(--amber); font-size:10px; font-weight:700; line-height:1.1; }.swap-preview-affected-day { background:#fff0c9 !important; box-shadow:inset 0 -3px 0 #c87816; color:#69450f !important; }.swap-preview-affected-row > th { background:#fff8e8 !important; color:#754b0c; box-shadow:inset 4px 0 0 #c87816,1px 0 0 var(--line); }.swap-preview-affected-row > td { background:#fffcf4; }.swap-preview-current { display:block; min-height:38px; padding-top:8px; color:#445149; text-align:center; font-size:12px; line-height:1.3; }.swap-preview-changed { position:relative; padding:4px !important; background:#fff0c9 !important; box-shadow:inset 0 0 0 2px #c87816; }.swap-preview-change { display:grid; gap:4px; min-height:58px; padding:6px 7px; border-left:4px solid #a24f08; background:#fffaf0; color:#70430d; font-size:11px; line-height:1.25; }.swap-preview-change span { color:#715d42; }.swap-preview-change strong { color:#7a3800; font-size:13px; line-height:1.3; }.swap-preview-missing { margin-top:12px; padding:10px; color:var(--red); background:#fff0ee; border:1px solid #f0c8c2; font-size:12px; line-height:1.5; }
@keyframes swap-flash { from { box-shadow:0 0 0 rgba(197,141,44,0); } to { box-shadow:0 0 0 4px rgba(197,141,44,.2); } }
.swap-preview-change-summary { margin-top:16px; padding:12px; border:1px solid #d7e2da; background:#fbfdfb; }.swap-preview-section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:10px; }.swap-preview-section-heading h3 { margin:0; font-size:14px; }.swap-preview-section-heading span { color:var(--muted); font-size:11px; }.swap-preview-legend { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; color:var(--muted); font-size:11px; }.swap-preview-legend span { padding:4px 7px; border:1px solid transparent; }.swap-preview-legend-before { background:#eef3f0; border-color:#d5e0d9 !important; }.swap-preview-legend-after { background:#e2f3e8; border-color:#a9d2b5 !important; color:#23613b; }.swap-preview-legend-change { background:#fff0c9; border-color:#c87816 !important; color:#70430d; }.swap-preview-change-table-wrap { border:0; }.swap-preview-change-table th,.swap-preview-change-table td { padding:8px 10px; }.swap-preview-change-table tbody th { color:var(--ink); font-weight:600; }.swap-preview-before-value,.swap-preview-after-value { text-align:center !important; font-weight:600; }.swap-preview-before-value { background:#eef3f0 !important; color:#52645a; }.swap-preview-after-value { background:#e2f3e8 !important; color:#23613b; box-shadow:inset 0 0 0 2px #8fc59f; }
.swap-review-check-card { margin-top:16px; padding:12px; border:1px solid #d7e2da; background:#fff; }.swap-review-check-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:8px; }.swap-review-check-heading h3 { margin:0; font-size:14px; }.swap-review-check-heading > span { color:var(--muted); font-size:11px; }.swap-review-check-table-wrap { border:0; }.swap-review-check-table { min-width:640px; }.swap-review-check-table th,.swap-review-check-table td { padding:8px 10px; vertical-align:top; }.swap-review-check-table tbody th { color:var(--ink); font-weight:600; }.swap-review-check-note,.swap-review-check-footnote { margin:8px 0 10px; color:var(--muted); font-size:11px; line-height:1.6; }.swap-review-check-footnote { margin-bottom:0; }.swap-check-pass { color:#23613b !important; font-weight:700; }.swap-check-fail { color:#a23b2e !important; font-weight:700; }.swap-review-decision-reasons { margin:8px 0 0; padding-left:20px; color:#a23b2e; font-size:12px; line-height:1.7; }
.swap-result-group { margin-top:12px; border-top:1px solid #e4ebe6; }.swap-result-group:first-of-type { margin-top:0; border-top:0; }.swap-result-group-heading { display:flex; justify-content:space-between; gap:12px; padding:10px 0 4px; font-size:12px; }.swap-result-group-heading strong { color:var(--ink); }.swap-result-group .swap-review-check-table { min-width:460px; }
.swap-review-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,370px); gap:16px; align-items:start; }
.swap-review-workspace-main,.swap-review-workspace-side { min-width:0; }
.swap-review-workspace-side { position:sticky; top:16px; max-height:calc(100vh - 32px); overflow:auto; padding-right:2px; }
.swap-review-preview-summary { display:grid; gap:5px; margin-bottom:12px; padding:12px 14px; border:1px solid #d7e2da; border-left:4px solid #c87816; background:#fffaf0; line-height:1.5; }
.swap-review-preview-summary strong { color:#70430d; font-size:14px; }
.swap-review-preview-summary span { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.swap-review-week-tabs { display:flex; gap:6px; margin-bottom:12px; overflow-x:auto; padding-bottom:2px; }
.swap-review-week-tabs button { display:grid; gap:2px; min-width:86px; padding:7px 10px; border:1px solid var(--line); background:#fff; color:var(--muted); cursor:pointer; text-align:left; }
.swap-review-week-tabs button:hover,.swap-review-week-tabs button.active { border-color:#c87816; background:#fff0c9; color:#70430d; }
.swap-review-week-tabs button small { color:inherit; font-size:10px; }
.swap-review-board { min-width:0; border:1px solid #d7e2da; background:#fff; }
.swap-review-board.is-selected { box-shadow:0 0 0 2px rgba(200,120,22,.16); }
.swap-review-board .swap-preview-board-heading h2 { margin:0; font-size:14px; }
.swap-review-board .swap-preview-board-heading span { white-space:nowrap; }
.swap-review-missing { display:grid; gap:4px; margin:12px 0; padding:12px 14px; border:1px solid #f0c8c2; background:#fff0ee; color:#8b3028; font-size:12px; line-height:1.5; }
.swap-review-missing strong { font-size:13px; }
.swap-review-workspace-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.swap-review-workspace-actions .primary-btn:disabled { cursor:not-allowed; opacity:.55; }
.swap-review-workspace-side .swap-review-check-card:first-child { margin-top:0; }
.schedule-workspace:has(.schedule-review-rail) { grid-template-columns:170px minmax(0,1fr) 370px; }
.schedule-review-rail { display:grid; align-content:start; gap:8px; min-width:0; padding:10px; border:1px solid #d7e2da; background:#f8fbf9; }
.schedule-review-rail-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding-bottom:8px; border-bottom:1px solid #d7e2da; }
.schedule-review-rail-heading strong { color:var(--ink); font-size:14px; }
.schedule-review-rail-heading span { color:#a24f08; font-size:11px; font-weight:700; }
.schedule-review-rail-item { display:grid; gap:4px; width:100%; padding:9px; border:1px solid #e7c98f; background:#fffaf0; color:var(--ink); text-align:left; cursor:pointer; }
.schedule-review-rail-item:hover,.schedule-review-rail-item:focus-visible { border-color:#c87816; background:#fff0c9; outline:0; }
.schedule-review-rail-item strong { font-size:12px; line-height:1.35; }
.schedule-review-rail-item span { color:#70430d; font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
.schedule-review-rail-item small { color:#a24f08; font-size:10px; font-weight:700; }
.schedule-review-rail-item.quota-review { border-color:#c87816; background:#fff4dc; }
.schedule-review-rail-item.quota-review.is-previewing { box-shadow:0 0 0 2px rgba(200,120,22,.24); }
.schedule-review-rail-actions { display:flex; gap:6px; margin-top:4px; }
.schedule-review-rail-actions button { flex:1 1 0; min-height:30px; padding:5px 7px; font-size:11px; }
.shift-chip.pending-review { min-width:100%; padding:5px 6px; border:2px solid #c87816; background:#fff0c9; color:#70430d; box-shadow:inset 0 0 0 1px rgba(255,255,255,.7); }
.shift-chip.pending-review .shift-label { opacity:1; font-size:10px; line-height:1.2; white-space:normal; }
.shift-chip.swap-preview-cell { min-width:100%; }
.schedule-review-rail-empty { padding:8px 2px; color:var(--muted); font-size:11px; line-height:1.5; }
.schedule-review-rail-link { padding:7px 4px; border:0; background:transparent; color:var(--green); font-size:11px; text-align:left; cursor:pointer; }
@media (max-width:1100px) { .swap-review-workspace { grid-template-columns:minmax(0,1fr) 320px; gap:12px; } }
@media (max-width:820px) { .swap-review-workspace { grid-template-columns:1fr; }.swap-review-workspace-side { position:static; max-height:none; overflow:visible; padding:0; }.swap-review-workspace-actions { justify-content:stretch; }.swap-review-workspace-actions button { flex:1 1 150px; }.swap-review-board .data-table { min-width:760px; } }
@media (max-width:1100px) and (min-width:821px) { .schedule-workspace:has(.schedule-review-rail) { grid-template-columns:150px minmax(0,1fr) 320px; } }
@media (max-width:820px) { .schedule-workspace:has(.schedule-review-rail) { grid-template-columns:1fr; }.schedule-review-rail { grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); }.schedule-review-rail-heading,.schedule-review-rail-link,.schedule-review-rail-empty { grid-column:1 / -1; } }
@media (max-width:720px) { .request-review-actions { width:100%; justify-content:space-between; }.request-review-actions .button-row { margin-left:auto; flex-wrap:wrap; justify-content:flex-end; }.modal:has(.swap-preview-boards) { width:calc(100vw - 24px); padding:14px; }.swap-preview-board-heading { align-items:flex-start; flex-direction:column; gap:4px; }.swap-preview-board .data-table { min-width:760px; }.swap-preview-board th,.swap-preview-board td { min-width:92px; }.swap-preview-board thead th:first-child,.swap-preview-board tbody th { min-width:88px; width:88px; }.swap-preview-change { min-height:64px; font-size:10px; }.swap-preview-change strong { font-size:12px; } }
@media (max-width:900px) { .date-compensation-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .modal:has(.date-compensation-modal) { width:100%; max-height:92dvh; padding:16px var(--mobile-gutter) calc(16px + env(safe-area-inset-bottom)); }.date-compensation-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.date-compensation-option { padding-left:2px; padding-right:2px; font-size:10px; }.modal:has(.date-compensation-modal) .modal-actions { margin-top:16px; } }
@media (max-width:600px) { .schedule-review-shortcut { align-items:flex-start; flex-direction:column; }.schedule-review-shortcut .primary-btn { width:100%; } }
@page { size:A4 portrait; margin:6mm; }
@media print {
  body { min-width:0; background:#fff; font-size:9px; }
  body > * { display:none !important; }
  body > #printRoot { display:block !important; width:100%; margin:0; padding:0; }
  #printRoot .print-week { display:block !important; height:280mm; break-inside:avoid; page-break-inside:avoid; overflow:hidden; }
  .print-title { box-sizing:border-box; height:12mm; margin:0; display:flex; align-items:center; font-size:16px; font-weight:700; }
  .print-only .print-schedule-table { min-width:0; width:100%; height:268mm; table-layout:fixed; border-collapse:collapse; }
  .print-only .print-schedule-table,
  .print-only .print-schedule-table th,
  .print-only .print-schedule-table td { border:2px solid #445049; }
  .print-only .print-schedule-table th { height:var(--print-row-height); padding:2px 1px; font-size:max(10px,var(--print-font-size)); line-height:1.1; }
  .print-only .print-schedule-table th small { margin-top:2px; font-size:max(9px,calc(var(--print-font-size) - 2px)); }
  .print-only .print-schedule-table .name-col,
  .print-only .print-schedule-table td.name-cell { width:18mm; min-width:18mm; max-width:18mm; }
  .print-only .print-schedule-table td { height:var(--print-row-height); padding:1px; font-size:var(--print-font-size); line-height:1.1; text-align:center; }
  .print-only .print-schedule-table td.print-shift-italic { font-style:italic; }
.print-only .print-schedule-table td.print-quota-rest { color:#b45309; font-weight:700; }
  .print-only .print-schedule-table td.name-cell { padding-left:2px; text-align:left; }
}

/* UI refresh: keep the existing business surface, update its visual language. */
/* Tokens are defined once at the top of this file. Do not override them here. */
body { background:var(--color-surface-wash); color:var(--color-text-primary); }
button, input, select { border-radius:var(--radius-md); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline:2px solid var(--color-brand);
  outline-offset:2px;
}
input, select {
  border-color:var(--color-border);
  color:var(--color-text-primary);
  background:var(--color-surface-page);
  transition:border-color var(--duration-fast) var(--ease-default),box-shadow var(--duration-fast) var(--ease-default);
}
textarea {
  width: 100%;
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-sizing: border-box;
  background: var(--color-surface-page);
  color: var(--color-text-primary);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}
textarea:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px var(--color-brand-subtle);
  outline: 0;
}
.shift-notice-cell { min-width: 180px; max-width: 320px; line-height: 1.45; overflow-wrap: anywhere; }
input:focus, select:focus {
  border-color:var(--color-brand);
  box-shadow:0 0 0 3px var(--color-brand-subtle);
  outline:0;
}
input::placeholder { color:var(--color-text-placeholder); }
.primary-btn, .login-submit {
  border-radius:var(--radius-md);
  background:var(--color-brand);
  color:var(--color-text-inverse);
  box-shadow:var(--shadow-xs);
  transition:background var(--duration-fast) var(--ease-default),transform var(--duration-fast) var(--ease-default),box-shadow var(--duration-fast) var(--ease-default);
}
.primary-btn:hover, .login-submit:hover { background:var(--color-brand-hover); box-shadow:var(--shadow-sm); }
.primary-btn:active, .login-submit:active { background:var(--color-brand-active); transform:translateY(1px); }
.secondary-btn, .outline-btn, .refresh-btn {
  border-radius:var(--radius-md);
  transition:border-color var(--duration-fast) var(--ease-default),background var(--duration-fast) var(--ease-default),color var(--duration-fast) var(--ease-default);
}
.secondary-btn:hover, .outline-btn:hover, .refresh-btn:hover {
  border-color:var(--color-brand);
  background:var(--color-brand-subtle);
  color:var(--color-brand);
}

.login-screen { background:linear-gradient(135deg,var(--color-brand-subtle) 0%,var(--color-surface-raised) 55%,var(--color-info-subtle) 100%); }
.login-box { border:1px solid var(--color-border); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); }
.login-brand .brand-mark { border:0; border-radius:var(--radius-lg); background:var(--color-brand-subtle); color:var(--color-brand-hover); }
.login-box h1 { color:var(--color-text-primary); letter-spacing:0; }
.login-field input { border-radius:var(--radius-md); }
.remember-login input { appearance:none; width:16px; height:16px; margin:0; border:1px solid var(--color-border-strong); border-radius:var(--radius-sm); background:var(--color-surface-page); cursor:pointer; }
.remember-login input:checked { border-color:var(--color-brand); background:var(--color-brand); box-shadow:inset 0 0 0 3px var(--color-text-inverse); }

.sidebar { width:240px; flex-basis:240px; background:var(--color-sidebar-bg); }
.brand-mark { border-radius:var(--radius-md); }
.nav-item { border-radius:var(--radius-md); transition:background var(--duration-fast) var(--ease-default),color var(--duration-fast) var(--ease-default),transform var(--duration-fast) var(--ease-default); }
.nav-item:hover { background:rgba(255,255,255,.09); transform:translateX(2px); }
.nav-item.active { background:var(--color-sidebar-active); box-shadow:var(--shadow-md); }
.nav-icon { display:grid; place-items:center; }
.nav-icon svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.navigation-menu-btn { border-radius:6px; }
.mobile-nav-backdrop { backdrop-filter:blur(4px); }
.topbar { box-shadow:0 1px 0 rgba(17,24,39,.02); }
.content { max-width:1440px; }
.page-heading h1 { color:var(--color-text-primary); }
.metric, .panel, .required-panel, .table-wrap { border-radius:var(--radius-lg); box-shadow:var(--shadow-xs); }
.metric { transition:box-shadow var(--duration-fast) var(--ease-default); }
.metric:hover { box-shadow:var(--shadow-sm); }
.metric-value { color:var(--color-text-primary); }
.status, .tag, .leave-balance { border-radius:var(--radius-full); }
.status.red, .balance-debt { background:var(--color-danger-subtle); color:var(--color-danger-text); }
.request-row { align-items:center; padding:16px 0; }
.request-main { min-width:0; }
.request-review-actions { align-self:center; }
.request-review-actions .primary-btn { min-width:96px; }
.financial-metrics .metric:first-child .metric-value { display:flex; align-items:center; gap:8px; }
.financial-metrics .metric:first-child .metric-value::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--color-success); }
.financial-metrics .metric:first-child .status.red + * { color:var(--color-danger); }

.schedule-toolbar-primary, .schedule-toolbar-secondary { border-radius:var(--radius-lg); }
.schedule-board-table .name-col, .schedule-board-table th.name-col { z-index:4; background:var(--color-surface-overlay); }
.shift-chip:hover { filter:saturate(1.08); }
@keyframes swap-selected-pulse { 0%,100% { box-shadow:inset 0 0 0 2px rgba(5,150,105,.08); } 50% { box-shadow:inset 0 0 0 2px rgba(5,150,105,.42); } }

.toast { border:1px solid rgba(255,255,255,.14); border-radius:var(--radius-lg); background:rgba(17,24,39,.88); backdrop-filter:blur(8px); box-shadow:var(--shadow-lg); animation:toast-in var(--duration-base) var(--ease-default) both; }
.toast.success { background:var(--color-success); border-color:var(--color-success-border); }
.toast.warning { background:var(--color-warning); border-color:var(--color-warning-border); color:var(--color-text-inverse); }
.toast.error { background:var(--color-danger); border-color:var(--color-danger-border); }
.loading { background:rgba(17,24,39,.58); backdrop-filter:blur(8px); }
@keyframes toast-in { from { opacity:0; } to { opacity:1; } }

@media (max-width:700px) {
  .sidebar { width:min(82vw,300px); background:var(--color-sidebar-bg); }
  .topbar { background:rgba(255,255,255,.96); backdrop-filter:blur(10px); }
  .content { padding-top:22px; }
  .metric, .panel, .required-panel, .table-wrap { border-radius:6px; }
  .schedule-review-grid { grid-template-columns:1fr; gap:8px; }
  .schedule-workspace { grid-template-columns:1fr; gap:10px; }
  .schedule-workspace-reviews .schedule-review-grid { grid-template-columns:1fr; margin-top:0; }
  .schedule-review-card { border-radius:6px; }
  .schedule-review-card summary { min-height:52px; padding:8px 10px; gap:8px; }
  .schedule-review-title small { white-space:normal; }
  .schedule-review-summary { max-width:40%; font-size:10px; white-space:normal; }
  .schedule-review-card[open] .schedule-review-content { padding:0 8px 8px; }
  .schedule-review-actions { align-items:flex-end; flex-wrap:wrap; justify-content:flex-start; }
  .request-row { display:block; }
  .request-review-actions { margin-top:12px; }
  .request-review-actions .button-row { margin-left:0; }
  }

/* The two coverage checks use one status color; the result text remains authoritative. */
.dashboard-check-box.is-ok,
.dashboard-check-box.has-issue { border-color:#c8dfd0; background:#f2f8f4; }
.dashboard-check-box.is-ok .dashboard-check-result,
.dashboard-check-box.has-issue .dashboard-check-result { color:var(--green); }

/* Half-day rest keeps the configured shift color and adds a compact semantic marker. */
.shift-chip.pharm:not(.rest),
.shift-chip.nurse:not(.rest),
.shift-chip.special:not(.rest) { background:var(--shift-color,#eef1ef); }
.shift-chip.pharm-half-rest { box-shadow:inset 0 -3px 0 #7650a5; }

/* Navigation drawer keeps the schedule board full width until a destination is needed. */
.navigation-menu-btn { display:grid; width:36px; height:36px; place-items:center; flex:0 0 36px; margin-right:14px; border:1px solid var(--line); background:var(--color-surface-page); color:var(--color-text-primary); font-size:20px; line-height:1; transition:background var(--duration-fast) var(--ease-default),border-color var(--duration-fast) var(--ease-default),color var(--duration-fast) var(--ease-default); }
.navigation-menu-btn:hover { border-color:var(--color-brand); background:var(--color-brand-subtle); color:var(--color-brand); }
.navigation-menu-btn:focus-visible { outline:3px solid var(--color-info); outline-offset:2px; }
.mobile-nav-backdrop { display:none; }

@media (min-width:701px) {
  .app-shell { display:block; }
  .sidebar { position:fixed; inset:0 auto 0 0; z-index:40; width:240px; height:100dvh; padding:24px 16px 18px; transform:translateX(-105%); transition:transform var(--duration-base) var(--ease-default); box-shadow:10px 0 30px rgba(18,30,23,.18); }
  .main-content { min-height:100vh; }
  .topbar { position:sticky; top:0; z-index:25; padding:0 28px; }
  .mobile-nav-backdrop { position:fixed; inset:0; z-index:35; display:block; background:rgba(18,30,23,.42); opacity:0; pointer-events:none; transition:opacity var(--duration-base) var(--ease-default); }
  body.mobile-nav-open .sidebar { transform:translateX(0); }
  body.mobile-nav-open .mobile-nav-backdrop { opacity:1; pointer-events:auto; }
  .content { max-width:1680px; padding:22px 28px 38px; }
}

@media (max-width: 700px) {
  :root { --mobile-gutter:16px; }
  html { overflow-x:hidden; }
  body { min-width:0; overflow-x:hidden; font-size:14px; }
  .app-shell { display:block; min-height:100dvh; }
  .sidebar { position:fixed; inset:0 auto 0 0; z-index:40; width:min(82vw,300px); padding:20px 14px 16px; transform:translateX(-105%); transition:transform .22s ease; box-shadow:10px 0 30px rgba(18,30,23,.18); }
  .mobile-nav-backdrop { position:fixed; inset:0; z-index:35; display:block; background:rgba(18,30,23,.42); opacity:0; pointer-events:none; transition:opacity .22s ease; }
  body.mobile-nav-open .sidebar { transform:translateX(0); }
  body.mobile-nav-open .mobile-nav-backdrop { opacity:1; pointer-events:auto; }
  .brand { padding-bottom:22px; }
  .workspace-label { margin-top:2px; }
  .nav-list { margin-top:18px; }
  .nav-item { min-height:46px; padding:12px 11px; }
  .sidebar-bottom { margin-top:auto; }
  .main-content { width:100%; }
  .topbar { position:sticky; top:0; z-index:25; height:56px; padding:0 var(--mobile-gutter); box-shadow:0 1px 6px rgba(22,42,31,.06); }
  .navigation-menu-btn { margin-right:10px; }
  .breadcrumbs { min-width:0; gap:7px; font-size:13px; white-space:nowrap; overflow:hidden; }
  .breadcrumbs span,.breadcrumbs b { display:none; }
  .breadcrumbs strong { overflow:hidden; text-overflow:ellipsis; }
  .top-actions { gap:8px; margin-left:auto; }
  .mobile-release { display:block; color:#65716a; font-size:11px; white-space:nowrap; }
  .icon-btn { font-size:19px; }
  .outline-btn { padding:7px 9px; font-size:12px; }
  .content { padding:20px var(--mobile-gutter) 40px; }
  .page-heading { display:block; margin-bottom:18px; }
  .page-heading h1 { font-size:23px; }
  .page-heading p { margin-top:6px; line-height:1.5; }
  .page-heading > .button-row { margin-top:14px; }
  .button-row { display:flex; flex-wrap:wrap; gap:8px; }
  .primary-btn,.secondary-btn,.danger-btn,.login-submit { min-height:40px; padding:9px 12px; }
  .metric-grid,.panel-grid,.schedule-groups,.dashboard-check-boxes { grid-template-columns:1fr; gap:10px; }
  .metric { padding:16px; }
  .metric-value { margin-top:8px; font-size:26px; }
  .panel { padding:16px; }
  .panel-head { align-items:flex-start; gap:10px; margin-bottom:12px; }
  .panel-head .status { flex:0 0 auto; }
  .alert-row,.request-row { gap:10px; padding:12px 0; }
  .alert-main,.request-main { min-width:0; }
  .alert-main span,.request-main span { line-height:1.45; }
  .toolbar { display:grid; grid-template-columns:1fr; gap:8px; margin-bottom:12px; }
  .search,.filter { width:100%; min-height:42px; }
  .financial-toolbar { display:grid; }.financial-toolbar .filter { min-width:0; }.financial-pagination { justify-content:flex-start; }
  .table-wrap { max-width:100%; -webkit-overflow-scrolling:touch; }
  .data-table { min-width:max-content; }
  .data-table th,.data-table td { padding:12px; }
  .employee-table th,.employee-table td { padding:7px 9px; }
  .employee-table .person-mark { width:24px; height:24px; }
  .schedule-toolbar { display:block; margin-bottom:12px; }
  .period-tabs { display:flex; max-width:100%; overflow-x:auto; padding-bottom:2px; -webkit-overflow-scrolling:touch; }
  .period-tabs button { flex:0 0 auto; }
  .period-tabs button { min-height:40px; padding:8px 12px; }
  .schedule-toolbar > .button-row { margin-top:10px; }
  .schedule-cell-operation { flex-wrap:wrap; margin-top:10px; }
  .schedule-toolbar > .button-row button { flex:1 1 auto; }
  .overview-note { display:block; margin-bottom:12px; padding:11px 12px; line-height:1.5; }
  .overview-note strong { display:block; margin-bottom:4px; }
  .group-title { padding:12px; }
  .group-title h2 { font-size:15px; }
  .required-panel,.rotation-panel,.forecast-panel,.prep-panel { margin-top:10px; padding:12px; }
  .rotation-legend { gap:12px; flex-wrap:wrap; line-height:1.4; }
  .forecast-row { grid-template-columns:1fr; gap:4px; padding:11px 0; }
  .prep-grid { grid-template-columns:1fr; }
  .prep-row:nth-last-child(-n+2) { border-bottom:1px solid #edf1ee; }
  .prep-row:last-child { border-bottom:0; }
  .month-strip { overflow-x:auto; justify-content:flex-start; gap:28px; white-space:nowrap; }
  .empty { padding:36px 20px; }
  .modal-backdrop { place-items:end center; padding:0; }
  .modal { width:100%; max-height:92dvh; overflow:auto; padding:20px var(--mobile-gutter) calc(20px + env(safe-area-inset-bottom)); border-width:1px 0 0; box-shadow:0 -10px 30px rgba(22,42,31,.16); }
  .modal h2 { padding-right:28px; font-size:18px; }
  .form-grid { grid-template-columns:1fr; gap:12px; }
  .form-field.full { grid-column:auto; }
  .form-field input,.form-field select { min-height:42px; }
  .modal-actions { position:sticky; bottom:0; margin:20px calc(var(--mobile-gutter) * -1) calc(var(--mobile-gutter) * -1); padding:12px var(--mobile-gutter) calc(12px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid var(--line); }
  .modal-actions button { flex:1; }
  .toast { right:16px; left:16px; bottom:calc(16px + env(safe-area-inset-bottom)); transform:translateY(20px); text-align:center; }
  .toast.show { transform:translateY(0); }
  .loading { padding:24px 18px calc(24px + env(safe-area-inset-bottom)); }
}

/* Desktop admin density: keep the full business surface visible with less scrolling. */
@media screen and (min-width:701px) {
  body { font-size:13px; }
  .sidebar { width:218px; flex-basis:218px; padding:18px 12px 14px; }
  .brand { gap:9px; padding:0 8px 20px; }
  .brand-mark { width:30px; height:30px; }
  .brand strong { font-size:14px; }
  .brand span,.admin-profile span { font-size:11px; }
  .workspace-label { padding:0 8px 6px; font-size:10px; }
  .period-select { padding:8px; font-size:11px; }
  .nav-list { gap:2px; margin-top:14px; }
  .nav-item { gap:9px; padding:8px 9px; }
  .nav-icon { width:16px; font-size:15px; }
  .admin-profile { padding:10px 6px; }
  .avatar { width:26px; height:26px; }
  .admin-profile strong { font-size:12px; }
  .version { padding:0 6px; font-size:10px; }

  .topbar { height:54px; padding:0 24px; }
  .breadcrumbs { gap:8px; font-size:13px; }
  .top-actions { gap:8px; }
  .outline-btn { padding:5px 9px; }
  .content { max-width:1600px; padding:18px 24px 28px; }
  .page-heading { margin-bottom:14px; }
  .page-heading h1 { font-size:21px; }
  .page-heading p { margin-top:4px; font-size:12px; }
  .button-row { gap:6px; }
  .primary-btn,.secondary-btn,.danger-btn { padding:7px 11px; font-size:12px; }

  .metric-grid,.panel-grid { gap:10px; }
  .metric { padding:12px 14px; }
  .metric-value { margin-top:6px; font-size:25px; }
  .metric-note { margin-top:5px; font-size:11px; }
  .panel { padding:14px; }
  .panel h2 { font-size:14px; }
  .panel-head { margin-bottom:10px; }
  .alert-list,.request-list { gap:5px; }
  .alert-row,.request-row { gap:12px; padding:8px 0; }
  .alert-main span,.request-main span { margin-top:3px; font-size:11px; }
  .status { padding:3px 6px; font-size:11px; }

  .toolbar { gap:10px; margin-bottom:10px; }
  .search,.filter { padding:7px 9px; }
  .search { width:230px; }
  .data-table th,.data-table td { padding:8px 10px; }
  .data-table th { font-size:11px; }
  .person { gap:7px; }
  .person-mark { width:24px; height:24px; font-size:11px; }
  .tag { padding:3px 6px; font-size:11px; }
  .employee-table th,.employee-table td { padding:5px 8px; }
  .employee-table .person { gap:6px; }
  .employee-table .person-mark { width:22px; height:22px; }
  .employee-table .tag { padding:2px 5px; }
  .inline-actions { gap:5px; }

  .overview-note { gap:12px; margin-bottom:10px; padding:8px 10px; }
  .required-panel,.rotation-panel,.forecast-panel,.prep-panel { margin-top:10px; padding:12px; }
  .required-table td,.required-table th { padding:6px 8px; }
  .forecast-row { gap:8px; padding:7px 0; }
  .prep-row { gap:10px; padding:8px 0; }
  .empty { padding:28px; }

  .modal-backdrop { padding:18px; }
  .modal { width:min(560px,100%); padding:18px; }
  .modal h2 { font-size:18px; }
  .modal p { margin:6px 0 14px; }
  .form-grid { gap:10px; }
  .form-field { gap:5px; }
  .form-field input,.form-field select { padding:7px 9px; }
  .modal-actions { gap:7px; margin-top:16px; }
  .leave-balance { gap:4px; margin:1px 5px 1px 0; padding:3px 5px; font-size:11px; }
  .log-table-wrap .data-table th,.log-table-wrap .data-table td { padding:6px 8px; }
  .financial-toolbar .filter { min-width:150px; }
}

@media (max-width:380px) {
  .top-actions .outline-btn { padding-right:7px; padding-left:7px; }
  .page-heading h1 { font-size:21px; }
  .page-heading > .button-row button { flex:1 1 100%; }
}


.schedule-name-button{display:block;width:100%;height:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}
.schedule-name-button.name-drag-enabled{touch-action:none;cursor:grab}
.schedule-name-button.name-drag-enabled.dragging{opacity:.55;cursor:grabbing}
.name-drag-row.insert-before td.name-cell{box-shadow:inset 0 3px 0 var(--green)}
.name-drag-row.insert-after td.name-cell{box-shadow:inset 0 -3px 0 var(--green)}
.schedule-name-sequence{display:inline-block;min-width:14px;margin-right:3px;color:var(--muted);font-size:9px;font-weight:400;text-align:right;vertical-align:baseline}
.remember-login{display:flex;align-items:center;gap:7px;margin:12px 0;color:var(--muted);font-size:13px;cursor:pointer}.remember-login input{width:15px;height:15px;accent-color:var(--green)}
.schedule-name-button:hover{color:var(--green);text-decoration:underline}
.group-choice-list,.employee-choice-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 16px}
.group-choice,.employee-choice{min-height:40px;padding:8px 10px;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer;text-align:left}
.group-choice{display:flex;justify-content:space-between;align-items:center}
.group-choice span{color:var(--green);font-size:12px}
.group-choice:hover,.employee-choice:hover{border-color:var(--green);background:var(--green-soft)}
.employee-choice.selected{border-color:var(--green);background:var(--green-soft);box-shadow:0 0 0 2px rgba(39,94,66,.18)}
.group-choice.selected{border-color:var(--green);background:var(--green-soft)}
.schedule-name-editor h3{margin:14px 0 6px;font-size:14px}
@media (max-width:560px){.group-choice-list,.employee-choice-list{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-name-button{text-align:left}}
.auto-suggestion-constraints{max-height:52vh;overflow:auto;margin-top:14px}.auto-suggestion-constraints .data-table{min-width:620px}.auto-suggestion-constraints select{min-height:44px}.suggestion-score{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;color:var(--muted);font-size:12px}.suggestion-score span{padding:6px 8px;border:1px solid var(--line);background:#f7faf8}.suggestion-change-table{max-height:42vh;overflow:auto}.auto-suggestion-preview{width:min(860px,100%)}
@media (max-width:760px){
.schedule-overview-panel .schedule-table .name-col{width:64px;min-width:64px}
}

/* Stage A board surface: one semantic table, one scroll owner, one mobile drawer. */
.schedule-overview-panel { padding:10px; }
.schedule-overview-panel .week-card-body { padding:0; }
.schedule-board-table thead { display:table-header-group; }
.schedule-board-table .schedule-board-group { display:table-row-group; }
.schedule-board-table .schedule-group-row { display:table-row; }
.schedule-board-table .schedule-group-row th { display:table-cell; }
.schedule-board-table th.name-col,.schedule-board-table th.name-col,.schedule-board-table thead th.name-col { z-index:7; background:#f3f7f4; }
.schedule-board-table tbody tr:nth-child(even):not(.schedule-group-row) td { background:#fbfcfb; }
.schedule-board-table tbody tr:nth-child(even):not(.schedule-group-row) td.name-cell { background:#fbfcfb; }
.schedule-board-table .schedule-group-row + tr td { border-top-color:#c6d9cc; }
.schedule-cell-drawer { max-height:92dvh; }
.schedule-cell-drawer .schedule-cell-drag-handle { display:none; }
.schedule-cell:focus-visible { z-index:6; outline:3px solid #155b9a; outline-offset:-3px; }
.schedule-cell:disabled { border:0; }
.schedule-cell.unavailable { cursor:not-allowed; background:#f5f6f5; color:#7b817d; opacity:.72; }
.schedule-cell.unavailable::after { content:'未建立'; position:absolute; right:2px; bottom:2px; padding:1px 3px; background:#e7e9e7; color:#66706a; font-size:8px; line-height:1.2; }
.schedule-cell.published-readonly { cursor:default; background:#f8faf8; }

@media (max-width:700px) {
  .schedule-toolbar-primary,.schedule-toolbar-secondary { align-items:stretch; }
  .schedule-toolbar-primary { display:grid; grid-template-columns:1fr auto; }
  .schedule-toolbar-primary .schedule-week-tabs { grid-column:1 / -1; }
  .schedule-toolbar-primary .schedule-status { margin-right:0; align-self:center; }
  .schedule-toolbar-primary #addNextWeek { min-height:40px; }
  .schedule-toolbar-secondary { display:grid; grid-template-columns:1fr 1fr; }
  .schedule-toolbar-secondary .schedule-cell-operation { grid-column:1 / -1; display:flex; flex-wrap:wrap; }
  .schedule-toolbar-secondary .schedule-cell-operation-modes { flex:1 1 auto; }
  .schedule-toolbar-secondary .schedule-cell-operation-modes button { flex:1 1 50%; }
  .schedule-toolbar-secondary .name-rotate-btn,.schedule-toolbar-secondary .name-lock-btn,.schedule-toolbar-secondary .schedule-more { min-height:40px; }
  .schedule-toolbar-secondary .name-rotate-btn { min-width:0; }
  .schedule-more summary { min-height:40px; text-align:center; }
  .schedule-board-table th.name-col,.schedule-board-table thead th.name-col { z-index:7; background:#f3f7f4; }
  .schedule-board-table tbody .schedule-group-row th { position:static; }
  .schedule-board-table th.name-col { padding-left:7px; }
  .schedule-board-table .schedule-group-row th { height:27px; }
  .schedule-board-table .modal-backdrop:has(.schedule-cell-drawer) { place-items:end center; }
  .schedule-cell-drawer { width:100%; max-height:92dvh; padding:20px var(--mobile-gutter) calc(20px + env(safe-area-inset-bottom)); border-width:1px 0 0; }
}

@media (min-width:701px) {
  /* The desktop board is a scanning surface: keep the date pair on one line and
     reclaim vertical space while leaving mobile's 44px touch targets unchanged. */
  .schedule-board-table:not(.print-schedule-table) {
    border-spacing:1px;
  }
  .schedule-board-table:not(.print-schedule-table) th {
    height:32px;
    padding:5px 8px;
    border-radius:6px 6px 0 0;
    line-height:1.1;
  }
  .schedule-board-table:not(.print-schedule-table) th .schedule-day-name,
  .schedule-board-table:not(.print-schedule-table) th .schedule-day-date {
    display:inline;
  }
  .schedule-board-table:not(.print-schedule-table) th .schedule-day-date {
    margin:0 0 0 4px;
    color:#9ca3af;
    font-size:10px;
  }
  .schedule-board-table:not(.print-schedule-table) td {
    height:32px;
    padding:2px;
  }
  .schedule-board-table:not(.print-schedule-table) td.name-cell {
    padding-left:7px;
    font-size:12px;
  }
  .schedule-board-table:not(.print-schedule-table) .schedule-group-row th {
    height:24px;
    padding:4px 9px;
    border-radius:5px;
    box-shadow:none;
    font-size:11px;
  }
  .schedule-board-table:not(.print-schedule-table) .schedule-cell {
    height:28px;
  }
  .schedule-board-table:not(.print-schedule-table) .shift-chip {
    border-radius:4px;
    padding:3px 5px;
    font-size:11px;
  }

  .modal-backdrop:has(.schedule-cell-drawer) { display:block; padding:0; }
  .modal.schedule-cell-drawer { position:fixed; top:50%; left:50%; width:min(560px,calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow:auto; transform:translate(-50%,-50%); animation:modal-slide-in-centered 0.3s cubic-bezier(0.4,0,0.2,1) !important; }
 .schedule-cell-drawer h2 { display:flex; align-items:center; gap:10px; min-height:30px; padding-right:30px; }
  .schedule-cell-drawer .schedule-cell-drag-handle { display:inline-flex; align-items:center; min-height:30px; padding:5px 8px; border:1px solid var(--line); background:#f3f7f4; color:var(--muted); cursor:grab; font-size:11px; font-weight:500; line-height:1; touch-action:none; user-select:none; }
  .schedule-cell-drawer.schedule-cell-dragging .schedule-cell-drag-handle { cursor:grabbing; }
}

@media print {
  .schedule-board-table:not(.print-schedule-table) { width:100%; min-width:0; }
  .schedule-board-table:not(.print-schedule-table) th.name-col,.schedule-board-table:not(.print-schedule-table) td.name-cell { width:58px; min-width:58px; max-width:58px; }
  .schedule-board-table:not(.print-schedule-table) td { height:28px; }
  .schedule-board-table:not(.print-schedule-table) .schedule-group-row th { height:27px; }
}
/* 弹窗动画系统 */
@keyframes modal-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modal-slide-in-mobile {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-slide-in-centered {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}


/* 应用动画 */
.modal-backdrop {
  animation: modal-backdrop-in 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal {
  animation: modal-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(17, 24, 39, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* 移动端从底部滑入 */
@media (max-width: 720px) {
  .modal {
    animation: modal-slide-in-mobile 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px 12px 0 0;
  }
}

/* Toast 动画 */
@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(-100%) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) translateX(-50%);
  }
}

.toast {
  animation: toast-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.hiding {
  animation: toast-slide-out 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 未排班标记样式 */
.unscheduled-label {
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
  opacity: 0.7;
  letter-spacing: 0.01em;
}

/* CSS variable override for position colors */
.shift-chip.pharm:not(.rest) { background:var(--shift-color,linear-gradient(135deg,#3b82f6 0%,#2563eb 100%)); }
.shift-chip.common:not(.rest) { background:var(--shift-color,#F9E8C8); }
.shift-chip.nurse:not(.rest) { background:var(--shift-color,linear-gradient(135deg,#f59e0b 0%,#d97706 100%)); }
.shift-chip.special:not(.rest) { background:var(--shift-color,linear-gradient(135deg,#8b5cf6 0%,#7c3aed 100%)); }

/* Tokenized component overrides: keep later additions aligned with the global system. */
.primary-btn,
.secondary-btn,
.danger-btn,
.text-btn,
.link-btn,
.outline-btn,
.icon-btn,
.refresh-btn,
.login-submit {
  cursor:pointer;
}

.primary-btn {
  background:var(--color-brand);
  color:var(--color-text-inverse);
  border-radius:var(--radius-md);
}

.primary-btn:hover { background:var(--color-brand-hover); }
.primary-btn:active { background:var(--color-brand-active); }

.secondary-btn {
  border:1px solid var(--color-border);
  background:var(--color-surface-page);
  color:var(--color-text-primary);
  border-radius:var(--radius-md);
}

.danger-btn {
  border:1px solid var(--color-danger-border);
  background:var(--color-danger-subtle);
  color:var(--color-danger-text);
  border-radius:var(--radius-md);
  transition:background var(--duration-fast) var(--ease-default),color var(--duration-fast) var(--ease-default),border-color var(--duration-fast) var(--ease-default);
}

.danger-btn:hover {
  border-color:var(--color-danger);
  background:var(--color-danger);
  color:var(--color-text-inverse);
}

.text-btn,
.link-btn {
  color:var(--color-text-link);
  transition:color var(--duration-fast) var(--ease-default);
}

.text-btn:hover,
.link-btn:hover {
  color:var(--color-brand-hover);
  text-decoration:underline;
}

.icon-btn {
  display:grid;
  min-width:44px;
  min-height:44px;
  place-items:center;
  border-radius:var(--radius-md);
  transition:background var(--duration-fast) var(--ease-default),color var(--duration-fast) var(--ease-default);
}

.icon-btn:hover { background:var(--color-surface-raised); }
.refresh-btn { border-radius:var(--radius-md); }

.form-field input,
.form-field select,
.search,
.filter {
  border:1px solid var(--color-border);
  border-radius:var(--radius-md);
  background:var(--color-surface-page);
  color:var(--color-text-primary);
}

.form-field input:disabled,
.form-field select:disabled,
.search:disabled,
.filter:disabled {
  cursor:not-allowed;
  opacity:.5;
  background:var(--color-surface-raised);
}

.form-field label {
  color:var(--color-text-secondary);
  font-size:var(--font-size-sm);
  font-weight:var(--font-weight-medium);
}

.status {
  border:1px solid var(--color-warning-border);
  background:var(--color-warning-subtle);
  color:var(--color-warning-text);
  font-size:var(--font-size-sm);
  font-weight:var(--font-weight-medium);
}

.status.green {
  border-color:var(--color-success-border);
  background:var(--color-success-subtle);
  color:var(--color-success-text);
}

.status.red {
  border-color:var(--color-danger-border);
  background:var(--color-danger-subtle);
  color:var(--color-danger-text);
}

.tag {
  background:var(--color-surface-raised);
  color:var(--color-text-secondary);
  border-radius:var(--radius-sm);
  font-size:var(--font-size-sm);
}

.tag.pharm { background:var(--color-info-subtle); color:var(--color-info); }
.tag.special { background:var(--color-warning-subtle); color:var(--color-warning-text); }

.leave-balance {
  background:var(--color-surface-raised);
  color:var(--color-text-secondary);
}

.leave-balance strong { color:var(--color-text-primary); }
.balance-debt,
.balance-debt strong { color:var(--color-danger-text); }

.optional-quota-tag {
  border-color:var(--color-border);
  background:var(--color-surface-raised);
  color:var(--color-text-secondary);
  border-radius:var(--radius-sm);
}

.optional-quota-tag.holiday {
  border-color:var(--color-warning-border);
  background:var(--color-warning-subtle);
  color:var(--color-warning-text);
}

.optional-quota-tag.other {
  border-color:var(--color-success-border);
  background:var(--color-success-subtle);
  color:var(--color-success-text);
}

.optional-quota-tag.half-day {
  border-color:var(--color-info-subtle);
  background:var(--color-info-subtle);
  color:var(--color-info);
}

.data-table th,
.data-table td { border-bottom-color:var(--color-border-subtle); }

.data-table th {
  background:var(--color-surface-raised);
  color:var(--color-text-secondary);
  font-size:var(--font-size-sm);
  font-weight:var(--font-weight-semibold);
  letter-spacing:.04em;
  text-transform:uppercase;
  border-bottom:2px solid var(--color-border);
}

.data-table tbody tr { transition:background var(--duration-fast) var(--ease-default); }
.data-table tbody tr:hover td { background:var(--color-surface-raised); }
.data-table tbody tr:nth-child(even) td { background:var(--color-surface-raised); }

.metric,
.panel {
  border-color:var(--color-border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-xs);
}

.metric-label {
  color:var(--color-text-secondary);
  font-size:var(--font-size-sm);
  font-weight:var(--font-weight-medium);
}

.metric-value {
  color:var(--color-text-primary);
  font-size:var(--font-size-hero);
  font-weight:var(--font-weight-bold);
}

.metric-note.warn { color:var(--color-warning); }
.panel h2 { color:var(--color-text-primary); font-size:var(--font-size-lg); font-weight:var(--font-weight-semibold); }
.alert-row,
.request-row { border-bottom-color:var(--color-border-subtle); }
.request-main strong { font-size:var(--font-size-base); font-weight:var(--font-weight-semibold); }
.request-main span { color:var(--color-text-secondary); font-size:var(--font-size-sm); margin-top:var(--space-1); }

.request-filter button {
  border-color:var(--color-border);
  border-radius:var(--radius-md);
  background:var(--color-surface-page);
  color:var(--color-text-secondary);
  transition:border-color var(--duration-fast) var(--ease-default),background var(--duration-fast) var(--ease-default),color var(--duration-fast) var(--ease-default);
}

.request-filter button:hover {
  border-color:var(--color-brand);
  color:var(--color-brand);
}

.request-filter button.active {
  border-color:var(--color-brand);
  background:var(--color-brand-subtle);
  color:var(--color-brand);
  font-weight:var(--font-weight-semibold);
}

.sidebar { background:var(--color-sidebar-bg); }
.nav-item { color:var(--color-sidebar-nav); }
.nav-item:hover,
.nav-item.active { background:var(--color-sidebar-active); color:var(--color-sidebar-text); }
.nav-item em { border-radius:var(--radius-full); background:var(--color-danger); }
.admin-profile { border-top-color:var(--color-sidebar-border); }

.topbar {
  border-bottom-color:var(--color-border);
  background:var(--color-surface-page);
}

.breadcrumbs b { color:var(--color-border-strong); }
.breadcrumbs strong { color:var(--color-text-primary); font-weight:var(--font-weight-semibold); }
.refresh-btn { border-color:var(--color-border); color:var(--color-brand); }

.toast.success { background:var(--color-success); border-color:var(--color-success-border); }
.toast.warning { background:var(--color-warning); border-color:var(--color-warning-border); color:var(--color-text-inverse); }
.toast.error { background:var(--color-danger); border-color:var(--color-danger-border); }

@media (max-width:700px) {
  .sidebar { transition:transform var(--duration-base) var(--ease-default); }
  .mobile-nav-backdrop { transition:opacity var(--duration-base) var(--ease-default); }
  .metric-value { font-size:var(--font-size-hero); }
}

@media (min-width:701px) {
  .data-table .inline-actions {
    opacity:0;
    transition:opacity var(--duration-fast) var(--ease-default);
  }

  .data-table tbody tr:hover .inline-actions,
  .data-table .inline-actions:focus-within { opacity:1; }
}


/* =============================================================
   macOS 风格升级 — M1 全局视觉基底 + M2 弹性动效 + M3 过渡 + M4 细节
   所有改动引用 Design Token，不硬编码颜色值。
   ============================================================= */

/* --- M1: 顶部栏毛玻璃 --- */
.topbar {
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  background:rgba(255,255,255,.78);
  border-bottom:0;
  box-shadow:0 1px 0 rgba(0,0,0,.06);
}

/* --- M1: 登录框去边框 --- */
.login-box {
  border:0;
  box-shadow:0 8px 40px rgba(22,42,31,.12),0 1px 3px rgba(0,0,0,.04);
}

/* --- M1: 侧边栏激活指示器 --- */
.nav-item.active {
  background:transparent;
  box-shadow:none;
  position:relative;
}
.nav-item.active::before {
  content:'';
  position:absolute;
  left:0;
  top:6px;
  bottom:6px;
  width:3px;
  border-radius:0 3px 3px 0;
  background:var(--color-brand-emphasis);
}
.nav-item.active:hover {
  background:rgba(255,255,255,.06);
}

/* --- M1: 弹窗 backdrop 毛玻璃 --- */
.modal-backdrop {
  background:rgba(0,0,0,.3);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

/* --- M1 + M2: 卡片去边框 + hover 浮起 --- */
.metric,
.panel,
.required-panel,
.table-wrap {
  border:0;
  box-shadow:var(--shadow-xs);
  transition:box-shadow 0.2s var(--ease-spring),transform 0.2s var(--ease-spring);
}
.metric:hover,
.panel:hover,
.required-panel:hover {
  box-shadow:var(--shadow-sm);
  transform:translateY(-2px);
}

/* --- M2: 按钮弹性 hover/active --- */
.primary-btn,
.login-submit {
  transition:background var(--duration-fast) var(--ease-spring),transform var(--duration-fast) var(--ease-spring),box-shadow var(--duration-fast) var(--ease-spring);
}
.primary-btn:hover,
.login-submit:hover {
  background:var(--color-brand-hover);
  box-shadow:0 4px 12px rgba(35,104,71,.18);
  transform:translateY(-1px);
}
.primary-btn:active,
.login-submit:active {
  background:var(--color-brand-active);
  transform:translateY(0);
  box-shadow:var(--shadow-xs);
}
.secondary-btn,
.outline-btn,
.refresh-btn {
  transition:border-color var(--duration-fast) var(--ease-spring),background var(--duration-fast) var(--ease-spring),color var(--duration-fast) var(--ease-spring),transform var(--duration-fast) var(--ease-spring);
}
.secondary-btn:hover,
.outline-btn:hover,
.refresh-btn:hover {
  transform:translateY(-1px);
}

/* --- M2: 弹窗弹出弹簧曲线 --- */
.modal {
  animation-name:modal-slide-in;
  animation-duration:0.35s;
  animation-timing-function:var(--ease-spring);
}

/* --- M3: 内容视图淡入 --- */
@keyframes view-fade-in {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}
#viewRoot > .content {
  animation:view-fade-in 0.25s var(--ease-default) both;
}

/* --- M3: 弹窗关闭过渡 --- */
.modal-backdrop.closing {
  opacity:0;
  transition:opacity 0.2s var(--ease-default);
}
.modal-backdrop.closing .modal {
  transform:scale(0.96);
  opacity:0;
  transition:transform 0.2s var(--ease-default),opacity 0.2s var(--ease-default);
}

/* --- M4: Toast 毛玻璃升级 --- */
.toast {
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  background:rgba(31,48,40,.82);
}

/* --- M4: Loading overlay 毛玻璃升级 --- */
.loading {
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  background:rgba(31,48,40,.55);
}

/* --- M4: 表头行毛玻璃 --- */
.data-table th {
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  background:rgba(250,252,251,.88);
}

/* --- M4: 表格行 hover 微绿底色 --- */
.data-table tbody tr:hover td {
  background:rgba(39,104,71,.04);
}

/* --- M4: Input focus 柔和阴影 --- */
input:focus,
select:focus {
  box-shadow:0 0 0 3px rgba(35,104,71,.12);
}

/* --- M2: 排班 chip hover 微缩放 --- */
.shift-chip:hover {
  transform:scale(1.04);
  box-shadow:0 4px 16px rgba(0,0,0,.12);
}

/* --- M4: 桌面端自定义滚动条 --- */
@media (min-width:701px) {
  ::-webkit-scrollbar { width:6px; height:6px; }
  ::-webkit-scrollbar-track { background:transparent; }
  ::-webkit-scrollbar-thumb { background:rgba(0,0,0,.12); border-radius:3px; }
  ::-webkit-scrollbar-thumb:hover { background:rgba(0,0,0,.22); }
}
@media (max-width:1100px) {
  body { min-width:0; overflow-x:hidden; }
}
@media (prefers-reduced-motion:reduce) {
  *,
  *::before,
  *::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
  }
}

.swap-auto-settings .settings-group { border: 1px solid var(--color-border); padding: 12px; margin: 0; }
.swap-auto-settings textarea { width: 100%; min-height: 72px; resize: vertical; font: inherit; }
.swap-auto-settings .subtle { display: block; margin-top: 5px; }

/* 班型管理需要高密度浏览，保持长通知在列内换行，避免整页被宽表格撑开。 */
.shift-management-page { display: grid; gap: 10px; }
.shift-management-page .panel { padding: 12px 14px; }
.shift-management-page .panel-head { margin-bottom: 9px; gap: 12px; }
.shift-management-page .panel-head .subtle { display: block; margin-top: 3px; font-size: 11px; }
.shift-management-page .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 12px; }
.shift-management-page .swap-auto-settings .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shift-management-page .swap-auto-settings .settings-group { padding: 8px 10px; }
.shift-management-page .swap-auto-settings textarea { min-height: 54px; }
.shift-management-page .color-swatch-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 5px; }
.shift-management-page .color-swatch-option { min-height: 32px; padding: 4px 6px; gap: 5px; font-size: 11px; }
.shift-management-page .color-swatch { width: 18px; height: 18px; flex-basis: 18px; }
.shift-management-page .table-wrap { min-width: 0; }
.shift-management-page .data-table { table-layout: fixed; font-size: 12px; }
.shift-management-page .data-table th,
.shift-management-page .data-table td { padding: 7px 9px; white-space: normal; vertical-align: top; line-height: 1.35; }
.shift-management-page .data-table th { font-size: 10px; }
.shift-management-page .data-table th:nth-child(1) { width: 11%; }
.shift-management-page .data-table th:nth-child(2) { width: 10%; }
.shift-management-page .data-table th:nth-child(3) { width: 15%; }
.shift-management-page .data-table th:nth-child(4) { width: 9%; }
.shift-management-page .data-table th:nth-child(5) { width: 13%; }
.shift-management-page .data-table th:nth-child(6) { width: 14%; }
.shift-management-page .data-table th:nth-child(7) { width: 20%; }
.shift-management-page .data-table th:nth-child(8) { width: 8%; }
.shift-management-page .shift-notice-cell { min-width: 0; max-width: none; overflow-wrap: anywhere; }
.shift-management-page .danger-link { color: var(--red); }
@media (max-width: 900px) {
  .shift-management-page .form-grid,
  .shift-management-page .swap-auto-settings .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shift-management-page .color-swatch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .swap-auto-settings .panel-head { align-items: flex-start; gap: 12px; }
  .swap-auto-settings .panel-head button { flex: 0 0 auto; }
  .swap-auto-settings .form-grid { grid-template-columns: minmax(0, 1fr); }
  .shift-management-page .form-grid,
  .shift-management-page .swap-auto-settings .form-grid { grid-template-columns: minmax(0, 1fr); }
  .shift-management-page .color-swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shift-management-page .data-table { min-width: 720px; table-layout: auto; }
}

/* =============================================================
   schedule-grid-product — Tabulator 排班网格产品化样式
   仅作用于显式挂载 .schedule-grid-product 的网格根节点。
   ============================================================= */
.schedule-grid-product {
  --schedule-grid-quota-width: 100px;
  --schedule-grid-name-width: 112px;
  --schedule-grid-cell-width: 112px;
  --schedule-grid-row-height: 44px;
  --schedule-grid-surface: var(--color-surface-page);
  --schedule-grid-muted-surface: var(--color-surface-raised);
  --schedule-grid-line: var(--color-border-subtle);
  --schedule-grid-focus: #155b9a;
  min-width:0;
  max-width:100%;
  color:var(--color-text-primary);
  font-size:var(--font-size-base);
}

.schedule-grid-product .tabulator {
  width:100%;
  max-width:100%;
  overflow:hidden;
  border:1px solid var(--color-border);
  border-radius:var(--radius-md);
  background:var(--schedule-grid-surface);
  color:var(--color-text-primary);
  font-family:var(--font-family-base);
}

/* Tabulator leaves unused holder space beside the fixed seven-day table. Keep
   that implementation space on the same surface instead of exposing the
   vendor's gray background as a fake eighth column. */
.schedule-grid-product .tabulator-tableholder,
.schedule-grid-product .tabulator-tableholder .tabulator-table {
  background:var(--schedule-grid-surface) !important;
}

.schedule-grid-product .tabulator,
.schedule-grid-product.tabulator {
  background:var(--schedule-grid-surface) !important;
}

.schedule-grid-product .tabulator-tableholder {
  max-width:100%;
  overflow-x:auto;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scrollbar-gutter:stable;
  touch-action:pan-x pan-y;
}

.schedule-grid-product .tabulator-table {
  min-width:calc(var(--schedule-grid-quota-width) + var(--schedule-grid-name-width) + (7 * var(--schedule-grid-cell-width)));
  background:var(--schedule-grid-surface);
}

.schedule-grid-product .tabulator-header {
  overflow:visible;
  border-bottom:1px solid var(--color-border-strong);
  background:var(--schedule-grid-muted-surface);
  color:var(--color-text-secondary);
  font-size:var(--font-size-sm);
  font-weight:var(--font-weight-semibold);
}

.schedule-grid-product .tabulator-col,
.schedule-grid-product .tabulator-cell {
  min-width:var(--schedule-grid-cell-width);
  border-right:1px solid var(--schedule-grid-line);
}

.schedule-grid-product .tabulator-col:last-child,
.schedule-grid-product .tabulator-cell:last-child {
  border-right:0;
}

.schedule-grid-product .tabulator-col[tabulator-field="name"],
.schedule-grid-product .tabulator-cell[tabulator-field="name"] {
  width:var(--schedule-grid-name-width);
  min-width:var(--schedule-grid-name-width);
  max-width:var(--schedule-grid-name-width);
}

.schedule-grid-product .tabulator-col[tabulator-field="quotaBalances"],
.schedule-grid-product .tabulator-cell[tabulator-field="quotaBalances"] {
  width:var(--schedule-grid-quota-width);
  min-width:var(--schedule-grid-quota-width);
  max-width:var(--schedule-grid-quota-width);
}

.schedule-grid-product .tabulator-col[tabulator-field="quotaBalances"],
.schedule-grid-product .tabulator-cell[tabulator-field="quotaBalances"] {
  left:0;
  text-align:center;
}

.schedule-grid-product .tabulator-col[tabulator-field="quotaBalances"] {
  z-index:5;
}

.schedule-grid-product .tabulator-cell[tabulator-field="quotaBalances"] {
  z-index:3;
}

.schedule-grid-product .schedule-grid-product-quotas {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  width:100%;
}

.schedule-grid-product .schedule-grid-product-quota {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:24px;
  padding:0 4px;
  border:1px solid transparent;
  border-radius:6px;
  font-size:12px;
  font-weight:var(--font-weight-semibold);
  line-height:1;
  white-space:nowrap;
}

.schedule-grid-product .schedule-grid-product-quota.annual {
  border-color:#b9d9cc;
  background:#f1f8f4;
  color:#176c4d;
}

.schedule-grid-product .schedule-grid-product-quota.holiday {
  border-color:#e7c98f;
  background:#fff7e8;
  color:#8a5700;
}

.schedule-grid-product .schedule-grid-product-quota.half-day {
  border-color:#c9d8ed;
  background:#eef4fb;
  color:#2c6195;
}

.schedule-grid-product .tabulator-col[tabulator-field="name"],
.schedule-grid-product .tabulator-cell[tabulator-field="name"],
.schedule-grid-product .tabulator-frozen {
  position:sticky;
  z-index:2;
  background:var(--color-surface-overlay);
}

.schedule-grid-product .tabulator-col[tabulator-field="name"],
.schedule-grid-product .tabulator-cell[tabulator-field="name"] {
  left:var(--schedule-grid-quota-width);
  text-align:left;
}

.schedule-grid-product .tabulator-col[tabulator-field="name"] {
  z-index:4;
}

.schedule-grid-product .tabulator-col-content {
  min-height:44px;
  display:flex;
  align-items:center;
  padding:8px 10px;
}

.schedule-grid-product .tabulator-cell {
  min-height:var(--schedule-grid-row-height);
  display:inline-flex;
  align-items:center;
  padding:6px 8px;
  border-bottom:1px solid var(--schedule-grid-line);
  background:var(--schedule-grid-surface);
  line-height:1.35;
  white-space:normal;
  vertical-align:middle;
}

.schedule-grid-product .tabulator-row:nth-child(even) .tabulator-cell {
  background:var(--color-surface-raised);
}

.schedule-grid-product .tabulator-row:hover .tabulator-cell,
.schedule-grid-product .tabulator-row.tabulator-selected .tabulator-cell {
  background:#f1f7f3;
}

.schedule-grid-product .tabulator-row:hover .tabulator-frozen,
.schedule-grid-product .tabulator-row.tabulator-selected .tabulator-frozen {
  background:#eaf3ed;
}

.schedule-grid-product .tabulator-group {
  min-height:32px;
  padding:7px 10px;
  border-top:1px solid var(--color-border-strong);
  border-bottom:1px solid var(--color-border);
  background:#eef5f0;
  color:var(--color-brand);
  font-size:var(--font-size-sm);
  font-weight:var(--font-weight-semibold);
}

.schedule-grid-product .tabulator-group .tabulator-arrow {
  border-left-color:var(--color-brand);
}

.schedule-grid-product .schedule-grid-product-shift,
.schedule-grid-product [data-shift-status] {
  width:100%;
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 8px;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  font-size:12px;
  font-weight:var(--font-weight-semibold);
  line-height:1.25;
  text-align:center;
  overflow-wrap:anywhere;
}

.schedule-grid-product .schedule-grid-product-shift[data-shift-status="rest"],
.schedule-grid-product [data-shift-status="rest"] {
  border-color:var(--color-border);
  background:var(--shift-rest-bg);
  color:var(--shift-rest-text);
}
.schedule-grid-product .schedule-grid-product-shift[data-shift-status="quota-rest"],
.schedule-grid-product [data-shift-status="quota-rest"] {
  border-color:#d97706;
  background:linear-gradient(135deg,#d97706 0%,#b45309 100%);
  color:#fff;
}

.schedule-grid-product .schedule-grid-product-shift[data-shift-status="conflict"],
.schedule-grid-product [data-shift-status="conflict"] {
  border-color:var(--color-danger-border);
  background:var(--color-danger-subtle);
  color:var(--color-danger-text);
}

.schedule-grid-product .schedule-grid-product-shift[data-shift-status="warning"],
.schedule-grid-product [data-shift-status="warning"] {
  border-color:var(--color-warning-border);
  background:var(--color-warning-subtle);
  color:var(--color-warning-text);
}

.schedule-grid-product .schedule-grid-product-shift[data-shift-status="published"],
.schedule-grid-product [data-shift-status="published"] {
  border-color:var(--color-success-border);
  background:var(--color-success-subtle);
  color:var(--color-success-text);
}

.schedule-grid-product .schedule-grid-product-shift.is-italic {
  font-style:italic;
}

.schedule-grid-product .schedule-grid-product-shift.is-italic::after {
  margin-left:4px;
  color:#d4a72c;
  content:'斜';
  font-size:.72em;
  font-style:normal;
  font-weight:700;
}

.schedule-grid-stage {
  margin:0 0 18px;
  padding:14px 16px 16px;
  border:1px solid var(--color-border-subtle);
  border-radius:var(--radius-md);
  background:var(--color-surface-page);
}

.schedule-grid-stage-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}

.schedule-grid-stage-head > div:first-child {
  display:flex;
  flex-direction:column;
  gap:3px;
}

.schedule-grid-mode {
  display:inline-flex;
  gap:4px;
  padding:3px;
  border:1px solid var(--color-border);
  border-radius:var(--radius-sm);
  background:var(--color-surface-raised);
}

.schedule-grid-mode button {
  min-height:38px;
  padding:7px 12px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:var(--color-text-secondary);
  cursor:pointer;
  font:inherit;
}

.schedule-grid-mode button.active {
  background:var(--color-surface-overlay);
  color:var(--color-text-primary);
  box-shadow:0 1px 3px rgba(16,24,40,.12);
  font-weight:var(--font-weight-semibold);
}

.schedule-grid-product.is-hidden,
.schedule-legacy-view.is-hidden {
  display:none;
}

.schedule-grid-empty {
  min-height:150px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
  padding:24px;
  border:1px dashed var(--color-border-strong);
  border-radius:var(--radius-sm);
  background:var(--color-surface-raised);
  color:var(--color-text-secondary);
  text-align:center;
}

.schedule-grid-empty strong {
  color:var(--color-text-primary);
}

.schedule-grid-product .tabulator-cell:focus,
.schedule-grid-product .tabulator-cell:focus-visible,
.schedule-grid-product .tabulator-col:focus,
.schedule-grid-product .tabulator-col:focus-visible,
.schedule-grid-product [tabindex]:focus-visible {
  position:relative;
  z-index:6;
  outline:3px solid var(--schedule-grid-focus);
  outline-offset:-3px;
}

.schedule-grid-product .tabulator-cell[aria-disabled="true"],
.schedule-grid-product .tabulator-cell.is-unavailable {
  background:#f5f6f5;
  color:var(--color-text-secondary);
  cursor:not-allowed;
  opacity:.72;
}

@media (max-width:700px) {
  .schedule-board-table:not(.print-schedule-table) { min-width:780px; }
  .schedule-grid-stage {
    padding:12px 10px 10px;
  }

  .schedule-grid-stage-head {
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }

  .schedule-grid-mode {
    width:100%;
  }

  .schedule-grid-mode button {
    flex:1;
    min-height:44px;
  }

  .schedule-grid-product {
    --schedule-grid-quota-width: 100px;
    --schedule-grid-name-width: 112px;
    --schedule-grid-cell-width: 112px;
    --schedule-grid-row-height: 56px;
    font-size:var(--font-size-md);
  }

  .schedule-grid-product .tabulator-col-content {
    min-height:44px;
    padding:8px 10px;
  }

  .schedule-grid-product .tabulator-cell {
    min-height:44px;
    padding:6px 8px;
  }

  .schedule-grid-product .schedule-grid-product-shift,
  .schedule-grid-product [data-shift-status] {
    min-height:44px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .schedule-grid-product .tabulator-tableholder {
    scroll-behavior:auto;
  }

  .schedule-grid-product .tabulator-cell,
  .schedule-grid-product .schedule-grid-product-shift,
  .schedule-grid-product [data-shift-status] {
    transition:none;
  }
}

.login-screen {
  flex-direction: column;
}
.login-box-icp {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.login-box-icp .icp-tag {
  background: var(--color-brand);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.login-box-icp a {
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-box-icp a:hover {
  color: var(--color-brand-hover);
}
