@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  color-scheme: light;
  --bg: #fffaf0;
  --bg-soft: #f7efe1;
  --surface: #ffffff;
  --surface-warm: #fffdf7;
  --text: #2e261d;
  --text-muted: #756b5f;
  --text-soft: #9a8d7b;
  --line: #eadfce;
  --line-strong: #d8c8b3;
  --primary: #8f5f2a;
  --primary-hover: #774b1e;
  --primary-soft: #f2dfc5;
  --accent: #d99745;
  --state-neutral-bg: #f1eadf;
  --state-neutral-text: #5f554a;
  --success: #27694d;
  --success-bg: #e5f3ea;
  --danger: #a33b31;
  --danger-bg: #fff0ed;
  --warning: #74460e;
  --warning-bg: #fff1dc;
  --planned: #425f76;
  --planned-bg: #edf5f9;
  --settled: #4e682d;
  --settled-bg: #eef4e8;
  --overtime: #2f6a78;
  --overtime-bg: #e8f5f4;
  --settlement-unsettled: #8f4a17;
  --settlement-unsettled-bg: #fff1e2;
  --settlement-pending: #2f5f85;
  --settlement-pending-bg: #e8f2f9;
  --settlement-paid: #27694d;
  --settlement-paid-bg: #e5f3ea;
  --settlement-held: #9b332c;
  --settlement-held-bg: #fff0ed;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(67, 48, 28, 0.05);
  --shadow-md: 0 10px 24px rgba(67, 48, 28, 0.09);
  --font-ui: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-emotion: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.94), rgba(247, 239, 225, 0.82)),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.48; }

.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.82);
  backdrop-filter: blur(24px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 8px 10px 8px 8px;
  border: 1px solid rgba(216, 200, 179, .72);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(247, 239, 225, .56));
  color: var(--text);
  box-shadow: 0 10px 28px rgba(67, 48, 28, .07);
}
.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--primary), #aa7130);
  color: white;
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 18px rgba(143, 95, 42, .18);
}
.brand-text {
  display: grid;
  min-width: 0;
  gap: 2px;
  line-height: 1.05;
}
.brand-kicker {
  color: var(--primary);
  font-family: var(--font-emotion);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}
.brand-title {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.08;
  white-space: nowrap;
}
.nav {
  display: grid;
  gap: 6px;
  margin-top: 32px;
}
.nav a, .ghost-button, .secondary-button, .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.nav a {
  justify-content: flex-start;
  color: var(--text-muted);
}
.nav a:hover, .ghost-button:hover, .secondary-button:hover, .primary-button:hover {
  transform: translateY(-1px);
}
.nav a:hover { background: var(--primary-soft); color: var(--text); }
.logout-form { margin-top: 28px; }
.full { width: 100%; }
.content { padding: 32px; }

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.page-header.narrow { max-width: 900px; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 {
  font-family: var(--font-emotion);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 700;
}
h2 { font-size: 20px; }
.muted { color: var(--text-muted); margin: 8px 0 0; line-height: 1.6; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card, .panel, .today-card, .mobile-summary, .login-card {
  background: var(--surface-warm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.metric-card {
  min-height: 104px;
  padding: 18px;
  border-radius: 14px;
}
.metric-card span, .computed-box span, .mobile-summary span, .access-card span {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}
.metric-card strong {
  display: block;
  margin-top: 18px;
  font-size: 28px;
  line-height: 1;
}
.dashboard-metrics {
  margin-bottom: 20px;
}
.dashboard-chart-grid {
  display: grid;
  grid-template-columns: minmax(320px, .85fr) minmax(0, 1.35fr);
  gap: 18px;
  margin-bottom: 20px;
}
.dashboard-chart-grid.lower {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.chart-panel {
  min-height: 318px;
  overflow: hidden;
}
.donut-layout {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 220px;
}
.donut-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 188px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--donut-bg));
  box-shadow: inset 0 0 0 1px rgba(216, 200, 179, .74), 0 12px 22px rgba(67, 48, 28, .08);
  animation: chart-pop .64s cubic-bezier(.22, 1, .36, 1) both;
}
.donut-chart::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--surface-warm);
  box-shadow: inset 0 0 0 1px var(--line);
}
.donut-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
}
.donut-center span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.donut-center strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}
.chart-legend-list {
  display: grid;
  gap: 10px;
}
.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(234, 223, 206, .74);
}
.legend-row strong {
  font-size: 15px;
}
.bar-chart-list,
.issue-chart-list {
  display: grid;
  gap: 13px;
  padding-top: 4px;
}
.compact-bars {
  gap: 12px;
}
.bar-row,
.issue-row {
  display: grid;
  gap: 8px;
}
.bar-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 850;
}
.bar-row-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-row-head strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 13px;
}
.bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3eadc;
  box-shadow: inset 0 0 0 1px rgba(216, 200, 179, .62);
}
.bar-fill {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-hover), var(--accent));
  transform-origin: left center;
  animation: chart-bar-grow .76s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: var(--bar-delay, 0ms);
}
.bar-row.work .bar-fill {
  background: linear-gradient(90deg, var(--success), #8ba35f);
}
.issue-bars {
  display: grid;
  gap: 7px;
}
.issue-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.issue-bar i {
  display: block;
  height: 11px;
  border-radius: 999px;
  transform-origin: left center;
  animation: chart-bar-grow .76s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: var(--bar-delay, 0ms);
}
.issue-bar.late i {
  width: var(--late-width);
  background: var(--danger);
}
.issue-bar.early i {
  width: var(--early-width);
  background: var(--warning);
}
.issue-bar em {
  min-width: 72px;
  font-style: normal;
  text-align: right;
}
.settlement-status-chart {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}
.settlement-focus,
.settlement-bar-row {
  --settlement-color: var(--state-neutral-text);
  --settlement-bg: var(--state-neutral-bg);
}
.settlement-focus.unsettled,
.settlement-bar-row.unsettled {
  --settlement-color: var(--settlement-unsettled);
  --settlement-bg: var(--settlement-unsettled-bg);
}
.settlement-focus.pending,
.settlement-bar-row.pending {
  --settlement-color: var(--settlement-pending);
  --settlement-bg: var(--settlement-pending-bg);
}
.settlement-focus.paid,
.settlement-bar-row.paid {
  --settlement-color: var(--settlement-paid);
  --settlement-bg: var(--settlement-paid-bg);
}
.settlement-focus.held,
.settlement-bar-row.held {
  --settlement-color: var(--settlement-held);
  --settlement-bg: var(--settlement-held-bg);
}
.settlement-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid rgba(216, 200, 179, .76);
  border-radius: 14px;
  background: var(--settlement-bg);
}
.settlement-focus span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.settlement-focus strong {
  display: block;
  margin-top: 4px;
  color: var(--settlement-color);
  font-size: 18px;
  line-height: 1.15;
}
.settlement-focus em {
  flex: 0 0 auto;
  color: var(--settlement-color);
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
.settlement-bar-list {
  display: grid;
  gap: 12px;
}
.settlement-bar-row {
  display: grid;
  gap: 7px;
}
.settlement-bar-row.is-empty {
  opacity: .58;
}
.settlement-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.settlement-row-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}
.settlement-row-label i {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--settlement-color);
}
.settlement-row-value {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.settlement-row-value strong {
  color: var(--text);
  font-size: 14px;
}
.settlement-row-value small {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.settlement-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3eadc;
  box-shadow: inset 0 0 0 1px rgba(216, 200, 179, .62);
}
.settlement-meter span {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: var(--settlement-color);
  transform-origin: left center;
  animation: chart-bar-grow .72s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: var(--bar-delay, 0ms);
}
.settlement-bar-row:not(.is-empty) .settlement-meter span {
  min-width: 6px;
}
.chart-empty {
  display: grid;
  place-items: center;
  min-height: 178px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(247, 239, 225, .34);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 900;
}
.panel {
  padding: 22px;
  border-radius: 14px;
  margin-bottom: 20px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.panel-heading.compact { margin-bottom: 10px; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th, td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}
th {
  color: var(--text-muted);
  font-size: 13px;
  background: rgba(247, 239, 225, 0.7);
}
.text-link {
  color: var(--primary);
  font-weight: 800;
  border-bottom: 1px solid rgba(143, 95, 42, .34);
}
.empty-cell { text-align: center; color: var(--text-muted); padding: 34px 12px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--state-neutral-bg);
  color: var(--state-neutral-text);
  font-size: 12px;
  font-weight: 800;
}
.status-chip.success { background: var(--success-bg); color: var(--success); }
.status-chip.warning { background: var(--warning-bg); color: var(--warning); }
.status-chip.inactive { background: #f0ece5; color: var(--state-neutral-text); }
.status-chip.settled { background: var(--settled-bg); color: var(--settled); }
.status-chip.unpaid { background: #f7efe1; color: var(--primary-hover); }
.status-chip.planned { background: var(--planned-bg); color: var(--planned); }
.inactive-row {
  color: var(--text-muted);
  background: rgba(247, 239, 225, .24);
}
.inactive-row .text-link {
  color: var(--text-muted);
  border-bottom-color: rgba(117, 107, 95, .28);
}
.title-with-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.title-with-status h1 {
  margin: 0;
}
.inline-form {
  display: inline-flex;
  margin: 0;
}
.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.settlement-table {
  min-width: 1080px;
}
.settlement-panel .table-wrap {
  max-height: min(520px, 58vh);
  overflow-x: auto;
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
}
.settlement-panel .settlement-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--line);
}
.settlement-table td {
  vertical-align: top;
}
.settlement-table td strong {
  display: block;
}
.settlement-table td small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}
.settlement-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 220px;
}
.compact-settlement-actions {
  align-items: flex-start;
}
.settlement-action-menu {
  position: relative;
}
.settlement-action-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}
.settlement-action-menu summary::-webkit-details-marker {
  display: none;
}
.settlement-action-menu summary::after {
  content: "⌄";
  margin-left: 7px;
  color: var(--state-neutral-text);
  font-size: 12px;
}
.settlement-action-menu[open] summary {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.settlement-action-menu-panel {
  display: grid;
  gap: 7px;
  min-width: 180px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.settlement-action-menu-panel .inline-form,
.settlement-action-menu-panel button,
.settlement-action-menu-panel a {
  width: 100%;
}
.settlement-action-menu-panel .compact-button {
  justify-content: flex-start;
}

.primary-button { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 8px rgba(143, 95, 42, .16); }
.primary-button:hover { background: var(--primary-hover); }
.secondary-button { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.ghost-button { background: transparent; color: var(--text-muted); border-color: var(--line); }
.nav a:focus-visible,
.ghost-button:focus-visible,
.secondary-button:focus-visible,
.primary-button:focus-visible,
.danger-button:focus-visible,
.period-template-button:focus-visible,
.settlement-action-menu summary:focus-visible {
  outline: 3px solid var(--primary-soft);
  outline-offset: 3px;
}

.login-body, .mobile-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}
.login-card {
  width: min(440px, 100%);
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}
.stack-form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: var(--text-muted); font-weight: 800; font-size: 14px; }
input, select {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--primary);
  flex: 0 0 auto;
}
.checkbox-field span {
  font-weight: 900;
}
.toggle-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.toggle-card input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.toggle-visual {
  position: relative;
  width: 46px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #f5eee3;
  box-shadow: inset 0 1px 2px rgba(67, 48, 28, 0.08);
  flex: 0 0 auto;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.toggle-visual::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(67, 48, 28, 0.22);
  transition: transform .18s ease;
}
.toggle-card input[type="checkbox"]:checked + .toggle-visual {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 1px 2px rgba(67, 48, 28, 0.12), 0 0 0 3px var(--primary-soft);
}
.toggle-card input[type="checkbox"]:checked + .toggle-visual::after {
  transform: translateX(20px);
}
.toggle-card input[type="checkbox"]:focus-visible + .toggle-visual {
  outline: 3px solid var(--primary-soft);
  outline-offset: 3px;
}
.toggle-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.toggle-copy strong {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}
.toggle-copy small {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}
.form-panel { max-width: 940px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.computed-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #f8efdf;
  border: 1px solid var(--line);
}
.computed-box strong { font-size: 22px; }
.computed-box.subdued strong { font-size: 14px; word-break: break-all; }

.fixed-time-field.hidden { display: none; }
.weekly-schedule-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, .66);
}
.weekly-schedule-panel[hidden] { display: none; }
.weekday-schedule-grid {
  display: grid;
  gap: 8px;
}
.weekday-row {
  display: grid;
  grid-template-columns: 96px repeat(3, minmax(110px, 1fr)) 92px;
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.weekday-row.off {
  background: rgba(247, 239, 225, .42);
}
.weekday-workday {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--text);
  font-weight: 900;
}
.weekday-workday input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--primary);
}
.weekday-minutes {
  display: grid;
  gap: 8px;
  min-height: 48px;
  padding: 6px 0;
}
.weekday-minutes span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}
.weekday-minutes strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}
.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.alert {
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
  font-weight: 800;
}
.alert.success { color: var(--success); background: #e9f4ed; border-color: #cce6d5; }
.alert.danger { color: var(--danger); background: var(--danger-bg); border-color: #f1c8c2; }

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
  gap: 24px;
}
.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}
.detail-list div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
dt { color: var(--text-muted); font-size: 12px; font-weight: 800; }
dd { margin: 6px 0 0; font-weight: 800; }
.access-card {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: #fbf4e8;
}
.access-card strong { display: block; margin-top: 10px; word-break: break-all; color: var(--primary); }
.access-denied-screen {
  display: grid;
  align-items: center;
}
.access-denied-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, .92);
  text-align: center;
}
.access-denied-card img {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(67, 48, 28, .12);
}
.access-denied-card h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.16;
}
.access-denied-card strong {
  color: var(--primary);
  font-size: 18px;
}
.access-denied-card .muted {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}
.access-denied-help {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8efdf;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.mobile-screen {
  width: min(430px, 100%);
  min-height: calc(100vh - 36px);
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 253, 247, .9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.mobile-screen.wide { width: min(520px, 100%); }
.brand-splash[hidden] {
  display: none;
}
.brand-splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 44%, rgba(52, 120, 90, .14), transparent 32%),
    radial-gradient(circle at 50% 60%, rgba(217, 151, 69, .16), transparent 38%),
    linear-gradient(145deg, #fffdf7, #fff4df);
  color: var(--text);
  opacity: 0;
  transform: scale(1.012);
  transition: opacity .32s ease, transform .32s ease;
}
.brand-splash.show {
  opacity: 1;
  transform: scale(1);
}
.brand-splash.is-hiding {
  opacity: 0;
  transform: scale(1.018);
}
.brand-splash-content {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.brand-splash-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
}
.brand-splash-mark img {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  box-shadow: 0 16px 34px rgba(67, 48, 28, .16);
}
.brand-splash-mark span {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(52, 120, 90, .28);
  border-radius: 50%;
  animation: splash-pulse 1.1s ease-out infinite;
}
.brand-splash p {
  margin: 2px 0 0;
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}
.brand-splash strong {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 900;
}
.mobile-header h1 { font-size: 31px; }
.mobile-header.compact h1 { font-size: 28px; }
.clock {
  margin-top: 18px;
  font-family: var(--font-emotion);
  font-size: clamp(48px, 14vw, 74px);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mobile-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 12px;
  padding: 14px;
  border-radius: 20px;
}
.mobile-summary div {
  padding: 12px;
  border-radius: 15px;
  background: var(--surface);
}
.mobile-summary strong { display: block; margin-top: 8px; font-size: 24px; }
.today-card {
  padding: 17px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.today-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.today-times div {
  padding: 14px;
  border-radius: 15px;
  background: #fbf4e8;
}
.today-times dd { font-size: 23px; }
.time-actual-note {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.time-text-button .time-actual-note {
  margin-left: 6px;
  margin-top: 0;
}
.gps-note {
  margin: 0;
  padding: 11px 12px;
  border-radius: 13px;
  background: #f5eddf;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}
.gps-note.ok { background: #e9f4ed; color: var(--success); }
.gps-note.bad { background: var(--danger-bg); color: var(--danger); }
.mobile-actions { display: grid; gap: 10px; }
.center-actions {
  position: relative;
  margin: 14px 0 20px;
}
.jumbo { min-height: 58px; font-size: 17px; border-radius: 17px; }
.attention-cta {
  position: relative;
  z-index: 1;
  min-height: 66px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  font-size: 20px;
  font-weight: 950;
  box-shadow:
    0 10px 20px rgba(143, 95, 42, .20),
    0 0 0 5px rgba(143, 95, 42, .07);
  animation: attention-float 3.4s ease-in-out infinite;
}
.attention-cta::before,
.attention-cta::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.attention-cta::before {
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
  opacity: .55;
}
.attention-cta::after {
  display: none;
}
.attention-in {
  background:
    linear-gradient(180deg, #a8793f 0%, var(--primary) 100%);
  border-color: #7e531f;
  color: #fff;
}
.attention-out {
  background:
    linear-gradient(180deg, #fff9ef 0%, #f4e2c9 100%);
  border-color: #b98a55;
  color: var(--primary-hover);
  box-shadow:
    0 10px 20px rgba(143, 95, 42, .16),
    0 0 0 5px rgba(184, 117, 32, .09);
}
.attention-cta:hover {
  transform: translateY(-2px);
}
.action-complete {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid #c9e6d4;
  border-radius: 17px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 17px;
  font-weight: 900;
}
.month-link {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  min-height: 44px;
  align-items: center;
  color: var(--primary);
  font-weight: 900;
}
.install-card[hidden] {
  display: none;
}
.install-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 247, .88);
  box-shadow: var(--shadow-sm);
}
.install-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.install-card-head img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(67, 48, 28, .10);
}
.install-card-head span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.install-card-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}
.install-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}
.install-actions {
  display: grid;
  gap: 8px;
}
.month-panel { padding: 12px; }
.mobile-table table { min-width: 0; }
.mobile-table th, .mobile-table td { padding: 12px 8px; font-size: 13px; }

@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    display: grid;
    gap: 14px;
  }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
  .logout-form { margin-top: 0; }
  .content { padding: 20px; }
  .page-header { display: grid; }
  .metric-grid, .metric-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-chart-grid,
  .dashboard-chart-grid.lower {
    grid-template-columns: 1fr;
  }
  .donut-layout {
    grid-template-columns: 176px minmax(0, 1fr);
  }
  .donut-chart {
    width: 176px;
  }
  .form-grid.two, .form-grid.three, .split-panel, .detail-list { grid-template-columns: 1fr; }
  .weekday-row { grid-template-columns: 1fr 1fr; }
  .weekday-workday, .weekday-minutes { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .content { padding: 14px; }
  .metric-grid, .metric-grid.three { grid-template-columns: 1fr; }
  .metric-card { min-height: 96px; }
  .chart-panel { min-height: auto; }
  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .donut-chart {
    width: 164px;
  }
  .chart-legend-list {
    width: 100%;
  }
  .panel { padding: 16px; }
  .header-actions, .form-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .code-row { grid-template-columns: 1fr; }
  .weekday-row { grid-template-columns: 1fr; }
  .weekday-workday, .weekday-minutes { grid-column: auto; }
  .mobile-body { padding: 0; place-items: stretch; }
  .mobile-screen { width: 100%; min-height: 100vh; border-radius: 0; border: 0; }
}

@keyframes chart-pop {
  0% {
    opacity: 0;
    transform: scale(.92);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 공휴일·근무상태·세무사 전달 자료 */
.holiday-sync-summary {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 247, .72);
}
.compact-detail-list { margin-bottom: 10px; }
.holiday-sync-form {
  display: grid;
  grid-template-columns: minmax(160px, 240px) auto;
  align-items: end;
  gap: 12px;
}
.day-status-dialog { width: min(560px, calc(100vw - 24px)); }
.standalone-dialog-topline { padding: 22px 22px 0; }
.day-status-dialog > h3 { margin: 8px 22px 0; }
.day-status-form { border-bottom: 0; }
.public-holiday-notice {
  margin: 12px 22px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0f2;
  color: #9f3344;
  font-weight: 900;
}
.dialog-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 22px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.dialog-divider::before,
.dialog-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.accountant-table { min-width: 1320px; }
.accountant-table th,
.accountant-table td { white-space: nowrap; }
.accountant-table .reason-cell { min-width: 240px; white-space: normal; line-height: 1.45; }
.status-chip.weekly-eligible { background: var(--success-bg); color: var(--success); }
.status-chip.weekly-ineligible { background: #f7e1df; color: #a8443d; }
.status-chip.weekly-review { background: var(--warning-bg); color: var(--warning); }
.status-chip.weekly-not_applicable { background: #eeeae5; color: var(--text-muted); }
.status-chip.weekly-schedule_review { background: #fff0d9; color: #8b4d08; }
.disabled-button { opacity: .58; cursor: not-allowed; }
.accountant-review-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0;
  padding: 18px 20px;
  border: 1px solid #e7c48f;
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  background: linear-gradient(100deg, #fff8ea, #fffdf8);
  box-shadow: var(--shadow-sm);
}
.accountant-review-guide strong { color: var(--warning); font-size: 16px; }
.accountant-review-guide p { margin: 5px 0 0; color: var(--text-muted); line-height: 1.55; }
.accountant-review-guide > span {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--warning-bg);
  color: var(--warning);
  font-weight: 900;
}
.accountant-total-card {
  border-color: rgba(143, 95, 42, .35);
  background: linear-gradient(145deg, #fffdf7, #f8ead7);
}
.accountant-total-card strong { color: var(--primary); }
.accountant-summary-panel { overflow: hidden; }
.accountant-column-head,
.accountant-employee > summary {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(86px, .7fr) minmax(76px, .62fr) minmax(118px, .9fr) minmax(112px, .9fr) minmax(112px, .9fr) minmax(142px, 1.05fr) 88px;
  align-items: center;
  column-gap: 14px;
}
.accountant-column-head {
  margin: 20px 0 0;
  padding: 12px 18px;
  border-block: 1px solid var(--line);
  background: #faf4e9;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.accountant-employee-list { margin-inline: -1px; }
.accountant-employee {
  border-bottom: 1px solid var(--line);
  background: var(--surface-warm);
}
.accountant-employee:first-child { border-top: 0; }
.accountant-employee > summary {
  min-height: 84px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  transition: background .18s ease, box-shadow .18s ease;
}
.accountant-employee > summary::-webkit-details-marker { display: none; }
.accountant-employee > summary:hover { background: #fff9ed; }
.accountant-employee[open] > summary {
  background: #fff5e4;
  box-shadow: inset 4px 0 0 var(--primary);
}
.accountant-employee.needs-review > summary { box-shadow: inset 4px 0 0 #d99745; }
.accountant-employee > summary > span:not(.employee-summary-name) { min-width: 0; }
.accountant-employee > summary b { font-size: 14px; white-space: nowrap; }
.employee-summary-name { display: grid; justify-items: start; gap: 7px; }
.employee-summary-name > strong { font-size: 17px; }
.employee-summary-name .status-chip { font-size: 11px; }
.employee-taxable-total b { color: var(--primary); font-size: 16px !important; }
.employee-expand-label {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
.employee-expand-label::after {
  content: "⌄";
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: white;
  font-size: 16px;
  transition: transform .2s ease;
}
.accountant-employee[open] .employee-expand-label::after { transform: rotate(180deg); }
.weekly-detail-shell {
  padding: 18px;
  border-top: 1px dashed var(--line-strong);
  background: #fbf6ed;
}
.weekly-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.weekly-detail-heading strong { font-size: 15px; }
.weekly-detail-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 12px; }
.weekly-detail-table { min-width: 1380px; background: white; }
.weekly-detail-table .outside-month-week { opacity: .58; background: #f5f1ea; }
.month-inclusion {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}
.month-inclusion.included { background: var(--success-bg); color: var(--success); }
.month-inclusion.excluded { background: #eeeae5; color: var(--text-muted); }
.weekly-detail-table .reason-cell span { display: block; }
.review-fix-button {
  display: inline-flex;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 900;
}
.review-fix-button:hover { background: var(--primary-hover); }
.accountant-status-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 15px 18px;
  background: #faf6ef;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}
.accountant-status-footnote .has-review { color: var(--warning); }
.review-focus-alert { border-color: #e7c48f; background: var(--warning-bg); color: var(--warning); }
.responsive-day.review-focus-day {
  outline: 3px solid rgba(217, 151, 69, .5);
  box-shadow: 0 0 0 6px rgba(217, 151, 69, .13), var(--shadow-md);
}

/* Confirmed prescribed-work schedules */
.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
}
.schedule-employee-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.schedule-employee-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 900;
}
.schedule-employee-chip.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.schedule-employee-chip small { opacity: .72; }
.schedule-missing-card { border-color: #e7c48f; background: var(--warning-bg); }
.schedule-late-card { border-color: #e1a79f; background: var(--danger-bg); }
.schedule-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.schedule-policy-note {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #d9c49f;
  border-radius: 14px;
  background: linear-gradient(110deg, #fffaf0, #f8efe1);
}
.schedule-policy-note strong { color: var(--primary); }
.schedule-policy-note p { margin: 5px 0 0; color: var(--text-muted); line-height: 1.55; }
.schedule-week-list { display: grid; gap: 12px; }
.schedule-week-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-warm);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 18px;
}
.schedule-week-card.context-week { opacity: .76; background: #f8f3eb; }
.schedule-week-card.focus-week { outline: 3px solid rgba(217, 151, 69, .45); outline-offset: 2px; }
.schedule-week-card.status-confirmed { border-left: 5px solid var(--success); }
.schedule-week-card.status-draft { border-left: 5px solid var(--accent); }
.schedule-week-card.status-late { border-left: 5px solid var(--danger); }
.schedule-week-card.status-missing { border-left: 5px solid var(--line-strong); }
.schedule-week-card.status-legacy { border-left: 5px solid var(--text-soft); }
.schedule-week-card > summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(88px, .65fr)) 88px;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.schedule-week-card > summary::-webkit-details-marker { display: none; }
.schedule-week-card[open] > summary { background: #fff7e8; border-bottom: 1px dashed var(--line-strong); }
.schedule-week-card > summary span { min-width: 0; }
.schedule-week-card > summary small { display: block; margin-bottom: 4px; color: var(--text-muted); font-size: 11px; font-weight: 800; }
.schedule-week-card > summary b { font-size: 14px; }
.schedule-week-period strong { font-size: 16px; }
.schedule-state { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; }
.schedule-state.state-confirmed { background: var(--success-bg); color: var(--success); }
.schedule-state.state-draft { background: var(--warning-bg); color: var(--warning); }
.schedule-state.state-draft_revision { background: var(--warning-bg); color: var(--warning); }
.schedule-state.state-late { background: var(--danger-bg); color: var(--danger); }
.schedule-state.state-missing { background: var(--state-neutral-bg); color: var(--state-neutral-text); }
.schedule-state.state-legacy { background: #eeeae5; color: var(--text-muted); }
.schedule-expand { justify-self: end; color: var(--primary); font-size: 12px; font-weight: 900; }
.schedule-week-form { padding: 18px; background: #fcf8f1; }
.schedule-week-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.schedule-week-meta > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.schedule-week-meta strong, .schedule-week-meta span { display: block; }
.schedule-week-meta span { margin-top: 4px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.schedule-comparison-meta.has-mismatch { border-color: #e7b0a8; background: #fff7f5; }
.schedule-comparison-meta.has-mismatch strong { color: var(--danger); }
.schedule-day-grid { display: grid; grid-template-columns: repeat(7, minmax(154px, 1fr)); gap: 8px; overflow-x: auto; }
.schedule-day-card { min-width: 154px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.schedule-day-card.public-holiday-day { border-color: #efbdc3; background: #fff8f8; }
.schedule-day-card.comparison-mismatch,
.schedule-day-card.comparison-unscheduled { border-color: #df9f96; box-shadow: inset 0 0 0 1px rgba(168, 68, 61, .12); }
.schedule-day-card label:not(.schedule-workday-toggle) { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 5px; margin-top: 8px; }
.schedule-day-card label > span { color: var(--text-muted); font-size: 11px; font-weight: 900; }
.schedule-day-card input[type="time"], .schedule-day-card input[type="number"] { width: 100%; height: 34px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fffdf9; font-size: 12px; font-weight: 800; }
.schedule-workday-toggle { display: flex; align-items: center; gap: 7px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.schedule-workday-toggle span { color: var(--text) !important; font-size: 13px !important; }
.schedule-holiday-chip { margin-left: auto; padding: 3px 5px; border-radius: 999px; background: #ffe2e7; color: #a6384b; font-size: 9px; font-style: normal; font-weight: 900; white-space: nowrap; }
.schedule-holiday-name { margin: 8px 0 2px; color: #a6384b; font-size: 11px; font-weight: 900; line-height: 1.35; }
.schedule-day-card > small { display: block; margin-top: 9px; color: var(--text-soft); font-size: 10px; font-weight: 800; }
.schedule-day-actual { display: grid; gap: 4px; margin-top: 10px; padding: 9px; border-radius: 9px; background: #f7f4ee; }
.schedule-day-actual strong { color: var(--text); font-size: 11px; }
.schedule-day-actual span { color: var(--text-muted); font-size: 10px; line-height: 1.35; }
.comparison-result { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; font-style: normal; font-weight: 900; line-height: 1.35; }
.comparison-result.status-matched { color: var(--success); }
.comparison-result.status-mismatch,
.comparison-result.status-unscheduled,
.comparison-result.status-missing { color: var(--danger); }
.comparison-result.status-holiday { color: #a6384b; }
.comparison-result.status-off_with_history { color: var(--warning); }
.schedule-difference-cell { min-width: 245px; white-space: normal !important; }
.schedule-difference-cell b,
.schedule-difference-cell span { display: block; }
.schedule-difference-cell span { margin-top: 4px; color: var(--text-muted); font-size: 11px; line-height: 1.35; }
.schedule-change-reason { display: grid; gap: 6px; margin-top: 14px; }
.schedule-change-reason > span { color: var(--text-muted); font-size: 12px; font-weight: 900; }
.schedule-change-reason b { color: var(--danger); }
.schedule-change-reason input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: white; }
.schedule-change-reason small { color: var(--text-muted); }
.schedule-agreement-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}
.schedule-agreement-grid label { display: grid; gap: 6px; }
.schedule-agreement-grid label > span { color: var(--text-muted); font-size: 12px; font-weight: 900; }
.schedule-agreement-grid b { color: var(--danger); }
.schedule-agreement-grid select,
.schedule-agreement-grid input { min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: white; }
.schedule-agreement-grid p { grid-column: 1 / -1; margin: 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.schedule-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.schedule-history { padding: 0 18px 16px; background: #fcf8f1; }
.schedule-history > summary { width: fit-content; color: var(--primary); cursor: pointer; font-size: 12px; font-weight: 900; }
.schedule-history ol { margin: 10px 0 0; padding-left: 22px; }
.schedule-history li { margin-top: 7px; color: var(--text-muted); font-size: 12px; }
.schedule-history li b, .schedule-history li span { display: block; }
@media (max-width: 720px) {
  .schedule-agreement-grid { grid-template-columns: 1fr; }
  .schedule-agreement-grid p { grid-column: 1; }
}
@media (max-width: 1120px) {
  .schedule-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .schedule-week-card > summary { grid-template-columns: minmax(200px, 1.4fr) repeat(2, minmax(92px, .7fr)); }
  .schedule-expand { justify-self: start; }
}
@media (max-width: 720px) {
  .schedule-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-toolbar { align-items: flex-start; flex-direction: column; }
  .schedule-week-card > summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-week-period { grid-column: 1 / -1; }
  .schedule-week-meta { grid-template-columns: 1fr; }
  .schedule-form-actions { flex-direction: column-reverse; }
  .schedule-form-actions button { width: 100%; }
}
.employee-schedule-section { display: grid; gap: 10px; margin: 14px 0; }
.employee-schedule-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 3px; }
.employee-schedule-heading span, .employee-schedule-heading strong { display: block; }
.employee-schedule-heading span { color: var(--primary); font-size: 11px; font-weight: 900; }
.employee-schedule-heading strong { margin-top: 3px; font-size: 15px; }
.employee-schedule-heading em { padding: 5px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-style: normal; font-weight: 900; }
.employee-schedule-card { padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--success); border-radius: 14px; background: var(--surface-warm); box-shadow: var(--shadow-sm); }
.employee-schedule-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.employee-schedule-card > header small, .employee-schedule-card > header strong { display: block; }
.employee-schedule-card > header small { color: var(--success); font-size: 11px; font-weight: 900; }
.employee-schedule-card > header strong { margin-top: 2px; font-size: 15px; }
.employee-schedule-card > header > span { color: var(--text-muted); font-size: 10px; font-weight: 900; }
.employee-schedule-days { display: grid; gap: 6px; padding: 10px 0; }
.employee-schedule-days > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: 12px; }
.employee-schedule-days b { color: var(--text); }
.schedule-acknowledged { padding: 9px 10px; border-radius: 9px; background: var(--success-bg); color: var(--success); text-align: center; font-size: 12px; font-weight: 900; }
.field-help { display: block; margin-top: 6px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }

@media (max-width: 1280px) {
  .accountant-column-head { display: none; }
  .accountant-employee > summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 16px;
  }
  .employee-summary-name { grid-column: span 2; }
  .accountant-employee > summary > span:not(.employee-summary-name, .employee-expand-label)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
  }
  .employee-expand-label { justify-self: end; }
}

@media (max-width: 720px) {
  .holiday-sync-form { grid-template-columns: 1fr; }
  .accountant-heading { align-items: flex-start; }
  .accountant-review-guide { align-items: flex-start; flex-direction: column; }
  .accountant-employee > summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-summary-name { grid-column: 1 / -1; }
  .employee-expand-label { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; }
  .weekly-detail-heading { align-items: flex-start; flex-direction: column; }
}

@keyframes chart-bar-grow {
  0% {
    opacity: .42;
    transform: scaleX(0);
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes splash-pulse {
  0% {
    opacity: .95;
    transform: scale(.82);
  }
  100% {
    opacity: 0;
    transform: scale(1.26);
  }
}

@keyframes attention-float {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1px) scale(1.004);
  }
}

@keyframes attention-ring {
  0% {
    opacity: .88;
    transform: scale(.86);
  }
  70% {
    opacity: .2;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.14);
  }
}

@keyframes attention-shine {
  0%, 32% {
    transform: translateX(0) rotate(18deg);
    opacity: 0;
  }
  44% {
    opacity: .75;
  }
  64%, 100% {
    transform: translateX(440%) rotate(18deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-splash,
  .brand-splash-mark span,
  .attention-cta,
  .attention-cta::before,
  .attention-cta::after,
  .donut-chart,
  .bar-fill,
  .issue-bar i,
  .settlement-meter span {
    animation: none;
    transition: none;
  }
}

.calendar-panel {
  padding-bottom: 18px;
}
.calendar-heading {
  align-items: flex-start;
}
.calendar-tools {
  display: grid;
  gap: 10px;
  justify-items: end;
}
.month-inline-label {
  color: var(--primary);
  font-weight: 900;
}
.month-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
}
.month-nav-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}
.month-nav-button:hover,
.month-reset-button:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.month-current {
  min-width: 94px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}
.month-reset-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.done { background: var(--success); }
.legend-dot.working { background: var(--warning); }
.legend-dot.empty { background: var(--text-soft); }
.legend-dot.settled { background: #86a65b; }
.legend-dot.planned { background: var(--planned); }
.legend-dot.public-holiday { background: #c54c5c; }
.legend-dot.annual-leave { background: #477fc0; }
.legend-dot.absence { background: #6f6257; }
.calendar-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}
.month-calendar {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 6px 0;
}
.month-calendar th,
.month-calendar td {
  width: 96px;
  min-width: 96px;
  white-space: normal;
  text-align: center;
  border-bottom: 0;
}
.month-calendar th {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: rgba(247, 239, 225, .88);
}
.month-calendar th span,
.month-calendar th small {
  display: block;
}
.month-calendar th span {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}
.month-calendar th small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.month-calendar th.weekend span,
.month-calendar th.weekend small {
  color: var(--warning);
}
.month-calendar th.today {
  background: var(--primary-soft);
  border-color: var(--line-strong);
}
.calendar-day-cell {
  scroll-snap-align: start;
  padding: 10px 8px 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(255, 255, 255, .72);
  vertical-align: top;
}
.calendar-day-cell strong,
.calendar-day-cell span,
.calendar-day-cell em {
  display: block;
}
.calendar-day-cell strong {
  min-height: 24px;
  font-size: 12px;
  font-weight: 900;
}
.calendar-day-cell span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}
.calendar-day-cell em {
  margin-top: 7px;
  color: var(--text);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}
.calendar-day-cell.done {
  background: #eaf6ef;
  border-color: #cce6d5;
}
.calendar-day-cell.done strong {
  color: var(--success);
}
.calendar-day-cell.working {
  background: #fff2dd;
  border-color: #efd6ad;
}
.calendar-day-cell.working strong {
  color: var(--warning);
}
.calendar-day-cell.empty strong,
.calendar-day-cell.empty span,
.calendar-day-cell.empty em {
  color: var(--text-soft);
}
.calendar-day-cell.today {
  box-shadow: inset 0 0 0 2px rgba(143, 95, 42, .22);
}
@media (max-width: 920px) {
  .calendar-heading {
    display: grid;
  }
  .calendar-tools {
    justify-items: start;
  }
  .calendar-legend {
    justify-content: flex-start;
  }
}

/* Compact horizontal monthly timetable. Overrides the first calendar draft. */
.timetable-calendar {
  border-spacing: 0;
  border: 1px solid var(--line-strong);
  border-right: 0;
  background: rgba(255, 253, 247, .92);
}
.timetable-calendar th,
.timetable-calendar td {
  width: 78px;
  min-width: 78px;
  border-right: 1px solid var(--line-strong);
}
.timetable-calendar th {
  border-top: 0;
  border-left: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 8px 4px;
  background: #f5ecdd;
}
.timetable-calendar th span {
  font-size: 17px;
  line-height: 1;
}
.timetable-calendar th small {
  font-size: 11px;
}
.timetable-calendar .calendar-day-cell {
  height: 138px;
  border-top: 0;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0;
  padding: 8px 5px;
  vertical-align: top;
  background: rgba(255, 253, 247, .72);
}
.timetable-calendar .calendar-day-cell.done {
  background: #eef8f2;
}
.timetable-calendar .calendar-day-cell.working {
  background: #fff6e8;
}
.timetable-calendar .calendar-day-cell.empty {
  background: rgba(255, 253, 247, .62);
}
.timetable-calendar .calendar-day-cell.today {
  box-shadow: inset 0 0 0 2px rgba(143, 95, 42, .28);
}
.time-stack {
  display: grid;
  gap: 5px;
  align-content: start;
}
.time-line {
  display: grid;
  gap: 1px;
  text-align: left;
}
.time-line span {
  display: block;
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}
.time-line strong {
  display: block;
  min-height: auto;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}
.empty-day {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--text-soft);
  font-weight: 900;
}
@media (max-width: 920px) {
  .timetable-calendar th,
  .timetable-calendar td {
    width: 72px;
    min-width: 72px;
  }
  .timetable-calendar .calendar-day-cell {
    height: 126px;
  }
}

/* Responsive wrapping calendar: replaces horizontal overflow table on detail page. */
.responsive-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  align-items: stretch;
}
.responsive-day {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 253, 247, .78);
}
.responsive-day.done { background: #eef8f2; border-color: #cce6d5; }
.responsive-day.working { background: #fff6e8; border-color: #efd6ad; }
.responsive-day.planned { background: #f3f8fb; border-color: #cbdbe7; }
.responsive-day.public-holiday { background: #fff2f3; border-color: #ecc7cd; }
.responsive-day.annual-leave { background: #eef5ff; border-color: #c9d9ef; }
.responsive-day.absence { background: #f3f0ed; border-color: #d8d0c9; }
.responsive-day.company-holiday { background: #f2f7ec; border-color: #cfdfbd; }
.responsive-day.empty:hover {
  border-color: var(--primary);
  background: #fff9ee;
}
.calendar-empty-button {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.calendar-empty-button:focus-visible {
  outline: 3px solid var(--primary-soft);
  outline-offset: -3px;
}
.responsive-day.today { box-shadow: inset 0 0 0 2px rgba(143, 95, 42, .28); }
.responsive-day-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 7px 4px;
  background: #f5ecdd;
  border-bottom: 1px solid var(--line-strong);
}
.responsive-day-head strong {
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
}
.responsive-day-head span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
}
.responsive-day-head.weekend strong,
.responsive-day-head.weekend span {
  color: var(--warning);
}
.day-badge,
.table-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 17px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
.day-badge.settled,
.table-badge.settled {
  border: 1px solid #d7e3c8;
  background: var(--settled-bg);
  color: var(--settled);
}
.day-badge.planned,
.table-badge.planned {
  border: 1px solid #cbdbe7;
  background: var(--planned-bg);
  color: var(--planned);
}
.day-badge.overtime,
.table-badge.overtime {
  border: 1px solid #b9d9d6;
  background: var(--overtime-bg);
  color: var(--overtime);
}
.day-badge.public-holiday,
.table-badge.public-holiday { background: #f9dfe3; color: #9f3344; }
.day-badge.annual-leave,
.status-chip.annual-leave { background: #dceaff; color: #315f97; }
.day-badge.absence,
.status-chip.absence { background: #e7e1dc; color: #5d5046; }
.day-badge.company-holiday { background: #e4efd7; color: #536f34; }
.table-badge {
  margin-left: 6px;
  vertical-align: middle;
}
.responsive-day-body {
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 88px;
  padding: 8px 6px;
}
.responsive-day-body .time-line {
  text-align: left;
}
.responsive-day-body .time-line span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
}
.responsive-day-body .time-line strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}
.responsive-day-body .time-line-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.responsive-day-body .time-line.late span,
.responsive-day-body .time-line.late strong {
  color: var(--danger);
}
.responsive-day-body .time-line.early span,
.responsive-day-body .time-line.early strong {
  color: var(--warning);
}
.responsive-day-body .time-line.planned span,
.responsive-day-body .time-line.planned strong {
  color: var(--planned);
}
.responsive-day-body .time-line.public-holiday span,
.responsive-day-body .time-line.public-holiday strong { color: #a23b4b; }
.responsive-day-body .time-line.annual-leave span,
.responsive-day-body .time-line.annual-leave strong { color: #315f97; }
.responsive-day-body .time-line.absence span,
.responsive-day-body .time-line.absence strong { color: #5d5046; }
.time-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
.time-badge.late {
  border: 1px solid #efc1ba;
  background: var(--danger-bg);
  color: var(--danger);
}
.time-badge.early {
  border: 1px solid #efcf9e;
  background: var(--warning-bg);
  color: var(--warning);
}
.time-badge.overtime {
  border: 1px solid #b9d9d6;
  background: var(--overtime-bg);
  color: var(--overtime);
}
.responsive-day-body .empty-day {
  min-height: 72px;
}
.empty-day span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(245, 236, 221, .72);
  color: var(--text-muted);
  font-size: 11px;
}
.settled-empty span {
  background: var(--settled-bg);
  color: var(--settled);
}
.responsive-day.empty:hover .empty-day span {
  background: var(--primary-soft);
  color: var(--primary-hover);
}
@media (min-width: 1260px) {
  .responsive-calendar {
    grid-template-columns: repeat(16, minmax(0, 1fr));
  }
}
@media (max-width: 920px) {
  .responsive-calendar {
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
    gap: 7px;
  }
  .responsive-day {
    min-height: 116px;
  }
}
@media (max-width: 560px) {
  .responsive-calendar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.editable-attendance-table th,
.editable-attendance-table td {
  vertical-align: middle;
}
.inline-attendance-form {
  display: contents;
}
.editable-attendance-table td[colspan="2"] {
  min-width: 310px;
}
.editable-attendance-table td[colspan="2"] .inline-attendance-form,
.inline-attendance-form label {
  display: inline-grid;
}
.editable-attendance-table td[colspan="2"] label {
  width: 138px;
  margin-right: 8px;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
}
.editable-attendance-table input[type="time"] {
  height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
}
.compact-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .editable-attendance-table td[colspan="2"] {
    min-width: 220px;
  }
  .editable-attendance-table td[colspan="2"] label {
    width: 102px;
  }
}

/* Modal-based attendance editing keeps the table readable. */
.refined-attendance-table .time-text-button,
.dashboard-attendance-table .time-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0;
}
.refined-attendance-table .time-text-button:hover,
.dashboard-attendance-table .time-text-button:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.refined-attendance-table .time-text-button:focus-visible,
.dashboard-attendance-table .time-text-button:focus-visible {
  outline: 3px solid var(--primary-soft);
}
.dashboard-attendance-table .time-text-button,
.dashboard-time-display {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.25;
}
.dashboard-time-display {
  display: inline-flex;
  min-height: 34px;
  padding: 0 8px;
  font-weight: 900;
}
.dashboard-time-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.dashboard-attendance-table .time-text-button .time-actual-note,
.dashboard-time-display .time-actual-note {
  margin-left: 0;
  margin-top: 0;
}
.dashboard-attendance-table .issue-late .dashboard-time-line {
  color: var(--danger);
}
.dashboard-attendance-table .issue-early .dashboard-time-line {
  color: var(--warning);
}
.time-edit-dialog {
  width: min(520px, calc(100vw - 24px));
  width: min(520px, calc(100dvw - 24px));
  max-width: calc(100vw - 24px);
  max-width: calc(100dvw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface-warm);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(67, 48, 28, .22);
}
.time-edit-dialog[open] {
  position: fixed;
  inset: 0;
}
.time-edit-dialog::backdrop {
  background: rgba(46, 38, 29, .28);
  backdrop-filter: blur(8px);
}
.time-edit-form {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(16px, 4vw, 22px);
}
.time-edit-form > * {
  min-width: 0;
}
.dialog-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.dialog-topline .eyebrow {
  margin: 0;
}
.dialog-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
}
.time-edit-form h3 {
  font-family: var(--font-emotion);
  font-size: clamp(24px, 6vw, 28px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.time-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.time-edit-dialog:not(.payslip-period-dialog) .time-edit-grid {
  grid-template-columns: 1fr;
}
.time-edit-grid label {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .74);
}
.time-edit-grid input[type="time"] {
  min-width: 0;
  height: 50px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: clamp(16px, 4.6vw, 20px);
  font-weight: 900;
}
.reason-field {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .74);
}
.reason-field span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.reason-field textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}
.reason-field textarea:focus {
  outline: 3px solid var(--primary-soft);
  border-color: var(--primary);
}
.overtime-field {
  align-items: flex-start;
  min-width: 0;
  min-height: auto;
  padding: 14px;
  border-radius: 16px;
  background: rgba(232, 245, 244, .54);
}
.overtime-field input[type="checkbox"] {
  margin-top: 2px;
}
.overtime-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.overtime-copy strong {
  color: var(--overtime);
  font-size: 13px;
  font-weight: 900;
}
.overtime-copy small {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: keep-all;
}
.payslip-period-dialog {
  width: min(460px, calc(100vw - 32px));
}
.settlement-cancel-dialog {
  width: min(520px, calc(100vw - 32px));
}
.date-range-grid input[type="date"] {
  height: 50px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
}
.period-template-box {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(247, 239, 225, .5);
}
.period-template-box > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
}
.period-template-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.period-template-button {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 900;
}
.period-template-button:hover,
.period-template-button.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.settlement-impact-note {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff8ed;
  color: var(--state-neutral-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}
.payslip-actions {
  justify-content: space-between;
  flex-wrap: wrap;
}
.dialog-actions.split {
  align-items: center;
  justify-content: space-between;
}
.dialog-action-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.dialog-actions .ghost-button,
.dialog-actions .primary-button,
.dialog-actions .danger-button {
  flex: 0 1 auto;
}
.danger-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #f1c8c2;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 900;
}
.danger-button:hover {
  border-color: #e6aaa1;
  background: #ffe7e2;
}
.hidden-delete-form {
  display: none;
}
.settled-lock {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--state-neutral-bg);
  color: var(--state-neutral-text);
  font-size: 12px;
  font-weight: 900;
}
@media (max-width: 560px) {
  .time-edit-grid {
    grid-template-columns: 1fr;
  }
  .period-template-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dialog-actions,
  .dialog-actions.split,
  .dialog-action-group {
    display: grid;
    grid-template-columns: 1fr;
  }
}
