:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #f2f4f6;
  --surface-hover: #eef6ff;
  --line: #e5e8eb;
  --text: #191f28;
  --sub: #6b7684;
  --muted: #8b95a1;
  --primary: #3182f6;
  --primary-weak: #e8f3ff;
  --danger: #f04452;
  --danger-weak: #fff0f1;
  --warn: #f59f00;
  --warn-weak: #fff7e6;
  --success: #00a661;
  --success-weak: #e9f9f0;
  --shadow: 0 8px 30px rgba(25, 31, 40, 0.08);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 8%, rgba(49, 130, 246, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.login-card {
  width: min(440px, 100%);
  border-radius: 24px;
  background: var(--surface);
  padding: 34px;
  box-shadow: var(--shadow);
}

.brand-mark {
  color: var(--primary);
  font-size: 16px;
  font-weight: 900;
}

.login-card h1 {
  margin: 28px 0 10px;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

.login-card p {
  margin: 0 0 28px;
  color: var(--sub);
  line-height: 1.55;
}

.login-card label {
  display: block;
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}

.password-toggle:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.password-toggle .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
}

.password-toggle.visible {
  color: var(--primary);
}

.login-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 14px 18px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 10px 8px;
  font-size: 19px;
}

.brand span {
  font-weight: 900;
}

.brand strong {
  color: var(--primary);
  font-size: 13px;
}

.sidebar-caption {
  padding: 0 10px 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-profile {
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.avatar.image {
  object-fit: cover;
}

.profile-button:hover {
  background: #e6e8eb;
}

.mini-profile strong {
  display: block;
  font-size: 14px;
}

.mini-profile span {
  display: block;
  overflow: hidden;
  color: var(--sub);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
}

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

.nav-group-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
}

.nav-group-trigger:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.nav-group.open .nav-group-trigger {
  color: var(--text);
}

.nav-group-arrow {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.14s ease;
}

.nav-group.open .nav-group-arrow {
  transform: rotate(180deg);
}

.nav-tabs {
  display: grid;
  gap: 4px;
  padding: 0 0 8px 8px;
}

.nav-tabs[hidden] {
  display: none;
}

.nav-tab {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--sub);
  background: transparent;
  font-weight: 700;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
}

.nav-tab:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.nav-tab.active {
  color: var(--primary);
  background: var(--primary-weak);
}

.sidebar-footer {
  position: relative;
  padding-top: 18px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  background: rgba(247, 248, 250, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 232, 235, 0.7);
}

.title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
}

.title-sub {
  margin-top: 5px;
  color: var(--sub);
  font-size: 14px;
}

.topbar-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.notification-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(25, 31, 40, 0.06);
}

.notification-button .material-symbols-outlined {
  font-size: 23px;
  line-height: 1;
}

.notification-button b {
  position: absolute;
  right: -2px;
  top: -3px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  padding: 0 5px;
  font-size: 11px;
  line-height: 1;
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: 54px;
  z-index: 4;
  width: 320px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 10px;
  box-shadow: var(--shadow);
}

.notification-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--line);
}

.notification-head strong {
  font-size: 15px;
}

.notification-head span {
  color: var(--sub);
  font-size: 12px;
  font-weight: 800;
}

.notification-item {
  width: 100%;
  display: grid;
  gap: 4px;
  border-radius: 16px;
  background: transparent;
  padding: 13px 10px;
  color: var(--text);
  text-align: left;
}

.notification-item:hover {
  background: var(--surface-soft);
}

.notification-item span {
  color: var(--sub);
  font-size: 12px;
  font-weight: 800;
}

.notification-item strong {
  font-size: 15px;
}

.notification-empty {
  padding: 18px 10px 10px;
  color: var(--sub);
  font-size: 13px;
}

.account-dropdown {
  position: absolute;
  bottom: 78px;
  left: 0;
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow);
}

.account-menu-head {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 11px;
  align-items: center;
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--line);
}

.account-menu-head strong,
.account-menu-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-head strong {
  font-size: 14px;
}

.account-menu-head span {
  margin-top: 2px;
  color: var(--sub);
  font-size: 12px;
}

.account-menu-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 8px 0;
  color: var(--sub);
  font-size: 12px;
}

.account-menu-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-action {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  padding: 0 10px;
  font-weight: 800;
  text-align: left;
}

.dropdown-action:hover {
  background: var(--surface-soft);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: transparent;
}

.content {
  max-width: 1280px;
  padding: 26px 32px 52px;
}

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

.metric-card {
  min-height: 132px;
  padding: 20px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(25, 31, 40, 0.04);
  color: inherit;
  text-align: left;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.metric-card .label {
  color: var(--sub);
  font-size: 14px;
  font-weight: 800;
}

.metric-card .value {
  margin-top: 10px;
  font-size: 38px;
  font-weight: 900;
}

.metric-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.metric-card.urgent .value { color: var(--danger); }
.metric-card.watch .value { color: var(--warn); }
.metric-card.good .value { color: var(--primary); }
.metric-card.money .value { color: var(--success); }

.panel {
  padding: 22px;
  margin-bottom: 14px;
  border-radius: 24px;
  background: var(--surface);
}

.panel h2 {
  margin: 0 0 9px;
  font-size: 19px;
  line-height: 1.35;
}

.panel p {
  margin: 0;
  color: var(--sub);
  line-height: 1.6;
}

.settings-panel {
  padding: 0;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 24px;
}

.setting-kicker {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.setting-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.setting-switch {
  position: relative;
  width: 70px;
  height: 34px;
  border-radius: 999px;
  background: #d8dde3;
  transition: background 0.16s ease;
}

.setting-switch span {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(25, 31, 40, 0.18);
  transition: transform 0.16s ease;
}

.setting-switch.on {
  background: var(--primary);
}

.setting-switch.on span {
  transform: translateX(36px);
}

.hero-panel {
  background: #191f28;
  color: #fff;
}

.hero-panel p {
  color: #d1d6db;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 14px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.section-head h2 {
  margin: 0 0 6px;
}

.section-head p {
  margin: 0;
}

.dashboard-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.slim-panel {
  margin-bottom: 14px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 34px;
  border-radius: 999px;
  background: transparent;
  color: var(--sub);
  padding: 0 12px;
  font-weight: 800;
}

.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 6px rgba(25, 31, 40, 0.08);
}

.chart-card {
  margin-top: 14px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.metric-summary {
  min-width: 0;
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 13px 14px;
}

.metric-summary-head,
.mini-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.metric-summary-head > span,
.metric-summary small {
  display: block;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.35;
}

.metric-tabs {
  display: inline-flex;
  flex-shrink: 0;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
}

.metric-tabs button {
  min-height: 24px;
  border-radius: 999px;
  background: transparent;
  color: var(--sub);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
}

.metric-tabs button.active {
  background: var(--primary);
  color: #fff;
}

.metric-summary strong {
  display: block;
  margin: 5px 0;
  font-size: 21px;
  line-height: 1.2;
}

.metric-exact {
  display: block;
  margin: -1px 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

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

.mini-chart {
  position: relative;
  min-width: 0;
  border-radius: 18px;
  background: var(--surface-soft);
  padding: 16px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: opacity 140ms ease, transform 180ms ease, box-shadow 140ms ease;
}

.mini-chart.dragging-source {
  display: none;
}

.metric-dragging {
  cursor: grabbing;
  user-select: none;
}

.metric-drag-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  margin: 0;
  opacity: 0.92;
  pointer-events: none;
  cursor: grabbing;
  box-shadow: 0 18px 42px rgba(25, 31, 40, 0.2);
  transition: none !important;
  will-change: transform;
  transform: translate3d(-9999px, -9999px, 0);
}

.mini-chart.drag-over {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--primary);
}

.metric-placeholder {
  min-width: 0;
  border: 2px dashed rgba(49, 130, 246, 0.34);
  border-radius: 18px;
  background: rgba(49, 130, 246, 0.08);
  transition: transform 180ms ease, background 140ms ease, border-color 140ms ease;
}

.mini-chart-head strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-chart p {
  min-height: 34px;
  margin: 0 0 12px;
  font-size: 12px;
}

.bars {
  height: 112px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.bar {
  flex: 1;
  min-width: 5px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
  padding: 0;
  transition: opacity 140ms ease, transform 140ms ease;
}

.bar:hover,
.bar:focus-visible {
  opacity: 0.82;
  transform: translateY(-2px);
  outline: none;
}

.line-chart {
  width: 100%;
  height: 112px;
  overflow: visible;
}

.line-chart polyline {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart circle {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width: 3;
  cursor: pointer;
  outline: none;
}

.line-chart circle:hover,
.line-chart circle:focus-visible {
  fill: var(--primary-weak);
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  width: max-content;
  max-width: min(220px, calc(100% - 24px));
  transform: translate(-50%, -100%);
  border-radius: 16px;
  background: #191f28;
  color: #fff;
  padding: 10px 12px;
  box-shadow: 0 10px 28px rgba(25, 31, 40, 0.24);
  pointer-events: none;
}

.chart-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
  background: #191f28;
}

.chart-tooltip span,
.chart-tooltip small {
  display: block;
  color: #d1d6db;
  font-size: 12px;
  line-height: 1.35;
}

.chart-tooltip strong {
  display: block;
  margin: 2px 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.chart-foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.chart-foot b {
  color: var(--text);
}

.chart-foot span:last-child {
  text-align: right;
}

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

.toolbar, .inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface);
}

.ops-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.ops-form input,
.ops-form select {
  width: 100%;
}

.compact-form {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
}

.point-ledger-filter {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(220px, 1fr) auto auto;
}

.point-ledger-filter input {
  width: 100%;
}

input, textarea, select {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 15px;
  outline: none;
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 14px 15px;
  resize: vertical;
}

input:focus, textarea:focus, select:focus {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.wide {
  width: 100%;
  margin-top: 20px;
}

.primary {
  min-height: 46px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
}

.primary:hover {
  background: #1b64da;
}

.ghost {
  min-height: 40px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 14px;
  font-weight: 700;
}

.ghost:hover {
  background: #e6e8eb;
}

.danger-text {
  color: var(--danger);
}

.rows {
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
}

.row {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.row-main.with-thumb {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.thumb {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--surface-soft);
}

.thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--sub);
  font-weight: 900;
}

.row:last-child {
  border-bottom: 0;
}

.point-ledger-row {
  grid-template-columns: minmax(170px, 1.1fr) minmax(220px, 1.6fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) minmax(120px, 0.8fr);
  align-items: center;
}

.point-ledger-head {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) minmax(220px, 1.6fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) minmax(120px, 0.8fr);
  gap: 16px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.point-ledger-head span:nth-child(n + 3) {
  text-align: right;
}

.ledger-member,
.ledger-description,
.ledger-balance {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ledger-member strong,
.ledger-description strong,
.ledger-balance strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-member span,
.ledger-member small,
.ledger-balance span,
.ledger-balance small {
  color: var(--muted);
  font-size: 12px;
}

.ledger-description span {
  justify-self: start;
}

.ledger-money {
  min-height: 40px;
  display: grid;
  align-items: center;
  justify-content: end;
  border-radius: 14px;
  padding: 0 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ledger-in {
  background: var(--success-weak);
  color: var(--success);
}

.ledger-out {
  background: var(--danger-weak);
  color: var(--danger);
}

.ledger-balance {
  text-align: right;
}

.ledger-balance strong {
  font-variant-numeric: tabular-nums;
}

.row h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.row p {
  margin: 7px 0 0;
  color: var(--sub);
  line-height: 1.45;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.chip.ok {
  background: var(--success-weak);
  color: var(--success);
}

.chip.warn {
  background: var(--warn-weak);
  color: #ad6b00;
}

.chip.danger {
  background: var(--danger-weak);
  color: var(--danger);
}

.chip.neutral {
  background: var(--surface-soft);
  color: var(--sub);
}

.metric-pill {
  color: var(--sub);
  font-weight: 800;
}

.content-metrics {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.sparkline {
  height: 48px;
  min-width: 154px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.sparkline span {
  width: 14px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
}

.type-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding: 8px;
  border-radius: 20px;
  background: var(--surface);
}

.type-tabs button {
  min-height: 38px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: transparent;
  color: var(--sub);
  padding: 0 14px;
  font-weight: 800;
}

.type-tabs button.active {
  background: var(--primary);
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  align-content: start;
}

.alert {
  margin-bottom: 14px;
  border-radius: 18px;
  background: var(--success-weak);
  color: var(--success);
  padding: 14px 16px;
  font-weight: 700;
}

.alert.danger, .error {
  background: var(--danger-weak);
  color: var(--danger);
}

.empty {
  color: var(--sub);
}

.skeleton {
  color: var(--sub);
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 188px minmax(0, 1fr);
  }
  .sidebar {
    padding: 18px 10px 14px;
  }
  .brand {
    font-size: 17px;
  }
  .nav {
    gap: 6px;
  }
  .nav-tab {
    min-height: 42px;
    padding: 0 11px;
    font-size: 13px;
  }
  .mini-profile {
    grid-template-columns: 34px 1fr;
    gap: 8px;
    padding: 10px;
  }
  .mini-profile .avatar {
    width: 34px;
    height: 34px;
  }
  .cards,
  .dashboard-grid,
  .metric-strip,
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar {
    padding: 18px;
  }
  .content {
    padding: 18px;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .setting-row {
    grid-template-columns: 1fr;
  }
  .point-ledger-filter,
  .point-ledger-row,
  .point-ledger-head {
    grid-template-columns: 1fr;
  }
  .point-ledger-head {
    display: none;
  }
  .ledger-money,
  .ledger-balance {
    justify-content: start;
    text-align: left;
  }
  .ops-form {
    grid-template-columns: 1fr 1fr;
  }
  .actions {
    justify-content: flex-start;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .app {
    grid-template-columns: 156px minmax(0, 1fr);
  }
  .sidebar {
    padding: 16px 8px 12px;
  }
  .brand {
    display: grid;
    gap: 0;
    padding: 0 8px 8px;
  }
  .sidebar-caption,
  .nav-group-trigger {
    padding-left: 8px;
    padding-right: 8px;
  }
  .nav-tab {
    border-radius: 12px;
    font-size: 12px;
  }
  .mini-profile {
    display: none;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .account-dropdown {
    width: min(280px, calc(100vw - 178px));
  }
  .cards,
  .dashboard-grid,
  .metric-strip,
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .ops-form {
    grid-template-columns: 1fr;
  }
  .compact-form {
    grid-template-columns: 1fr;
  }
  .login-card {
    padding: 26px 20px;
  }
}


/* T35 콘텐츠 상세 심사 모달 */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 21;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}
.detail-modal .panel {
  pointer-events: auto;
  width: min(560px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
}
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-thumb { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; margin: 10px 0; }
.detail-desc { white-space: pre-wrap; color: var(--text-sub, #aaa); margin: 8px 0 12px; }
.detail-commission { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.detail-commission label { width: 100%; font-size: 12px; opacity: 0.8; }
.detail-commission input { width: 120px; }
.detail-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.inline-rate { width: 84px; }


/* T37 상세 팝업 풀상세 */
.detail-scroll { overflow-y: auto; flex: 1 1 auto; }
.detail-modal .panel { display: flex; flex-direction: column; }
.detail-actions { position: sticky; bottom: 0; background: var(--surface, #fff); padding-top: 10px; }
.detail-char { border: 1px solid var(--border, #e5e5e5); border-radius: 10px; padding: 10px; margin: 8px 0; }
.detail-char-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.detail-char-img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.detail-char p { margin: 4px 0; font-size: 13px; }


/* T38 우측 슬라이드 드로어 (상세/사용자 공통) */
.detail-modal { align-items: stretch; justify-content: flex-end; padding: 0; }
.detail-modal .panel { width: min(540px, 94vw); height: 100vh; max-height: 100vh; border-radius: 0; }
.detail-modal .panel.anim-in { animation: detailSlideIn 0.22s ease; }
@keyframes detailSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }


/* T39 원본 비율 이미지 + 갤러리 */
.detail-gallery { display: flex; flex-direction: row; gap: 8px; margin: 10px 0; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.detail-img { height: 240px; width: auto; max-width: 88%; object-fit: contain; border-radius: 10px; display: block; background: rgba(0,0,0,0.04); flex: 0 0 auto; }
.detail-thumb { width: 100%; height: auto; max-height: none; object-fit: contain; }
.detail-char-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }


/* T45 팝업 UI 고도화 */
.field { margin: 12px 0; }
.field-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.field-val { color: var(--text); white-space: pre-wrap; line-height: 1.55; font-size: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.chip.soft { background: var(--surface-soft); color: var(--sub); }
.char-card { background: var(--surface-soft); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.char-top { display: flex; align-items: center; gap: 12px; }
.char-avatar { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; }
.char-avatar.ph { display: flex; align-items: center; justify-content: center; background: var(--primary-weak); color: var(--primary); font-weight: 800; font-size: 20px; }
.char-name { font-weight: 700; font-size: 16px; color: var(--text); }
.char-sub { font-size: 13px; color: var(--sub); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ep-list { display: flex; flex-direction: column; }
.ep-item { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.ep-item:last-child { border-bottom: none; }
.ep-num { background: var(--primary-weak); color: var(--primary); font-weight: 700; border-radius: 8px; padding: 3px 9px; font-size: 13px; flex: 0 0 auto; }
.ep-title { flex: 1; color: var(--text); font-size: 14px; }
.badge-muted { background: var(--surface-soft); color: var(--muted); border-radius: 6px; padding: 2px 7px; font-size: 12px; }
.commission-card { background: var(--surface-soft); border-radius: 12px; padding: 13px; margin-top: 16px; }
.commission-row { display: flex; gap: 8px; margin-top: 8px; }
.commission-row input { flex: 0 0 120px; }
.detail-summary { margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.creator-line { width: 100%; margin-top: 4px; font-size: 13px; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }

/* T47 content row: separate numeric stats from status chips */
.content-row { grid-template-columns: minmax(0,1fr) auto auto; align-items: center; }
.content-row .row-body { min-width: 0; }
.content-row .row-desc { margin: 4px 0 9px; color: var(--sub); font-size: 13px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.chip-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row-foot { margin-top: 8px; font-size: 12px; color: var(--muted); }
.row-stats { display: flex; gap: 22px; align-items: center; flex: 0 0 auto; padding: 0 4px; }
.row-stats .stat { display: flex; flex-direction: column; align-items: flex-end; min-width: 44px; }
.row-stats .stat-num { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.row-stats .stat-lab { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 700; }
@media (max-width: 720px) { .content-row { grid-template-columns: minmax(0,1fr) auto; } .row-stats { display: none; } }

/* T48 staged review wizard + accordions */
.review-stepper { display: flex; align-items: flex-start; gap: 4px; margin: 16px 0 18px; }
.rstep { display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; padding: 0; flex: 0 0 auto; }
.rstep-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--surface-soft); color: var(--sub); transition: all .15s; }
.rstep.active .rstep-num { background: var(--primary); color: #fff; }
.rstep.done .rstep-num { background: var(--primary-weak); color: var(--primary); }
.rstep-lab { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.rstep.active .rstep-lab { color: var(--text); }
.rstep-line { flex: 1; height: 2px; background: var(--line); margin-top: 13px; }
.review-step-body { min-height: 80px; }
.detail-actions .grow { flex: 1; }
.detail-actions { align-items: center; }
.ep-acc-list { display: flex; flex-direction: column; gap: 8px; }
.ep-acc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ep-acc-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.ep-acc.open .ep-acc-head { background: var(--surface-soft); }
.ep-acc-head .ep-title { flex: 1; font-weight: 600; color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-caret { color: var(--muted); flex: 0 0 auto; font-size: 12px; }
.ep-body { padding: 14px 16px; white-space: pre-wrap; line-height: 1.75; font-size: 14px; color: var(--text); max-height: 440px; overflow-y: auto; border-top: 1px solid var(--line); }
.char-card { background: var(--surface-soft); border-radius: 14px; padding: 0; margin-bottom: 10px; overflow: hidden; }
.char-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.char-headtext { flex: 1; min-width: 0; }
.char-card.open .char-head { border-bottom: 1px solid var(--line); }
.char-detail { padding: 14px; }
.review-final .commission-hint { font-size: 12px; color: var(--muted); margin: 9px 0 0; }
.commission-row .pct-suffix { font-weight: 800; color: var(--sub); align-self: center; }
.empty { color: var(--muted); padding: 10px 2px; display: block; }

/* T49 overlay + N badges + review polish */
#contentDetailBackdrop, #userDetailBackdrop { background: rgba(15, 23, 42, 0.45); z-index: 20; backdrop-filter: saturate(120%) blur(1px); }
.ep-new, .work-new { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger, #e5484d); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; flex: 0 0 auto; }
.work-new { vertical-align: middle; }
.ep-acc-head { gap: 8px; }
.review-final { display: flex; flex-direction: column; gap: 4px; }
.review-final .commission-card { margin-top: 4px; }
.uw-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.uw-followers { font-size: 12px; color: var(--muted); font-weight: 700; }
.uw-list { display: flex; flex-direction: column; gap: 8px; }
.uw-card { width: 100%; text-align: left; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .12s; }
.uw-card:hover { border-color: var(--primary); }
.uw-title { font-weight: 700; color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.uw-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.uw-stats b { color: var(--text); font-weight: 800; font-size: 13px; }

/* T50 승인 단계 시각화 */
.rv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 16px; }
.rv-stat { background: var(--surface-soft); border-radius: 12px; padding: 13px 6px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.rv-num { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.rv-num.adult { color: var(--danger, #e5484d); }
.rv-lab { font-size: 11px; color: var(--muted); font-weight: 700; }
.rv-badge { transform: scale(0.92); }
.rv-check { display: flex; flex-direction: column; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rv-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--line); }
.rv-row:last-child { border-bottom: 0; }
.rv-row b { margin-left: auto; color: var(--sub); font-variant-numeric: tabular-nums; font-weight: 800; }
.rv-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface-soft); color: var(--muted); flex: 0 0 auto; }
.rv-row.done .rv-dot { background: var(--primary-weak); color: var(--primary); }
.rv-commission { background: var(--surface-soft); border-radius: 14px; padding: 16px; }
.rv-com-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 11px; flex-wrap: wrap; }
.rv-com-title { font-size: 14px; font-weight: 800; color: var(--text); }
.rv-com-pct { font-size: 13px; color: var(--sub); }
.rv-com-pct b { color: var(--text); font-weight: 800; }
.rv-split { display: flex; height: 30px; border-radius: 9px; overflow: hidden; margin-bottom: 14px; background: var(--line); }
.rv-split-p { background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; transition: width .16s ease; min-width: 26px; }
.rv-split-c { background: var(--primary-weak); color: var(--primary); display: grid; place-items: center; font-size: 12px; font-weight: 800; transition: width .16s ease; min-width: 26px; }
.rv-com-input { display: flex; align-items: center; gap: 8px; }
.rv-com-input input { flex: 1; text-align: center; font-size: 18px; font-weight: 800; min-width: 0; }
.rv-step-suffix { font-weight: 800; color: var(--sub); }
.rv-step { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface, #fff); font-size: 20px; font-weight: 700; cursor: pointer; color: var(--text); flex: 0 0 auto; line-height: 1; }
.rv-step:hover { background: var(--surface-soft); border-color: var(--primary); }
.rv-com-hint { font-size: 12px; color: var(--muted); margin: 11px 0 0; }
