:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  color: #192845;
  background: #f3f6fb;
  --navy: #142749;
  --blue: #2358d8;
  --muted: #52617b;
  --border: #d7e0ed;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
h1, h2, p { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #779cf7; outline-offset: 2px; }

.masthead { background: #fff; border-bottom: 1px solid var(--border); }
.masthead-inner, .page { width: min(100% - 48px, 1260px); margin-inline: auto; }
.masthead-inner { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.account-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 13px; color: var(--muted); font-size: .875rem; }
.brand { display: flex; align-items: center; gap: 11px; font-size: .98rem; font-weight: 750; color: var(--navy); }
.brand-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: white; background: var(--blue); position: relative; }
.brand-icon::before { content: ""; width: 16px; height: 11px; border: 2px solid currentColor; border-radius: 3px; transform: translate(-2px, -1px); }
.brand-icon::after { content: ""; width: 7px; height: 8px; border: 2px solid currentColor; border-left: 0; border-radius: 0 4px 2px 0; position: absolute; left: 22px; top: 13px; }
.brand-icon i { position: absolute; width: 4px; height: 4px; background: currentColor; border-radius: 50%; top: 22px; left: 11px; box-shadow: 12px 0 currentColor; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 8px 14px; border-radius: 7px; border: 1px solid transparent; font-size: .9rem; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.outline { border-color: #c9d6ed; color: #264578; background: #fff; }
.outline:hover, .text-button:hover { background: #edf3ff; }
.primary { background: var(--blue); color: #fff; padding-inline: 18px; }
.primary:hover:not(:disabled) { background: #1946b5; }
.text-button { background: transparent; color: #51617b; }
.plus { font-size: 1.2rem; line-height: .8; font-weight: 500; }

.page { padding-block: 30px 44px; }
.page-heading { margin-bottom: 20px; }
.page-heading p { max-width: 50rem; margin-top: 8px; color: var(--muted); font-size: .95rem; line-height: 1.65; }
h1 { color: var(--navy); font-size: clamp(1.65rem, 4vw, 2.2rem); font-weight: 780; letter-spacing: -.035em; line-height: 1.25; }
h2 { color: var(--navy); font-size: 1.06rem; font-weight: 750; }
.sheet { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: 11px; box-shadow: 0 2px 6px #162f4c08; padding: 20px 22px 22px; }
.sheet-top { padding-bottom: 17px; border-bottom: 1px solid #ebeff6; }
.login-panel { max-width: 450px; }
.login-panel form { display: grid; gap: 14px; margin-top: 16px; }
.login-panel button { justify-self: start; }
.input-field { display: grid; gap: 6px; min-width: 0; font-size: .9rem; font-weight: 700; }
.input-field input, .input-field select {
  min-width: 0;
  height: 43px;
  border: 1px solid #cbd6e6;
  border-radius: 7px;
  color: inherit;
  background-color: #fff;
  padding: 8px 32px 8px 11px;
  font-size: 1rem;
  font-weight: 400;
  appearance: none;
}
.input-field select {
  background-image: linear-gradient(45deg, transparent 50%, #52617b 50%), linear-gradient(135deg, #52617b 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 11px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.center-value { display: flex; align-items: center; gap: 14px; font-size: .9rem; color: var(--muted); }
.center-value strong { color: var(--navy); }
.workspace-nav { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.workspace-nav [aria-pressed="true"] { border-color: #b5c8f5; background: #e6eeff; color: #1649b7; }
.required { color: #b13231; }
.sheet-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 12px; }
.sheet-toolbar p, .scroll-tip, .form-status { color: var(--muted); font-size: .875rem; }
.sheet-toolbar p { margin-top: 3px; }
.scroll-tip { display: none; margin-bottom: 7px; }

.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 7px; scrollbar-color: #a9b7cf #f3f6fb; }
.entry-table { width: 100%; min-width: 990px; table-layout: fixed; border-collapse: collapse; }
.column-index { width: 54px; }
.column-line { width: 15%; }
.column-size { width: 10%; }
.column-sensitive { width: 10%; }
.column-duration { width: 9%; }
.column-action { width: 64px; }
.entry-table th, .entry-table td { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.entry-table tr > :last-child { border-right: 0; }
.entry-table #entry-rows tr:last-child > * { border-bottom: 0; }
.entry-table thead th { color: #253e68; background: #edf3ff; text-align: left; padding: 10px 9px; font-size: .875rem; font-weight: 750; white-space: nowrap; }
.entry-table thead th:first-child, .entry-table thead th:last-child, .row-index, .row-action { text-align: center; }
.entry-table td { padding: 0; vertical-align: top; }
.entry-table .example-row > * { padding: 9px; background: #f3f6fb; color: var(--muted); font-size: .875rem; vertical-align: middle; }
.example-row th { font-weight: 750; }
.entry-table .row-action { vertical-align: middle; }
.row-index { background: #f7f9fc; color: var(--muted); font-size: .875rem; font-weight: 600; }
.entry-table input, .entry-table textarea { display: block; width: 100%; min-width: 0; min-height: 59px; border: 0; border-radius: 0; background: #fff; color: inherit; padding: 9px; font-size: .94rem; line-height: 1.4; }
.entry-table textarea { resize: vertical; }
.entry-table td:focus-within { background: #f2f6ff; }
.entry-table input:focus, .entry-table textarea:focus { background: #f2f6ff; outline: 2px solid var(--blue); outline-offset: -2px; }
.entry-table :is(input, textarea)[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #b13231; }
.remarks-field { margin-top: 16px; }
.remarks-field textarea { width: 100%; padding: 9px 11px; border: 1px solid #cbd6e6; border-radius: 7px; color: inherit; background: #fff; font-size: .94rem; font-weight: 400; resize: vertical; }
.remarks-field .form-status { font-weight: 400; }
.row-action .button { min-height: 35px; padding-inline: 7px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.form-status[data-error="true"] { color: #ad2928; }
.form-status:empty { display: none; }

.records-toolbar, .records-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.records-toolbar { justify-content: space-between; margin-bottom: 12px; }
.center-filter { display: flex; align-items: center; gap: 6px; }
.center-filter select { min-width: 125px; }
#records-content { display: grid; gap: 10px; margin-top: 10px; }
.saved-record { border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; }
.saved-record header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.saved-record h3 { margin: 0; color: var(--navy); font-size: .95rem; }
.saved-record .text-button[data-delete] { color: #ad2928; }
.saved-record details { margin-top: 7px; }
.saved-record summary { cursor: pointer; color: var(--navy); font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.saved-record details .table-scroll { margin-top: 8px; }
.saved-remarks { margin-top: 8px; padding: 9px 11px; border-radius: 7px; background: #f3f6fb; font-size: .9rem; }
.saved-remarks p { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.saved-date { color: var(--muted); font-size: .875rem; }
.saved-table { width: 100%; min-width: 820px; table-layout: fixed; border-collapse: collapse; }
.saved-table :is(th, td) { padding: 7px; border: 1px solid #e4eaf3; text-align: left; vertical-align: top; font-size: .85rem; }
.saved-table th { background: #edf3ff; color: #253e68; }
.saved-table td { white-space: pre-wrap; overflow-wrap: anywhere; }
.local-records { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; color: var(--muted); font-size: .875rem; }
.local-records summary { cursor: pointer; color: var(--navy); font-weight: 700; }
.local-records p { margin: 6px 0; }
#local-records-content { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 1100px) {
  .scroll-tip { display: block; }
}
@media (max-width: 600px) {
  .masthead-inner, .page { width: calc(100% - 26px); }
  .masthead-inner { min-height: 56px; }
  .page { padding-block: 22px 28px; }
  .page-heading { margin-bottom: 15px; }
  .sheet { padding: 14px; }
  .form-footer { align-items: flex-start; }
}
