:root {
  --sidebar-width: 248px;
  --cellaheal: #161616;
  --cellaheal-red-dark: #ff0000;
  --cellaheal-red-light: #ffbbbb;
  --cellaheal-spotless-dark: #991B1B;
  --cellaheal-spotless-light: #fff2f2;
  --cellaheal-poreless-dark: #92400E;
  --cellaheal-poreless-light: #fffbec;
  --cellaheal-stressless-dark: #065F46;
  --cellaheal-stressless-light: #f1ffe1;
  --cellaheal-flawless-dark: #ffd50b;
  --cellaheal-flawless-light: #fffbec;
  --cellaheal-dryless-dark: #0071cf;
  --cellaheal-timeless-dark: #bd4ad0;
  --cellaheal-black: #000;
  --cellaheal-white: #fff;
  --cellaheal-050: #fbfbfb;
  --cellaheal-100: #f5f5f5;
  --cellaheal-200: #d5d5d5;
  --cellaheal-300: #b5b5b5;
  --cellaheal-400: #959595;
  --cellaheal-500: #767676;
  --cellaheal-600: #565656;
  --cellaheal-700: #363636;
  --cellaheal-800: #161616;
  --bg: var(--cellaheal-white);
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: var(--cellaheal-white);
  --surface-muted: var(--cellaheal-100);
  --line: rgba(22, 22, 22, 0.1);
  --line-strong: rgba(22, 22, 22, 0.18);
  --text: var(--cellaheal-800);
  --muted: var(--cellaheal-400);
  --accent: var(--cellaheal-800);
  --accent-soft: rgba(22, 22, 22, 0.06);
  --good: var(--cellaheal-800);
  --warn: var(--cellaheal-700);
  --bad: var(--cellaheal-800);
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Figtree", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  background:var(--cellaheal-white);

}

a,
button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.shell-fixed-sidebar {
  position: relative;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: var(--cellaheal-white);
  backdrop-filter: blur(18px);
}

/* Brand */
.brand {
  margin-bottom: 24px;
}

.brand small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 600;
}

.brand strong {
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: -0.04em;
  font-weight: 500;
}

/* Sidebar User */
.sidebar-user {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 14px;
  font-size: 14px;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 16px;
  margin-right: 4px;
}

/* navigation */

.nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: grid;
  gap: 6px;
}

.nav-link,
.subnav-link {
  text-decoration: none;
  transition: 140ms ease;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  border-color: var(--line);
  background: var(--surface-muted);
}

.nav-toggle {
  width: 100%;
  background: transparent;
  cursor: pointer;
}

.nav-toggle::before {
  content: none;
}

.nav-toggle::after {
  content: "+";
  display: block;
  line-height: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.nav-toggle:hover,
.nav-toggle.is-open {
  border-color: var(--line);
  background: var(--surface-muted);
}

.nav-toggle:hover::after,
.nav-toggle.is-open::after {
  color: var(--text);
}

.nav-toggle.is-open::after {
  content: "-";
}

.subnav {
  display: none;
  gap: 6px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.subnav.is-open {
  display: grid;
}

.subnav-static {
  display: grid;
}

.subnav-link {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.subnav-action {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.subnav-link:hover,
.subnav-link.active {
  color: var(--text);
  background: var(--surface-muted);
}



.main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 30px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.page-header p,
.muted,
p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.grid.two {
  grid-template-columns: 1.2fr 0.8fr;
}

.card,
.panel {
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--cellaheal-050)
}

.card h2,
.card h3,
h2,
h3 {
  margin: 0 0 14px;
  letter-spacing: -0.03em;
}

.metric {
  margin: 8px 0 2px;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  gap: 4px;
}

.pill.good {
  color: var(--cellaheal-stressless-dark);
  background-color: var(--cellaheal-stressless-light);
  border: 1px solid var(--cellaheal-stressless-dark);
}
.pill.warn {
  color: var(--cellaheal-poreless-dark);
  background-color: var(--cellaheal-poreless-light);
  border: 1px solid var(--cellaheal-poreless-dark);
}
.pill.bad {
  color: var(--cellaheal-spotless-dark);
  background-color: var(--cellaheal-spotless-light);
  border: 1px solid var(--cellaheal-spotless-dark);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.toolbar,
.stack {
  display: grid;
  gap: 12px;
}

.toolbar {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.field button,
button,
.button,
.button-quiet,
.button-danger {
  width: 100%;
  border-radius: 14px;
  padding: 12px 14px;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  background: var(--cellaheal-white);
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field button,
button,
.button {
  border: 1px solid var(--cellaheal-800);
  background: var(--cellaheal-800);
  color: var(--cellaheal-white);
  cursor: pointer;
  font-weight: 700;
}

.field button:hover,
button:hover,
.button:hover {
  background: var(--cellaheal-black);
}

button:disabled,
.button:disabled {
  border-color: var(--cellaheal-200);
  background: var(--cellaheal-200);
  color: var(--cellaheal-500);
  cursor: not-allowed;
}

.button-quiet {
  width: auto;
  border: 1px solid var(--line-strong);
  background: var(--cellaheal-white);
  color: var(--text);
  font-weight: 600;
}

.button-danger {
  width: auto;
  border: 1px solid var(--line-strong);
  background: var(--cellaheal-white);
  color: var(--text);
  font-weight: 600;
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-muted);
}

.split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.empty-page {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
}

.range-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.range-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cellaheal-white);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: 140ms ease;
}

.range-toggle:hover,
.range-toggle.active {
  border-color: var(--cellaheal-800);
  background: var(--cellaheal-800);
  color: var(--cellaheal-white);
}

.panel {
  width: min(420px, 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.notice,
.notice-error {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

.notice-error {
  color: var(--text);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.16);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: min(640px, 100vw);
  height: 100vh;
  padding: 24px;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: var(--cellaheal-white);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.1);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--cellaheal-800);
  color: var(--cellaheal-white);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.surface-muted {
  background: var(--surface-muted);
}

.compact-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card-grid-5 {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cellaheal-800);
}

.good .status-dot {
  background: var(--cellaheal-stressless-dark);
}

.warn .status-dot {
  background: var(--cellaheal-poreless-dark);
}

.bad .status-dot {
  background: var(--cellaheal-spotless-dark);
}

.status-label {
  font-size: 12px;
  font-weight: 700;
}

.section-spaced {
  margin-top: 18px;
}

@media (max-width: 1200px) {
  .card-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .shell {
    min-height: auto;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    overflow-y: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .grid.two,
  .card-grid-5 {
    grid-template-columns: 1fr;
  }

  .main {
    min-height: auto;
    margin-left: 0;
    padding: 20px;
  }

  .page-header h1,
  h1 {
    font-size: 2rem;
  }
}
