:root {
  --ink: #172a43;
  --ink-soft: #40536d;
  --muted: #7d8da1;
  --muted-light: #a6b2c1;
  --line: #e4eaf1;
  --line-strong: #d4dee9;
  --canvas: #f5f8fb;
  --paper: #ffffff;
  --blue: #1769e0;
  --blue-deep: #115bc5;
  --blue-soft: #edf5ff;
  --teal: #2f9f93;
  --teal-soft: #e9f8f5;
  --green: #4c9b68;
  --green-soft: #eaf7ee;
  --amber: #c98728;
  --amber-soft: #fff6e8;
  --red: #c46268;
  --red-soft: #fff1f2;
  --purple: #7661bc;
  --purple-soft: #f1effd;
  --shadow: 0 20px 48px rgba(32, 57, 86, 0.09);
  --shadow-tight: 0 8px 22px rgba(32, 57, 86, 0.08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); }

button, input, select, textarea { font: inherit; }

button { border: 0; cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.18);
  outline-offset: 2px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink-soft);
  background: #fff;
  outline: 0;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input, select { height: 39px; padding: 0 11px; }

textarea { min-height: 82px; padding: 10px 11px; resize: vertical; }

input:hover, select:hover, textarea:hover { border-color: #bed0e5; }

input:focus, select:focus, textarea:focus {
  border-color: #6d9ee2;
  background: #fcfeff;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.1);
}

input::placeholder, textarea::placeholder { color: #adb9c8; }

.app-root { min-height: 100vh; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Brand and sign-in */
.login-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(145deg, #f8fbff 0%, #f2f7fd 56%, #eef8f7 100%);
}

.login-shell::before {
  position: absolute;
  top: -280px;
  right: -210px;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(47, 117, 209, 0.09);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 80px rgba(47, 117, 209, 0.025), 0 0 0 160px rgba(47, 117, 209, 0.018);
}

.login-shell::after {
  position: absolute;
  bottom: -270px;
  left: -210px;
  width: 570px;
  height: 570px;
  border: 1px solid rgba(56, 159, 147, 0.11);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 70px rgba(56, 159, 147, 0.025);
}

.login-header, .login-main { position: relative; z-index: 1; width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
}

.brand-lockup { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }

.brand-icon {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  box-shadow: 0 7px 14px rgba(23, 105, 224, 0.18);
}

.brand-copy { display: grid; gap: 2px; }

.brand-copy b { color: #173456; font-size: 16px; letter-spacing: -.03em; }

.brand-copy span { color: #8a9aae; font-size: 9px; font-weight: 700; letter-spacing: .12em; }

.login-head-note { display: flex; align-items: center; gap: 7px; color: #8292a6; font-size: 11px; }

.login-head-note i, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(47, 159, 147, .1); }

.login-main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  align-items: center;
  min-height: calc(100vh - 158px);
  gap: clamp(42px, 8vw, 120px);
  padding: 50px 0 70px;
}

.login-intro { max-width: 570px; animation: riseIn .48s ease both; }

.eyebrow { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; }

.login-intro h1 { max-width: 540px; margin: 17px 0 18px; color: #152d4c; font-size: clamp(38px, 5.1vw, 60px); line-height: 1.15; letter-spacing: -.075em; }

.login-intro h1 em { color: var(--blue); font-style: normal; }

.login-intro > p { max-width: 480px; margin: 0; color: #71849a; font-size: 15px; line-height: 1.9; }

.login-qualities { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 31px; }

.quality-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #dce7f3; border-radius: 99px; background: rgba(255, 255, 255, 0.72); color: #5e738b; font-size: 11px; font-weight: 700; }

.quality-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

.login-card {
  position: relative;
  max-width: 458px;
  padding: 30px;
  border: 1px solid rgba(217, 229, 241, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 25px 60px rgba(51, 83, 116, .11);
  animation: riseIn .52s .06s ease both;
  backdrop-filter: blur(12px);
}

.login-card::before {
  position: absolute;
  top: -1px;
  left: 38px;
  width: 74px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  content: "";
  background: linear-gradient(90deg, var(--blue), #66a2ec);
}

.login-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 4px; border-radius: 11px; background: #f0f4f8; }

.login-tab { min-height: 39px; border-radius: 8px; color: #8291a4; background: transparent; font-size: 12px; font-weight: 750; transition: background .2s ease, box-shadow .2s ease, color .2s ease, transform .2s ease; }

.login-tab.active { color: var(--blue); background: #fff; box-shadow: 0 3px 8px rgba(35, 76, 119, .08); }

.login-tab:active { transform: scale(.98); }

.login-card-head { margin: 28px 0 20px; }

.login-card-head h2 { margin: 0; color: #223d5f; font-size: 22px; letter-spacing: -.05em; }

.login-card-head p { margin: 7px 0 0; color: #92a0b0; font-size: 11px; line-height: 1.65; }

.login-role-hint { display: flex; align-items: flex-start; gap: 8px; padding: 10px 11px; border: 1px solid #e3ebf3; border-radius: 9px; background: #f9fbfd; color: #7a8da2; font-size: 11px; line-height: 1.6; }

.login-role-hint strong { color: #4a6684; }

.login-role-hint i { width: 6px; height: 6px; flex: 0 0 auto; margin-top: 6px; border-radius: 50%; background: var(--teal); }

.login-name-field { display: grid; gap: 7px; margin-top: 14px; color: #526f8c; font-size: 11px; font-weight: 740; }
.login-name-field input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #d9e5ef; border-radius: 9px; outline: none; color: #274866; background: #fff; box-shadow: inset 0 1px 2px rgba(39, 72, 102, .02); font: inherit; font-weight: 600; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.login-name-field input::placeholder { color: #a8b7c4; font-weight: 500; }
.login-name-field input:focus { border-color: #61b7ef; background: #fbfdff; box-shadow: 0 0 0 3px rgba(0, 140, 245, .12); }

.qr-login-row { display: grid; grid-template-columns: 122px minmax(0, 1fr); align-items: center; gap: 17px; margin: 22px 0; padding: 14px; border: 1px solid #e2eaf2; border-radius: 13px; background: #fcfdff; }

.qr-visual {
  position: relative;
  width: 122px;
  height: 122px;
  overflow: hidden;
  border: 7px solid #fff;
  border-radius: 9px;
  background-color: #f7fafe;
  background-image:
    linear-gradient(90deg, transparent 47%, #2b5179 47%, #2b5179 57%, transparent 57%),
    linear-gradient(0deg, transparent 47%, #2b5179 47%, #2b5179 57%, transparent 57%),
    repeating-linear-gradient(90deg, #2c5279 0 6px, transparent 6px 12px, #2c5279 12px 18px, transparent 18px 24px),
    repeating-linear-gradient(0deg, transparent 0 6px, #2c5279 6px 12px, transparent 12px 18px, #2c5279 18px 24px);
  box-shadow: inset 0 0 0 1px #e1eaf3, 0 5px 12px rgba(45, 77, 112, .06);
}

.qr-visual::before, .qr-visual::after, .qr-visual b {
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 5px solid #2c5279;
  background: #f8fbff;
  content: "";
}

.qr-visual::before { top: 6px; left: 6px; }
.qr-visual::after { top: 6px; right: 6px; }
.qr-visual b { bottom: 6px; left: 6px; }
.qr-visual::before, .qr-visual::after, .qr-visual b { box-shadow: inset 0 0 0 5px #f8fbff, inset 0 0 0 10px #2c5279; }

.qr-code-image {
  display: block;
  width: 122px;
  height: 122px;
  padding: 7px;
  border: 1px solid #e1eaf3;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(45, 77, 112, .08);
  image-rendering: pixelated;
}

.qr-copy h3 { margin: 0; color: #365472; font-size: 13px; }
.qr-copy p { margin: 6px 0 10px; color: #94a3b3; font-size: 10px; line-height: 1.6; }

.text-action { padding: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 750; }
.text-action:hover { color: var(--blue-deep); text-decoration: underline; }

.primary-button, .secondary-button, .quiet-button, .danger-button, .icon-button, .nav-item {
  position: relative;
  overflow: hidden;
  transform-origin: center;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.primary-button::after, .secondary-button::after, .quiet-button::after, .danger-button::after, .nav-item::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
}

.primary-button:active, .secondary-button:active, .quiet-button:active, .danger-button:active, .nav-item:active { transform: scale(.975); }
.primary-button:active::after, .secondary-button:active::after, .quiet-button:active::after, .danger-button:active::after, .nav-item:active::after { opacity: .1; transform: translate(-50%, -50%) scale(22); transition: transform .15s ease, opacity .1s ease; }

.primary-button, .secondary-button, .quiet-button, .danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  gap: 7px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.primary-button { color: #fff; background: var(--blue); box-shadow: 0 8px 17px rgba(23, 105, 224, .21); }
.primary-button:hover { background: var(--blue-deep); box-shadow: 0 10px 21px rgba(23, 105, 224, .26); }
.secondary-button { border: 1px solid #bcd2ee; color: var(--blue); background: #fff; }
.secondary-button:hover { border-color: #74a2dc; background: #f8fbff; }
.quiet-button { color: #62778e; background: #eff3f7; }
.quiet-button:hover { color: #405b76; background: #e7edf3; }
.danger-button { color: var(--red); background: var(--red-soft); }
.danger-button:hover { background: #ffe8ea; }
.button-small { min-height: 32px; padding: 0 10px; border-radius: 7px; font-size: 11px; }
.button-wide { width: 100%; }

.login-footnote { margin: 16px 0 0; color: #a0adbb; font-size: 10px; line-height: 1.6; text-align: center; }

/* Application shell */
.workspace { display: flex; min-height: 100vh; background: var(--canvas); }
.menu-scrim { display: none; }

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 238px;
  flex-direction: column;
  padding: 25px 16px 17px;
  border-right: 1px solid #e1e8ef;
  background: #fff;
  box-shadow: 7px 0 21px rgba(33, 57, 82, .025);
}

.side-brand { display: flex; align-items: center; gap: 9px; padding: 0 9px 26px; }
.side-brand .brand-icon { width: 32px; height: 32px; border-radius: 9px; box-shadow: none; }
.side-brand .brand-copy b { font-size: 14px; }
.side-brand .brand-copy span { font-size: 8px; }

.nav-caption { padding: 0 10px 7px; color: #a1aebd; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.side-nav { display: grid; gap: 3px; }

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 39px;
  gap: 11px;
  padding: 0 10px;
  border-radius: 8px;
  color: #73859a;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

.nav-item:hover { color: #3f5874; background: #f6f9fc; }
.nav-item.active { color: var(--blue); background: var(--blue-soft); font-weight: 780; }
.nav-symbol { width: 17px; color: #9aaabe; font-size: 16px; font-weight: 500; line-height: 1; text-align: center; transition: color .2s ease, transform .2s ease; }
.nav-item.active .nav-symbol { color: var(--blue); transform: scale(1.1); }
.nav-pill { margin-left: auto; padding: 2px 6px; border-radius: 99px; color: var(--blue); background: #dcecff; font-size: 9px; font-weight: 800; }

.side-status { margin: 26px 7px 0; padding: 13px; border: 1px solid #e2eaf1; border-radius: 10px; background: #f9fbfc; }
.side-status span { display: block; color: #9caaba; font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.side-status b { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: #60758d; font-size: 10px; }
.side-status b i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(47, 159, 147, .1); }

.sidebar-foot { display: flex; align-items: center; gap: 7px; margin: auto 7px 0; padding-top: 17px; border-top: 1px solid #edf1f4; color: #a4b0bd; font-size: 10px; line-height: 1.5; }

.workspace-body { width: calc(100% - 238px); min-width: 0; margin-left: 238px; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
  padding: 0 clamp(22px, 3.1vw, 45px);
  border-bottom: 1px solid #e8edf2;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(13px);
}

.topbar-left, .topbar-right, .topbar-user, .head-actions, .filter-row, .inline-actions { display: flex; align-items: center; }
.topbar-left { gap: 12px; }
.topbar-left > span { color: #788ba0; font-size: 11px; }
.topbar-right { gap: 12px; }
.topbar-user { gap: 8px; }
.topbar-user > div { display: grid; gap: 1px; }
.topbar-user b { color: #3a526d; font-size: 11px; }
.topbar-user span { color: #9cabba; font-size: 9px; }

.role-badge, .tag, .mode-label, .date-label, .number-badge, .staff-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.role-badge { padding: 6px 8px; border: 1px solid #d7e5f6; color: #4070a3; background: #f7fbff; }
.role-badge i, .tag i, .staff-state i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.role-badge.employee { border-color: #d7eee8; color: #278879; background: #f4fcfa; }

.avatar { display: inline-grid; width: 31px; height: 31px; border-radius: 10px; color: #fff; background: linear-gradient(140deg, #2679db, #4aa6d9); font-size: 12px; font-weight: 800; place-items: center; }
.avatar.employee { background: linear-gradient(140deg, #319c90, #58b38c); }

.icon-button { display: inline-grid; width: 33px; height: 33px; padding: 0; border-radius: 8px; color: #8191a3; background: #f4f7fa; font-size: 17px; place-items: center; }
.icon-button:hover { color: #45617c; background: #eaf0f5; }
.mobile-menu { display: none; }

.main-content { width: min(100%, 1510px); margin: 0 auto; padding: 33px clamp(22px, 3.7vw, 54px) 65px; }
.view-enter { animation: pageIn .3s ease both; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.page-head-copy { min-width: 0; }
.page-head h1 { margin: 8px 0 7px; color: #1e3857; font-size: clamp(25px, 2.5vw, 32px); line-height: 1.22; letter-spacing: -.06em; }
.page-head p { max-width: 650px; margin: 0; color: #7e8fa3; font-size: 12px; line-height: 1.75; }
.page-head .eyebrow { font-size: 10px; }
.head-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 5px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.metric-card { min-height: 116px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 8px 19px rgba(32, 57, 86, .025); transition: transform .2s ease, box-shadow .2s ease; }
.metric-card:hover { box-shadow: var(--shadow-tight); transform: translateY(-2px); }
.metric-card-top { display: flex; align-items: center; justify-content: space-between; }
.metric-card-label { color: #8797a9; font-size: 11px; font-weight: 680; }
.metric-icon { display: inline-grid; width: 29px; height: 29px; border-radius: 8px; color: var(--blue); background: #eaf3ff; font-size: 16px; font-weight: 700; place-items: center; }
.metric-card:nth-child(2) .metric-icon { color: var(--teal); background: var(--teal-soft); }
.metric-card:nth-child(3) .metric-icon { color: var(--amber); background: var(--amber-soft); }
.metric-card:nth-child(4) .metric-icon { color: var(--purple); background: var(--purple-soft); }
.metric-value { display: block; margin-top: 10px; color: #233d5b; font-size: 27px; font-weight: 780; letter-spacing: -.06em; }
.metric-value small { margin-left: 3px; color: #93a1b0; font-size: 10px; font-weight: 650; letter-spacing: 0; }
.metric-note { display: block; margin-top: 3px; overflow: hidden; color: #a0acba; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(285px, .7fr); gap: 17px; }
.content-grid.equal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.content-grid.tight { grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr); }

.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 10px 25px rgba(33, 55, 84, .025); }
.panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 14px; padding: 15px 18px; border-bottom: 1px solid #edf1f5; }
.panel-title { min-width: 0; }
.panel-title h2 { margin: 4px 0 0; overflow: hidden; color: #29415e; font-size: 16px; letter-spacing: -.04em; white-space: nowrap; text-overflow: ellipsis; }
.panel-title .eyebrow { color: #7891aa; font-size: 9px; }
.panel-body { padding: 17px 18px; }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }

.list-stack { display: grid; gap: 9px; }
.duty-row { display: grid; grid-template-columns: 67px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #e7edf3; border-radius: 10px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.duty-row:hover { border-color: #cfe0f1; box-shadow: 0 5px 12px rgba(40, 80, 120, .045); transform: translateY(-1px); }
.duty-date { display: grid; gap: 2px; color: #7b91a8; font-size: 10px; text-align: center; }
.duty-date b { color: #32618f; font-size: 15px; line-height: 1; }
.duty-detail { min-width: 0; }
.duty-detail b, .duty-detail span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.duty-detail b { color: #3a536f; font-size: 12px; }
.duty-detail span { margin-top: 4px; color: #98a7b7; font-size: 10px; }
.duty-person { color: #4b6f94; font-size: 11px; font-weight: 750; }

.insight-card { position: relative; overflow: hidden; padding: 24px; border: 1px solid #d8e8f3; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #2d80d5, #1769cf); box-shadow: 0 17px 31px rgba(25, 103, 211, .17); }
.insight-card::before { position: absolute; top: -72px; right: -62px; width: 235px; height: 235px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; content: ""; box-shadow: 0 0 0 34px rgba(255,255,255,.055); }
.insight-card > * { position: relative; z-index: 1; }
.insight-card .eyebrow { color: #d9ecff; }
.insight-card h3 { margin: 14px 0 8px; font-size: 23px; line-height: 1.35; letter-spacing: -.06em; }
.insight-card p { margin: 0; color: #d7eaff; font-size: 11px; line-height: 1.8; }
.insight-list { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.insight-list li { display: flex; align-items: center; gap: 9px; color: #e1efff; font-size: 11px; }
.insight-list i { display: inline-grid; width: 20px; height: 20px; border: 1px solid rgba(255,255,255,.37); border-radius: 6px; color: #fff; font-size: 10px; font-style: normal; place-items: center; }

.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; text-align: left; }
.data-table th { padding: 11px 16px; border-bottom: 1px solid #edf1f5; color: #91a0b1; background: #fbfcfd; font-size: 10px; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.data-table td { height: 59px; padding: 10px 16px; border-bottom: 1px solid #edf1f5; color: #64768b; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .18s ease; }
.data-table tbody tr:hover { background: #fbfdff; }
.data-table .row-main { display: block; color: #38516c; font-size: 12px; font-weight: 750; }
.data-table .row-sub { display: block; max-width: 215px; margin-top: 4px; overflow: hidden; color: #9aa9b8; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.data-table .table-action { text-align: right; }
.data-table .muted-cell { color: #9aa8b8; }

.tag { padding: 5px 8px; }
.tag.blue { color: #3d77bc; background: #edf5ff; }
.tag.green { color: var(--green); background: var(--green-soft); }
.tag.amber { color: var(--amber); background: var(--amber-soft); }
.tag.red { color: var(--red); background: var(--red-soft); }
.tag.purple { color: var(--purple); background: var(--purple-soft); }
.mode-label { padding: 5px 8px; color: #557eaa; background: #f0f6fc; }
.staff-state { padding: 5px 8px; color: var(--green); background: var(--green-soft); }
.staff-state.offline { color: #8b9aaa; background: #f1f4f6; }

.filter-row { flex-wrap: wrap; gap: 9px; padding: 14px 18px; border-bottom: 1px solid #edf1f5; background: #fcfdfe; }
.filter-field { display: flex; align-items: center; gap: 8px; color: #8797a9; font-size: 10px; font-weight: 700; }
.filter-field input, .filter-field select { width: auto; min-width: 110px; height: 33px; font-size: 11px; }
.filter-summary { margin-left: auto; color: #99a8b8; font-size: 10px; }

.person-cell { display: flex; align-items: center; gap: 9px; }
.mini-avatar { display: inline-grid; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 8px; color: #4a76a4; background: #eaf3ff; font-size: 10px; font-weight: 800; place-items: center; }
.mini-avatar.teal { color: #278d80; background: #e7f8f5; }
.mini-avatar.amber { color: #b97d28; background: #fff4e4; }
.mini-avatar.purple { color: #6b5ab2; background: #f1effd; }
.mini-avatar.red { color: #ba5d64; background: #fff0f1; }

.form-panel { padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.form-grid label, .modal-form label { display: grid; gap: 7px; min-width: 0; color: #596e85; font-size: 11px; font-weight: 720; }
.form-grid label > span, .modal-form label > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.form-grid .span-2 { grid-column: span 2; }
.form-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; padding: 11px; border: 1px solid #dce9f7; border-radius: 9px; color: #7189a4; background: #f7fbff; font-size: 10px; line-height: 1.6; }
.form-note i { width: 6px; height: 6px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: var(--blue); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.form-foot span { color: #a0adbb; font-size: 10px; line-height: 1.55; }

.shift-editor { display: grid; gap: 8px; margin-top: 18px; }
.shift-line { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(105px, .9fr) minmax(100px, .9fr) 35px; align-items: end; gap: 9px; padding: 10px; border: 1px solid #e5ebf1; border-radius: 10px; background: #fcfdff; }
.shift-line label { display: grid; gap: 5px; color: #8998a9; font-size: 9px; font-weight: 750; }
.shift-line input { height: 33px; font-size: 11px; }
.shift-line .icon-button { width: 33px; height: 33px; color: #a47a81; background: #fff3f4; font-size: 15px; }

.holiday-list { display: grid; gap: 8px; }
.holiday-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid #e5edf3; border-radius: 9px; background: #fcfdff; }
.holiday-item b { color: #486584; font-size: 11px; }
.holiday-item span { color: #98a8b8; font-size: 10px; white-space: nowrap; }

.temporary-plan-form { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(110px, .55fr) minmax(180px, 1.5fr) auto; align-items: end; gap: 11px; }
.temporary-plan-form label { display: grid; gap: 7px; min-width: 0; color: #596e85; font-size: 11px; font-weight: 720; }
.temporary-plan-form .primary-button { min-height: 39px; white-space: nowrap; }
.temporary-plan-list { display: grid; gap: 8px; margin-top: 14px; }
.temporary-plan-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 11px; border: 1px solid #e5edf2; border-radius: 10px; background: #fcfdff; }
.temporary-plan-date { display: grid; gap: 2px; padding: 7px 3px; border-radius: 8px; color: #367c73; background: #eaf8f4; font-size: 9px; text-align: center; }
.temporary-plan-date b { font-size: 12px; }
.temporary-plan-card > div:nth-child(2) { min-width: 0; }
.temporary-plan-card > div:nth-child(2) b, .temporary-plan-card > div:nth-child(2) span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.temporary-plan-card > div:nth-child(2) b { color: #526b86; font-size: 11px; }
.temporary-plan-card > div:nth-child(2) span { margin-top: 3px; color: #a0aeba; font-size: 10px; }

.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-card { min-height: 184px; padding: 16px; border: 1px solid #e1e9f1; border-radius: 12px; color: #61758a; background: #fff; text-align: left; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.mode-card:hover { border-color: #b9d1eb; box-shadow: 0 9px 18px rgba(30, 84, 138, .07); transform: translateY(-2px); }
.mode-card.active { border-color: #7eaae0; background: linear-gradient(145deg, #f4f9ff, #fff); box-shadow: 0 9px 19px rgba(31, 96, 170, .08); }
.mode-card i { display: inline-grid; width: 31px; height: 31px; border-radius: 9px; color: var(--blue); background: #eaf3ff; font-size: 16px; font-style: normal; font-weight: 750; place-items: center; }
.mode-card:nth-child(2) i { color: #6b5eb4; background: #f0effd; }
.mode-card:nth-child(3) i { color: #278e80; background: #e9f8f5; }
.mode-card b { display: block; margin-top: 15px; color: #3c5876; font-size: 13px; }
.mode-card span { display: block; margin-top: 7px; color: #90a0b1; font-size: 10px; line-height: 1.65; }
.mode-card em { display: inline-block; margin-top: 12px; color: var(--blue); font-size: 10px; font-style: normal; font-weight: 750; }

.generation-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.generation-summary > div { padding: 12px; border: 1px solid #e5ebf1; border-radius: 9px; background: #fafcfe; }
.generation-summary span { display: block; color: #99a7b5; font-size: 9px; font-weight: 750; }
.generation-summary b { display: block; margin-top: 6px; color: #476887; font-size: 14px; letter-spacing: -.03em; }

.schedule-calendar { display: grid; gap: 11px; }
.schedule-day { overflow: hidden; border: 1px solid #e5ecf2; border-radius: 11px; background: #fff; }
.schedule-day-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid #edf2f6; background: #fbfcfe; }
.schedule-day-head b { color: #395978; font-size: 12px; }
.schedule-day-head span { color: #9ba9b8; font-size: 10px; }
.schedule-shifts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shift-slot { min-width: 0; padding: 13px; border-right: 1px solid #edf2f6; }
.shift-slot:last-child { border-right: 0; }
.shift-slot .slot-title { display: flex; align-items: center; gap: 5px; color: #8092a6; font-size: 10px; }
.shift-slot .slot-title i { width: 5px; height: 5px; border-radius: 50%; background: #4d99d9; }
.shift-slot:nth-child(2) .slot-title i { background: #d3a049; }
.shift-slot:nth-child(3) .slot-title i { background: #6a64b5; }
.shift-slot b { display: block; margin: 9px 0 3px; overflow: hidden; color: #385a7a; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.shift-slot span { display: block; overflow: hidden; color: #a0aebb; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }

.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; color: #8193a6; font-size: 10px; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend i { width: 7px; height: 7px; border-radius: 50%; background: #f2b653; }
.calendar-legend i.duty { background: #4d97df; }
.calendar-legend i.temporary { background: #40a98f; }

.year-calendar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.month-calendar { overflow: hidden; border: 1px solid #e1eaf2; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(38, 73, 108, .025); }
.month-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 42px; padding: 0 11px; border-bottom: 1px solid #e9eff4; background: #fbfdff; }
.month-calendar-head b { color: #435f7e; font-size: 12px; letter-spacing: -.01em; }
.month-calendar-head span { color: #91a2b3; font-size: 9px; white-space: nowrap; }
.month-weekdays, .month-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-weekdays { border-bottom: 1px solid #eef3f7; background: #f8fafc; }
.month-weekdays span { padding: 6px 0; color: #a7b4c0; font-size: 9px; font-weight: 730; text-align: center; }
.month-weekdays span:first-child, .month-weekdays span:last-child { color: #bd939a; }
.month-day { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 82px; padding: 5px 4px; border-right: 1px solid #eef2f5; border-bottom: 1px solid #eef2f5; background: #fff; transition: background-color .18s ease, box-shadow .18s ease; }
.month-day:nth-child(7n) { border-right: 0; }
.month-day.is-empty { min-height: 38px; padding: 0; background: #fbfcfd; }
.month-day.is-holiday { background: linear-gradient(145deg, #fffaf0, #fffefd); }
.month-day.has-duty { box-shadow: inset 2px 0 0 #76ace1; }
.month-day.has-temporary { box-shadow: inset 2px 0 0 #43a890; }
.month-day.is-today { outline: 2px solid #9bc2e7; outline-offset: -2px; z-index: 1; }
.month-day-number { color: #5d7084; font-size: 10px; line-height: 1.2; }
.is-holiday .month-day-number { color: #a3722a; }
.calendar-holiday-name { display: block; overflow: hidden; margin-top: 2px; color: #bf8530; font-size: 8px; font-weight: 750; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.calendar-assignments { display: grid; gap: 2px; margin-top: auto; padding-top: 3px; }
.calendar-assignment { display: block; min-width: 0; padding: 2px 3px; border-radius: 4px; color: #3d6d9a; background: #edf6ff; font-size: 8px; font-weight: 680; line-height: 1.35; overflow-wrap: anywhere; }
.calendar-assignment.temporary { color: #247967; background: #e8f8f3; }

.frequency-list { display: grid; gap: 13px; }
.frequency-item { display: grid; grid-template-columns: 34px minmax(72px, .7fr) minmax(100px, 2.3fr) auto; align-items: center; gap: 10px; }
.frequency-item .mini-avatar { width: 30px; height: 30px; }
.frequency-name { overflow: hidden; color: #516a85; font-size: 11px; font-weight: 720; white-space: nowrap; text-overflow: ellipsis; }
.frequency-track { height: 7px; overflow: hidden; border-radius: 99px; background: #edf1f4; }
.frequency-track b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #59a2e5, #1769e0); }
.frequency-item:nth-child(2) .frequency-track b { background: linear-gradient(90deg, #5cb5a1, #299788); }
.frequency-item:nth-child(3) .frequency-track b { background: linear-gradient(90deg, #a591dd, #7661bc); }
.frequency-count { color: #4b6783; font-size: 12px; font-weight: 780; }
.frequency-count small { color: #a0adbb; font-size: 9px; font-weight: 650; }

.log-list { display: grid; gap: 0; }
.log-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf1f5; }
.log-row:last-child { border-bottom: 0; }
.log-row i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #5d9ee2; box-shadow: 0 0 0 3px #5d9ee217; }
.log-row:nth-child(2) i { background: #50a58a; box-shadow: 0 0 0 3px #50a58a17; }
.log-row:nth-child(3) i { background: #b188d2; box-shadow: 0 0 0 3px #b188d217; }
.log-row b { display: block; overflow: hidden; color: #536b85; font-size: 11px; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; }
.log-row span { display: block; margin-top: 3px; color: #a2afbc; font-size: 9px; }
.log-row time { color: #a4b1bd; font-size: 9px; white-space: nowrap; }

.balance-card { display: grid; gap: 12px; padding: 18px; border: 1px solid #dbe8f5; border-radius: 12px; background: linear-gradient(145deg, #f5faff, #fff); }
.balance-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.balance-head b { color: #436586; font-size: 12px; }
.balance-head span { color: #2a8e7d; font-size: 10px; font-weight: 750; }
.balance-card p { margin: 0; color: #8396aa; font-size: 10px; line-height: 1.65; }
.balance-legend { display: flex; align-items: center; gap: 14px; color: #8fa0b1; font-size: 9px; }
.balance-legend i { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #2f9f93; }
.balance-legend i.warn { background: #d3a049; }

.export-stack { display: grid; gap: 9px; }
.export-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e3ebf2; border-radius: 10px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.export-card:hover { border-color: #c7d9ea; box-shadow: 0 6px 15px rgba(38, 85, 131, .055); transform: translateY(-1px); }
.export-card > i { display: inline-grid; width: 34px; height: 34px; border-radius: 9px; color: #3f83c9; background: #eaf4ff; font-size: 15px; font-style: normal; font-weight: 800; place-items: center; }
.export-card:nth-child(2) > i { color: #318e7e; background: #e8f8f4; }
.export-card:nth-child(3) > i { color: #7a65ba; background: #f0effd; }
.export-card b { display: block; overflow: hidden; color: #405d7a; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.export-card span { display: block; margin-top: 4px; color: #99a8b7; font-size: 10px; }

.design-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.design-card { padding: 17px; border: 1px solid #e3eaf1; border-radius: 12px; background: #fff; }
.design-card h3 { margin: 0; color: #48627e; font-size: 13px; }
.design-card p { margin: 7px 0 0; color: #95a4b3; font-size: 10px; line-height: 1.65; }
.swatches { display: flex; gap: 7px; margin-top: 17px; }
.swatches i { width: 27px; height: 27px; border-radius: 8px; background: var(--blue); }
.swatches i:nth-child(2) { background: var(--teal); }
.swatches i:nth-child(3) { background: #e8eef4; }
.swatches i:nth-child(4) { background: #213c5d; }
.component-samples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.component-samples .primary-button, .component-samples .secondary-button { pointer-events: none; }
.motion-list { display: grid; gap: 8px; margin-top: 16px; }
.motion-list span { display: flex; align-items: center; gap: 7px; color: #7890a7; font-size: 10px; }
.motion-list i { width: 17px; height: 17px; border: 1px solid #c6d9ed; border-radius: 5px; background: #ecf5ff; }

.empty-state {
  position: relative;
  display: grid;
  min-height: 280px;
  overflow: hidden;
  padding: 42px 24px;
  color: #74899f;
  background: linear-gradient(140deg, #fbfdff, #f3f8fc);
  place-items: center;
  text-align: center;
}
.empty-state::before, .empty-state::after { position: absolute; border: 1px solid #d9e8f4; border-radius: 50%; content: ""; }
.empty-state::before { top: -90px; right: -65px; width: 250px; height: 250px; }
.empty-state::after { bottom: -90px; left: -80px; width: 190px; height: 190px; border-color: #d7ece8; }
.empty-state-inner { position: relative; z-index: 1; max-width: 310px; }
.empty-illustration { position: relative; display: grid; width: 74px; height: 74px; margin: 0 auto 16px; border: 1px solid #d8e6f2; border-radius: 22px; background: #fff; box-shadow: 0 10px 22px rgba(39, 85, 130, .07); place-items: center; animation: breathe 3.2s ease-in-out infinite; }
.empty-illustration::before { width: 30px; height: 35px; border: 2px solid #88aed5; border-radius: 7px; content: ""; }
.empty-illustration::after { position: absolute; top: 28px; left: 27px; width: 20px; height: 2px; box-shadow: 0 7px 0 #8fb5d9, 0 14px 0 #8fb5d9; content: ""; background: #8fb5d9; }
.empty-state h3 { margin: 0; color: #55708c; font-size: 15px; }
.empty-state p { margin: 7px 0 16px; color: #96a6b6; font-size: 11px; line-height: 1.7; }

.skeleton-panel { padding: 17px 18px; }
.skeleton-line { height: 14px; margin: 12px 0; overflow: hidden; border-radius: 99px; background: #edf2f6; }
.skeleton-line::after { display: block; width: 38%; height: 100%; content: ""; background: linear-gradient(90deg, transparent, #fff, transparent); animation: shimmer 1.1s infinite; }
.skeleton-line.short { width: 42%; }
.skeleton-line.medium { width: 68%; }

/* Employee view */
.employee-banner { position: relative; overflow: hidden; padding: 24px; border: 1px solid #d7ebe6; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #228f85, #42ad93); box-shadow: 0 16px 32px rgba(37, 143, 130, .16); }
.employee-banner::after { position: absolute; top: -90px; right: -40px; width: 255px; height: 255px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; content: ""; box-shadow: 0 0 0 35px rgba(255,255,255,.06); }
.employee-banner > * { position: relative; z-index: 1; }
.employee-banner .eyebrow { color: #d8fbf3; }
.employee-banner h1 { max-width: 500px; margin: 10px 0 6px; color: #fff; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.06em; }
.employee-banner p { margin: 0; color: #dbf8f2; font-size: 11px; line-height: 1.75; }
.employee-banner .head-actions { position: absolute; top: 20px; right: 20px; }
.employee-banner .secondary-button { border-color: rgba(255,255,255,.48); color: #fff; background: rgba(255,255,255,.13); }
.employee-banner .secondary-button:hover { background: rgba(255,255,255,.22); }
.employee-banner + .employee-next { margin-top: 17px; }
.employee-next { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px; border: 1px solid #dcebe8; border-radius: 12px; background: linear-gradient(145deg, #fbfffe, #f3fbf9); }
.employee-next-date { display: grid; height: 58px; border-radius: 10px; color: #248679; background: #e4f7f2; font-size: 10px; place-items: center; }
.employee-next-date b { display: block; margin-top: -10px; font-size: 19px; line-height: 1; }
.employee-next h2 { margin: 0; color: #3e6d68; font-size: 15px; letter-spacing: -.04em; }
.employee-next p { margin: 6px 0 0; color: #8ba49f; font-size: 10px; }
.employee-next .tag { justify-self: end; }
.employee-duty-cards { display: none; }

/* Modal / feedback */
.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; overflow-y: auto; padding: 22px; background: rgba(19, 37, 58, .34); animation: fadeIn .18s ease both; place-items: center; backdrop-filter: blur(4px); }
.modal-card { width: min(570px, 100%); max-height: calc(100vh - 44px); overflow: auto; border: 1px solid #dce6ef; border-radius: 15px; background: #fff; box-shadow: 0 25px 65px rgba(17, 41, 69, .22); animation: modalIn .23s ease both; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 21px; border-bottom: 1px solid #edf1f4; }
.modal-head h2 { margin: 0; color: #29425f; font-size: 18px; letter-spacing: -.05em; }
.modal-head p { margin: 5px 0 0; color: #99a7b5; font-size: 10px; line-height: 1.65; }
.modal-close { display: inline-grid; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; color: #7d8ea1; background: #f2f5f8; font-size: 18px; font-weight: 300; line-height: 1; place-items: center; }
.modal-close:hover { color: #4c6681; background: #e8edf2; }
.modal-body { padding: 20px 21px 22px; }
.modal-form { display: grid; gap: 15px; }
.modal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.modal-form-grid .span-2 { grid-column: span 2; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.confirm-content { display: flex; align-items: flex-start; gap: 13px; padding: 2px 0 5px; }
.confirm-mark { display: inline-grid; width: 37px; height: 37px; flex: 0 0 auto; border-radius: 11px; color: #b16a70; background: #fff1f2; font-size: 18px; font-weight: 800; place-items: center; }
.confirm-content p { margin: 3px 0 0; color: #788da1; font-size: 11px; line-height: 1.75; }
.modal-qr { display: grid; grid-template-columns: 155px minmax(0, 1fr); align-items: center; gap: 23px; }
.modal-qr .qr-visual { width: 155px; height: 155px; }
.modal-qr .qr-code-image { width: 155px; height: 155px; }
.modal-qr .qr-copy h3 { color: #3c5a79; font-size: 16px; }
.modal-qr .qr-copy p { font-size: 11px; line-height: 1.75; }
.modal-qr .qr-copy .primary-button { margin-top: 5px; }
.read-only-note { display: flex; align-items: flex-start; gap: 8px; padding: 11px; border: 1px solid #d8eee9; border-radius: 9px; color: #4d9185; background: #f3fcf9; font-size: 10px; line-height: 1.6; }
.read-only-note i { width: 6px; height: 6px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: var(--teal); }

.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: flex; align-items: center; max-width: min(380px, calc(100vw - 44px)); gap: 9px; padding: 11px 13px; border: 1px solid #dce7f2; border-radius: 10px; color: #4a6684; background: rgba(255,255,255,.96); box-shadow: 0 15px 36px rgba(22, 50, 80, .15); animation: toastIn .26s ease both; font-size: 11px; line-height: 1.5; backdrop-filter: blur(8px); }
.toast i { display: inline-grid; width: 19px; height: 19px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--teal); font-size: 10px; font-style: normal; font-weight: 800; place-items: center; }
.toast.error i { background: var(--red); }

@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes shimmer { from { transform: translateX(-120%); } to { transform: translateX(310%); } }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid.tight { grid-template-columns: minmax(0, 1fr); }
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .login-main { grid-template-columns: 1fr; max-width: 550px; min-height: auto; padding-top: 32px; }
  .login-intro { max-width: 100%; text-align: center; }
  .login-intro h1, .login-intro > p { margin-right: auto; margin-left: auto; }
  .login-qualities { justify-content: center; }
  .login-card { max-width: 100%; margin: 0 auto; }
  .sidebar { transform: translateX(-101%); transition: transform .25s ease; }
  .workspace.menu-open .sidebar { box-shadow: 16px 0 36px rgba(33, 56, 79, .16); transform: translateX(0); }
  .workspace.menu-open::after { content: none; }
  .menu-scrim { position: fixed; z-index: 25; inset: 0; display: block; width: 100%; height: 100%; padding: 0; background: rgba(27, 46, 69, .23); }
  .workspace-body { width: 100%; margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .content-grid, .content-grid.equal { grid-template-columns: minmax(0, 1fr); }
  .page-head { display: grid; }
  .head-actions { justify-content: flex-start; padding-top: 0; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: auto; }
  .mode-card b { margin-top: 10px; }
  .mode-card em { margin-top: 9px; }
}

@media (max-width: 620px) {
  .login-header, .login-main { width: min(100% - 32px, 530px); }
  .login-header { min-height: 72px; }
  .login-head-note { display: none; }
  .login-main { gap: 26px; padding: 26px 0 38px; }
  .login-intro h1 { margin-top: 11px; font-size: 35px; }
  .login-intro > p { font-size: 12px; }
  .login-card { padding: 22px 18px; border-radius: 16px; }
  .login-card-head { margin: 22px 0 17px; }
  .login-name-field { margin-top: 13px; }
  .qr-login-row { grid-template-columns: 95px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .qr-visual { width: 95px; height: 95px; border-width: 5px; }
  .qr-code-image { width: 95px; height: 95px; padding: 5px; }
  .qr-visual::before, .qr-visual::after, .qr-visual b { width: 22px; height: 22px; border-width: 4px; }
  .qr-visual::before { top: 4px; left: 4px; }.qr-visual::after { top: 4px; right: 4px; }.qr-visual b { bottom: 4px; left: 4px; }
  .topbar { min-height: 59px; padding: 0 16px; }
  .topbar-left > span, .topbar-user > div { display: none; }
  .topbar-right { gap: 7px; }
  .role-badge { padding: 5px 7px; font-size: 9px; }
  .main-content { padding: 23px 16px 47px; }
  .page-head { gap: 15px; margin-bottom: 18px; }
  .page-head h1 { font-size: 25px; }
  .page-head p { font-size: 11px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric-card { min-height: 105px; padding: 13px; }
  .metric-value { font-size: 23px; }
  .panel-head { min-height: 61px; padding: 13px 14px; }
  .panel-body { padding: 14px; }
  .panel-actions .quiet-button { display: none; }
  .form-panel { padding: 16px; }
  .form-grid, .modal-form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .modal-form-grid .span-2 { grid-column: span 1; }
  .form-foot { align-items: flex-start; flex-direction: column; }
  .form-foot .primary-button { width: 100%; }
  .shift-line { grid-template-columns: 1fr 1fr 32px; }
  .shift-line label:nth-child(3) { grid-column: span 2; }
  .temporary-plan-form { grid-template-columns: 1fr 1fr; }
  .temporary-plan-form .temporary-note { grid-column: span 2; }
  .temporary-plan-form .primary-button { grid-column: span 2; width: 100%; }
  .temporary-plan-card { grid-template-columns: 54px minmax(0, 1fr) auto; }
  .generation-summary { grid-template-columns: 1fr; }
  .year-calendar { grid-template-columns: 1fr; }
  .month-day { min-height: 66px; }
  .calendar-legend { gap: 10px; }
  .schedule-shifts { grid-template-columns: 1fr; }
  .shift-slot { border-right: 0; border-bottom: 1px solid #edf2f6; }
  .shift-slot:last-child { border-bottom: 0; }
  .frequency-item { grid-template-columns: 30px minmax(56px, .7fr) minmax(70px, 1.5fr) auto; gap: 7px; }
  .filter-summary { display: none; }
  .employee-banner { padding: 20px 17px 71px; }
  .employee-banner .head-actions { top: auto; right: auto; bottom: 17px; left: 17px; }
  .employee-next { grid-template-columns: 56px minmax(0, 1fr); gap: 11px; }
  .employee-next .tag { display: none; }
  .employee-duty-table { display: none; }
  .employee-duty-cards { display: grid; gap: 9px; padding: 12px 14px 14px; }
  .employee-duty-card { padding: 12px; border: 1px solid #e2edea; border-radius: 11px; background: linear-gradient(145deg, #fff, #f8fcfb); }
  .employee-duty-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #e8f0ee; }
  .employee-duty-card-head b { display: block; color: #365f5a; font-size: 13px; }
  .employee-duty-card-head div > span { display: block; margin-top: 3px; color: #91a8a4; font-size: 10px; }
  .employee-duty-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 10px; }
  .employee-duty-card-grid > div { min-width: 0; }
  .employee-duty-card-grid span { display: block; color: #92a6a2; font-size: 9px; }
  .employee-duty-card-grid b { display: block; margin-top: 4px; color: #416964; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
  .employee-duty-card-grid .employee-duty-card-site { grid-column: 1 / -1; }
  .modal-backdrop { padding: 12px; }
  .modal-card { max-height: calc(100vh - 24px); }
  .modal-head, .modal-body { padding-right: 16px; padding-left: 16px; }
  .modal-qr { grid-template-columns: 1fr; text-align: center; }
  .modal-qr .qr-visual { margin: 0 auto; }
  .modal-qr .qr-code-image { margin: 0 auto; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .primary-button, .modal-foot .secondary-button, .modal-foot .danger-button { width: 100%; }
  .toast { right: 13px; bottom: 13px; }
  .design-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

:root {
  --ink: #00316b;
  --ink-soft: #24547f;
  --muted: #6f849b;
  --muted-light: #9aabba;
  --line: #dfeaf2;
  --line-strong: #c9dbe8;
  --canvas: #f4f9fc;
  --paper: #ffffff;
  --blue: #008cf5;
  --blue-deep: #0072ca;
  --blue-soft: #e8f6ff;
  --teal: #42aa9b;
  --teal-soft: #eaf9f5;
  --green: #54aa80;
  --green-soft: #ebf8f0;
  --amber: #d69726;
  --amber-soft: #fff7e8;
  --red: #ca6671;
  --red-soft: #fff1f3;
  --purple: #5a80bd;
  --purple-soft: #edf3fd;
  --shadow: 0 18px 42px rgba(0, 49, 107, .09);
  --shadow-tight: 0 9px 22px rgba(0, 49, 107, .08);
  font-family: "Source Han Sans CN", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Inter, sans-serif;
}

body { color: var(--ink); background: var(--canvas); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-color: rgba(0, 140, 245, .22);
}

input:focus, select:focus, textarea:focus {
  border-color: #69bdf6;
  background: #fdfeff;
  box-shadow: 0 0 0 3px rgba(0, 140, 245, .11);
}

.login-shell {
  background:
    radial-gradient(circle at 86% 9%, rgba(0, 140, 245, .16), transparent 26%),
    radial-gradient(circle at 8% 88%, rgba(187, 239, 226, .65), transparent 27%),
    linear-gradient(135deg, #f9fcff 0%, #eef8ff 52%, #f4fcfa 100%);
}

.login-shell::before {
  top: -250px;
  right: -150px;
  width: 620px;
  height: 620px;
  border-color: rgba(0, 140, 245, .14);
  box-shadow: 0 0 0 72px rgba(0, 140, 245, .035), 0 0 0 144px rgba(0, 140, 245, .018);
}

.login-shell::after {
  bottom: -220px;
  left: -160px;
  border-color: rgba(66, 170, 155, .18);
  box-shadow: 0 0 0 70px rgba(187, 239, 226, .17);
}

.login-header, .login-main { width: min(1200px, calc(100% - 56px)); }
.login-header { min-height: 96px; }
.brand-lockup { min-width: 250px; }

.official-brand-logo {
  display: block;
  width: min(300px, 38vw);
  min-width: 220px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.login-head-note {
  padding: 7px 10px;
  border: 1px solid rgba(0, 140, 245, .13);
  border-radius: 99px;
  color: #4c718f;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 5px 18px rgba(0, 49, 107, .035);
}

.login-head-note i, .live-dot { background: #42aa9b; box-shadow: 0 0 0 4px rgba(66, 170, 155, .11); }
.login-main { grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr); gap: clamp(46px, 8.6vw, 132px); }
.login-intro { max-width: 610px; }
.eyebrow { color: #008cf5; font-size: 10px; letter-spacing: .16em; }
.login-intro h1 { color: #00316b; letter-spacing: -.07em; }
.login-intro h1 em { color: #008cf5; }
.login-intro > p { max-width: 510px; color: #55728c; }

.login-qualities li {
  border-color: rgba(0, 140, 245, .13);
  color: #25567e;
  background: rgba(255, 255, 255, .74);
}

.login-qualities li i { background: #42aa9b; }

.login-card {
  border-color: rgba(0, 140, 245, .14);
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(0, 49, 107, .11);
}

.login-card::before {
  height: 4px;
  background: linear-gradient(90deg, #008cf5 0%, #26b4e8 54%, #bbefe2 100%);
}

.login-card-head h2, .qr-copy h3 { color: #00316b; }
.login-card-head p, .qr-copy p { color: #6b849a; }
.qr-login-row { border-color: #dceaf4; background: #fbfdff; }
.qr-visual { border-color: #00316b; background: #fff; }
.qr-visual::before, .qr-visual::after, .qr-visual b { border-color: #008cf5; }
.qr-visual::before, .qr-visual::after, .qr-visual b { box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 10px #00316b; }
.login-footnote { color: #7791a8; }

.primary-button { background: #008cf5; box-shadow: 0 9px 18px rgba(0, 140, 245, .22); }
.primary-button:hover { background: #0072ca; box-shadow: 0 11px 23px rgba(0, 140, 245, .29); }
.secondary-button { border-color: #b9dff8; color: #007acb; }
.secondary-button:hover { border-color: #69bdf6; background: #f4fbff; }

.sidebar {
  width: 258px;
  padding: 24px 17px 17px;
  border-right-color: #dceaf4;
  background:
    linear-gradient(180deg, rgba(0, 140, 245, .045) 0, transparent 170px),
    #fff;
  box-shadow: 8px 0 26px rgba(0, 49, 107, .035);
}

.side-brand { gap: 11px; padding: 2px 8px 29px; }
.side-brand-logo {
  display: block;
  width: 111px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.side-product-lockup { display: grid; gap: 3px; min-width: 0; padding-left: 10px; border-left: 1px solid #cbddea; }
.side-product-lockup b { color: #00316b; font-size: 14px; letter-spacing: -.04em; white-space: nowrap; }
.side-product-lockup span { color: #7290aa; font-size: 7px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.nav-caption { color: #7190a9; }
.nav-item { color: #5d7891; border-radius: 10px; }
.nav-item:hover { color: #006fc4; background: #f2faff; }
.nav-item.active { color: #0077c9; background: linear-gradient(90deg, #e8f7ff, #f3fcff); }
.nav-symbol, .nav-item.active .nav-symbol { color: inherit; }
.nav-pill { color: #0076c8; background: #d9f2ff; }
.side-status { border-color: #dceaf1; background: linear-gradient(135deg, #f6fbff, #f7fdfb); }
.side-status b { color: #35627f; }
.sidebar-foot { border-top-color: #e4eff5; color: #87a0b4; }
.workspace-body { width: calc(100% - 258px); margin-left: 258px; }

.topbar {
  border-bottom-color: #dfebf3;
  background: rgba(255, 255, 255, .9);
}

.topbar-left > span, .page-head p { color: #638098; }
.topbar-user b { color: #00316b; }
.role-badge { border-color: #cfe9f9; color: #0079cc; background: #f3fbff; }
.avatar { background: linear-gradient(140deg, #008cf5, #42b3dd); }
.icon-button { color: #5a7a94; background: #eef7fc; }
.icon-button:hover { color: #0077c9; background: #e1f3ff; }
.page-head h1 { color: #00316b; }

.metric-card, .panel {
  border-color: #dfeaf2;
  box-shadow: 0 10px 25px rgba(0, 49, 107, .035);
}

.metric-card:hover { box-shadow: 0 13px 28px rgba(0, 49, 107, .075); }
.metric-icon { color: #007ccc; background: #e8f6ff; }
.metric-card:nth-child(2) .metric-icon { color: #42a58f; background: #eaf9f5; }
.metric-card:nth-child(3) .metric-icon { color: #cd8c19; background: #fff7e6; }
.metric-card:nth-child(4) .metric-icon { color: #4379bd; background: #edf4ff; }
.metric-value, .panel-title h2 { color: #00316b; }
.panel-head { border-bottom-color: #e5eef4; }
.panel-title .eyebrow { color: #5286aa; }

.duty-row:hover { border-color: #b8def4; box-shadow: 0 6px 16px rgba(0, 49, 107, .06); }
.duty-date b { color: #007ccc; }
.month-calendar { border-color: #dceaf2; box-shadow: 0 5px 15px rgba(0, 49, 107, .035); }
.month-calendar-head { border-bottom-color: #e3edf4; background: linear-gradient(90deg, #f8fcff, #f6fdfa); }
.month-calendar-head b { color: #00316b; }
.month-day.is-holiday { background: linear-gradient(145deg, #fffaf0, #fffefd); }
.month-day.has-duty { box-shadow: inset 3px 0 0 #008cf5; }
.month-day.has-temporary { box-shadow: inset 3px 0 0 #42aa9b; }
.month-day.is-today { outline-color: #77c5f5; }
.calendar-assignment { color: #006fb9; background: #e8f6ff; }
.calendar-assignment.temporary { color: #247d6c; background: #e7f8f2; }

@media (max-width: 880px) {
  .sidebar { width: 258px; }
  .workspace-body { width: 100%; margin-left: 0; }
  .login-main { grid-template-columns: 1fr; }
  .login-intro { max-width: 650px; }
}

@media (max-width: 620px) {
  .login-header, .login-main { width: min(100% - 32px, 530px); }
  .login-header { min-height: 78px; }
  .brand-lockup { min-width: 0; }
  .official-brand-logo { width: 220px; min-width: 0; }
  .login-head-note { display: none; }
  .side-brand-logo { width: 105px; }
  .side-product-lockup { padding-left: 8px; }
  .sidebar { width: 258px; }
}
