:root {
  color-scheme: light;
  --ink: #251e21;
  --muted: #6d6267;
  --line: #e9e0e3;
  --paper: #fff;
  --canvas: #f9f6f7;
  --accent: #a53348;
  --accent-soft: #f8e7eb;
  --sidebar: #321e28;
  --sidebar-width: 226px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), select, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #bc5369; outline-offset: 3px; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link { position: fixed; z-index: 9; top: 12px; left: 12px; padding: 10px; background: var(--paper); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--sidebar);
  color: #fff8fb;
  padding: 29px 17px 19px;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: 12px; align-self: flex-start; flex-shrink: 0; padding-left: 9px; }
.brand-symbol {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff2f5;
  background: #a7384f;
  border: 1px solid #bc586e;
  box-shadow: 0 5px 18px #1d0b1460;
}
.brand-symbol svg { width: 29px; height: 29px; }
.brand-type, .account-meta { display: grid; gap: 3px; }
.brand-type strong { font-size: 19px; letter-spacing: .08em; line-height: 1.16; }
.brand-type small { font-size: 11px; color: #d7bcc7; letter-spacing: .06em; }
.primary-nav { display: grid; gap: 13px; min-height: 0; margin: 30px 0 12px; overflow-y: auto; scrollbar-width: thin; }
.mobile-nav { display: none; }
.nav-group { display: grid; gap: 2px; }
.nav-group-title { padding: 3px 13px 1px; color: #d7bcc7; font-size: 11px; font-weight: 650; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #e3ccd5;
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease;
}
.nav-link:hover { background: #ffffff0d; color: #fff; }
.primary-nav .nav-link:focus-visible { outline-offset: -2px; }
.nav-link[aria-current="page"] { background: #613348; color: #fff; border-color: #774158; font-weight: 650; }
.nav-link[aria-current="page"] .icon { color: #ffbdca; }
.sidebar-bottom { flex: none; margin-top: auto; }
.sidebar-system-entry { margin-top: 6px; }
.sidebar-system-entry[hidden] { display: none; }
.sidebar-foot {
  padding: 17px 9px 3px;
  border-top: 1px solid #6f4c5a;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e0c5cf;
  font-size: 12px;
}
.sidebar-foot-mark { height: 7px; width: 7px; background: #e58da3; border-radius: 50%; }
.more-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.more-group { display: grid; align-content: start; }
.more-link { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 14px; }
.more-link:last-child { border: 0; }
.more-link .icon { color: var(--accent); }
.more-link:hover { color: var(--accent); }
.punch-shift { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #ffe2eb; font-size: 13px; }
.punch-shift .icon { width: 15px; height: 15px; }
.home-shortcuts { margin-top: 12px; }

.workspace { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 clamp(20px, 3.2vw, 50px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.breadcrumb, .topbar-right, .account { display: flex; align-items: center; }
.breadcrumb { gap: 12px; color: var(--muted); font-size: 13px; }
.breadcrumb strong { color: var(--ink); font-size: 14px; }
.breadcrumb-separator { color: #8c7a81; }
.topbar-right { gap: 20px; }
.topbar-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  color: #874051;
  background: #faedf0;
  border: 1px solid #f2dce2;
  border-radius: 20px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
}
.topbar-badge[hidden] { display: none; }
.topbar-badge span { width: 6px; height: 6px; border-radius: 50%; background: #b74c63; }
a.topbar-badge::before { content: ""; position: absolute; inset: -10px 0; }
a.topbar-badge:hover, .topbar-badge[aria-current="page"] { background: #f8e2e9; border-color: #d99cab; }
.account-menu { position: relative; }
.account { gap: 9px; min-height: 44px; padding-left: 19px; border-left: 1px solid var(--line); list-style: none; }
.account::-webkit-details-marker { display: none; }
.account-options {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  right: 0;
  min-width: 120px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 0 4px 12px #42222f14;
}
.account-options .account-action { width: 100%; padding-inline: 8px; }
.account-options button.account-action { text-align: left; background: transparent; border: 0; }
.account-options [hidden] { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #903d51; background: #f4e2e7; font-size: 14px; font-weight: 700; }
.account-meta strong { font-size: 13px; line-height: 1; white-space: nowrap; }
.account-meta small { font-size: 11px; color: var(--muted); white-space: nowrap; }

.main-content { width: 100%; max-width: 1390px; margin-inline: auto; padding: 33px clamp(20px, 3.2vw, 50px) 32px; flex: 1; }
.main-content:focus { outline: none; }
.greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.greeting h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.2; letter-spacing: -.05em; }
.greeting h1 span { color: var(--accent); }
.greeting p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.date-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: #574951; white-space: nowrap; font-size: 12px; }
.date-chip .icon { width: 16px; height: 16px; color: var(--accent); }

.punch-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(110deg, #351e2b 7%, #492535 58%, #602b40 100%);
  border: 1px solid #684052;
  color: #fff6f9;
  box-shadow: 0 6px 18px #42222f14;
}
.clock-art { position: absolute; right: 0; top: 50%; width: min(56%, 490px); height: auto; transform: translateY(-50%); z-index: -1; pointer-events: none; }
.punch-content { padding: 24px 30px; }
.punch-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 15px; }
.punch-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; letter-spacing: .02em; }
.punch-heading h2 .icon { color: #ffb3c6; }
.punch-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; padding: 5px 8px; color: #ffe2b6; background: #ffe2b617; border: 1px solid #ffe2b64d; border-radius: 20px; }
.punch-status.recorded { color: #d0f5db; background: #b1e7c719; border-color: #b1e7c74d; }
.punch-status span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.clock-line { display: flex; gap: 13px; align-items: baseline; margin-top: 13px; }
.clock-line time { font-size: clamp(43px, 5.3vw, 67px); font-weight: 650; line-height: 1.08; font-variant-numeric: tabular-nums; letter-spacing: -.065em; }
.clock-line > span { font-size: 11px; color: #f2cdda; letter-spacing: .04em; }
.punch-times { display: flex; gap: 17px; margin-top: 15px; }
.punch-times > div { display: grid; gap: 4px; min-width: 89px; }
.punch-times > div + div { border-left: 1px solid #ab7687; padding-left: 17px; }
.punch-times span { color: #edc8d4; font-size: 11px; }
.punch-times strong { font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.punch-action { display: flex; align-items: center; gap: 12px; margin-top: 21px; }
.punch-action small { color: #efd0db; font-size: 11px; }
.primary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 9px 14px;
  border: 1px solid #ffbbc7;
  background: #ffb7c6;
  color: #451f30;
  font-size: 13px;
  font-weight: 750;
  transition: background 160ms ease;
}
.primary-button .icon { width: 18px; height: 18px; }
.primary-button:hover:not(:disabled) { background: #ffd0da; }
.primary-button:disabled { color: #fae3ea; background: #7b4b60; border-color: #b07b8f; }
.punch-hero :focus-visible { outline-color: #ffd8e2; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.section-heading h2 { font-size: 19px; letter-spacing: -.025em; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.quick-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 17px 18px 5px;
  box-shadow: 0 2px 6px #40263105;
}
.quick-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 11px; }
.tile-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; flex: none; }
.tile-icon .icon { width: 19px; height: 19px; }
.tile-rose { background: #f9e7ed; color: #a43851; }
.tile-amber { background: #f9efdb; color: #8a5818; }
.tile-green { background: #e5f3eb; color: #32684d; }
.card-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.quick-card h3 { font-size: 14px; line-height: 1.5; }
.quick-metric { display: inline-block; font-weight: 750; font-size: clamp(20px, 2.25vw, 31px); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.quick-metric.masked { font-size: 23px; letter-spacing: .13em; }
.quick-metric span { font-size: .64em; margin-left: 2px; }
.quick-metric.masked span { font-size: inherit; margin: 0; }
.quick-text { font-size: clamp(18px, 1.75vw, 24px); display: flex; align-items: center; letter-spacing: -.035em; min-height: 44px; }
.salary-line, .metric-progress { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.icon-button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-block: -1px; color: #725b64; background: transparent; border: 0; border-radius: 8px; }
.icon-button:hover { color: var(--accent); background: #faf0f3; }
.icon-button .icon { width: 17px; height: 17px; }
.metric-progress progress { flex: 1; min-width: 20px; max-width: 113px; height: 6px; border: 0; border-radius: 10px; appearance: none; background: #e8efeb; color: #49856a; }
.metric-progress progress::-webkit-progress-bar { border-radius: 10px; background: #e8efeb; }
.metric-progress progress::-webkit-progress-value { border-radius: 10px; background: #49856a; }
.metric-progress progress::-moz-progress-bar { border-radius: 10px; background: #49856a; }
.quick-detail { min-height: 27px; margin-bottom: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.quick-link, .text-link { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 8px; color: #983148; font-size: 13px; font-weight: 700; }
.quick-link { border-top: 1px solid var(--line); margin-top: auto; }
.quick-link:hover, .text-link:hover { color: #6d1530; text-decoration: underline; }
.quick-link .icon, .text-link .icon { width: 16px; height: 16px; }

.attendance-history { margin-top: 20px; }
.overview .attendance-history { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 17px 18px; }
.overview .attendance-history .panel-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.overview .attendance-history .panel-title { font-size: 17px; }
.overview .attendance-history .panel-header p { margin-top: 5px; font-size: 12px; color: var(--muted); }
.overview .module-table { width: 100%; margin-top: 12px; border-collapse: collapse; text-align: left; font-size: 13px; }
.overview .module-table :is(th, td) { padding: 10px 6px; border-top: 1px solid var(--line); }
.overview .module-table thead { color: var(--muted); }
.overview .badge { color: #38634f; font-size: 12px; }
.empty-records { display: flex; align-items: center; gap: 9px; min-height: 57px; margin-top: 10px; padding: 10px 12px; background: var(--canvas); border-radius: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.empty-records .icon { color: #a0576d; }

.workspace-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 clamp(20px, 3.2vw, 50px) 19px; color: var(--muted); font-size: 11px; }
.connection-status { padding: 8px clamp(20px, 3.2vw, 50px); border-bottom: 1px solid #ead9bd; color: #754b17; background: #faf0dd; font-size: 13px; line-height: 1.45; }
.install-guide { font-size: 14px; line-height: 1.6; }
.install-guide dl { margin: 0; }
.install-guide dt { font-weight: 700; }
.install-guide dt + dd { margin: 3px 0 12px; color: var(--muted); }
.install-guide dd:last-child { margin-bottom: 0; }
.toast {
  position: fixed;
  z-index: 5;
  bottom: 24px;
  right: 25px;
  max-width: calc(100% - 50px);
  padding: 12px 16px;
  border-radius: 9px;
  background: #321e28;
  color: #fff6f9;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 5px 20px #321e2840;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1080px) {
  :root { --sidebar-width: 192px; }
  .clock-art { width: 49%; }
  .quick-card { padding-inline: 14px; }
}

@media (max-width: 790px), (pointer: coarse) and (max-height: 500px) and (orientation: landscape) {
  :root { scroll-padding-bottom: calc(60px + var(--safe-bottom)); }
  .sidebar { inset: auto 0 0; width: auto; overflow: visible; padding: 0 max(4px, var(--safe-right)) var(--safe-bottom) max(4px, var(--safe-left)); border-top: 1px solid #5b3949; }
  .brand, .sidebar-bottom, .primary-nav { display: none; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav-link { flex-direction: column; justify-content: center; gap: 4px; margin: 3px 1px; min-height: 51px; padding: 4px 0; font-size: 11px; white-space: nowrap; }
  .nav-link .icon { width: 18px; height: 18px; }
  .workspace { margin: 0; min-height: 100svh; padding-bottom: calc(59px + var(--safe-bottom)); }
  .topbar { min-height: calc(57px + var(--safe-top)); padding-top: var(--safe-top); }
  .main-content { padding-top: 23px; }
  .toast { bottom: calc(72px + var(--safe-bottom)); right: max(15px, var(--safe-right)); max-width: calc(100% - 30px - var(--safe-left) - var(--safe-right)); }
  .signin-card .brand { display: flex; }
}

@media (max-width: 570px) {
  .topbar, .workspace-footer { padding-inline: 15px; }
  .main-content { padding: 23px 15px 24px; }
  .breadcrumb { gap: 6px; }
  .breadcrumb-start, .breadcrumb-separator { display: none; }
  .topbar-right { gap: 10px; }
  .account { padding-left: 10px; }
  .avatar { width: 31px; height: 31px; }
  .greeting { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
  .greeting p { margin-top: 6px; }
  .date-chip { padding: 6px 8px; }
  .punch-content { padding: 20px 15px; }
  .clock-art { right: -65px; top: 43%; width: 300px; opacity: .26; }
  .clock-line { gap: 9px; }
  .punch-action { flex-wrap: wrap; gap: 9px; }
  .section-heading { margin-top: 23px; }
  .quick-grid { grid-template-columns: 1fr; gap: 10px; }
  .quick-card { padding: 13px 14px 2px; }
  .quick-head { margin-bottom: 5px; }
  .quick-detail { min-height: 0; margin-bottom: 10px; }
  .quick-text, .quick-metric { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

.signin-page { min-height: 100svh; display: grid; place-items: center; padding: max(20px, var(--safe-top)) max(20px, var(--safe-right)) max(20px, var(--safe-bottom)) max(20px, var(--safe-left)); background: radial-gradient(ellipse at 70% 0%, #f4dbe3, transparent 58%), var(--canvas); }
.signin-card { width: min(100%, 450px); padding: clamp(22px, 6vw, 42px); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 15px 40px #502a381a; }
.signin-card .brand { padding: 0; margin-bottom: 30px; }
.signin-card .brand-type small { color: var(--muted); }
.signin-card h1 { font-size: 29px; }
.signin-card p { color: var(--muted); margin: 11px 0 21px; line-height: 1.65; }
.signin-action { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 15px; border-radius: 8px; background: var(--accent); color: white; font-size: 14px; font-weight: 700; }
.account-action { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-size: 12px; font-weight: 650; white-space: nowrap; }
.account-action:hover { text-decoration: underline; }
.loading-state { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.loading-state p { margin-top: 8px; color: var(--muted); line-height: 1.55; }
.loading-state button { margin-top: 12px; }
.account-meta { min-width: 0; }
.account-meta :is(strong, small) { overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.sidebar .nav-link { min-width: 0; }
.punch-action .primary-button[aria-busy="true"] { opacity: .75; }
@media (max-width: 570px) {
  .account-meta :is(strong, small) { max-width: 80px; }
}

.greeting h1, .quick-text { overflow-wrap: anywhere; }
@media (max-width: 790px), (pointer: coarse) and (max-height: 500px) and (orientation: landscape) {
  :root { --mobile-gutter: 20px; }
  :is(.topbar, .connection-status, .main-content, .workspace-footer) {
    padding-left: max(var(--mobile-gutter), var(--safe-left));
    padding-right: max(var(--mobile-gutter), var(--safe-right));
  }
  dialog.hub-dialog {
    max-width: calc(100% - 24px - var(--safe-left) - var(--safe-right));
    max-height: min(82dvh, calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom)));
  }
  body :is(.module-shell, .hub-dialog) :is(input, select, textarea) { font-size: 16px; }
}
@media (max-width: 570px) {
  :root { --mobile-gutter: 15px; }
}

.auth-link { display: inline-flex; align-items: center; justify-content: center; }

.task-board { gap: 14px; }
.task-board > .module-intro { margin: 0; }
.task-content, .task-panel { display: grid; gap: 14px; min-width: 0; }
.task-metrics, .task-panels { display: grid; gap: 12px; }
.task-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.task-panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.task-metric { display: grid; justify-items: start; gap: 7px; text-align: left; }
.task-metric span, .task-data dt, .task-list li span { color: var(--muted); font-size: 13px; }
.task-metric strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.task-board [data-task-filter][aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.task-board button.task-metric:hover { border-color: var(--accent); }
.task-reminders, .task-data { display: grid; gap: 6px; margin: 0; }
.task-reminders button, .task-data div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; }
.task-reminders button { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); text-align: left; }
.task-data dd { margin: 0; font-weight: 700; }
.task-search { min-width: 0; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.task-list { display: grid; margin: 0; padding: 0; list-style: none; }
.task-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 10px; border-top: 1px solid var(--line); }
.task-list li > div { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.task-list li a { flex: none; }
.task-empty { color: var(--muted); font-size: 14px; }
@media (max-width: 620px) {
  .task-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-panels { grid-template-columns: minmax(0, 1fr); }
}

.library-page [aria-current="page"], .schedule-page [aria-pressed="true"] {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
}
.library-list, .library-record summary { display: grid; gap: 6px; }
.library-record { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.library-record summary { cursor: pointer; grid-template-columns: minmax(0, 1fr) 22px; align-items: center; }
.library-record summary::-webkit-details-marker { display: none; }
.library-record summary small { grid-column: 1; color: var(--muted); }
.library-record summary::after { content: '›'; grid-area: 1 / 2 / 3; color: var(--muted); font-size: 22px; text-align: center; }
.library-record[open] summary::after { transform: rotate(90deg); }
.library-record p { white-space: pre-wrap; }
.library-record .hub-form-actions { margin-top: 10px; }
.library-dialog { width: min(660px, calc(100% - 24px)); }
.schedule-period { display: flex; align-items: center; gap: 8px; }
.schedule-period input { min-height: 44px; padding-inline: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.schedule-page label:is(.schedule-person, .schedule-all label) { display: flex; align-items: center; gap: 10px; }
.schedule-page input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.schedule-person small { display: block; margin-top: 4px; color: var(--muted); }
.schedule-page [hidden], .library-page [hidden] { display: none; }
@media (max-width: 550px) {
  .library-dialog .hub-form-grid, .schedule-page form > .hub-form-grid { grid-template-columns: 1fr; }
  .library-page .module-heading h1, .schedule-page .module-heading h1 { min-width: 0; }
}
.roster-preview { max-height: 260px; overflow-y: auto; }
.library-dialog > .hub-form { padding: clamp(14px, 4vw, 24px); }
.hub-shift { margin: 6px 0 0; font-size: 13px; font-weight: 650; color: var(--accent); }

.library-page [data-library-status]:empty, .schedule-page [role="status"]:empty { display: none; }
.stock-page section + section { margin-top: 6px; }
.stock-actions { align-items: flex-end; }
.stock-store { display: grid; gap: 4px; min-width: min(170px, 100%); font-size: 13px; }
.stock-store select { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.stock-page [hidden] { display: none; }

:is(.library-dialog,.capital-dialog) > .contract-qr { padding: clamp(14px, 4vw, 24px); }
.contract-qr-code img { display: block; max-width: 100%; width: auto; height: auto; margin-inline: auto; }
.contract-scan { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.contract-scan summary { min-height: 32px; padding-block: 5px; cursor: pointer; color: var(--accent); font-weight: 650; }
.contract-scan [data-contract-capture] { display: grid; gap: 8px; }
.contract-scan-pages { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.contract-scan-pages:empty { display: none; }
.contract-scan-pages li { display: flex; align-items: center; gap: 8px; }
.contract-scan-pages img { width: 44px; height: 52px; object-fit: contain; }
.contract-scan-pages button { margin-inline-start: auto; }

[data-task-create][hidden] { display: none; }
[data-task-dialog] .hub-dialog-body { overflow-wrap: anywhere; }
@media (max-width: 570px) {
  [data-task-dialog] .hub-form-grid { grid-template-columns: 1fr; }
}
