/* src/styles.css */
:root {
  --bg: #f4f1ea;
  --bg-soft: #fbfaf7;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffdf9;
  --line: rgba(126, 107, 76, 0.14);
  --line-strong: rgba(126, 107, 76, 0.24);
  --text: #1d1a16;
  --muted: #6e655a;
  --brand: #b8642f;
  --brand-deep: #8e4518;
  --brand-soft: #f2dfd0;
  --success: #2d7d55;
  --warn: #b67519;
  --danger: #b24d3d;
  --shadow: 0 24px 80px rgba(87, 65, 39, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-sans:
    "Noto Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  --font-display:
    "IBM Plex Sans",
    "Noto Sans SC",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body,
#root {
  min-height: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 235, 217, 0.95),
      transparent 28%),
    radial-gradient(
      circle at top right,
      rgba(238, 229, 205, 0.9),
      transparent 22%),
    linear-gradient(
      180deg,
      #f8f4ed 0%,
      #f2eee7 100%);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}
a {
  color: inherit;
  text-decoration: none;
}
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 16px;
  color: var(--muted);
}
.boot-mark {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.auth-poster {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      160deg,
      rgba(184, 100, 47, 0.15),
      rgba(255, 255, 255, 0)),
    url(https://images.unsplash.com/photo-1513364776144-60967b0f800f?auto=format&fit=crop&w=1400&q=80) center/cover no-repeat;
}
.auth-poster-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(20, 14, 8, 0.18),
      rgba(20, 14, 8, 0.46));
}
.auth-poster-inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fffaf4;
}
.brand-chip,
.badge,
.status-chip,
.account-pill,
.segmented {
  border-radius: 999px;
}
.brand-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  width: fit-content;
  background: rgba(255, 250, 244, 0.16);
  backdrop-filter: blur(12px);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-poster h1,
.sidebar-brand h1,
.topbar h2,
.section-head h3,
.panel-header h3,
.account-card h3,
.admin-block h4 {
  margin: 0;
  font-family: var(--font-display);
}
.auth-poster h1 {
  margin-top: 28px;
  max-width: 520px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.98;
}
.auth-lead {
  max-width: 520px;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 250, 244, 0.88);
}
.selling-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 14px;
  max-width: 560px;
}
.selling-list li {
  padding: 14px 18px;
  border: 1px solid rgba(255, 250, 244, 0.18);
  background: rgba(255, 250, 244, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  line-height: 1.65;
}
.poster-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 14px;
  color: rgba(255, 250, 244, 0.82);
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}
.auth-card,
.compose-panel,
.result-panel,
.template-group,
.account-card,
.admin-block {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.auth-card {
  width: min(520px, 100%);
  padding: 34px;
  border-radius: var(--radius-xl);
}
.auth-card-head,
.panel-header,
.section-head,
.compact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.auth-switch {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #f1e9dc;
}
.segmented {
  border: 0;
  background: transparent;
  padding: 10px 16px;
  color: var(--muted);
}
.segmented.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 24px rgba(100, 75, 42, 0.08);
}
.auth-form,
.page-stack,
.task-list,
.ledger-list,
.stack-list {
  display: grid;
  gap: 16px;
}
.auth-form {
  margin-top: 28px;
}
.field {
  display: grid;
  gap: 10px;
}
.field span,
.field label,
.option-section-head span,
.pricing-box span,
.metric-card span,
.badge,
.eyebrow,
.section-copy,
.task-copy p,
.account-pill span,
.data-list dt,
.data-list dd,
.ledger-row span,
.stack-row p,
.stack-row span,
.session-card span {
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdfa;
  padding: 14px 16px;
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(184, 100, 47, 0.45);
  box-shadow: 0 0 0 4px rgba(184, 100, 47, 0.08);
}
.field textarea {
  resize: vertical;
}
.field.compact select {
  min-width: 140px;
}
.date-picker-field {
  position: relative;
  min-width: 220px;
}
.date-picker-field:focus-within {
  z-index: 70;
}
.date-picker-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.date-picker-clear,
.date-picker-toggle {
  white-space: nowrap;
}
.date-picker-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  width: min(340px, calc(100vw - 48px));
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.98);
  border: 1px solid rgba(126, 107, 76, 0.18);
  box-shadow: 0 22px 60px rgba(87, 65, 39, 0.18);
  backdrop-filter: blur(12px);
}
.date-picker-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.date-picker-head strong {
  text-align: center;
  font-family: var(--font-display);
}
.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.date-picker-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.date-picker-day,
.date-picker-empty {
  min-height: 38px;
  border-radius: 12px;
}
.date-picker-day {
  border: 1px solid transparent;
  background: #fff9f0;
  color: var(--text);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}
.date-picker-day:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 100, 47, 0.2);
  background: #f6eadb;
}
.date-picker-day.is-selected {
  background:
    linear-gradient(
      135deg,
      var(--brand),
      var(--brand-deep));
  color: #fffaf5;
  border-color: rgba(184, 100, 47, 0.28);
}
.inline-error {
  color: var(--danger);
  background: rgba(178, 77, 61, 0.08);
  border: 1px solid rgba(178, 77, 61, 0.12);
  padding: 12px 14px;
  border-radius: 14px;
}
.primary-button,
.ghost-button {
  border-radius: 16px;
  padding: 13px 18px;
  border: 0;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}
.primary-button {
  background:
    linear-gradient(
      135deg,
      var(--brand),
      var(--brand-deep));
  color: #fffaf5;
  box-shadow: 0 18px 42px rgba(184, 100, 47, 0.24);
}
.primary-button:hover,
.ghost-button:hover,
.nav-link:hover,
.choice-card:hover,
.mini-template:hover,
.template-card:hover,
.task-card:hover,
.session-card:hover {
  transform: translateY(-1px);
}
.ghost-button {
  background: #f3ece0;
  color: var(--text);
}
.primary-button.small,
.ghost-button.small {
  padding: 10px 14px;
  border-radius: 14px;
}
.auth-note {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.sidebar {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 251, 246, 0.7);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      #f1d8bf,
      #ffffff);
  color: var(--brand-deep);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(184, 100, 47, 0.16);
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.sidebar-balance {
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(
      180deg,
      #fff9f2,
      #f4ebdf);
  border: 1px solid rgba(184, 100, 47, 0.14);
  display: grid;
  gap: 6px;
}
.sidebar-balance strong {
  font-size: 28px;
  font-family: var(--font-display);
}
.sidebar-nav {
  display: grid;
  gap: 8px;
}
.nav-link {
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease;
}
.nav-link.is-active {
  background: #fffdf8;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(184, 100, 47, 0.1);
}
.sidebar-logout {
  margin-top: auto;
}
.main-area {
  padding: 28px;
  display: grid;
  gap: 24px;
}
.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}
.topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}
.topbar-refresh-error {
  grid-column: 1 / -1;
}
.account-pill {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid var(--line);
}
.announcement-card {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-radius: 22px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 249, 240, 0.96),
      rgba(244, 234, 219, 0.92));
  border: 1px solid rgba(184, 100, 47, 0.12);
}
.page-stack {
  gap: 22px;
}
.hero-strip,
.workspace-layout,
.account-grid,
.template-library,
.admin-grid,
.session-grid {
  display: grid;
  gap: 20px;
}
.hero-strip {
  grid-template-columns: 1.2fr 1fr;
  align-items: start;
  padding: 28px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 252, 247, 0.92),
      rgba(245, 236, 226, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}
.hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.hero-kpis-compact {
  align-self: stretch;
}
.metric-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(184, 100, 47, 0.1);
  display: grid;
  gap: 8px;
}
.metric-card strong {
  font-size: 24px;
  font-family: var(--font-display);
}
.workspace-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}
.compose-panel,
.result-panel,
.template-group,
.account-card,
.admin-block {
  border-radius: var(--radius-xl);
  padding: 24px;
}
.badge {
  display: inline-flex;
  padding: 8px 12px;
  background: #f3eadf;
  color: var(--brand-deep);
  font-size: 12px;
}
.badge.soft {
  background: rgba(184, 100, 47, 0.08);
}
.option-section {
  display: grid;
  gap: 12px;
}
.provider-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(33, 46, 63, 0.12);
  border-radius: 12px;
  background: rgba(249, 250, 247, 0.82);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}
.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.option-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.quality-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.choice-card,
.mini-template,
.template-card,
.task-card,
.session-card {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}
.choice-card {
  border: 1px solid var(--line);
  background: #fffdfa;
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  display: grid;
  gap: 6px;
}
.choice-card.is-active {
  border-color: rgba(184, 100, 47, 0.4);
  box-shadow: inset 0 0 0 1px rgba(184, 100, 47, 0.18);
}
.quality-card em {
  color: var(--brand-deep);
  font-style: normal;
}
.inline-controls {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: end;
}
.inline-controls-tight {
  grid-template-columns: minmax(0, 220px);
  justify-content: start;
}
.pricing-box {
  border: 1px dashed rgba(184, 100, 47, 0.22);
  background: rgba(248, 241, 232, 0.8);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}
.pricing-box strong {
  font-size: 24px;
}
.template-strip {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(247, 239, 229, 0.72);
  border: 1px solid rgba(184, 100, 47, 0.1);
}
.template-strip-head,
.template-card-head,
.template-card-foot,
.task-meta,
.action-row,
.stack-row,
.ledger-row,
.data-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.mini-template-list,
.template-grid {
  display: grid;
  gap: 12px;
}
.mini-template-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mini-template {
  border: 1px solid rgba(184, 100, 47, 0.12);
  background: rgba(255, 253, 249, 0.82);
  border-radius: 18px;
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 6px;
}
.task-list {
  gap: 14px;
  max-height: min(74vh, 1120px);
  overflow: auto;
  padding-right: 6px;
  align-content: start;
}
.task-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdfa;
}
.task-preview {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      #f2e5d6,
      #f9f5ef);
}
.task-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.status-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}
.tone-brand {
  color: var(--brand-deep);
}
.tone-success {
  color: var(--success);
}
.tone-danger {
  color: var(--danger);
}
.tone-warn {
  color: var(--warn);
}
.task-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.task-progress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(243, 236, 224, 0.72);
  border: 1px solid rgba(184, 100, 47, 0.1);
}
.task-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.task-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(184, 100, 47, 0.12);
  overflow: hidden;
}
.task-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      var(--brand),
      var(--brand-deep));
  transition: width 240ms ease;
}
.task-message {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.92);
  border: 1px solid rgba(184, 100, 47, 0.1);
  color: var(--muted);
}
.preview-button,
.task-preview-action {
  border: 0;
}
.preview-button {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
}
.task-preview-action {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}
.task-copy strong {
  font-size: 18px;
}
.template-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(184, 100, 47, 0.1);
}
.attachment-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(250, 245, 238, 0.88);
  border: 1px solid rgba(184, 100, 47, 0.1);
}
.attachment-box-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.attachment-box-head span,
.attachment-empty,
.attachment-preview figcaption {
  color: var(--muted);
  font-size: 13px;
}
.attachment-preview-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.attachment-preview {
  margin: 0;
  display: grid;
  gap: 8px;
  position: relative;
  min-width: 0;
}
.attachment-preview img,
.attachment-slot-empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid rgba(184, 100, 47, 0.1);
  background: #fffdfa;
}
.attachment-preview img {
  object-fit: cover;
}
.attachment-slot-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px;
  border-style: dashed;
  color: var(--muted);
  text-align: center;
  min-height: 132px;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}
.attachment-slot-empty strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(184, 100, 47, 0.1);
  color: var(--brand-deep);
  font-size: 22px;
  line-height: 1;
}
.attachment-slot-empty span {
  font-size: 13px;
  line-height: 1.5;
}
.attachment-slot-empty:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(184, 100, 47, 0.35);
  background: rgba(255, 249, 240, 0.96);
}
.attachment-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 252, 247, 0.94);
  color: var(--danger);
  box-shadow: 0 8px 20px rgba(87, 65, 39, 0.12);
}
.upload-dropzone {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(184, 100, 47, 0.28);
  background: rgba(255, 251, 246, 0.92);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
  cursor: pointer;
}
.upload-dropzone-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.upload-dropzone p,
.upload-dropzone span {
  margin: 0;
  color: var(--muted);
}
.upload-dropzone.is-dragging {
  border-color: rgba(184, 100, 47, 0.6);
  background: rgba(250, 239, 226, 0.95);
  box-shadow: inset 0 0 0 1px rgba(184, 100, 47, 0.12);
}
.sr-only-input {
  display: none;
}
.template-library {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.template-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: #fffdf9;
  display: grid;
  gap: 14px;
}
.account-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.data-list {
  display: grid;
  gap: 12px;
}
.data-list dt,
.data-list dd {
  margin: 0;
}
.ledger-row,
.stack-row,
.session-card {
  padding: 14px 0;
  border-bottom: 1px solid rgba(126, 107, 76, 0.08);
}
.ledger-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}
.ledger-scroll {
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
  align-content: start;
}
.admin-ledger-toolbar {
  margin-top: 18px;
}
.admin-record-scroll {
  max-height: 520px;
  padding-right: 8px;
}
.ledger-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.ledger-copy strong,
.ledger-copy span {
  overflow-wrap: anywhere;
}
.ledger-empty {
  padding: 24px 0 10px;
  text-align: center;
  color: var(--muted);
}
.task-list::-webkit-scrollbar,
.ledger-scroll::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.task-list::-webkit-scrollbar-thumb,
.ledger-scroll::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(184, 100, 47, 0.24);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.task-list::-webkit-scrollbar-track,
.ledger-scroll::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.ledger-row:last-child,
.stack-row:last-child {
  border-bottom: 0;
}
.ledger-amount.is-positive {
  color: var(--success);
}
.ledger-amount.is-negative {
  color: var(--danger);
}
.session-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.session-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 250, 0.9);
  padding: 18px;
  display: grid;
  gap: 8px;
}
.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.panel-header-stack {
  align-items: center;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(29, 26, 22, 0.48);
  backdrop-filter: blur(6px);
}
.lightbox-dialog {
  width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 30px 80px rgba(27, 18, 10, 0.22);
}
.lightbox-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.lightbox-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.lightbox-image {
  width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  border-radius: 18px;
  background: #f7f2ea;
}
.table-wrap {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(126, 107, 76, 0.08);
  text-align: left;
  vertical-align: top;
}
.section-copy {
  margin: 8px 0 0;
  line-height: 1.7;
}
@media (max-width: 1200px) {
  .auth-page,
  .shell,
  .workspace-layout,
  .hero-strip,
  .template-library,
  .account-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .hero-kpis,
  .mini-template-list,
  .template-grid,
  .session-grid,
  .attachment-preview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .auth-poster-inner,
  .main-area,
  .sidebar,
  .auth-panel {
    padding: 20px;
  }
  .choice-grid,
  .quality-grid,
  .hero-kpis,
  .mini-template-list,
  .template-grid,
  .session-grid,
  .attachment-preview-list {
    grid-template-columns: 1fr;
  }
  .task-card {
    grid-template-columns: 1fr;
  }
  .task-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .topbar,
  .announcement-card,
  .panel-header,
  .section-head,
  .compact-head,
  .lightbox-head,
  .template-strip-head,
  .task-meta,
  .action-row,
  .data-list > div,
  .stack-row,
  .ledger-row {
    grid-template-columns: 1fr;
    display: grid;
  }
  .inline-controls {
    grid-template-columns: 1fr;
  }
  .ledger-toolbar {
    grid-template-columns: 1fr;
  }
  .ledger-scroll {
    max-height: 360px;
    padding-right: 0;
  }
  .date-picker-input-row {
    grid-template-columns: 1fr;
  }
  .date-picker-popover {
    width: 100%;
  }
  .upload-dropzone-head {
    align-items: stretch;
    flex-direction: column;
  }
}
