:root {
  --ink: #183c34;
  --muted: #75817b;
  --green: #286c53;
  --bg: #f5f6f1;
  --line: #e2e7df;
  --amber: #9a6419;
  --red: #ad463d;
  --white: #fff;
  font-family:
    Pretendard,
    "Noto Sans KR",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #263e35;
  background: var(--bg);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
a {
  color: var(--green);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.8;
}
small,
.muted {
  color: var(--muted);
  font-size: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
}
.sidebar {
  padding: 36px 22px;
  background: #173e35;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 36px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  border: 2px solid #b8d4a7;
  border-radius: 9px;
  width: 31px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #c9dfb6;
}
.mobile-logout {
  display: none;
}
pre {
  overflow: auto;
  max-width: 100%;
  font-size: 12px;
}
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2px;
  color: #a3beb0;
  margin-top: 5px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav a {
  border: 0;
  background: transparent;
  color: #b4c8be;
  text-align: left;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
}
.nav a.active,
.nav a:hover {
  background: #2c5347;
  color: white;
}
.nav a .navicon {
  display: inline-block;
  width: 28px;
  opacity: 0.8;
}
.side-foot {
  margin-top: auto;
  padding: 18px 9px;
  border-top: 1px solid #ffffff20;
  line-height: 1.8;
}
.side-foot small {
  color: #adc2b6;
}
.side-foot button {
  background: none;
  border: 0;
  color: #c1d1c6;
  padding: 8px 0;
}
.main {
  min-width: 0;
  max-width: 1600px;
  width: 100%;
  padding: 37px 44px 60px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #7e8c7b;
  font-weight: 700;
  margin-bottom: 9px;
}
.date-chip {
  background: #e9eee4;
  border: 1px solid #e1e7d9;
  border-radius: 30px;
  padding: 10px 16px;
  font-size: 12px;
}
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 25px;
}
.pagehead p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 9px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid #dbe2d8;
  background: white;
  border-radius: 7px;
  padding: 10px 15px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 1.3;
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.btn.danger {
  color: var(--red);
  border-color: #e8d6ce;
}
.btn.sm {
  font-size: 12px;
  padding: 7px 10px;
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 23px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 21px 23px;
}
.metric-label {
  font-size: 12px;
  color: #788273;
  display: flex;
  justify-content: space-between;
}
.metric-value {
  font-size: 32px;
  margin-top: 16px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -1px;
}
.metric-value small {
  font-size: 12px;
  font-weight: 400;
  margin-left: 7px;
}
.metric .hint {
  font-size: 11px;
  color: #99a190;
  margin-top: 8px;
}
.metric.warn .metric-value {
  color: var(--amber);
}
.metric.danger .metric-value {
  color: var(--red);
}
.notice {
  border: 1px solid #e2e4d5;
  background: #eef1e6;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 23px;
  font-size: 12px;
  color: #69725d;
  line-height: 1.8;
}
.notice.warning {
  background: #fff5e4;
  border-color: #f1dfbc;
  color: #906527;
}
.notice.error {
  background: #fff0ed;
  border-color: #e8ccc5;
  color: var(--red);
}
.panel {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.panel-body {
  padding: 23px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 240px;
}
.toolbar select {
  width: auto;
  min-width: 170px;
  max-width: 100%;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #f8faf5;
  color: #87907f;
  font-size: 11px;
  font-weight: 500;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 18px;
  border-bottom: 1px solid #edf0e8;
  font-size: 13px;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  display: block;
  font-size: 14px;
}
td small {
  display: block;
  margin-top: 6px;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 500;
  background: #edf3e6;
  color: #63834f;
}
.badge.green {
  background: #e7f2e9;
  color: #3a7759;
}
.badge.amber {
  background: #fff2d9;
  color: #9a712c;
}
.badge.red {
  background: #fbedeb;
  color: #a35449;
}
.badge.gray {
  background: #eef0ed;
  color: #8b9285;
}
.qty {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
}
.qty small {
  display: inline;
  font-size: 11px;
  font-weight: 400;
  margin-left: 4px;
}
.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
  white-space: normal;
}
.empty h2 {
  color: var(--ink);
  margin-bottom: 12px;
}
.empty .btn {
  margin-top: 20px;
}
.footnote {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8d9685;
  font-size: 11px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.full {
  grid-column: 1/-1;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #66765f;
}
input,
select,
textarea {
  border: 1px solid #dce2d7;
  border-radius: 6px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  min-width: 0;
  width: 100%;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--green);
}
input[type="number"] {
  max-width: 180px;
}
.check {
  flex-direction: row;
  align-items: flex-start;
  line-height: 1.6;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: var(--ink);
  color: white;
  padding: 12vw 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-story h1 {
  font-size: 46px;
  line-height: 1.4;
  margin-top: 60px;
}
.login-story p {
  color: #bad0be;
  margin-top: 24px;
  max-width: 350px;
}
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: 30px;
}
.login-card {
  max-width: 370px;
  width: 100%;
}
.login-card h2 {
  font-size: 26px;
  margin-bottom: 12px;
}
.login-card form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}
.login-card .btn {
  padding: 13px;
}
.loading {
  padding: 80px;
  text-align: center;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0;
  max-width: 900px;
  width: calc(100% - 36px);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 30px 100px #183c3430;
}
dialog::backdrop {
  background: #14302665;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 23px 27px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
.modal-body {
  padding: 26px;
}
.modal-head button {
  border: 0;
  background: none;
  font-size: 25px;
  color: var(--muted);
}
.category-card {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}
.category-card h3 {
  margin-bottom: 15px;
}
.rule-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-top: 13px;
  line-height: 1.8;
}
.weekdays {
  display: flex;
  gap: 8px;
}
.weekdays label {
  gap: 6px;
  align-items: center;
}
.day-protected {
  background: #f1f7ed;
}
.inline-error {
  color: var(--red);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  border-radius: 8px;
  padding: 13px 22px;
  box-shadow: 0 5px 25px #12352620;
  display: none;
  max-width: 90vw;
  z-index: 100;
}
#toast.show {
  display: block;
}
.history-line {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.history-line:last-child {
  border: 0;
}
.history-meta {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 13px;
}
.history-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.legend {
  font-size: 12px;
  display: flex;
  gap: 18px;
  margin: 16px 0;
  color: var(--muted);
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
details {
  margin-top: 12px;
}
summary {
  cursor: pointer;
  color: var(--green);
  font-size: 12px;
}
.summary-line {
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 16px;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.subsection {
  margin-bottom: 20px;
}
.subsection h3 {
  margin-bottom: 15px;
}
#form-error:empty {
  display: none;
}
.history-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.history-filter label {
  max-width: 170px;
}
.section-note {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
}
@media (min-width: 1500px) {
  .main {
    padding-left: 55px;
    padding-right: 55px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 185px 1fr;
  }
  .sidebar {
    padding: 30px 15px;
  }
  .main {
    padding: 28px 25px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .pagehead {
    align-items: flex-start;
  }
  .grid3 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .mobile-logout {
    display: block;
    position: absolute;
    top: 23px;
    right: 20px;
    border: 1px solid #ffffff40;
    border-radius: 5px;
    color: #d1e1d6;
    background: transparent;
    padding: 6px 9px;
    font-size: 11px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 20px;
    gap: 20px;
  }
  .brand {
    font-size: 22px;
  }
  .brand small {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 5px;
  }
  .nav a {
    white-space: nowrap;
    padding: 10px;
    font-size: 12px;
  }
  .navicon {
    display: none !important;
  }
  .side-foot {
    display: none;
  }
  .main {
    padding: 23px 16px;
  }
  .topbar {
    margin-bottom: 25px;
  }
  .pagehead {
    flex-direction: column;
    align-items: stretch;
  }
  .pagehead h1 {
    font-size: 25px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .metric-value {
    font-size: 27px;
  }
  .metric {
    padding: 17px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric .hint {
    font-size: 10px;
  }
  .formgrid,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .login-wrap {
    display: block;
  }
  .login-story {
    padding: 30px;
  }
  .login-story h1 {
    font-size: 28px;
    margin-top: 35px;
  }
  .login-story p {
    font-size: 12px;
  }
  .login-form-wrap {
    padding: 45px 25px;
  }
  .panel-head,
  .toolbar {
    padding: 17px;
  }
  .footnote {
    flex-direction: column;
  }
  .modal-body {
    padding: 20px;
  }
  .history-meta {
    flex-direction: column;
  }
  td,
  th {
    padding: 14px;
  }
  .date-chip {
    font-size: 11px;
    padding: 9px;
  }
  .weekdays {
    gap: 12px;
  }
}
