:root {
  color-scheme: light;
  --ink: #14211c;
  --muted: #65716c;
  --line: #dfe6e2;
  --paper: #ffffff;
  --wash: #f4f7f5;
  --green: #176b4d;
  --green-dark: #0e5139;
  --green-soft: #e1f2ea;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, #dff0e7 0, transparent 28rem),
    var(--wash);
}

button, input { font: inherit; }

.shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 28px;
}

header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(32px, 5vw, 52px); letter-spacing: -.04em; }
h2 { margin-bottom: 4px; font-size: 20px; }
.toolbar p { margin-bottom: 0; color: var(--muted); }
.hint { margin-top: 6px !important; font-size: 12px; }
.filters { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: min(360px, 100%); }
.toggle { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.toggle input { width: 16px; height: 16px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.button:hover, button:hover { border-color: #9dafA5; transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.primary { color: white; border-color: var(--green); background: var(--green); }
.primary:hover { border-color: var(--green-dark); background: var(--green-dark); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stats article, .panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 40px rgba(28, 54, 43, .05);
}

.stats article { padding: 18px 20px; }
.stats span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stats strong { display: block; overflow: hidden; font-size: 24px; text-overflow: ellipsis; white-space: nowrap; }

.panel { overflow: hidden; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.search { min-width: min(360px, 100%); color: var(--muted); font-size: 12px; font-weight: 700; }
.search span { display: block; margin-bottom: 6px; }
.search input { width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--wash); outline: none; }
.search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

.notice { margin: 16px 22px 0; padding: 12px 14px; border-radius: 10px; color: var(--green-dark); background: var(--green-soft); font-weight: 700; }
.notice.error { color: #8b2727; background: #fde9e9; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 1600px; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; color: var(--muted); background: #f9fbfa; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
td { max-width: 220px; font-size: 13px; }
td.title { font-weight: 750; }
td.desc { max-width: 280px; color: var(--muted); line-height: 1.35; }
td.muted { color: var(--muted); }
td a { color: var(--green); font-weight: 700; text-decoration: none; }
td a:hover { text-decoration: underline; }

.empty { padding: 60px 20px; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 14px 20px; }
.pagination span { color: var(--muted); font-size: 13px; font-weight: 700; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 16px 4px 0; color: var(--muted); font-size: 12px; }

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(64, 148, 108, .28), transparent 28rem),
    linear-gradient(135deg, #0d2d21 0%, #123b2c 48%, #e8f2ed 48%, #f7f9f8 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px);
  align-items: center;
  gap: clamp(50px, 10vw, 150px);
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.login-brand { max-width: 620px; color: white; }
.login-brand .eyebrow { color: #82d3ad; }
.login-brand h1 { margin-bottom: 22px; font-size: clamp(44px, 7vw, 78px); line-height: .98; }
.login-brand > p:not(.eyebrow) { max-width: 520px; color: rgba(255, 255, 255, .72); font-size: 18px; line-height: 1.6; }
.login-detail { display: flex; align-items: center; gap: 10px; margin-top: 34px; color: rgba(255, 255, 255, .82); font-size: 13px; font-weight: 700; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #63d69b; box-shadow: 0 0 0 5px rgba(99, 214, 155, .15); }

.login-card {
  padding: clamp(30px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 32px 80px rgba(7, 31, 22, .2);
}

.login-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  border-radius: 13px;
  color: white;
  background: var(--green);
  font-weight: 850;
  letter-spacing: -.04em;
}

.login-card h2 { margin-bottom: 8px; font-size: 32px; letter-spacing: -.03em; }
.login-copy { margin-bottom: 28px; color: var(--muted); }
.login-error { margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; color: #8b2727; background: #fde9e9; font-size: 13px; font-weight: 700; }
.login-form { display: grid; gap: 18px; }
.login-form label span { display: block; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 750; }
.login-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--wash);
  outline: none;
}
.login-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.login-submit { width: 100%; min-height: 48px; margin-top: 4px; }
.login-footnote { margin: 24px 0 0; color: #8b9691; font-size: 11px; text-align: center; }

@media (max-width: 900px) {
  header { align-items: flex-start; flex-direction: column; }
  .actions { justify-content: flex-start; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .login-page { background: linear-gradient(160deg, #103425 0, #174934 38%, var(--wash) 38%); }
  .login-shell { grid-template-columns: 1fr; gap: 38px; max-width: 560px; padding: 52px 0; }
  .login-brand h1 { font-size: 46px; }
  .login-brand > p:not(.eyebrow), .login-detail { display: none; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 24px, 1440px); padding-top: 24px; }
  .stats { grid-template-columns: 1fr; }
  .actions, .actions > * { width: 100%; }
  footer { flex-direction: column; }
  .login-shell { width: min(100% - 24px, 560px); padding: 30px 0; }
  .login-brand h1 { font-size: 38px; }
  .login-card { border-radius: 18px; }
}
