@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f4f7fd;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-soft: #f7f9fe;
  --line: #e5ebf5;
  --line-strong: #d9e1f0;
  --text: #0f172f;
  --muted: #67758f;
  --muted-2: #8b97ad;
  --blue: #2f66ff;
  --blue-soft: #edf3ff;
  --blue-deep: #1a4ee6;
  --green: #22b35a;
  --green-soft: #eaf9ef;
  --purple: #8054ff;
  --purple-soft: #f1edff;
  --violet: #7b4ce3;
  --orange: #ff932f;
  --orange-soft: #fff2e5;
  --red: #ff5c5c;
  --red-soft: #fff0f0;
  --pink: #ff5ea8;
  --pink-soft: #fff0f7;
  --yellow: #f7bb1d;
  --yellow-soft: #fff8df;
  --cyan: #2bb8d6;
  --cyan-soft: #ebfbff;
  --gray-soft: #f2f5fb;
  --shadow: 0 22px 60px rgba(15, 23, 47, 0.07);
  --shadow-soft: 0 10px 30px rgba(15, 23, 47, 0.04);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --sidebar-width: 236px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(47, 102, 255, 0.08), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(128, 84, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7fd 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

svg {
  flex: none;
}

.landing-body {
  position: relative;
  overflow-x: hidden;
}

.page-glow {
  position: fixed;
  inset: auto;
  width: 540px;
  height: 540px;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  z-index: 0;
}

.page-glow-left {
  top: 120px;
  left: -180px;
  background: rgba(67, 97, 255, 0.12);
}

.page-glow-right {
  top: 220px;
  right: -220px;
  background: rgba(155, 132, 255, 0.12);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(217, 225, 240, 0.7);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(160deg, #192447, #0d132a 70%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(10, 21, 52, 0.25);
}

.brand-name {
  white-space: nowrap;
}

.landing-nav {
  display: inline-flex;
  align-items: center;
  gap: 52px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.landing-nav a:hover {
  color: var(--blue);
}

.btn,
.outline-action,
.ghost-action,
.text-link,
.compact-chip,
.filter-chip,
.category-item {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.btn:hover,
.outline-action:hover,
.ghost-action:hover,
.compact-chip:hover,
.filter-chip:hover,
.category-item:hover {
  transform: translateY(-1px);
}

.btn {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(47, 102, 255, 0.26);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-white {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.btn-google svg {
  width: 24px;
  height: 24px;
}

.landing-main {
  position: relative;
  z-index: 1;
  padding: 28px 28px 40px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr);
  gap: 34px;
  align-items: center;
  padding: 26px 26px 30px;
  border-radius: 36px;
}

.hero-copy h1,
.page-head h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.065em;
}

.hero-copy h1 {
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(58px, 6vw, 88px);
  line-height: 0.97;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 670px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 14px 18px;
  border: 1px solid rgba(219, 228, 243, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.feature-pill strong,
.solution-card h3,
.card-head h2,
.metric-value,
.template-item strong,
.report-kpis strong {
  font-family: "Manrope", sans-serif;
}

.feature-pill strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.feature-pill span {
  color: var(--muted);
  font-size: 14px;
}

.feature-icon,
.solution-icon,
.metric-icon,
.list-icon {
  display: grid;
  place-items: center;
  border-radius: 18px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  flex: none;
}

.feature-icon svg,
.solution-icon svg,
.preview-rail-icon svg,
.app-nav svg,
.ghost-action svg,
.profile-btn svg,
.filter-chip svg,
.metric-icon svg,
.list-icon svg,
.outline-action svg,
.compact-chip svg,
.template-item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon.blue,
.solution-icon.blue,
.metric-icon.blue-soft,
.list-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.metric-icon.blue {
  background: #eef5ff;
  color: var(--blue);
}

.feature-icon.green,
.solution-icon.green,
.metric-icon.green,
.list-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.solution-icon.purple,
.metric-icon.purple,
.metric-icon.violet,
.list-icon.purple,
.list-icon.violet {
  background: var(--purple-soft);
  color: var(--purple);
}

.metric-icon.violet {
  color: var(--violet);
}

.metric-icon.orange,
.list-icon.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.metric-icon.red,
.list-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.metric-icon.pink {
  background: var(--pink-soft);
  color: var(--pink);
}

.metric-icon.yellow {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.metric-icon.cyan,
.solution-icon.cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.metric-icon.gray,
.list-icon.gray {
  background: var(--gray-soft);
  color: #5c6983;
}

.hero-preview {
  position: relative;
}

.hero-preview::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: -18px;
  width: 180px;
  height: 180px;
  background-image: radial-gradient(circle, rgba(47, 102, 255, 0.18) 1px, transparent 1px);
  background-size: 12px 12px;
  opacity: 0.45;
}

.preview-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  min-height: 540px;
  border-radius: 28px;
  border: 1px solid rgba(217, 225, 240, 0.8);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: rgba(250, 252, 255, 0.75);
}

.preview-rail-logo,
.preview-rail-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.preview-rail-logo {
  background: linear-gradient(160deg, #2b5fff, #1b49d5);
  color: #ffffff;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.preview-rail-icon {
  color: #6f7b93;
}

.preview-rail-icon.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.preview-pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 20px 20px;
}

.preview-topbar,
.preview-card-head,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-topbar h2,
.page-head h1 {
  font-size: clamp(44px, 5vw, 56px);
  line-height: 0.98;
}

.preview-topbar h2 {
  font-size: 22px;
}

.preview-date,
.compact-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.preview-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.preview-stat {
  min-height: 122px;
  padding: 14px 16px;
  border: 1px solid rgba(226, 233, 245, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.preview-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.preview-stat strong {
  display: block;
  margin-top: 10px;
  font-family: "Manrope", sans-serif;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.preview-stat small {
  display: block;
  margin-top: 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.preview-chart-card,
.section-card {
  border: 1px solid rgba(226, 233, 245, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.preview-chart-card {
  padding: 18px 18px 14px;
}

.preview-card-head strong,
.card-head h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.preview-legend,
.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.preview-legend span,
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.line-solid,
.line-dashed,
.legend-line,
.dot,
.feed-dot {
  display: inline-block;
}

.line-solid,
.legend-line {
  width: 18px;
  height: 0;
  border-top: 3px solid currentColor;
  border-radius: 999px;
}

.line-dashed,
.legend-line.dashed {
  width: 18px;
  height: 0;
  border-top: 3px dashed currentColor;
  border-radius: 999px;
}

.line-solid,
.legend-line.blue,
.dot.blue {
  color: var(--blue);
}

.legend-line.pink {
  color: var(--pink);
}

.legend-line.green,
.dot.green {
  color: var(--green);
}

.legend-line.orange {
  color: var(--orange);
}

.legend-line.purple,
.dot.purple {
  color: var(--purple);
}

.dot.gray {
  color: #cad2e2;
}

.preview-chart,
.chart-svg,
.micro-chart {
  width: 100%;
  height: auto;
}

.grid-line {
  fill: none;
  stroke: #e8eef8;
  stroke-width: 1;
}

.chart-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-chart .chart-path.income,
.chart-svg .chart-path.blue {
  stroke: var(--blue);
}

.preview-chart .chart-path.spend,
.chart-svg .chart-path.orange {
  stroke: var(--orange);
}

.chart-svg .chart-path.green {
  stroke: var(--green);
}

.chart-svg .chart-path.purple {
  stroke: var(--purple);
}

.chart-svg .chart-path.pink {
  stroke: var(--pink);
}

.chart-svg .chart-path.red {
  stroke: var(--red);
}

.chart-svg .chart-path.dashed {
  stroke: #8cb0ff;
  stroke-dasharray: 4 7;
}

.chart-labels text,
.chart-axis,
.card-subtext {
  color: var(--muted);
}

.chart-labels text,
.chart-axis span {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.solution-card {
  display: flex;
  gap: 18px;
  min-height: 232px;
  padding: 30px 28px;
  border: 1px solid rgba(219, 228, 243, 0.85);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.solution-icon {
  width: 74px;
  height: 74px;
  flex: none;
}

.solution-card h3 {
  margin: 2px 0 12px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.solution-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.card-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.card-link {
  margin-top: 22px;
}

.app-body {
  background:
    radial-gradient(circle at 18% 2%, rgba(47, 102, 255, 0.08), transparent 26%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7fd 100%);
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  zoom: 0.9;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 16px 14px;
  border-right: 1px solid rgba(217, 225, 240, 0.7);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.app-nav {
  display: grid;
  gap: 10px;
}

.app-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.app-nav a svg {
  color: currentColor;
}

.app-nav a.active {
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav-badge {
  margin-left: auto;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.main-shell {
  min-width: 0;
}

.app-topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(217, 225, 240, 0.7);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.ghost-action,
.profile-btn,
.outline-action,
.filter-chip,
.compact-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.ghost-action {
  padding: 0 16px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.profile-btn {
  padding: 5px 12px 5px 6px;
  color: var(--text);
}

.profile-avatar {
  position: relative;
  overflow: hidden;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111c36;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.profile-btn strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
}

.app-content {
  max-width: 1460px;
  margin: 0 auto;
  padding: 18px 22px 28px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: fade-in 0.22s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0 18px;
}

.page-head h1 {
  font-size: clamp(28px, 3vw, 36px);
}

.page-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.filters-row,
.toolbar-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

.toolbar-row.compact {
  margin: 0;
}

.filters-row-main {
  margin-bottom: 20px;
}

.filter-chip {
  justify-content: space-between;
  min-width: 208px;
  padding: 0 14px;
  color: #1b2741;
  font-size: 14px;
  font-weight: 600;
}

.chip-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.chip-left svg {
  width: 18px;
  height: 18px;
  color: #6d7890;
}

.chip-arrow {
  width: 16px;
  height: 16px;
  color: #7d879b;
}

.outline-action {
  padding: 0 16px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.outline-action.small {
  min-height: 34px;
  padding: 0 12px;
}

.outline-action.full-width,
.btn.full-width {
  width: 100%;
}

.ml-auto {
  margin-left: auto;
}

.metric-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.metric-grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metric-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-grid.seven {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.metric-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(226, 233, 245, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.metric-icon {
  width: 48px;
  height: 48px;
  flex: none;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.metric-value {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.metric-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.delta {
  font-weight: 800;
}

.delta.positive {
  color: var(--green);
}

.delta.negative {
  color: var(--red);
}

.dashboard-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}

.dashboard-grid-three {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 286px;
}

.dashboard-grid-two-side {
  grid-template-columns: minmax(0, 1fr) 286px;
}

.stack-col {
  display: grid;
  gap: 14px;
}

.span-2 {
  grid-column: span 2;
}

.section-card {
  padding: 18px;
}

.card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.segmented button {
  min-width: 58px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.segmented button.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.chart-card .chart-legend {
  margin: 12px 0 4px;
}

.chart-summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.chart-summary {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.chart-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.chart-summary strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.chart-svg {
  margin-top: 6px;
}

.chart-dots circle {
  fill: #ffffff;
  stroke-width: 3;
}

.chart-dots.blue circle {
  stroke: var(--blue);
}

.chart-dots.pink circle {
  stroke: var(--pink);
}

.chart-dots.green circle {
  stroke: var(--green);
}

.chart-dots.orange circle {
  stroke: var(--orange);
}

.chart-tooltip rect {
  fill: rgba(255, 255, 255, 0.95);
  stroke: var(--line-strong);
}

.chart-tooltip text {
  fill: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.chart-area {
  fill-opacity: 0.85;
}

.chart-area.blue {
  fill: url(#homeRevenueFill);
}

.chart-area.orange {
  fill: url(#homeSpendFill);
}

.bars-group rect,
.bars-multi rect {
  fill: rgba(47, 102, 255, 0.48);
}

.bars-multi .bar-green {
  fill: rgba(34, 179, 90, 0.56);
}

.bars-multi .bar-blue {
  fill: rgba(47, 102, 255, 0.62);
}

.side-list,
.event-list,
.arrow-list {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.side-list li,
.mini-event {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.list-icon {
  width: 40px;
  height: 40px;
}

.side-list strong,
.mini-event strong,
.history-row strong,
.feed-item strong,
.arrow-list span,
.reason-list strong,
.ranking-list span,
.category-item span,
.funnel-list span,
.template-item strong,
.cta-box strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.side-list p,
.mini-event p,
.arrow-list small,
.cta-box p,
.history-row p,
.feed-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.side-list small,
.mini-event small,
.history-row small,
.event-list small {
  color: var(--muted-2);
  font-size: 12px;
}

.dashboard-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-head-inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.home-date-control {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.home-date-label {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.home-date-input {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
}

.home-date-input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.home-date-native {
  display: none;
}

.home-calendar {
  display: grid;
  width: min(368px, calc(100vw - 32px));
  gap: 14px;
}

.home-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-calendar-head strong {
  font-size: 15px;
  font-weight: 800;
  text-transform: capitalize;
}

.home-calendar-weekdays,
.home-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.home-calendar-weekdays span {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.home-calendar-cell {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.home-calendar-cell.is-spacer {
  min-height: 42px;
}

.home-calendar-cell.is-available {
  background: rgba(122, 92, 255, 0.12);
  color: var(--purple);
}

.home-calendar-cell.is-available:hover {
  border-color: rgba(122, 92, 255, 0.28);
}

.home-calendar-cell.is-selected {
  background: var(--purple);
  color: #fff;
}

.home-calendar-cell.is-blocked {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 92, 92, 0.08),
      rgba(255, 92, 92, 0.08) 6px,
      rgba(255, 92, 92, 0.18) 6px,
      rgba(255, 92, 92, 0.18) 12px
    );
  color: var(--red);
  cursor: not-allowed;
}

.home-calendar-cell.is-future {
  opacity: 0.9;
}

.home-calendar-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.home-calendar-note .is-available {
  color: var(--purple);
}

.home-calendar-note .is-blocked {
  color: var(--red);
}

.home-calendar-empty {
  padding: 14px 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.pretty-filter[data-pretty-filter="home-day"][data-calendar-mode="1"] .filter-select-popover {
  width: max-content;
  min-width: 368px;
  right: auto;
  padding: 14px;
}

.home-chart-card {
  min-height: 420px;
}

.compact-chip.icon-only {
  min-width: 44px;
  width: 44px;
  padding: 0;
}

.chart-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.chart-shell {
  position: relative;
  margin-top: 10px;
}

.chart-shell.is-modal {
  margin-top: 0;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-blue {
  stroke: var(--blue);
}

.chart-line-pink {
  stroke: var(--pink);
}

.chart-line-green {
  stroke: var(--green);
}

.chart-line-violet {
  stroke: var(--purple);
}

.chart-line-yellow {
  stroke: #ffb100;
}

.chart-line-orange {
  stroke: var(--orange);
}

.legend-line.blue,
.chart-point-blue {
  color: var(--blue);
}

.legend-line.pink,
.chart-point-pink {
  color: var(--pink);
}

.legend-line.green,
.chart-point-green {
  color: var(--green);
}

.legend-line.violet,
.chart-point-violet {
  color: var(--purple);
}

.legend-line.yellow,
.chart-point-yellow {
  color: #ffb100;
}

.legend-line.orange,
.chart-point-orange {
  color: var(--orange);
}

.chart-points-overlay {
  position: absolute;
  inset: 0;
}

.chart-point {
  position: absolute;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  appearance: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.chart-point::before,
.chart-point::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.chart-point::before {
  border: 3px solid currentColor;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.chart-point::after {
  inset: 5px;
  background: #fff;
}

.chart-point.is-active {
  transform: translate(-50%, -50%) scale(1.08);
}

.chart-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-info strong {
  color: var(--text);
}

.home-chart-modal-panel {
  width: min(1120px, calc(100vw - 48px));
}

.home-chart-modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.chart-series-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.chart-series-toggle input {
  margin: 0;
}

@media (max-width: 1100px) {
  .metric-grid.six,
  .dashboard-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .metric-grid.six,
  .dashboard-grid-two {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .home-date-control {
    width: 100%;
  }

  .card-head-inline {
    flex-direction: column;
    align-items: stretch;
  }
}

.action-list,
.action-grid {
  display: grid;
  gap: 10px;
}

.action-grid {
  grid-template-columns: 1fr 1fr;
}

.table-wrap {
  overflow-x: auto;
}

.books-table-card {
  min-height: 420px;
  overflow: visible;
}

.books-table-wrap {
  min-height: 360px;
  overflow: visible;
}

.home-filters > .filter-chip {
  display: none;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #edf1f8;
  white-space: nowrap;
  font-size: 13px;
}

.dashboard-table th {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-table.compact th,
.dashboard-table.compact td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.book-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-metric-stack,
.table-date-stack {
  display: grid;
  gap: 3px;
}

.table-metric-stack strong,
.table-date-stack strong {
  font-size: 13px;
  font-weight: 700;
}

.table-metric-stack small,
.table-date-stack small {
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.25;
}

.table-delta-up {
  color: var(--green);
}

.table-delta-down {
  color: var(--red);
}

.book-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
}

.cover {
  width: 24px;
  height: 36px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.cover-1 {
  background: linear-gradient(180deg, #39224a, #0f1935);
}

.cover-2 {
  background: linear-gradient(180deg, #0a7f6c, #112939);
}

.cover-3 {
  background: linear-gradient(180deg, #5f143d, #28183f);
}

.cover-4 {
  background: linear-gradient(180deg, #7f5505, #302114);
}

.cover-5 {
  background: linear-gradient(180deg, #253e63, #0f1a2b);
}

.cover-6 {
  background: linear-gradient(180deg, #8b6413, #2d1b0a);
}

.cover-7 {
  background: linear-gradient(180deg, #a18c75, #40362b);
}

.cover-8 {
  background: linear-gradient(180deg, #cfb48b, #6a5135);
}

.platform-tag,
.status-pill,
.feed-tag,
.tiny-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.platform-tag.litnet,
.platform-tag.info {
  background: var(--blue-soft);
  color: var(--blue);
}

.platform-tag.litgorod {
  background: rgba(52, 211, 153, 0.16);
  color: #059669;
}

.platform-tag.litmarket,
.platform-tag.success {
  background: var(--green-soft);
  color: var(--green);
}

.platform-tag.purple-lite {
  background: var(--purple-soft);
  color: var(--purple);
}

.platform-tag.warning {
  background: var(--orange-soft);
  color: var(--orange);
}

.platform-tag.cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.status-pill.ok,
.feed-tag.analytics {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.pause,
.feed-tag.system {
  background: #eef2f8;
  color: #687792;
}

.status-pill.done {
  background: var(--orange-soft);
  color: var(--orange);
}

.status-pill.progress,
.feed-tag.critical {
  background: var(--red-soft);
  color: var(--red);
}

.sparkline {
  display: inline-block;
  width: 74px;
  height: 22px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.sparkline.blue {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 22'%3E%3Cpath d='M2 18C10 16 12 8 20 10s10-4 18-2 10-6 18-4 10-8 16-2' fill='none' stroke='%232f66ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.sparkline.red {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 22'%3E%3Cpath d='M2 8C10 6 14 18 22 16s10-8 18-6 12 8 20 10 8 0 12 2' fill='none' stroke='%23ff5c5c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.note-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 252, 255, 0.96));
}

.mini-event {
  grid-template-columns: 40px minmax(0, 1fr);
}

.split-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.split-two-wide {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
}

.donut-layout {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 6px;
}

.donut-chart {
  position: relative;
  width: 192px;
  height: 192px;
  flex: none;
  border-radius: 50%;
  background:
    conic-gradient(var(--blue) 0 56%, var(--purple) 56% 84%, #dfe6f4 84% 100%);
}

.donut-chart::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: #ffffff;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  z-index: 1;
}

.donut-center strong {
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  letter-spacing: -0.05em;
}

.donut-center span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.donut-legend {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.donut-legend div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.donut-legend strong {
  color: var(--text);
}

.donut-legend small {
  grid-column: 2 / -1;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.funnel-card,
.simple-table-card,
.templates-card,
.report-preview,
.feed-card {
  min-height: 100%;
}

.funnel-visual {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.funnel-step {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.funnel-step.blue {
  background: linear-gradient(135deg, #2f66ff, #346dff);
}

.funnel-step.indigo {
  background: linear-gradient(135deg, #567dff, #7694ff);
}

.funnel-step.violet {
  background: linear-gradient(135deg, #8c6dff, #a68eff);
}

.funnel-step.green {
  background: linear-gradient(135deg, #5ac96f, #39b85d);
}

.funnel-notes {
  display: grid;
  gap: 12px;
  padding: 14px 0 0;
  margin: 0;
  list-style: none;
}

.funnel-notes li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.funnel-notes span {
  color: var(--text);
  font-weight: 800;
}

.event-list li,
.history-row {
  display: grid;
  grid-template-columns: auto 8px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.event-list strong {
  font-size: 13px;
  font-weight: 700;
}

.event-list small {
  display: block;
  margin-top: 4px;
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.ranking-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.ranking-list b {
  height: 12px;
  display: block;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #70a1ff);
}

.funnel-list {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.funnel-list div {
  display: grid;
  grid-template-columns: 120px 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.funnel-list b {
  height: 26px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8bb1ff, #2f66ff);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.template-item {
  display: grid;
  gap: 12px;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(250, 252, 255, 0.82);
}

.template-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.template-item small {
  width: fit-content;
  margin-top: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.card-subtext {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.micro-chart {
  margin-bottom: 14px;
}

.report-kpis {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.report-kpis div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.report-kpis span {
  color: var(--muted);
}

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  display: inline-block;
  border-radius: 999px;
  background: #d6dfef;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 47, 0.18);
}

.switch.on {
  background: var(--blue);
}

.switch.on::after {
  left: 19px;
}

.tiny-badge {
  width: fit-content;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 10px;
}

.cta-box {
  display: grid;
  gap: 14px;
}

.cta-box strong {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
}

.notification-feed {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.feed-item {
  display: grid;
  grid-template-columns: 10px 40px minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 2px;
  border-bottom: 1px solid #edf1f8;
}

.feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.feed-tag,
.feed-item small,
.feed-arrow {
  white-space: nowrap;
}

.feed-item small {
  color: var(--muted-2);
  font-size: 12px;
}

.feed-arrow {
  color: #a5afbf;
  font-size: 22px;
}

.history-list {
  display: grid;
  gap: 18px;
}

.history-day {
  display: grid;
  gap: 10px;
}

.history-day > strong {
  font-size: 14px;
  font-weight: 800;
}

.history-row {
  grid-template-columns: 52px 8px 110px minmax(0, 1fr) 110px auto;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f8;
  font-size: 13px;
}

.history-row a {
  color: var(--blue);
  font-weight: 700;
}

.category-list,
.reason-list {
  display: grid;
  gap: 10px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.category-item.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.reason-list div {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f8;
}

.reason-list b {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  letter-spacing: -0.04em;
}

.arrow-list li {
  position: relative;
  padding-right: 26px;
}

.arrow-list li::after {
  content: "вЂє";
  position: absolute;
  right: 0;
  top: 0;
  color: #8e99ae;
  font-size: 22px;
}

.cohort-grid {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
}

.cohort-row {
  display: grid;
  grid-template-columns: 1.6fr repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.cohort-row span,
.cohort-row b {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.cohort-row span:first-child {
  justify-content: flex-start;
  color: var(--muted);
}

.cohort-row.header span {
  min-height: auto;
  color: var(--muted-2);
  font-weight: 700;
}

.cohort-row b {
  background: linear-gradient(135deg, rgba(47, 102, 255, 0.18), rgba(47, 102, 255, 0.76));
  color: #ffffff;
  font-weight: 700;
}

.cohort-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cohort-scale b {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(47, 102, 255, 0.18), rgba(47, 102, 255, 1));
}

.reading-funnel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
}

.reading-funnel-shape {
  display: grid;
  gap: 8px;
}

.reading-funnel-shape span {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f66ff, #9b84ff);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.reading-funnel-notes {
  display: grid;
  gap: 12px;
}

.reading-funnel-notes div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.reading-funnel-notes strong {
  font-family: "Manrope", sans-serif;
  color: var(--text);
}

.compact-chip {
  padding: 0 14px;
  cursor: pointer;
}

.card-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 38, 0.38);
  backdrop-filter: blur(6px);
}

.settings-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(720px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 24px 28px;
  background:
    radial-gradient(circle at top right, rgba(47, 102, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  border-left: 1px solid rgba(217, 225, 240, 0.9);
  box-shadow: -24px 0 60px rgba(15, 23, 47, 0.16);
  overflow-y: auto;
}

.settings-panel-head,
.settings-layout,
.settings-services,
.settings-keys,
.settings-form,
.settings-form-actions {
  display: grid;
}

.settings-panel-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.settings-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.settings-panel-head h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.settings-panel-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.settings-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.settings-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
}

.settings-sidebar,
.settings-detail,
.settings-section {
  padding: 18px;
  border: 1px solid rgba(226, 233, 245, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.settings-sidebar,
.settings-detail {
  min-height: 420px;
}

.settings-section + .settings-section {
  margin-top: 14px;
}

.settings-sidebar h3,
.settings-section .card-head h3,
.settings-detail h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.settings-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
}

.settings-group {
  display: grid;
  gap: 10px;
}

.settings-group-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.settings-service-list,
.settings-keys {
  display: grid;
  gap: 10px;
}

.settings-service-button,
.settings-key-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.settings-service-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.settings-service-button.is-active {
  border-color: rgba(47, 102, 255, 0.28);
  background: linear-gradient(180deg, #f5f8ff, #edf3ff);
}

.settings-service-button h4,
.settings-key-card h4 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.settings-service-meta,
.settings-key-meta,
.settings-key-row,
.settings-key-actions,
.settings-detail-head,
.settings-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.settings-service-button p,
.settings-key-card p,
.settings-detail-lead {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.settings-detail {
  display: grid;
  align-content: start;
  gap: 14px;
}

.settings-detail-head {
  justify-content: space-between;
  align-items: start;
}

.settings-detail-title h3 {
  margin: 0;
}

.settings-detail-title p {
  margin: 8px 0 0;
}

.settings-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f8;
  color: #5f6e88;
  font-size: 12px;
  font-weight: 700;
}

.settings-chip.connected {
  background: var(--green-soft);
  color: var(--green);
}

.settings-chip.pending {
  background: var(--orange-soft);
  color: var(--orange);
}

.settings-create {
  width: fit-content;
}

.settings-form {
  gap: 14px;
  margin-top: 14px;
}

.settings-form label {
  display: grid;
  gap: 8px;
}

.settings-form span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.settings-form input,
.settings-form select,
.settings-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #ffffff;
  padding: 13px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.settings-form textarea {
  resize: vertical;
  min-height: 92px;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
  border-color: rgba(47, 102, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(47, 102, 255, 0.1);
}

.settings-form-actions {
  gap: 10px;
}

.settings-form-actions .btn {
  width: fit-content;
}

.settings-form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-form-grid .full {
  grid-column: 1 / -1;
}

.settings-key-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.settings-key-row code {
  padding: 6px 10px;
  border-radius: 10px;
  background: #eef3fb;
  color: var(--text);
  font-size: 12px;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.settings-key-actions {
  justify-content: space-between;
}

.settings-remove {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 92, 92, 0.18);
  border-radius: 12px;
  background: #fff7f7;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.settings-empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.settings-empty.align-left {
  text-align: left;
}

.book-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.book-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 38, 0.42);
  backdrop-filter: blur(6px);
}

.book-modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(820px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  transform: translate(-50%, -50%);
  padding: 24px;
  border: 1px solid rgba(226, 233, 245, 0.92);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(47, 102, 255, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  box-shadow: 0 28px 80px rgba(15, 23, 47, 0.22);
  overflow-y: auto;
}

.busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: inherit;
  background: rgba(244, 248, 255, 0.92);
  backdrop-filter: blur(8px);
}

.busy-overlay-inline {
  position: absolute;
  inset: 0;
}

.busy-overlay-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 360px;
  padding: 26px 22px;
  border: 1px solid rgba(214, 223, 240, 0.98);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(31, 41, 84, 0.14);
  text-align: center;
}

.busy-overlay-card strong {
  color: #d92d20;
  font-size: 16px;
}

.busy-overlay-card p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.busy-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(47, 102, 255, 0.18);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.book-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.book-modal-head h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 30px;
  letter-spacing: -0.05em;
}

.book-modal-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.book-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.book-form label {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-form label > span {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.book-form input[type="url"],
.book-form input[type="text"],
.book-form input[type="time"],
.book-form select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(203, 213, 229, 0.92);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 24px rgba(15, 23, 47, 0.04);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.book-form select {
  appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.book-form input::placeholder {
  color: var(--muted-2);
  font-weight: 500;
}

.book-form input:focus,
.book-form select:focus {
  outline: none;
  border-color: rgba(47, 102, 255, 0.48);
  box-shadow:
    0 0 0 4px rgba(47, 102, 255, 0.12),
    0 12px 28px rgba(47, 102, 255, 0.12);
  transform: translateY(-1px);
}

.book-form select:disabled,
.book-form input:disabled {
  background: #f4f7fb;
  color: var(--muted-2);
  cursor: not-allowed;
  box-shadow: none;
}

.book-tracking-box {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(214, 223, 240, 0.95);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(244, 248, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.book-goals-wrap {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed rgba(47, 102, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.book-goals-head,
.book-goal-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.book-goals-head {
  justify-content: space-between;
}

.book-goals-head > span {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.book-goals-list {
  display: grid;
  gap: 8px;
}

.book-goal-row input {
  flex: 1;
}

.book-goal-row .icon-action {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 20px;
}

.book-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.book-toggle-card {
  align-items: flex-start;
}

.book-toggle-copy {
  display: grid;
  gap: 4px;
}

.book-toggle-copy strong {
  font-size: 14px;
}

.book-toggle-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.book-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.book-form .settings-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.book-form .settings-form-actions .outline-action {
  min-height: 54px;
  padding: 0 18px;
}

.settings-form-hint.is-error {
  color: var(--red);
}

.table-inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.book-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-action {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(214, 223, 240, 0.96);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.book-actions-menu {
  position: relative;
}

.book-actions-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(214, 223, 240, 0.96);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(31, 41, 84, 0.16);
}

.book-actions-popover[hidden] {
  display: none;
}

.books-table .book-actions-menu {
  isolation: isolate;
}

.books-table .book-actions-popover {
  top: auto;
  bottom: calc(100% + 10px);
}

.book-actions-item {
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.book-actions-item:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.book-actions-item.danger:hover {
  background: rgba(255, 111, 97, 0.12);
  color: var(--red);
}

.book-detail-layout {
  display: grid;
  gap: 20px;
}

[data-book-page-body] {
  position: relative;
}

.books-filters {
  align-items: stretch;
}

.filter-select-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
  height: 56px;
  padding: 0 18px 0 48px;
  border: 1px solid rgba(214, 223, 240, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(32, 56, 117, 0.06);
}

.pretty-filter {
  position: relative;
  padding-right: 16px;
  z-index: 1;
}

.pretty-filter.is-open {
  z-index: 60;
  border-color: rgba(56, 103, 255, 0.34);
  box-shadow:
    0 18px 38px rgba(32, 56, 117, 0.12),
    0 0 0 4px rgba(56, 103, 255, 0.08);
}

.filter-select-icon {
  position: absolute;
  left: 18px;
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.filter-select-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.filter-select-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-select-chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #8a97b7;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease, color 160ms ease;
}

.pretty-filter.is-open .filter-select-chevron {
  color: var(--accent);
  transform: rotate(180deg);
}

.filter-native-select {
  position: absolute;
  inset: auto;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.filter-select-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 30;
  pointer-events: auto;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(214, 223, 240, 0.98);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  box-shadow: 0 24px 48px rgba(30, 46, 92, 0.18);
  backdrop-filter: blur(14px);
}

.filter-select-popover[hidden] {
  display: none;
}

.filter-select-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #243252;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.filter-select-option:hover {
  background: rgba(56, 103, 255, 0.08);
  color: var(--accent);
}

.filter-select-option.is-selected {
  background: linear-gradient(135deg, rgba(56, 103, 255, 0.16), rgba(56, 103, 255, 0.08));
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(56, 103, 255, 0.12);
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.table-sort-button.is-active {
  color: #1740d4;
}

.table-sort-arrow {
  font-size: 11px;
  opacity: 0.8;
}

.table-wrap-fixed {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.chapter-table-wrap {
  max-height: min(62vh, 560px);
  overflow: auto;
}

.book-depth-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.book-depth-summary {
  margin-top: 18px;
}

.depth-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.depth-insight-card {
  padding: 20px;
  border: 1px solid #e7edf7;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(251, 252, 255, 0.98), rgba(245, 248, 255, 0.92));
}

.depth-insight-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.depth-insight-head .metric-label {
  display: block;
  margin-bottom: 6px;
}

.depth-insight-head .metric-value {
  display: block;
}

.depth-insight-meta {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.depth-insight-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf1f8;
}

.depth-insight-meta span {
  color: var(--muted);
  font-size: 13px;
}

.depth-insight-meta strong {
  font-size: 13px;
}

.chapter-stats-body {
  margin-top: 18px;
}

.depth-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 18px;
  align-items: start;
}

.depth-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  min-height: 100%;
  border: 1px solid #e7edf7;
  border-radius: 24px;
  background: #fbfcff;
}

.depth-panel-head h3 {
  margin: 8px 0 6px;
}

.depth-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.depth-breakdown-table td:last-child {
  width: 42%;
}

.depth-value-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.depth-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.depth-trend-positive {
  color: #18a957;
}

.depth-trend-negative {
  color: #f05c57;
}

.depth-trend-neutral {
  color: var(--muted);
}

.depth-spike-panel {
  display: grid;
  gap: 14px;
}

.depth-spike-list {
  display: grid;
  gap: 12px;
}

.depth-spike-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e8edf7;
  border-radius: 18px;
  background: #fff;
}

.depth-spike-item > div {
  display: grid;
  gap: 4px;
}

.depth-spike-item span {
  color: var(--muted);
  font-size: 13px;
}

.depth-spike-item-baseline {
  background: #f7f9fe;
}

.depth-spike-metric {
  justify-items: end;
  text-align: right;
}

.depth-spike-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.metric-card.compact {
  min-height: 0;
}

.outline-action.square {
  min-width: 44px;
  padding-left: 0;
  padding-right: 0;
}

.chapter-modal[hidden] {
  display: none !important;
}

.chapter-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
}

.chapter-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 18, 43, 0.42);
  backdrop-filter: blur(10px);
}

.chapter-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  margin: 28px auto;
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(54, 86, 158, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(17, 33, 79, 0.18);
}

.chapter-modal-panel-depth {
  width: min(1280px, calc(100vw - 40px));
}

.book-cover-image,
.book-cover-large-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.book-hero {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
}

.book-cover-large {
  width: 120px;
  height: 176px;
  border-radius: 24px;
}

.book-hero-copy h2 {
  margin: 8px 0 10px;
}

.book-hero-copy p {
  margin: 0;
  color: var(--muted-2);
  word-break: break-word;
}

.book-detail-panel {
  width: min(980px, calc(100% - 32px));
}

.book-detail-body,
.book-detail-grid {
  display: grid;
  gap: 16px;
}

.book-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.book-detail-grid .full-span {
  grid-column: 1 / -1;
}

.book-detail-meta,
.book-detail-stats {
  display: grid;
  gap: 12px;
}

.book-detail-meta div,
.book-detail-stats div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #edf1f8;
  border-radius: 14px;
  background: #fbfcff;
}

.book-detail-meta span,
.book-detail-stats span {
  color: var(--muted);
  font-size: 13px;
}

.book-detail-meta strong,
.book-detail-stats strong,
.book-detail-meta a {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.book-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.accent-action {
  border-color: rgba(47, 102, 255, 0.22);
  background: rgba(47, 102, 255, 0.08);
  color: var(--blue);
}

.metric-card-detail {
  position: relative;
}

.metric-card-copy {
  display: grid;
  gap: 8px;
}

.metric-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.metric-depth-icon {
  font-size: 16px;
  font-weight: 800;
}

.metric-depth-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.metric-depth-button {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(54, 86, 158, 0.18);
  border-radius: 10px;
  background: rgba(248, 250, 255, 0.96);
  color: var(--blue);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.metric-depth-button:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 102, 255, 0.32);
  box-shadow: 0 10px 24px rgba(47, 102, 255, 0.12);
}

.metric-depth-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-depth-button-card {
  width: 36px;
  height: 36px;
}

.metric-depth-card-value {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

.book-inline-loading {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.book-history-tools .outline-action {
  display: none;
}

.book-history-table th button[data-book-history-sort] {
  pointer-events: none;
  cursor: default;
  font-weight: 700;
}

.book-history-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.book-history-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.book-history-table th button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.history-date {
  display: grid;
  gap: 2px;
}

.history-date strong {
  font-size: 14px;
}

.history-date span {
  color: var(--muted);
  font-size: 12px;
}

.metric-stack {
  display: grid;
  gap: 2px;
}

.metric-stack strong {
  font-size: 14px;
}

.metric-stack span {
  font-size: 12px;
}

.delta-inline.positive {
  color: #18a957;
}

.delta-inline.negative {
  color: #f05c57;
}

.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
}

.history-genre-pill {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.history-genre-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1180px) {
  .depth-insight-grid,
  .depth-modal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .depth-panel,
  .depth-insight-card {
    padding: 16px;
  }

  .depth-spike-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .depth-spike-metric {
    justify-items: start;
    text-align: left;
  }
}

.genre-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f4f7ff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.genre-pill small {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.genre-delta-up,
.genre-delta-down {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.genre-delta-up {
  color: #20b15a;
}

.genre-delta-down {
  color: #ea5b4d;
}

.book-detail-log {
  display: grid;
  gap: 10px;
}

.book-detail-log p {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6f8fd;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .books-filters {
    grid-template-columns: 1fr;
  }

  .filter-select-shell {
    min-width: 0;
  }

  .book-hero {
    grid-template-columns: 1fr;
  }

  .book-cover-large {
    width: 96px;
    height: 144px;
  }

  .book-actions-popover {
    right: auto;
    left: 0;
  }

  .book-history-tools {
    align-items: flex-start;
    flex-direction: column;
  }
}

[hidden].settings-drawer {
  display: none !important;
}

[hidden].book-modal {
  display: none !important;
}

@media (max-width: 1480px) {
  .site-header {
    padding: 14px 20px;
  }

  .landing-main {
    padding: 18px 20px 28px;
  }

  .landing-hero {
    gap: 18px;
    padding: 20px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 5vw, 70px);
  }

  .hero-lead {
    font-size: 19px;
  }

  .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
  }

  .preview-shell {
    min-height: 490px;
  }

  .preview-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-stat {
    min-height: 104px;
  }

  .app-topbar {
    height: 68px;
    padding: 0 18px;
  }

  .app-content {
    padding: 14px 18px 24px;
  }

  .dashboard-grid-three {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 258px;
  }

  .metric-grid.six,
  .metric-grid.seven {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid.three,
  .metric-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .landing-hero,
  .dashboard-grid-three,
  .dashboard-grid-two-side,
  .split-two,
  .split-two-wide {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .preview-stat-grid,
  .metric-grid.three,
  .metric-grid.five,
  .metric-grid.six,
  .metric-grid.seven,
  .metric-grid.four,
  .solutions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .donut-layout,
  .reading-funnel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .action-grid,
  .template-grid {
    grid-template-columns: 1fr 1fr;
  }

  .settings-layout,
  .settings-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .app-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-head,
  .notifications-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 820px) {
  .site-header,
  .landing-main,
  .app-content,
  .app-topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing-nav {
    display: none;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .feature-strip,
  .preview-stat-grid,
  .metric-grid.three,
  .metric-grid.five,
  .metric-grid.six,
  .metric-grid.seven,
  .metric-grid.four,
  .solutions-grid,
  .template-grid,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .app-nav {
    grid-template-columns: 1fr;
  }

  .feed-item {
    grid-template-columns: 10px 40px minmax(0, 1fr);
  }

  .feed-tag,
  .feed-item small,
  .feed-arrow {
    grid-column: 3;
    justify-self: start;
  }

  .history-row {
    grid-template-columns: 1fr;
  }

  .dashboard-table th,
  .dashboard-table td {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .landing-hero {
    padding: 8px 0 14px;
  }

  .hero-preview {
    display: none;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .feature-strip {
    margin-top: 22px;
  }

  .feature-pill {
    min-height: 64px;
    padding: 12px 14px;
  }

  .ghost-action span,
  .profile-btn strong {
    display: none;
  }
}

.chart-card {
  position: relative;
}

.chart-card .card-head {
  padding-right: 56px;
}

.chart-expand-button {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
}

.chart-expand-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  width: 14px;
  height: 14px;
}

.chart-point::before {
  border-width: 2px;
}

.chart-point::after {
  inset: 4px;
}

.chart-axis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}

.chart-axis span {
  min-height: 14px;
  text-align: center;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0 !important;
}

.chart-shell {
  isolation: isolate;
}

.chart-points-overlay {
  pointer-events: none;
}

.chart-point {
  pointer-events: auto;
}

.grid-line-zero {
  stroke: rgba(15, 23, 42, 0.18);
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  border-radius: 0;
}

.busy-overlay-inline {
  position: absolute;
  inset: 0;
}

.busy-overlay[hidden],
.busy-overlay-inline[hidden] {
  display: none !important;
}

.table-inline-link {
  border-radius: 10px;
  transition:
    color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease;
}

.table-inline-link:hover,
.table-inline-link:focus-visible {
  color: #1d4ed8;
  background: rgba(47, 102, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(47, 102, 255, 0.08);
  outline: none;
}

.home-calendar-modal-panel {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
}

.home-calendar-modal .home-calendar {
  width: 100%;
}

.home-calendar-modal .home-calendar-head button {
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}

.chart-shell {
  overflow: visible;
}

.chart-flyout {
  position: absolute;
  z-index: 4;
  min-width: 220px;
  max-width: min(320px, calc(100% - 24px));
  padding: 12px 14px;
  border: 1px solid rgba(207, 218, 239, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 54px rgba(17, 33, 79, 0.18);
  backdrop-filter: blur(14px);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
}

.chart-flyout::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-right: 1px solid rgba(207, 218, 239, 0.96);
  border-bottom: 1px solid rgba(207, 218, 239, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.chart-flyout strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.chart-flyout-list {
  display: grid;
  gap: 7px;
}

.chart-flyout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.chart-flyout-row span:last-child {
  color: var(--text);
  font-weight: 800;
}

.chart-flyout.is-edge-right {
  transform: translate(calc(-100% + 34px), calc(-100% - 16px));
}

.chart-flyout.is-edge-right::after {
  left: auto;
  right: 26px;
  transform: rotate(45deg);
}

.chart-flyout.is-edge-left {
  transform: translate(-34px, calc(-100% - 16px));
}

.chart-flyout.is-edge-left::after {
  left: 26px;
  transform: rotate(45deg);
}

.book-modal {
  padding: 14px;
}

.book-modal-panel {
  position: relative;
  top: auto;
  left: auto;
  width: min(1180px, 100%);
  height: calc(100vh - 28px);
  max-height: calc(100vh - 28px);
  margin: 0 auto;
  transform: none;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(47, 102, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 255, 0.98));
}

.book-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: flex-start;
  padding: 28px 30px 20px;
  border-bottom: 1px solid rgba(221, 230, 245, 0.92);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.96));
  backdrop-filter: blur(18px);
}

.book-modal-head h2 {
  font-size: 34px;
}

.book-modal-head p {
  max-width: 760px;
  font-size: 15px;
  line-height: 1.65;
}

.book-form {
  flex: 1;
  min-height: 0;
  padding: 24px 30px 30px;
  margin-top: 0;
  overflow: auto;
  gap: 18px;
}

.book-form .settings-form-grid {
  gap: 18px;
}

.book-tracking-box {
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  border-color: rgba(196, 210, 238, 0.96);
  background:
    radial-gradient(circle at top right, rgba(47, 102, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(243, 247, 255, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 42px rgba(25, 46, 96, 0.08);
}

.book-toggle {
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(210, 222, 244, 0.96);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.book-goals-wrap {
  gap: 12px;
  padding: 18px;
  border-style: solid;
  border-color: rgba(56, 103, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.book-form .settings-form-actions {
  position: sticky;
  bottom: -30px;
  z-index: 2;
  padding: 18px 0 0;
  margin-top: auto;
  border-top: 1px solid rgba(223, 231, 245, 0.92);
  background: linear-gradient(180deg, rgba(246, 249, 255, 0), rgba(246, 249, 255, 0.98) 28%);
}

.busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(243, 247, 255, 0.94);
}
.sync-toast-host {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2200;
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.sync-toast {
  min-width: 280px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #dbe4ff;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(34, 50, 84, 0.18);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 4px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sync-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sync-toast.sync-toast-success {
  border-color: rgba(44, 178, 98, 0.28);
}

.sync-toast.sync-toast-error {
  border-color: rgba(234, 91, 77, 0.34);
}

.sync-toast.sync-toast-info {
  border-color: rgba(52, 106, 255, 0.28);
}

.sync-toast-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.sync-toast-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sync-progress-toast {
  position: relative;
  overflow: hidden;
  min-width: 320px;
  max-width: 390px;
  gap: 10px;
}

.sync-progress-glow {
  position: absolute;
  inset: -30% auto auto -10%;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(86, 140, 255, 0.22), rgba(86, 140, 255, 0));
  pointer-events: none;
}

.sync-progress-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-progress-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sync-progress-badge-info {
  background: rgba(52, 106, 255, 0.1);
  color: var(--blue);
}

.sync-progress-badge-success {
  background: rgba(44, 178, 98, 0.12);
  color: var(--green);
}

.sync-progress-badge-error {
  background: rgba(234, 91, 77, 0.12);
  color: var(--red);
}

.sync-progress-bar {
  position: relative;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: rgba(196, 208, 232, 0.34);
}

.sync-progress-bar-fill {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f66ff, #73a4ff, #2f66ff);
  background-size: 200% 100%;
  animation: syncProgressBar 1.4s linear infinite;
}

.sync-progress-steps {
  display: grid;
  gap: 8px;
}

.sync-progress-step {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sync-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(160, 174, 199, 0.72);
  box-shadow: 0 0 0 0 rgba(52, 106, 255, 0);
}

.sync-progress-step-active {
  color: var(--text);
}

.sync-progress-step-active .sync-progress-dot {
  background: var(--blue);
  animation: syncProgressPulse 1.2s ease-in-out infinite;
}

.sync-progress-step-done .sync-progress-dot {
  background: var(--green);
}

.sync-progress-step-error .sync-progress-dot {
  background: var(--red);
}

.sync-progress-label {
  line-height: 1.4;
}

@keyframes syncProgressBar {
  0% {
    transform: translateX(-10%);
    background-position: 0% 50%;
  }
  100% {
    transform: translateX(130%);
    background-position: 100% 50%;
  }
}

@keyframes syncProgressPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(52, 106, 255, 0.16);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(52, 106, 255, 0);
  }
}

[data-book-sync].is-loading {
  animation: syncButtonPulse 1.2s ease-in-out infinite;
}

@keyframes syncButtonPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(52, 106, 255, 0.18);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(52, 106, 255, 0);
  }
}

.metric-note-inline {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-select {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.dashboard-select span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-select select {
  min-height: 58px;
  width: 100%;
  padding: 0 18px;
  border: 1px solid rgba(206, 217, 237, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.dashboard-select select:focus {
  border-color: rgba(47, 102, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(47, 102, 255, 0.1);
}

.notifications-controls,
.report-create-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.notifications-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.notifications-main {
  min-width: 0;
}

.notifications-side {
  position: sticky;
  top: 24px;
}

.notification-row {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 18px;
}

.notification-row .feed-copy {
  min-width: 0;
}

.notification-row.is-unread {
  padding-left: 12px;
  padding-right: 12px;
  background: rgba(47, 102, 255, 0.04);
}

.notification-row.is-read {
  opacity: 0.86;
}

.notification-row.is-read .feed-dot {
  background: #c8d3e6;
}

.notification-row.is-unread .feed-dot {
  background: var(--blue);
}

.notification-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.notification-toggle {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(219, 228, 243, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.notification-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.notification-toggle strong {
  display: block;
  margin-bottom: 6px;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
}

.notification-toggle span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.report-history-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.danger-link {
  color: #e15757;
}

.report-note-list {
  display: grid;
  gap: 14px;
}

.report-note-list li {
  padding-right: 0;
}

.report-note-list li::after {
  display: none;
}

.report-note-list span {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.report-note-list small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .notifications-layout,
  .notifications-controls,
  .report-create-grid,
  .notification-settings-grid {
    grid-template-columns: 1fr;
  }

  .notifications-side {
    position: static;
  }
}

@media (max-width: 1520px) and (min-width: 1101px) {
  .dashboard-shell {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .sidebar {
    gap: 18px;
    padding: 14px 12px;
  }

  .app-nav a,
  .ghost-action,
  .profile-btn strong {
    font-size: 14px;
  }

  .app-topbar {
    height: 68px;
    padding: 0 20px;
  }

  .app-content {
    max-width: 1360px;
    padding: 16px 18px 24px;
  }

  .page-head {
    margin-bottom: 14px;
  }

  .page-head h1 {
    font-size: clamp(24px, 2.4vw, 31px);
  }

  .page-head p,
  .card-subtitle {
    font-size: 14px;
  }

  .filters-row,
  .toolbar-row {
    gap: 10px;
    margin-bottom: 14px;
  }

  .metric-card {
    min-height: 102px;
    padding: 14px;
  }
}

.settings-panel {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(1430px, calc(100% - 64px));
  height: auto;
  max-height: calc(100vh - 56px);
  transform: translate(-50%, -50%);
  gap: 18px;
  padding: 34px;
  border: 1px solid rgba(226, 233, 245, 0.96);
  border-radius: 34px;
  background:
    radial-gradient(circle at top center, rgba(47, 102, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
  box-shadow: 0 34px 90px rgba(15, 23, 47, 0.24);
}

.settings-panel-head h2 {
  font-size: 48px;
  letter-spacing: -0.06em;
}

.settings-panel-head p {
  max-width: 720px;
  font-size: 16px;
}

.settings-layout {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 26px;
}

.settings-sidebar,
.settings-detail {
  min-height: 640px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
}

.settings-group {
  gap: 14px;
}

.settings-service-list,
.settings-keys {
  gap: 14px;
}

.settings-service-button,
.settings-key-card,
.settings-section {
  border-radius: 24px;
}

.settings-service-button {
  padding: 18px;
  border-color: rgba(222, 230, 244, 0.96);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.settings-service-button.is-active {
  border-color: rgba(47, 102, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 40px rgba(47, 102, 255, 0.08);
}

.settings-service-button h4,
.settings-key-card h4,
.settings-detail-title h3 {
  font-size: 16px;
}

.settings-detail-head {
  gap: 16px;
}

.settings-detail-lead {
  max-width: 620px;
  font-size: 15px;
}

.settings-form-grid {
  gap: 14px;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
  min-height: 56px;
  border-radius: 18px;
  font-size: 15px;
}

.settings-key-row {
  gap: 10px;
}

.settings-key-row code {
  padding: 8px 12px;
  border-radius: 12px;
}

.book-modal-panel {
  width: min(1024px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  padding: 24px 26px 24px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top center, rgba(47, 102, 255, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 255, 0.98));
  box-shadow: 0 34px 90px rgba(15, 23, 47, 0.22);
}

.book-modal-head {
  gap: 16px;
  padding-bottom: 2px;
}

.book-modal-head h2 {
  font-size: 42px;
  line-height: 0.95;
}

.book-modal-head p {
  max-width: 760px;
  font-size: 15px;
}

.book-form {
  gap: 18px;
  margin-top: 18px;
}

.book-form .settings-form-grid {
  padding: 20px;
  border: 1px solid rgba(222, 230, 244, 0.98);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
}

.book-form label {
  gap: 12px;
}

.book-form label > span {
  font-size: 14px;
}

.book-form input[type="url"],
.book-form input[type="text"],
.book-form input[type="time"],
.book-form select {
  min-height: 56px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 15px;
}

.book-tracking-box {
  gap: 14px;
  padding: 18px 20px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(251, 252, 255, 0.98), rgba(245, 249, 255, 0.98));
}

.book-toggle {
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
}

.book-toggle span {
  display: grid;
  gap: 6px;
}

.book-toggle small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.book-goals-wrap {
  padding: 20px;
  border: 1px solid rgba(221, 229, 243, 0.94);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
}

.book-goals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.book-goals-list {
  display: grid;
  gap: 12px;
}

.book-goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.book-form .settings-form-actions {
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(226, 233, 245, 0.92);
}

.book-form .settings-form-actions .btn,
.book-form .settings-form-actions .outline-action {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
}

@media (max-width: 1100px) {
  .settings-panel {
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
    padding: 24px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-sidebar,
  .settings-detail {
    min-height: auto;
  }

  .book-modal-panel {
    width: calc(100% - 20px);
    padding: 22px 20px 20px;
  }

  .book-modal-head h2 {
    font-size: 30px;
  }

  .book-modal-head p {
    font-size: 15px;
  }

  .book-form .settings-form-grid {
    padding: 18px;
  }
}


.settings-nav-card {
  width: 100%;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px 16px;
  border: 1px solid rgba(223, 231, 244, 0.94);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.settings-nav-card:hover,
.settings-nav-card.is-active {
  border-color: rgba(53, 102, 255, 0.26);
  box-shadow: 0 18px 40px rgba(47, 102, 255, 0.1);
  transform: translateY(-1px);
}

.settings-nav-icon,
.settings-service-icon {
  display: grid;
  place-items: center;
  border-radius: 20px;
}

.settings-nav-icon {
  width: 58px;
  height: 58px;
  background: linear-gradient(180deg, #eef3ff, #e8efff);
}

.settings-service-icon {
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  background: linear-gradient(180deg, #f6f4ff, #f0ebff);
}

.settings-nav-icon svg,
.settings-service-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-nav-copy,
.settings-overview-copy {
  display: grid;
  gap: 8px;
}

.settings-nav-copy strong,
.settings-overview-copy h4 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #12203f;
}

.settings-nav-copy span,
.settings-overview-copy p {
  margin: 0;
  color: #6e7f9e;
  font-size: 13px;
  line-height: 1.55;
}

.settings-overview-section {
  min-height: 100%;
}

.settings-detail-head-overview {
  margin-bottom: 18px;
}

.settings-overview-grid {
  display: grid;
  gap: 14px;
}

.settings-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(223, 231, 244, 0.96);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 255, 0.98));
}

.settings-overview-copy {
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
}

.settings-overview-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.settings-open-service {
  min-width: 156px;
  min-height: 52px;
  border-radius: 16px;
}

.settings-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6e7f9e;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.settings-back-link:hover {
  color: var(--blue);
}

.settings-icon-literary svg,
.settings-icon-litnet svg {
  stroke: #3163ff;
}

.settings-icon-api svg,
.settings-icon-yandex_direct svg,
.settings-icon-vk_ads svg {
  stroke: #64749a;
}

.settings-icon-system svg,
.settings-icon-system_preferences svg {
  stroke: #7a86a6;
}

.settings-icon-litgorod {
  background: linear-gradient(180deg, #ffeef8, #f9e4f1);
}

.settings-icon-litgorod svg {
  stroke: #d92c93;
}

.settings-icon-author_today {
  background: linear-gradient(180deg, #fff5ec, #fff0e1);
}

.settings-icon-author_today svg {
  stroke: #ff8a00;
}

.settings-icon-litmarket {
  background: linear-gradient(180deg, #ebfbf1, #e1f7ea);
}

.settings-icon-litmarket svg {
  stroke: #18b45d;
}

.settings-icon-yandex_direct {
  background: linear-gradient(180deg, #fff1ef, #ffe5e1);
}

.settings-icon-yandex_direct svg {
  stroke: #ff6b57;
}

.settings-icon-vk_ads {
  background: linear-gradient(180deg, #eef5ff, #e6efff);
}

.settings-icon-vk_ads svg {
  stroke: #2d73ff;
}

.settings-icon-system_preferences {
  background: linear-gradient(180deg, #f2f4f9, #ebeff7);
}

.depth-modal-grid-single-summary {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.depth-panel-placeholder {
  display: grid;
  min-height: 100%;
}

.depth-placeholder-box {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px dashed rgba(164, 179, 209, 0.78);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(247, 249, 255, 0.96), rgba(242, 246, 255, 0.96));
  color: #6b7a99;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1100px) {
  .settings-nav-card,
  .settings-overview-card,
  .settings-overview-copy {
    grid-template-columns: 1fr;
  }

  .settings-overview-actions {
    justify-items: stretch;
  }

  .settings-open-service {
    width: 100%;
  }

  .depth-modal-grid-single-summary {
    grid-template-columns: 1fr;
  }
}


.settings-panel {
  width: min(1380px, calc(100% - 56px));
  padding: 28px 28px 26px;
}

.settings-panel-head h2 {
  font-size: 42px;
}

.settings-panel-head p {
  font-size: 15px;
}

.settings-layout {
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 18px;
}

.settings-sidebar,
.settings-detail {
  padding: 22px;
}

.settings-nav-card {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 14px 16px;
}

.settings-nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.settings-nav-icon svg,
.settings-service-icon svg {
  width: 24px;
  height: 24px;
}

.settings-nav-copy {
  gap: 0;
}

.settings-nav-copy strong {
  font-size: 15px;
  line-height: 1.24;
}

.settings-overview-card {
  padding: 14px 16px;
  min-height: 100px;
}

.settings-overview-copy {
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 14px;
}

.settings-service-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
}

.settings-overview-copy h4 {
  font-size: 16px;
}

.settings-overview-copy p {
  font-size: 12px;
}

.settings-overview-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-open-service {
  min-width: 144px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(49, 99, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
  color: #3163ff;
  font-size: 15px;
  font-weight: 800;
}

.settings-open-service:hover {
  background: linear-gradient(180deg, rgba(246, 249, 255, 1), rgba(238, 244, 255, 1));
}

.settings-detail-title h3 {
  font-size: 16px;
}

.settings-detail-lead {
  font-size: 13px;
}

.chapter-modal-panel-depth {
  width: min(1210px, calc(100vw - 36px));
}

.chapter-modal-panel-depth .book-modal-head h2 {
  font-size: clamp(34px, 3.8vw, 46px);
  letter-spacing: -0.05em;
}

.chapter-modal-panel-depth .book-modal-head p {
  font-size: 14px;
}

.chapter-modal-panel-depth .depth-panel {
  padding: 18px;
}


.settings-overview-section {
  padding: 14px 16px;
}

.settings-detail-head-overview {
  margin-bottom: 12px;
}

.settings-detail-head-overview .settings-detail-title h3 {
  font-size: 15px;
}

.settings-detail-head-overview .settings-detail-lead {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.settings-overview-grid {
  gap: 10px;
}

.settings-overview-card {
  min-height: 78px;
  padding: 12px 16px;
  gap: 14px;
}

.settings-overview-copy {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
}

.settings-service-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
}

.settings-service-icon svg {
  width: 20px;
  height: 20px;
}

.settings-overview-copy h4 {
  font-size: 14px;
  line-height: 1.2;
}

.settings-overview-copy p {
  font-size: 11px;
  line-height: 1.25;
}

.settings-open-service {
  min-width: 128px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 14px;
}

.book-form-hero-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(210, 222, 244, 0.92);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(47, 102, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 24px 54px rgba(29, 52, 110, 0.08);
  overflow: hidden;
}

.book-form-hero-card::after {
  content: "";
  position: absolute;
  inset: auto -18% -72% 44%;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(111, 146, 255, 0.18), transparent 72%);
  pointer-events: none;
  animation: bookHeroPulse 7s ease-in-out infinite;
}

.book-form-hero-badge {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.book-form-hero-badge-icon,
.book-section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f66ff;
}

.book-form-hero-badge-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(236, 241, 255, 0.98), rgba(224, 233, 255, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 26px rgba(47, 102, 255, 0.16);
  animation: bookIconFloat 4.6s ease-in-out infinite;
}

.book-form-hero-badge-icon svg,
.book-section-title-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.book-form-hero-badge strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.book-form-hero-badge p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.book-form-hero-pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.book-form-hero-pills span {
  padding: 8px 12px;
  border: 1px solid rgba(195, 210, 244, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #3154c6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.book-primary-grid,
#book-tracking-fields {
  position: relative;
  overflow: hidden;
}

.book-primary-grid::before,
#book-tracking-fields::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(47, 102, 255, 0.03), transparent 36%);
  pointer-events: none;
}

.book-section-title {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(222, 230, 245, 0.96);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
}

.book-section-title-tight {
  margin-bottom: 2px;
}

.book-section-title-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(237, 242, 255, 0.98), rgba(227, 235, 255, 0.92));
}

.book-section-title strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.book-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.book-field {
  position: relative;
  z-index: 1;
}

.book-field input,
.book-field select {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 255, 0.98));
}

.book-link-field input {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.book-campaign-field .settings-form-hint {
  margin: 0;
}

.book-tracking-box {
  position: relative;
  overflow: hidden;
}

.book-tracking-box::after {
  content: "";
  position: absolute;
  inset: auto -12% -18% auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(47, 102, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.book-toggle {
  position: relative;
  z-index: 1;
}

.book-toggle input {
  width: 22px;
  height: 22px;
  accent-color: #2f66ff;
}

.book-toggle span {
  display: grid;
  gap: 6px;
}

.book-toggle small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

@keyframes bookHeroPulse {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate3d(-12px, -10px, 0) scale(1.06);
    opacity: 1;
  }
}

@keyframes bookIconFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@media (max-width: 900px) {
  .book-form-hero-card {
    padding: 18px;
    border-radius: 24px;
  }

  .book-form-hero-badge {
    grid-template-columns: 1fr;
  }

  .book-section-title {
    grid-template-columns: 1fr;
  }
}



.book-form-hero-card {
  display: none;
}

.book-modal {
  padding: 8px;
}

.book-modal-panel {
  width: min(920px, 100%);
  height: calc(100vh - 16px);
  max-height: calc(100vh - 16px);
  border-radius: 24px;
}

.book-modal-head {
  padding: 18px 20px 12px;
}

.book-modal-head h2 {
  font-size: 28px;
  line-height: 1.02;
}

.book-modal-head p {
  font-size: 14px;
  line-height: 1.45;
}

.book-form {
  padding: 14px 20px 20px;
  gap: 14px;
}

.book-form .settings-form-grid {
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
}

.book-section-title {
  padding: 10px 12px;
  border-radius: 18px;
}

.book-section-title strong {
  font-size: 13px;
}

.book-section-title p {
  display: none;
}

.book-tracking-box {
  gap: 12px;
  padding: 14px 16px;
  border-radius: 22px;
}

.book-toggle {
  padding: 10px 12px;
  border-radius: 16px;
}

.book-goals-wrap[hidden] {
  display: none !important;
}

.sync-progress-toast {
  min-width: 260px;
  max-width: 320px;
  gap: 8px;
}

.sync-progress-head-compact {
  align-items: center;
}

.sync-progress-head-compact .sync-toast-title {
  font-size: 14px;
}

.sync-progress-head-compact .sync-progress-badge {
  min-height: 24px;
  padding: 0 8px;
  font-size: 10px;
}

.sync-progress-toast .sync-toast-text {
  font-size: 12px;
}

.sync-progress-toast .sync-progress-glow,
.sync-progress-toast .sync-progress-steps {
  display: none;
}


.book-modal-panel-wide {
  width: min(1220px, calc(100vw - 20px));
  height: min(840px, calc(100vh - 16px));
  max-height: calc(100vh - 16px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.book-modal-head-compact {
  padding: 14px 20px 10px;
}

.book-modal-head-compact h2 {
  font-size: clamp(20px, 2.6vw, 38px);
  line-height: 1.02;
}

.book-modal-head-compact p {
  max-width: 700px;
  font-size: 14px;
}

.book-form-split {
  min-height: 0;
  padding: 0 20px 16px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.book-form-columns {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 12px;
  align-items: start;
  overflow: hidden;
}

.book-grid-panel {
  min-height: 0;
  align-content: start;
  padding: 14px;
  border-radius: 22px;
  overflow: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,249,255,0.98) 100%);
}

.book-grid-panel::-webkit-scrollbar {
  width: 10px;
}

.book-grid-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(74, 112, 255, 0.26);
  border: 2px solid rgba(255,255,255,0.8);
}

.book-section-title-solid {
  min-height: 64px;
  background: linear-gradient(135deg, rgba(237,243,255,0.96), rgba(255,255,255,0.98));
  border: 1px solid rgba(208, 222, 247, 0.9);
}

.book-section-title-solid strong {
  font-size: 14px;
}

.book-field {
  gap: 8px;
}

.book-field > span {
  font-size: 12px;
  font-weight: 700;
}

.book-form .book-field input[type="url"],
.book-form .book-field input[type="text"],
.book-form .book-field select {
  min-height: 50px;
  font-size: 14px;
}

.book-link-field {
  grid-column: 1 / -1;
}

.book-toggle-card {
  min-height: 82px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(237,243,255,0.94), rgba(255,255,255,0.98));
  border: 1px solid rgba(208, 222, 247, 0.9);
}

.book-toggle-card span {
  display: grid;
  gap: 6px;
}

.book-toggle-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.book-tracking-grid-shell {
  gap: 14px;
}

.book-tracking-fields-grid {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.book-goals-wrap {
  padding: 14px;
  border-radius: 20px;
  background: rgba(247, 249, 254, 0.88);
}

.book-form-actions-sticky {
  margin-top: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(217, 225, 240, 0.88);
  background: rgba(255,255,255,0.92);
}

.book-form-actions-sticky .settings-form-hint {
  margin-left: auto;
}

@media (max-width: 1180px) {
  .book-modal-panel-wide {
    width: min(1020px, calc(100vw - 14px));
    height: min(820px, calc(100vh - 12px));
    max-height: calc(100vh - 12px);
  }

  .book-form-columns {
    grid-template-columns: minmax(0, 1fr);
    overflow: auto;
    padding-right: 2px;
  }

  .book-grid-panel {
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .book-modal {
    padding: 4px;
  }

  .book-modal-panel-wide {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 22px;
  }

  .book-modal-head-compact {
    padding: 16px 18px 12px;
  }

  .book-form-split {
    padding: 0 18px 18px;
  }

  .book-form-actions-sticky {
    display: grid;
    gap: 10px;
  }

  .book-form-actions-sticky .settings-form-hint {
    margin-left: 0;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08111f;
  --surface: rgba(11, 19, 34, 0.9);
  --surface-solid: #0f1a2d;
  --surface-soft: #15233b;
  --line: #22324d;
  --line-strong: #314361;
  --text: #eef4ff;
  --muted: #9cb0d2;
  --muted-2: #8095bc;
  --blue: #5d8cff;
  --blue-soft: rgba(93, 140, 255, 0.18);
  --blue-deep: #7aa1ff;
  --green-soft: rgba(34, 179, 90, 0.18);
  --purple-soft: rgba(128, 84, 255, 0.18);
  --orange-soft: rgba(255, 147, 47, 0.18);
  --red-soft: rgba(255, 92, 92, 0.18);
  --pink-soft: rgba(255, 94, 168, 0.18);
  --yellow-soft: rgba(247, 187, 29, 0.18);
  --cyan-soft: rgba(43, 184, 214, 0.18);
  --gray-soft: #17253c;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 10% 12%, rgba(93, 140, 255, 0.16), transparent 26%),
    radial-gradient(circle at 82% 16%, rgba(123, 76, 227, 0.18), transparent 22%),
    linear-gradient(180deg, #07101d 0%, #0b1526 100%);
}

:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .app-topbar {
  background: rgba(10, 17, 30, 0.84);
  border-color: rgba(46, 63, 92, 0.88);
}

:root[data-theme="dark"] .section-card,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .filter-select-shell,
:root[data-theme="dark"] .compact-chip,
:root[data-theme="dark"] .outline-action,
:root[data-theme="dark"] .book-actions-popover,
:root[data-theme="dark"] .sync-toast,
:root[data-theme="dark"] .busy-overlay-card,
:root[data-theme="dark"] .calendar-modal-panel,
:root[data-theme="dark"] .home-chart-modal-panel,
:root[data-theme="dark"] .depth-placeholder-box {
  background: linear-gradient(180deg, rgba(18, 28, 45, 0.98), rgba(11, 19, 34, 0.98));
  border-color: rgba(46, 63, 92, 0.9);
  color: var(--text);
}

:root[data-theme="dark"] .settings-panel,
:root[data-theme="dark"] .settings-sidebar,
:root[data-theme="dark"] .settings-detail,
:root[data-theme="dark"] .settings-section,
:root[data-theme="dark"] .settings-nav-card,
:root[data-theme="dark"] .settings-overview-card,
:root[data-theme="dark"] .book-modal-panel,
:root[data-theme="dark"] .book-grid-panel,
:root[data-theme="dark"] .book-section-title-solid,
:root[data-theme="dark"] .book-toggle-card,
:root[data-theme="dark"] .book-goals-wrap,
:root[data-theme="dark"] .book-form-actions-sticky {
  background: linear-gradient(180deg, rgba(18, 28, 45, 0.98), rgba(11, 19, 34, 0.98));
  border-color: rgba(46, 63, 92, 0.9);
}

:root[data-theme="dark"] .book-modal-backdrop,
:root[data-theme="dark"] .settings-backdrop {
  background: rgba(3, 8, 16, 0.68);
}

:root[data-theme="dark"] .dashboard-table th,
:root[data-theme="dark"] .dashboard-table td {
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .settings-nav-copy strong,
:root[data-theme="dark"] .settings-overview-copy h4,
.settings-nav-copy strong,
.settings-overview-copy h4 {
  color: var(--text);
}

:root[data-theme="dark"] .settings-nav-copy span,
:root[data-theme="dark"] .settings-overview-copy p,
:root[data-theme="dark"] .settings-back-link,
.settings-nav-copy span,
.settings-overview-copy p,
.settings-back-link {
  color: var(--muted);
}

.settings-panel {
  width: min(1280px, calc(100% - 40px));
  max-height: min(820px, calc(100vh - 24px));
  padding: 24px;
  gap: 14px;
  overflow: hidden;
}

.settings-panel-head {
  gap: 14px;
}

.settings-panel-head h2 {
  font-size: 36px;
}

.settings-panel-head p {
  max-width: 640px;
  margin-top: 8px;
  font-size: 14px;
}

.settings-layout {
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 16px;
}

.settings-sidebar,
.settings-detail {
  min-height: 0;
  padding: 18px;
}

.settings-sidebar {
  gap: 10px;
}

.settings-detail {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: hidden;
}

.settings-section {
  padding: 16px;
  border-radius: 20px;
}

.settings-section + .settings-section {
  margin-top: 0;
}

.settings-nav-card {
  min-height: 76px;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 20px;
}

.settings-nav-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.settings-nav-copy strong {
  font-size: 14px;
  line-height: 1.28;
}

.settings-detail-head-overview {
  margin-bottom: 12px;
}

.settings-overview-grid {
  gap: 12px;
}

.settings-overview-card {
  min-height: 84px;
  padding: 12px 14px;
  border-radius: 20px;
}

.settings-overview-copy {
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
}

.settings-service-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.settings-overview-copy h4 {
  font-size: 15px;
}

.settings-overview-copy p {
  font-size: 12px;
  line-height: 1.45;
}

.settings-open-service {
  min-width: 132px;
  min-height: 46px;
  border-radius: 15px;
}

.settings-system-head {
  min-height: 0;
}

.settings-system-form {
  gap: 16px;
}

.settings-form-grid-system {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-form-grid-system .full {
  grid-column: 1 / -1;
}

.settings-system-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.settings-form-actions-system {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.app-content {
  max-width: none;
  width: 100%;
}

.dashboard-table th,
.dashboard-table td {
  border-bottom: 1px solid var(--line);
}

.view[data-view="books"] .dashboard-grid-two-side {
  grid-template-columns: minmax(0, 1fr);
}

.books-table-card,
.books-table-wrap {
  width: 100%;
}

.books-table {
  width: 100%;
  min-width: 1240px;
  table-layout: fixed;
}

.books-table th,
.books-table td {
  padding: 11px 10px;
}

.books-table th:first-child,
.books-table td:first-child {
  width: 280px;
  min-width: 280px;
}

.books-table th:nth-child(2),
.books-table td:nth-child(2) {
  width: 140px;
}

.books-table th:nth-child(10),
.books-table td:nth-child(10) {
  width: 126px;
}

.books-table th:nth-child(11),
.books-table td:nth-child(11) {
  width: 128px;
}

.books-table th:last-child,
.books-table td:last-child {
  width: 64px;
}

.books-table td:first-child {
  white-space: normal;
}

.books-table .book-cell {
  align-items: flex-start;
}

.books-table .book-cell > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.books-table .book-cell strong,
.books-table .book-cell small {
  white-space: normal;
  line-height: 1.35;
}

.book-modal-panel-single {
  width: min(860px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100vh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.book-modal-head-compact {
  padding: 16px 20px 12px;
}

.book-modal-head-compact h2 {
  font-size: clamp(22px, 3.2vw, 34px);
}

.book-modal-head-compact p {
  max-width: 100%;
  font-size: 13px;
}

.book-form-single {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 0 20px 18px;
}

.book-form-scroll {
  min-height: 0;
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.book-form-scroll::-webkit-scrollbar {
  width: 10px;
}

.book-form-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(74, 112, 255, 0.28);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.book-form-single .settings-form-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.book-grid-panel-single {
  padding: 16px;
  overflow: visible;
}

.book-grid-panel-single .full {
  grid-column: 1;
}

.book-section-title-solid {
  min-height: 58px;
}

.book-form .book-field input[type="url"],
.book-form .book-field input[type="text"],
.book-form .book-field select {
  min-height: 48px;
  font-size: 14px;
}

.book-toggle-card {
  min-height: 68px;
}

.book-toggle-card span {
  gap: 0;
}

.book-tracking-fields-grid {
  padding: 0;
}

.book-form-single .book-form-actions-sticky {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(217, 225, 240, 0.88);
}

.book-form-single .settings-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.book-form-single .settings-form-actions .settings-form-hint {
  margin-left: 0;
  flex: 1 1 280px;
}

@media (max-width: 1100px) {
  .settings-panel {
    overflow-y: auto;
  }

  .settings-form-grid-system {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .book-modal-panel-single {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 22px;
  }

  .book-form-single {
    padding: 0 18px 18px;
  }

  .book-form-scroll {
    padding-right: 2px;
  }
}


.book-create-shell {
  display: grid;
  gap: 24px;
}

.book-create-head {
  align-items: end;
}

.book-create-mount {
  min-width: 0;
}

.book-create-placeholder {
  min-height: 280px;
  display: grid;
  align-items: center;
}

.book-create-page {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(213, 223, 243, 0.96);
  border-radius: 36px;
  background:
    radial-gradient(circle at top right, rgba(125, 157, 255, 0.18), transparent 34%),
    radial-gradient(circle at left center, rgba(102, 177, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 28px 64px rgba(27, 51, 104, 0.10);
}

.book-create-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 42%),
    linear-gradient(315deg, rgba(87, 123, 255, 0.08), transparent 35%);
  pointer-events: none;
}

.book-create-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
}

.book-create-header {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(219, 228, 245, 0.94);
}

.book-create-header h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.96;
}

.book-create-header p {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.book-create-form-wrap {
  display: grid;
  gap: 18px;
}

.book-create-form-wrap .book-form {
  display: grid;
  gap: 18px;
}

.book-create-form-wrap .book-form-scroll {
  overflow: visible;
  padding-right: 0;
}

.book-create-form-wrap .book-grid-panel-single {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
}

.book-create-form-wrap .book-section-title-solid {
  min-height: 64px;
}

.book-create-form-wrap .book-field span {
  font-size: 15px;
}

.book-create-form-wrap .book-form .book-field input[type="url"],
.book-create-form-wrap .book-form .book-field input[type="text"],
.book-create-form-wrap .book-form .book-field select {
  min-height: 56px;
  font-size: 15px;
}

.book-create-form-wrap .book-toggle-card {
  min-height: 76px;
}

.book-create-form-wrap .book-form-actions-sticky {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 4px;
  padding: 18px 0 0;
  background: linear-gradient(180deg, rgba(246, 249, 255, 0), rgba(246, 249, 255, 0.98) 22%);
}

.book-create-form-wrap .settings-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.book-create-form-wrap .settings-form-actions .settings-form-hint {
  flex: 1 1 320px;
  margin-left: 0;
}

:root[data-theme="dark"] .book-create-page {
  border-color: rgba(107, 132, 182, 0.34);
  background:
    radial-gradient(circle at top right, rgba(76, 108, 214, 0.20), transparent 34%),
    radial-gradient(circle at left center, rgba(72, 137, 198, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(13, 22, 44, 0.98), rgba(9, 17, 34, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 28px 64px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .book-create-header {
  border-bottom-color: rgba(85, 106, 147, 0.42);
}

:root[data-theme="dark"] .book-create-form-wrap .book-grid-panel-single {
  background: rgba(18, 29, 57, 0.82);
}

:root[data-theme="dark"] .book-create-form-wrap .book-form-actions-sticky {
  background: linear-gradient(180deg, rgba(10, 18, 34, 0), rgba(10, 18, 34, 0.98) 22%);
}

@media (max-width: 980px) {
  .book-create-page {
    padding: 22px;
    border-radius: 28px;
  }

  .book-create-header h2 {
    font-size: clamp(28px, 6vw, 44px);
  }
}

@media (max-width: 720px) {
  .book-create-page {
    padding: 18px;
    border-radius: 24px;
  }

  .book-create-form-wrap .book-grid-panel-single {
    padding: 18px;
  }
}


.profile-menu {
  position: absolute;
  z-index: 2400;
  width: 180px;
  padding: 8px;
  border: 1px solid rgba(213, 223, 243, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px rgba(27, 42, 84, 0.16);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.profile-menu.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.profile-menu-action {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
}

.profile-menu-action:hover {
  background: rgba(61, 102, 255, 0.08);
}

:root[data-theme="dark"] .profile-menu {
  border-color: rgba(86, 107, 147, 0.44);
  background: rgba(13, 22, 44, 0.98);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .profile-menu-action:hover {
  background: rgba(92, 126, 255, 0.14);
}


.home-chart-detail-layout {
  display: grid;
  gap: 24px;
}

.home-chart-detail-shell {
  display: grid;
  gap: 20px;
}

.home-chart-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-chart-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-chart-detail-pill {
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(213, 223, 243, 0.96);
  background: rgba(246, 249, 255, 0.92);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.home-chart-detail-pill strong {
  color: var(--text);
}

.home-chart-detail-series {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-series-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(206, 217, 240, 0.96);
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.chart-series-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(61, 102, 255, 0.34);
}

.chart-series-chip.is-active {
  color: var(--text);
  border-color: rgba(61, 102, 255, 0.42);
  background: rgba(238, 243, 255, 0.98);
  box-shadow: 0 12px 24px rgba(61, 102, 255, 0.12);
}

.chart-series-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(61, 102, 255, 0.08);
}

.home-chart-detail-stage {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(213, 223, 243, 0.96);
  background:
    radial-gradient(circle at top right, rgba(61, 102, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.96));
}

.home-chart-detail-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 24px;
}

.home-chart-detail-scroll::-webkit-scrollbar {
  height: 12px;
}

.home-chart-detail-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(61, 102, 255, 0.72), rgba(124, 58, 237, 0.72));
}

.home-chart-detail-scroll::-webkit-scrollbar-track {
  background: rgba(221, 229, 245, 0.6);
  border-radius: 999px;
}

.home-chart-detail-chart {
  min-width: 1080px;
}

.home-chart-detail-chart .chart-shell.is-modal {
  min-height: 420px;
}

.home-chart-mini-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.home-chart-mini-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(213, 223, 243, 0.96);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(35, 55, 105, 0.08);
}

.home-chart-mini-card h3 {
  margin: 0;
  font-size: 18px;
}

.home-chart-mini-card p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.home-chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(14px, 1fr);
  align-items: end;
  gap: 8px;
  min-height: 132px;
}

.home-chart-bar-col {
  display: grid;
  align-items: end;
  gap: 8px;
}

.home-chart-bar {
  border-radius: 16px 16px 8px 8px;
  min-height: 10px;
  background: linear-gradient(180deg, var(--bar-color, rgba(61, 102, 255, 0.88)), rgba(255, 255, 255, 0.16));
  box-shadow: inset 0 -10px 24px rgba(255, 255, 255, 0.2), 0 10px 26px color-mix(in srgb, var(--bar-color, #3d66ff) 24%, transparent);
}

.home-chart-bar-label {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.instruction-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.instruction-card {
  position: relative;
  overflow: hidden;
}

.instruction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.48), transparent 36%);
  pointer-events: none;
}

.instruction-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.instruction-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.instruction-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.instruction-card.accent-blue .instruction-card-icon {
  background: rgba(61, 102, 255, 0.12);
  color: #2d57f1;
}

.instruction-card.accent-green .instruction-card-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #0f9f6e;
}

.instruction-card.accent-orange .instruction-card-icon {
  background: rgba(249, 115, 22, 0.12);
  color: #e26d12;
}

.instruction-card.accent-violet .instruction-card-icon {
  background: rgba(124, 58, 237, 0.12);
  color: #6d33d6;
}

.profile-menu {
  width: max-content;
  min-width: 220px;
}

.profile-menu-action.danger {
  color: #d03d36;
  background: rgba(255, 239, 238, 0.82);
}

.profile-menu-action.danger:hover {
  background: rgba(255, 225, 223, 0.96);
}

:root[data-theme="dark"] .home-chart-detail-pill,
:root[data-theme="dark"] .chart-series-chip,
:root[data-theme="dark"] .home-chart-mini-card,
:root[data-theme="dark"] .instruction-card {
  border-color: rgba(86, 107, 147, 0.44);
  background: rgba(13, 22, 44, 0.92);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .chart-series-chip.is-active {
  background: rgba(24, 37, 70, 0.98);
  border-color: rgba(92, 126, 255, 0.48);
}

:root[data-theme="dark"] .home-chart-detail-stage {
  border-color: rgba(86, 107, 147, 0.44);
  background:
    radial-gradient(circle at top right, rgba(92, 126, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(13, 22, 44, 0.98), rgba(9, 17, 34, 0.98));
}

:root[data-theme="dark"] .home-chart-detail-scroll::-webkit-scrollbar-track {
  background: rgba(33, 46, 74, 0.76);
}

:root[data-theme="dark"] .profile-menu-action.danger {
  color: #ff958f;
  background: rgba(84, 26, 25, 0.42);
}

:root[data-theme="dark"] .profile-menu-action.danger:hover {
  background: rgba(116, 38, 36, 0.56);
}

@media (max-width: 900px) {
  .home-chart-detail-chart {
    min-width: 900px;
  }
}


/* chart-detail-class-fix */
.home-chart-detail-series button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(205, 217, 241, 0.96);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.home-chart-detail-series button:hover {
  transform: translateY(-1px);
  border-color: rgba(61, 102, 255, 0.36);
}

.home-chart-detail-series button.is-active {
  color: var(--text);
  border-color: rgba(61, 102, 255, 0.48);
  background: rgba(238, 243, 255, 0.98);
  box-shadow: 0 12px 24px rgba(61, 102, 255, 0.12);
}

.home-chart-detail-series-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(61, 102, 255, 0.08);
}

.home-chart-detail-mini-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.home-chart-detail-mini-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(213, 223, 243, 0.96);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(35, 55, 105, 0.08);
}

.home-chart-detail-mini-card h3 {
  margin: 0;
  font-size: 18px;
}

.home-chart-detail-mini-card p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.home-chart-detail-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(14px, 1fr);
  align-items: end;
  gap: 8px;
  min-height: 138px;
}

.home-chart-detail-bar-col {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.home-chart-detail-bar {
  position: relative;
  width: 100%;
  max-width: 24px;
  min-height: 10px;
  border-radius: 13px 13px 7px 7px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bar-color, #3d66ff) 88%, white 12%), var(--bar-color, #3d66ff));
  box-shadow: 8px 10px 20px color-mix(in srgb, var(--bar-color, #3d66ff) 24%, transparent);
  transform: skewY(-6deg);
  transform-origin: bottom center;
}

.home-chart-detail-bar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -5px;
  width: 5px;
  height: 100%;
  border-radius: 0 10px 7px 0;
  background: color-mix(in srgb, var(--bar-color, #3d66ff) 68%, #0f172a 32%);
  opacity: 0.5;
}

.home-chart-detail-bar-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.home-chart-detail-chart .chart-line {
  stroke-width: 4;
  filter: drop-shadow(0 10px 10px rgba(15, 23, 42, 0.12));
}

:root[data-theme="dark"] .home-chart-detail-series button,
:root[data-theme="dark"] .home-chart-detail-mini-card {
  border-color: rgba(86, 107, 147, 0.44);
  background: rgba(13, 22, 44, 0.92);
}

/* home-chart-enhancement-v6 */
.enhanced-chart-legend {
  gap: 18px;
  margin-bottom: 12px;
}

.enhanced-chart-legend span {
  padding: 8px 12px;
  border: 1px solid rgba(209, 220, 244, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(28, 45, 90, 0.06);
}

.enhanced-chart-legend .legend-line {
  width: 22px;
  height: 3px;
  border-radius: 999px;
}

.chart-shell.is-enhanced {
  min-height: 292px;
  padding: 0;
  overflow: visible;
  border-radius: 26px;
  background: radial-gradient(circle at 78% 8%, rgba(61, 102, 255, 0.11), transparent 28%), linear-gradient(180deg, rgba(255,255,255,0.72), rgba(246,249,255,0.32));
}

.chart-shell.is-enhanced.is-detail {
  min-height: 470px;
  background: radial-gradient(circle at 78% 8%, rgba(61, 102, 255, 0.16), transparent 31%), linear-gradient(145deg, rgba(255,255,255,0.96), rgba(240,246,255,0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 28px 70px rgba(31, 54, 107, 0.12);
}

.enhanced-chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-backplate {
  fill: rgba(255, 255, 255, 0.48);
  stroke: rgba(209, 220, 244, 0.7);
}

.chart-area-fill {
  pointer-events: none;
}

.chart-line-glow {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.14;
}

.chart-shell.is-enhanced .chart-line {
  fill: none;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 9px 10px rgba(15, 23, 42, 0.15));
}

.chart-shell.is-enhanced.is-detail .chart-line {
  stroke-width: 5;
}

.chart-point-value {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(4px);
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(23, 37, 84, 0.12);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.chart-point.is-active .chart-point-value,
.chart-point:hover .chart-point-value {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.enhanced-chart-axis {
  margin-top: 8px;
  gap: 8px;
}

.enhanced-chart-axis span {
  min-width: 34px;
  padding-top: 4px;
  font-weight: 800;
}

.enhanced-chart-axis span.is-active {
  color: #2856f0;
}

.home-chart-detail-control-card {
  position: sticky;
  top: 8px;
  z-index: 4;
  backdrop-filter: blur(18px);
}

.home-chart-detail-stage {
  position: relative;
  perspective: 1300px;
}

.home-chart-detail-stage::before {
  content: "";
  position: absolute;
  inset: 18px 22px auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(61, 102, 255, 0.18), transparent 66%);
  pointer-events: none;
}

.home-chart-detail-scroll {
  padding: 28px;
}

.home-chart-detail-chart {
  min-width: 1180px;
}

.home-chart-detail-pills {
  align-items: center;
}

.home-chart-detail-pill {
  box-shadow: 0 10px 26px rgba(30, 48, 96, 0.07);
}

.home-chart-detail-series button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.home-chart-detail-mini-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
}

.home-chart-detail-mini-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--blue) 10%, transparent), transparent 34%);
  pointer-events: none;
}

.home-chart-detail-mini-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-chart-detail-mini-head h3 {
  margin: 0;
}

.home-chart-detail-mini-value {
  position: relative;
  margin-top: 12px;
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.home-chart-detail-bar-value {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 64px;
  white-space: nowrap;
  opacity: 0.86;
}

.home-chart-detail-bars {
  position: relative;
  align-items: end;
  min-height: 176px;
  padding-top: 8px;
}

.home-chart-detail-bar {
  transform: perspective(120px) rotateX(9deg) skewY(-5deg);
}

:root[data-theme="dark"] .enhanced-chart-legend span,
:root[data-theme="dark"] .chart-point-value,
:root[data-theme="dark"] .chart-backplate,
:root[data-theme="dark"] .home-chart-detail-control-card {
  border-color: rgba(86, 107, 147, 0.44);
  background: rgba(13, 22, 44, 0.9);
}

:root[data-theme="dark"] .chart-shell.is-enhanced,
:root[data-theme="dark"] .chart-shell.is-enhanced.is-detail {
  background: radial-gradient(circle at 78% 8%, rgba(92, 126, 255, 0.16), transparent 30%), linear-gradient(145deg, rgba(14, 23, 45, 0.98), rgba(8, 15, 31, 0.92));
}

:root[data-theme="dark"] .chart-backplate {
  fill: rgba(15, 23, 42, 0.5);
  stroke: rgba(86, 107, 147, 0.42);
}


.brand-name-glow {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  background: linear-gradient(135deg, #0f172f 0%, #2f66ff 38%, #7b4ce3 72%, #11b5d9 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandGradientShift 8s ease-in-out infinite;
}

.hero-brand-title {
  display: inline-block;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.06em;
  animation: heroBrandFloat 5.6s ease-in-out infinite;
}

.hero-brand-title + .hero-brand-title {
  margin-left: 0.08em;
}

.hero-brand-title-accent {
  background: linear-gradient(135deg, #2f66ff 0%, #7b4ce3 58%, #11b5d9 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation-delay: 0.4s;
  animation-duration: 6.4s;
}

@keyframes brandGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes heroBrandFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.brand img.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 13px;
  background: transparent;
  box-shadow: 0 12px 28px rgba(47, 102, 255, 0.2);
  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
}

.brand:hover img.brand-mark {
  transform: translateY(-2px) rotate(-2deg);
  filter: saturate(1.08);
  box-shadow: 0 16px 32px rgba(47, 102, 255, 0.28);
}
/* Service guide, authenticated landing profile and admin statistics */
.landing-profile-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 238px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(204, 216, 240, .94);
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
  color: var(--text);
  box-shadow: 0 14px 34px rgba(37, 64, 129, .08);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.landing-profile-button:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(37, 64, 129, .14); }
.landing-profile-avatar { display:grid; place-items:center; width:46px; height:46px; overflow:hidden; border-radius:14px; background:linear-gradient(145deg,#235fff,#6547eb); color:#fff; font-weight:800; }
.landing-profile-avatar img { width:100%; height:100%; object-fit:cover; }
.landing-profile-copy { display:grid; gap:3px; text-align:left; flex:1; }
.landing-profile-copy strong { max-width:145px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.landing-profile-copy small { color:var(--muted); font-size:11px; }
.landing-profile-arrow { color:var(--primary); font-size:20px; }

.instruction-view, .admin-stats-view { padding-bottom: 48px; }
.instruction-hero, .admin-stats-head {
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:24px;
  padding:30px 32px; border:1px solid rgba(207,219,242,.9); border-radius:28px;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(238,243,255,.9));
  box-shadow:0 24px 64px rgba(35,62,126,.08);
}
.instruction-hero h1, .admin-stats-head h1 { margin:7px 0 8px; font-size:clamp(28px,3vw,46px); line-height:1; }
.instruction-hero p, .admin-stats-head p { max-width:760px; margin:0; color:var(--muted); }
.instruction-quick-path { display:flex; align-items:center; gap:12px; padding:17px 22px; margin-bottom:22px; overflow:auto; border:1px solid rgba(207,219,242,.9); border-radius:18px; background:#fff; color:#536584; font-size:13px; font-weight:750; white-space:nowrap; }
.instruction-quick-path i { width:28px; height:1px; background:linear-gradient(90deg,#2d64ff,#8d62ff); }
.instruction-card { min-height:260px; padding:25px; border:1px solid rgba(209,220,241,.9); border-radius:24px; background:rgba(255,255,255,.95); box-shadow:0 18px 48px rgba(35,62,126,.07); }
.instruction-card h3 { margin:18px 0 10px; font-size:20px; }
.instruction-card p { margin:0 0 18px; color:var(--muted); line-height:1.55; }
.instruction-card strong { display:block; margin-bottom:5px; font-size:12px; letter-spacing:.08em; text-transform:uppercase; }
.instruction-number { display:grid; place-items:center; width:46px; height:46px; border-radius:15px; background:#eaf0ff; color:#2861ff; font-weight:850; }
.instruction-card.accent-violet .instruction-number { background:#f0eaff; color:#7450e8; }
.instruction-card.accent-green .instruction-number { background:#e7f8ef; color:#15965a; }
.instruction-card.accent-orange .instruction-number { background:#fff0e2; color:#ed761d; }

.admin-stats-actions { display:flex; gap:10px; }
.admin-stats-root { display:grid; gap:20px; }
.admin-stats-loading { display:flex; align-items:center; justify-content:center; gap:14px; min-height:260px; border:1px solid rgba(207,219,242,.9); border-radius:26px; background:#fff; color:#536584; }
.admin-stats-loading span { width:22px; height:22px; border:3px solid #dbe4ff; border-top-color:#2d64ff; border-radius:50%; animation:admin-spin .8s linear infinite; }
@keyframes admin-spin { to { transform:rotate(360deg); } }
.admin-metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.admin-metric-grid article { position:relative; overflow:hidden; display:grid; gap:7px; min-height:150px; padding:22px; border:1px solid rgba(207,219,242,.9); border-radius:23px; background:#fff; box-shadow:0 15px 42px rgba(35,62,126,.06); }
.admin-metric-grid article::after { content:""; position:absolute; width:90px; height:90px; right:-24px; top:-30px; border-radius:50%; background:rgba(44,99,255,.09); }
.admin-metric-grid span { color:var(--muted); font-size:13px; font-weight:700; }
.admin-metric-grid strong { font-size:36px; line-height:1; }
.admin-metric-grid small { color:#1a9c5c; font-weight:750; }
.admin-metric-grid small.has-errors { color:#d94b45; }
.admin-visit-card { display:grid; grid-template-columns:190px 1fr; align-items:end; gap:28px; min-height:160px; padding:24px 28px; border:1px solid rgba(207,219,242,.9); border-radius:24px; background:linear-gradient(120deg,#10204a,#254fc7); color:#fff; box-shadow:0 22px 56px rgba(26,55,126,.2); }
.admin-visit-card > div:first-child { display:grid; gap:7px; }
.admin-visit-card > div:first-child span { color:#aebff4; font-size:12px; text-transform:uppercase; letter-spacing:.1em; }
.admin-visit-card > div:first-child strong { font-size:22px; }
.admin-visit-chart { display:flex; align-items:flex-end; gap:6px; height:100px; }
.admin-visit-chart i { display:flex; align-items:flex-end; flex:1; height:100%; }
.admin-visit-chart i span { width:100%; height:var(--bar); min-height:5px; border-radius:7px 7px 2px 2px; background:linear-gradient(180deg,#7ee8ff,#7591ff); opacity:.9; }
.admin-tabs { display:flex; gap:8px; overflow:auto; padding:6px; border:1px solid rgba(207,219,242,.9); border-radius:18px; background:#fff; }
.admin-tabs button { display:flex; align-items:center; gap:9px; min-height:44px; padding:0 15px; border:0; border-radius:13px; background:transparent; color:#63728e; font-weight:750; white-space:nowrap; cursor:pointer; }
.admin-tabs button.active { background:#edf2ff; color:#245cff; }
.admin-tabs button span { display:grid; place-items:center; min-width:24px; height:24px; padding:0 6px; border-radius:8px; background:rgba(44,99,255,.09); font-size:11px; }
.admin-data-panel { min-height:310px; padding:22px; border:1px solid rgba(207,219,242,.9); border-radius:25px; background:#fff; box-shadow:0 18px 48px rgba(35,62,126,.06); }
.admin-table-wrap { overflow:auto; }
.admin-table { width:100%; border-collapse:collapse; min-width:720px; }
.admin-table th { padding:12px 14px; color:#8390a8; font-size:11px; text-align:left; text-transform:uppercase; letter-spacing:.07em; }
.admin-table td { padding:14px; border-top:1px solid #e7ecf6; color:#53617c; font-size:13px; }
.admin-user { display:flex; align-items:center; gap:11px; }
.admin-user > span { display:grid; place-items:center; width:40px; height:40px; overflow:hidden; border-radius:12px; background:#e9efff; color:#285eff; font-weight:850; }
.admin-user img { width:100%; height:100%; object-fit:cover; }
.admin-user div { display:grid; gap:3px; }
.admin-user small { color:#8793aa; }
.admin-trigger-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; }
.admin-trigger-card { padding:18px; border:1px solid #e0e7f5; border-radius:18px; background:#fafcff; }
.admin-trigger-card > div { display:flex; align-items:center; gap:9px; }
.admin-trigger-dot { width:9px; height:9px; border-radius:50%; background:#20b66a; box-shadow:0 0 0 5px rgba(32,182,106,.12); }
.admin-trigger-card p { margin:10px 0 16px; color:#8390a8; font-size:12px; }
.admin-trigger-card footer { display:flex; justify-content:space-between; gap:10px; padding-top:13px; border-top:1px solid #e7ecf6; color:#66758f; font-size:12px; }
.admin-trigger-card footer b { color:#245cff; }
.admin-timeline { display:grid; }
.admin-timeline article { display:grid; grid-template-columns:145px 15px 1fr auto; align-items:center; gap:14px; min-height:68px; border-bottom:1px solid #e8edf7; }
.admin-timeline time { color:#62718c; font-size:12px; }
.admin-timeline article > span { width:10px; height:10px; border-radius:50%; background:#2c63ff; box-shadow:0 0 0 6px #edf2ff; }
.admin-timeline article div { display:grid; gap:3px; }
.admin-timeline small { color:#8994aa; }
.admin-timeline em { padding:7px 10px; border-radius:9px; background:#edf2ff; color:#285eff; font-size:11px; font-style:normal; font-weight:750; }
.admin-status { display:inline-flex; padding:7px 9px; border-radius:9px; background:#e9f8f0; color:#168b53; font-weight:750; }
.admin-status.error { background:#fff0ef; color:#d34741; }
.admin-status.running { background:#edf2ff; color:#285eff; }
.admin-panel-toolbar { display:flex; justify-content:space-between; align-items:center; padding:0 2px 14px; color:#7b89a2; font-size:12px; }
.admin-panel-toolbar button { border:0; background:#fff0ef; color:#d34741; padding:9px 12px; border-radius:10px; font-weight:750; cursor:pointer; }
.admin-empty { display:grid; place-items:center; align-content:center; gap:8px; min-height:250px; color:#8994aa; text-align:center; }
.admin-empty strong { color:#27344f; font-size:18px; }
.profile-menu-action.admin { display:grid; gap:3px; min-height:62px; color:#245cff; background:#edf2ff; }
.profile-menu-action.admin small { color:#7d8aa5; font-size:10px; font-weight:600; }

@media (max-width: 1050px) { .admin-metric-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 720px) {
  .instruction-hero,.admin-stats-head { align-items:flex-start; flex-direction:column; padding:23px; }
  .admin-metric-grid { grid-template-columns:1fr; }
  .admin-visit-card { grid-template-columns:1fr; }
  .admin-stats-actions { width:100%; }
  .admin-timeline article { grid-template-columns:95px 12px 1fr; }
  .admin-timeline em { display:none; }
  .landing-profile-button { min-width:0; }
  .landing-profile-copy { display:none; }
}
.ads-extra-column { min-width:118px; text-align:center !important; }
.ads-extra-cell { min-width:118px; text-align:center; }
.ads-extra-cell small { display:block; margin-top:7px; color:#ee741c; font-size:11px; font-weight:800; white-space:nowrap; }
.ads-extra-add-button { position:relative; display:inline-grid; place-items:center; width:42px; height:42px; padding:0; border:1px solid rgba(255,141,52,.38); border-radius:14px; background:linear-gradient(145deg,#fff7ed,#ffe6ca); color:#f27919; box-shadow:0 10px 24px rgba(233,111,24,.14); cursor:pointer; transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }
.ads-extra-add-button::after { content:""; position:absolute; inset:5px; border:1px solid rgba(255,255,255,.85); border-radius:10px; pointer-events:none; }
.ads-extra-add-button svg { position:relative; z-index:1; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; transition:transform .25s ease; }
.ads-extra-add-button:hover { transform:translateY(-2px); border-color:#f28a34; box-shadow:0 14px 30px rgba(233,111,24,.23); }
.ads-extra-add-button:hover svg { transform:rotate(90deg); }
.ads-extra-add-button:disabled { opacity:.38; cursor:not-allowed; transform:none; box-shadow:none; }

.ads-extra-expense-modal[hidden] { display:none; }
.ads-extra-expense-modal { position:fixed; inset:0; z-index:1400; display:grid; place-items:center; padding:24px; }
.ads-extra-expense-backdrop { position:absolute; inset:0; background:rgba(13,25,52,.48); backdrop-filter:blur(12px); animation:ads-extra-fade .2s ease both; }
.ads-extra-expense-card { position:relative; width:min(520px,100%); overflow:hidden; padding:30px; border:1px solid rgba(215,225,246,.95); border-radius:28px; background:linear-gradient(145deg,rgba(255,255,255,.99),rgba(247,250,255,.98)); box-shadow:0 32px 90px rgba(18,36,79,.28); animation:ads-extra-rise .32s cubic-bezier(.2,.75,.25,1) both; }
.ads-extra-expense-card::before { content:""; position:absolute; width:210px; height:210px; top:-130px; right:-70px; border-radius:50%; background:radial-gradient(circle,rgba(255,164,83,.24),rgba(255,164,83,0) 70%); pointer-events:none; }
.ads-extra-expense-close { position:absolute; z-index:2; top:20px; right:20px; display:grid; place-items:center; width:40px; height:40px; padding:0; border:1px solid #dae3f3; border-radius:13px; background:rgba(255,255,255,.88); color:#53617b; cursor:pointer; transition:transform .2s ease,color .2s ease; }
.ads-extra-expense-close:hover { color:#e45f19; transform:rotate(5deg); }
.ads-extra-expense-close svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.ads-extra-expense-heading { display:grid; grid-template-columns:58px 1fr; align-items:center; gap:16px; padding-right:40px; }
.ads-extra-expense-icon { display:grid; place-items:center; width:58px; height:58px; border-radius:18px; background:linear-gradient(145deg,#ffad63,#f27718); color:#fff; box-shadow:0 14px 30px rgba(236,113,24,.25); }
.ads-extra-expense-icon svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; }
.ads-extra-expense-kicker { color:#ed741e; font-size:10px; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
.ads-extra-expense-heading h2 { margin:4px 0 3px; color:#101a35; font-size:25px; line-height:1.15; }
.ads-extra-expense-heading p { overflow:hidden; margin:0; color:#71809b; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.ads-extra-expense-form { display:grid; gap:18px; margin-top:26px; }
.ads-extra-expense-form label { display:grid; gap:8px; color:#26334f; font-size:13px; font-weight:750; }
.ads-extra-amount-field { display:grid; grid-template-columns:1fr 54px; align-items:center; overflow:hidden; border:1px solid #d5def0; border-radius:16px; background:#fff; box-shadow:0 8px 22px rgba(41,68,127,.06); transition:border-color .2s ease,box-shadow .2s ease; }
.ads-extra-amount-field:focus-within { border-color:#ff9b48; box-shadow:0 0 0 4px rgba(255,146,61,.12); }
.ads-extra-amount-field input { width:100%; min-height:56px; padding:0 17px; border:0; outline:0; background:transparent; color:#111c37; font-size:20px; font-weight:800; }
.ads-extra-amount-field b { display:grid; place-items:center; height:32px; border-left:1px solid #e4eaf4; color:#f0781d; font-size:17px; }
.ads-extra-expense-form textarea { width:100%; min-height:112px; resize:vertical; padding:15px 17px; border:1px solid #d5def0; border-radius:16px; outline:0; background:#fff; color:#1e2b46; font:inherit; font-weight:600; line-height:1.5; transition:border-color .2s ease,box-shadow .2s ease; }
.ads-extra-expense-form textarea:focus { border-color:#ff9b48; box-shadow:0 0 0 4px rgba(255,146,61,.12); }
.ads-extra-expense-error { margin:0; padding:11px 13px; border-radius:12px; background:#fff0ef; color:#cf433c; font-size:12px; font-weight:700; }
.ads-extra-expense-actions { display:flex; gap:10px; padding-top:3px; }
.ads-extra-expense-actions button { min-height:50px; padding:0 22px; border:0; border-radius:16px; font:inherit; font-size:14px; font-weight:800; cursor:pointer; transition:transform .2s ease,box-shadow .2s ease,background .2s ease; }
.ads-extra-expense-actions .primary-button { flex:1; color:#fff; background:linear-gradient(135deg,#ff9d3f 0%,#f16a16 58%,#e95512 100%); box-shadow:0 13px 28px rgba(233,103,20,.25); }
.ads-extra-expense-actions .primary-button:hover { transform:translateY(-2px); box-shadow:0 17px 34px rgba(233,103,20,.34); }
.ads-extra-expense-actions .secondary-button { min-width:112px; color:#53617b; border:1px solid #d7e0f0; background:linear-gradient(180deg,#fff,#f5f8fd); box-shadow:0 9px 22px rgba(45,66,112,.08); }
.ads-extra-expense-actions .secondary-button:hover { transform:translateY(-2px); color:#263653; border-color:#bdcae1; box-shadow:0 13px 27px rgba(45,66,112,.13); }
.ads-extra-expense-actions button:disabled { opacity:.58; cursor:wait; transform:none; box-shadow:none; }


@keyframes ads-extra-fade { from { opacity:0; } to { opacity:1; } }
@keyframes ads-extra-rise { from { opacity:0; transform:translateY(18px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }

@media (max-width:600px) {
  .ads-extra-expense-modal { padding:14px; align-items:end; }
  .ads-extra-expense-card { padding:24px 20px 20px; border-radius:24px; }
  .ads-extra-expense-heading { grid-template-columns:48px 1fr; gap:12px; }
  .ads-extra-expense-icon { width:48px; height:48px; border-radius:15px; }
  .ads-extra-expense-heading h2 { font-size:21px; }
  .ads-extra-expense-actions { flex-direction:column; }
  .ads-extra-expense-actions .secondary-button { width:100%; }
}
/* Admin statistics dashboard */
.admin-stats-view { position:relative; isolation:isolate; padding:6px 0 54px; }
.admin-stats-view::before { content:""; position:absolute; z-index:-1; inset:-34px -34px auto; height:420px; background:radial-gradient(circle at 15% 10%,rgba(53,111,255,.13),transparent 34%),radial-gradient(circle at 88% 22%,rgba(31,205,184,.11),transparent 30%); pointer-events:none; }
.admin-dashboard-hero { position:relative; overflow:hidden; align-items:center; min-height:190px; padding:34px 36px; border:0; background:linear-gradient(125deg,#0d1938 0%,#173a91 55%,#2862df 100%); color:#fff; box-shadow:0 28px 70px rgba(22,53,126,.25); }
.admin-dashboard-hero::before { content:""; position:absolute; inset:0; opacity:.2; background-image:linear-gradient(rgba(255,255,255,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.12) 1px,transparent 1px); background-size:34px 34px; mask-image:linear-gradient(90deg,#000,transparent 78%); }
.admin-dashboard-hero::after { content:""; position:absolute; width:300px; height:300px; right:-90px; top:-150px; border-radius:50%; border:55px solid rgba(111,221,255,.14); box-shadow:0 0 0 42px rgba(255,255,255,.04); }
.admin-hero-copy { position:relative; z-index:1; display:flex; align-items:center; gap:20px; }
.admin-hero-mark { display:grid; place-items:center; flex:0 0 66px; width:66px; height:66px; border:1px solid rgba(255,255,255,.24); border-radius:21px; background:linear-gradient(145deg,rgba(255,255,255,.2),rgba(255,255,255,.06)); box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 18px 35px rgba(1,15,54,.2); backdrop-filter:blur(8px); }
.admin-hero-mark svg { width:32px; height:32px; fill:none; stroke:#85e8ff; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.admin-dashboard-hero .settings-kicker { color:#7ee9ff; }
.admin-dashboard-hero h1 { margin:8px 0 9px; color:#fff; font-size:clamp(31px,3.2vw,50px); letter-spacing:-.045em; }
.admin-dashboard-hero p { color:#cbd8fb; font-size:14px; line-height:1.55; }
.admin-dashboard-hero .admin-stats-actions { position:relative; z-index:1; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.admin-live-pill { display:inline-flex; align-items:center; gap:8px; min-height:42px; padding:0 14px; border:1px solid rgba(255,255,255,.17); border-radius:14px; background:rgba(5,19,56,.2); color:#d9e5ff; font-size:11px; font-weight:800; backdrop-filter:blur(8px); }
.admin-live-pill i,.admin-stats-meta i { width:8px; height:8px; border-radius:50%; background:#52e29a; box-shadow:0 0 0 5px rgba(82,226,154,.15); animation:admin-live-pulse 1.8s ease-in-out infinite; }
@keyframes admin-live-pulse { 50% { box-shadow:0 0 0 9px rgba(82,226,154,0); } }
.admin-action-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 16px; border:1px solid rgba(255,255,255,.2); border-radius:14px; background:rgba(255,255,255,.1); color:#fff; font-weight:800; cursor:pointer; backdrop-filter:blur(8px); transition:transform .18s ease,background .18s ease,box-shadow .18s ease; }
.admin-action-button.primary { border-color:transparent; background:linear-gradient(135deg,#6ee7ff,#4e7dff); box-shadow:0 13px 27px rgba(16,42,114,.3); }
.admin-action-button:hover { transform:translateY(-2px); background:rgba(255,255,255,.18); }
.admin-action-button.primary:hover { background:linear-gradient(135deg,#8eedff,#628cff); }
.admin-action-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.admin-stats-root { gap:18px; }
.admin-stats-meta { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:-8px 8px 0; color:#7b89a3; font-size:11px; font-weight:700; }
.admin-stats-meta span { display:inline-flex; align-items:center; gap:10px; color:#21865a; }
.admin-stats-loading { flex-direction:column; gap:17px; min-height:330px; border:1px solid rgba(204,217,242,.88); background:linear-gradient(145deg,#fff,#f4f7ff); box-shadow:0 20px 55px rgba(31,57,117,.08); }
.admin-stats-loading > span { width:38px; height:38px; border-width:4px; box-shadow:0 0 0 8px rgba(44,99,255,.07); }
.admin-stats-loading div { display:grid; gap:5px; text-align:center; }
.admin-stats-loading strong { color:#1a2846; font-size:17px; }
.admin-stats-loading small { color:#8995aa; font-size:11px; }

.admin-metric-grid { gap:14px; }
.admin-metric-grid article { grid-template-columns:52px 1fr; align-items:center; gap:16px; min-height:142px; padding:20px; border-color:rgba(205,217,239,.88); background:linear-gradient(145deg,#fff,#f8faff); box-shadow:0 17px 44px rgba(30,55,112,.075); transition:transform .2s ease,box-shadow .2s ease; }
.admin-metric-grid article:hover { transform:translateY(-3px); box-shadow:0 22px 50px rgba(30,55,112,.12); }
.admin-metric-grid article::after { width:120px; height:120px; right:-48px; top:-58px; }
.admin-metric-grid article > div { display:grid; gap:7px; }
.admin-metric-grid .admin-metric-icon { position:relative; z-index:1; display:grid; place-items:center; width:52px; height:52px; border-radius:17px; color:#285eff; background:#e9efff; font-size:12px; font-weight:900; letter-spacing:.06em; box-shadow:inset 0 1px 0 rgba(255,255,255,.8); }
.admin-metric-grid article.visits .admin-metric-icon { color:#8d4edb; background:#f2eaff; }
.admin-metric-grid article.triggers .admin-metric-icon { color:#148e5c; background:#e4f8ee; }
.admin-metric-grid article.completed .admin-metric-icon { color:#e3731d; background:#fff0e2; }
.admin-metric-grid article.users::after { background:rgba(44,99,255,.09); }
.admin-metric-grid article.visits::after { background:rgba(141,78,219,.08); }
.admin-metric-grid article.triggers::after { background:rgba(20,174,103,.08); }
.admin-metric-grid article.completed::after { background:rgba(243,132,43,.09); }
.admin-metric-grid strong { color:#111d38; font-size:34px; letter-spacing:-.04em; }

.admin-visit-card { position:relative; overflow:hidden; grid-template-columns:230px 1fr; min-height:190px; padding:28px 30px 24px; border:0; border-radius:27px; background:linear-gradient(120deg,#101d3d,#1a3e94 60%,#265fd1); box-shadow:0 25px 60px rgba(24,56,132,.22); }
.admin-visit-card::after { content:""; position:absolute; width:260px; height:260px; right:-120px; top:-155px; border:45px solid rgba(106,232,255,.12); border-radius:50%; }
.admin-visit-copy { position:relative; z-index:1; align-self:center; }
.admin-visit-copy span { color:#79ddf6 !important; }
.admin-visit-copy small { color:#aebee6; font-size:11px; }
.admin-visit-chart { position:relative; z-index:1; height:125px; padding-bottom:20px; border-bottom:1px solid rgba(255,255,255,.12); }
.admin-visit-chart::before,.admin-visit-chart::after { content:""; position:absolute; left:0; right:0; height:1px; background:rgba(255,255,255,.08); }
.admin-visit-chart::before { top:33%; }
.admin-visit-chart::after { top:66%; }
.admin-visit-chart i { position:relative; z-index:1; }
.admin-visit-chart i span { border-radius:6px 6px 2px 2px; background:linear-gradient(180deg,#81edff,#6682ff); box-shadow:0 0 14px rgba(104,207,255,.18); transition:filter .18s ease,transform .18s ease; }
.admin-visit-chart i:hover span { filter:brightness(1.22); transform:scaleX(1.08); }
.admin-visit-chart i em { position:absolute; left:50%; bottom:-19px; transform:translateX(-50%); color:#8298c8; font-size:9px; font-style:normal; }

.admin-tabs { padding:7px; border-color:#d8e1f1; border-radius:19px; background:rgba(255,255,255,.92); box-shadow:0 12px 34px rgba(36,58,106,.06); }
.admin-tabs button { flex:1; justify-content:center; min-height:48px; border-radius:14px; transition:background .18s ease,color .18s ease,transform .18s ease; }
.admin-tabs button:hover { color:#245cff; background:#f3f6ff; }
.admin-tabs button.active { color:#fff; background:linear-gradient(135deg,#2c63ff,#6955e9); box-shadow:0 10px 22px rgba(48,82,210,.22); }
.admin-tabs button.active span { color:#285eff; background:#fff; }
.admin-data-panel { border-color:#dbe3f1; background:rgba(255,255,255,.96); box-shadow:0 20px 50px rgba(30,55,112,.07); }
.admin-table tbody tr { transition:background .16s ease; }
.admin-table tbody tr:hover { background:#f7f9ff; }
.admin-user > span { box-shadow:0 8px 18px rgba(48,87,180,.12); }
.admin-trigger-card { background:linear-gradient(145deg,#fbfdff,#f5f8ff); box-shadow:0 10px 24px rgba(38,62,115,.05); }

.admin-load-error { display:grid; place-items:center; align-content:center; gap:10px; min-height:330px; padding:34px; border:1px solid #f3d7d4; border-radius:27px; background:linear-gradient(145deg,#fff,#fff7f6); text-align:center; box-shadow:0 20px 55px rgba(120,46,40,.08); }
.admin-load-error > span { display:grid; place-items:center; width:58px; height:58px; border-radius:19px; background:#ffe8e5; color:#d94a42; font-size:26px; font-weight:900; }
.admin-load-error strong { margin-top:5px; color:#26334e; font-size:20px; }
.admin-load-error p { max-width:520px; margin:0; color:#7c899f; line-height:1.5; }
.admin-load-error button { min-height:46px; margin-top:9px; padding:0 19px; border:0; border-radius:14px; color:#fff; background:linear-gradient(135deg,#2e66ff,#654fe5); font-weight:800; box-shadow:0 12px 26px rgba(48,82,210,.23); cursor:pointer; transition:transform .18s ease,box-shadow .18s ease; }
.admin-load-error button:hover { transform:translateY(-2px); box-shadow:0 16px 32px rgba(48,82,210,.3); }

@media (max-width:1100px) {
  .admin-dashboard-hero { align-items:flex-start; flex-direction:column; }
  .admin-dashboard-hero .admin-stats-actions { justify-content:flex-start; }
}
@media (max-width:720px) {
  .admin-dashboard-hero { padding:25px 21px; border-radius:24px; }
  .admin-hero-copy { align-items:flex-start; }
  .admin-hero-mark { flex-basis:52px; width:52px; height:52px; border-radius:17px; }
  .admin-dashboard-hero .admin-stats-actions { width:100%; }
  .admin-live-pill { width:100%; justify-content:center; }
  .admin-action-button { flex:1; }
  .admin-stats-meta { align-items:flex-start; flex-direction:column; }
  .admin-metric-grid article { grid-template-columns:48px 1fr; min-height:120px; }
  .admin-metric-grid .admin-metric-icon { width:48px; height:48px; }
  .admin-visit-card { grid-template-columns:1fr; }
  .admin-tabs button { flex:0 0 auto; }
}
.profile-menu {
  display: grid;
  gap: 7px;
  width: 214px;
  min-width: 214px;
  padding: 9px;
  border-radius: 19px;
}

.profile-menu-action,
.profile-menu-action.admin,
.profile-menu-action.danger {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 15px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
}

.profile-menu-action.admin {
  color: #245cff;
  background: linear-gradient(135deg, #eef3ff 0%, #e6edff 100%);
}

.profile-menu-action.admin:hover {
  background: linear-gradient(135deg, #e5edff 0%, #dbe6ff 100%);
}

.profile-menu-action.danger {
  color: #d83f38;
  background: linear-gradient(135deg, #fff2f1 0%, #ffe9e7 100%);
}

.profile-menu-action.danger:hover {
  background: linear-gradient(135deg, #ffe9e7 0%, #ffddda 100%);
}
.table-wrap-fixed .ads-extra-column,
.table-wrap-fixed .ads-extra-cell {
  position: sticky;
  right: 0;
  width: 84px;
  min-width: 84px;
  max-width: 84px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center !important;
  background: #fff;
  box-shadow: -14px 0 22px rgba(28, 48, 92, 0.08);
}

.table-wrap-fixed .ads-extra-column {
  z-index: 4;
  white-space: normal;
  line-height: 1.15;
}

.table-wrap-fixed .ads-extra-cell {
  z-index: 3;
}

.table-wrap-fixed .ads-extra-add-button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.table-wrap-fixed .ads-extra-add-button svg {
  width: 17px;
  height: 17px;
}

:root[data-theme="dark"] .table-wrap-fixed .ads-extra-column,
:root[data-theme="dark"] .table-wrap-fixed .ads-extra-cell {
  background: #101a32;
  box-shadow: -14px 0 22px rgba(0, 0, 0, 0.2);
}