:root {
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: #162b2f;
  background: #f1f4f2;
  font-synthesis: none;
  --ink: #162b2f;
  --muted: #4f6265;
  --line: #d8e2df;
  --paper: #fff;
  --teal: #006658;
  --dark: #13272b;
  --mint: #acf4ce;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, input:focus-visible { outline: 2px solid #17866f; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -.045em; }
h1 { font-size: clamp(1.95rem, 4vw, 2.65rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.08rem; }
.muted { color: var(--muted); }

.site-header { background: var(--dark); color: white; }
.header-inner, .shell { max-width: 1260px; margin-inline: auto; padding-inline: clamp(15px, 4vw, 48px); }
.header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .account { display: flex; align-items: center; gap: 10px; }
.brand { font-weight: 750; letter-spacing: -.035em; white-space: nowrap; }
.brand-mark { width: 24px; height: 24px; border: 1px solid var(--mint); border-radius: 7px; position: relative; flex: none; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 9px; height: 9px; border: 1px solid var(--mint); transform: rotate(45deg); }
.brand-mark::before { inset: 4px auto auto 5px; }
.brand-mark::after { inset: 8px auto auto 9px; background: var(--mint); }
.account { color: #e4f2ed; font-size: .84rem; }
#account-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { border-radius: 20px; padding: 4px 9px; background: #244640; color: #c8fbdf; white-space: nowrap; }
.shell { padding-block: 24px 64px; }
.notice { padding: 10px 14px; border-radius: 9px; background: #e1efe8; color: #194c42; border: 1px solid #cde1d6; font-size: .86rem; margin-bottom: 22px; }
.button { min-height: 42px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; font-size: .87rem; white-space: nowrap; }
.primary { background: var(--teal); color: white; }
.primary:hover:enabled { background: #005347; }
.outline { background: white; color: #244744; border-color: #c7d6d2; }
.outline:hover:enabled { background: #ebf4ef; }
.ghost { min-height: 36px; color: white; background: transparent; border-color: #577171; }
.ghost:hover:enabled { background: #2c484b; }

.login-layout { max-width: 960px; margin: clamp(12px, 5vw, 58px) auto; display: grid; grid-template-columns: 1fr 1fr; border-radius: 21px; overflow: hidden; box-shadow: 0 12px 45px #1b3c3412; background: white; border: 1px solid var(--line); }
.login-visual { min-height: 490px; display: flex; align-items: flex-end; position: relative; isolation: isolate; padding: clamp(24px, 5vw, 52px); background: #123332; color: white; overflow: hidden; }
.login-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(90deg, transparent 0 31px, #b0ffd00d 32px), repeating-linear-gradient(0deg, transparent 0 31px, #b0ffd00d 32px), radial-gradient(ellipse at 38% 30%, #266458, #122d30 72%); }
.visual-copy span { display: block; color: var(--mint); font-size: .94rem; margin-bottom: 12px; }
.visual-copy h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.spindle { position: absolute; z-index: -1; width: 235px; aspect-ratio: 1; top: 30px; right: 32px; border: 1px solid #94e5bb61; border-radius: 50%; background: repeating-conic-gradient(#a3e9bb25 0deg 1deg, transparent 1deg 15deg); box-shadow: 0 0 0 13px #b6ffcc12; }
.spindle span { position: absolute; border: 1px solid #91e5bd80; border-radius: 50%; inset: 13%; box-shadow: inset 0 0 0 6px #1e584e; }
.spindle span:nth-child(2) { inset: 28%; background: #18463e; border-style: dashed; }
.spindle span:nth-child(3) { inset: 42%; background: #75cba1; box-shadow: 0 0 23px #84fbc075; }
.login-panel { padding: clamp(24px, 5vw, 63px); align-self: center; }
.login-panel h2 { font-size: 1.75rem; margin-bottom: 8px; }
.login-panel form { display: grid; gap: 13px; margin-top: 24px; }
.login-panel form .primary { margin-top: 5px; }
.sample-login { display: flex; gap: 7px; flex-wrap: wrap; padding-top: 15px; margin-top: 15px; border-top: 1px solid var(--line); }
.sample-login p { flex-basis: 100%; font-size: .81rem; color: var(--muted); }

.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 10px 0 24px; }
.page-intro p { margin-top: 7px; }
.today { color: var(--muted); white-space: nowrap; font-size: .86rem; font-variant-numeric: tabular-nums; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 4px 16px #183c2908; overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.panel-header { padding: 21px 23px 0; }
.panel-header p { margin-top: 6px; color: var(--muted); font-size: .87rem; }
.record-form { padding: 17px 23px 21px; }
fieldset { margin: 0; min-width: 0; border: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
label { display: grid; align-content: start; gap: 5px; min-width: 0; font-weight: 650; font-size: .84rem; }
input { width: 100%; min-width: 0; min-height: 43px; border: 1px solid #c5d4d1; border-radius: 8px; padding: 8px 10px; background: #fcfdfc; color: var(--ink); font-size: 1rem; }
input::placeholder { color: #61736e; font-size: .86rem; }
input:disabled { color: #506561; background: #eff3f0; }
.optional { display: inline-block; grid-row: 1; grid-column: 2; color: var(--muted); font-size: .73rem; font-weight: 500; }
label:has(.optional) { grid-template-columns: auto 1fr; column-gap: 7px; }
label:has(.optional) input { grid-column: 1 / -1; }
.form-actions { margin-top: 15px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.feedback { min-width: 0; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.feedback[data-kind="error"] { color: #ac321e; }
.feedback[data-kind="success"] { color: #006254; }
.feedback:not(:empty) { margin-block: 6px; }

.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; align-items: end; gap: 10px; padding: 16px 23px; }
.filter-actions { display: flex; gap: 6px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 1px 23px 18px; }
.metric { background: #f0f6f3; border-radius: 10px; padding: 12px 15px; overflow-wrap: anywhere; }
.metric span { display: block; font-size: .8rem; color: #415955; }
.metric strong { display: block; font-variant-numeric: tabular-nums; font-size: clamp(1.05rem, 2.1vw, 1.55rem); line-height: 1.25; margin-top: 5px; }
.metric.major { background: #164b41; color: white; }
.metric.major span { color: #d2f6e4; }
.results { padding: 0 23px 19px; }
.table-wrap { margin-top: 8px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .85rem; }
th, td { padding: 10px 7px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
thead { background: #edf3f0; color: #365651; }
thead th:first-child { border-radius: 7px 0 0 7px; }
thead th:last-child { border-radius: 0 7px 7px 0; }
tbody tr { border-bottom: 1px solid #e1e9e5; }
th:nth-child(n+3):nth-child(-n+5) { width: 9%; }
th:nth-child(8) { width: 69px; }
.cell-sub { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.quantity { font-variant-numeric: tabular-nums; }
.table-button { min-height: 35px; padding: 4px 9px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 15px; font-size: .85rem; }

dialog { width: min(700px, calc(100% - 24px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); }
dialog::backdrop { background: #142a2b99; }
.dialog-header { display: flex; justify-content: space-between; gap: 12px; padding: 21px 23px 0; }
.dialog-header p { margin-top: 5px; font-size: .86rem; overflow-wrap: anywhere; }
.dialog-header button { align-self: start; }
dialog fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.history { padding: 17px 23px 20px; border-top: 1px solid var(--line); }
.history ol { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.history li { background: #eff5f1; border-radius: 8px; padding: 10px 12px; font-size: .85rem; overflow-wrap: anywhere; }
.history li p { margin-top: 3px; }

@media (max-width: 960px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-actions .button { flex: 1; }
}

@media (max-width: 700px) {
  .header-inner { min-height: 59px; }
  #account-name { display: none; }
  .login-layout { grid-template-columns: 1fr; }
  .login-visual { min-height: 170px; }
  .visual-copy h1 { font-size: 2rem; }
  .spindle { width: 145px; right: 24px; top: 20px; }
  .page-intro { align-items: start; flex-direction: column; }
  .page-intro p { font-size: .9rem; }
  .panel-header, .dialog-header { padding-inline: 14px; }
  .record-form, .filters, .metrics, .results, .history { padding-inline: 14px; }
  fieldset, .filters, .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { align-self: stretch; align-items: end; }
  .filter-actions .button { padding-inline: 6px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .button { margin-left: auto; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  tbody { display: grid; gap: 9px; }
  tbody tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
  td { display: block; grid-column: span 3; padding: 6px; }
  td:nth-child(n+3):nth-child(-n+5) { grid-column: span 2; }
  td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .72rem; margin-bottom: 2px; }
  td:last-child:has(button) { grid-column: 1 / -1; }
  .table-button { width: 100%; min-height: 42px; }
}
