:root {
  --bg: #fff8f6;
  --bg-accent: rgba(253, 120, 101, 0.12);
  --rail: #f6ece9;
  --rail-soft: #fffdfc;
  --panel: #ffffff;
  --panel-soft: #fdf4f1;
  --panel-strong: #ffffff;
  --line: rgba(213, 195, 188, 0.62);
  --line-strong: rgba(154, 120, 108, 0.28);
  --ink: #1f1b19;
  --ink-soft: #51443f;
  --ink-muted: #8b7870;
  --accent: #fd7865;
  --accent-strong: #d85d4b;
  --accent-soft: rgba(253, 120, 101, 0.14);
  --danger: #b4453b;
  --danger-soft: rgba(180, 69, 59, 0.12);
  --success: #3f7c58;
  --success-soft: rgba(63, 124, 88, 0.12);
  --warning: #a8742e;
  --warning-soft: rgba(168, 116, 46, 0.12);
  --shadow: 0 22px 44px rgba(91, 62, 50, 0.08);
  --shadow-soft: 0 12px 28px rgba(91, 62, 50, 0.05);
  --radius-2xl: 30px;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, var(--bg-accent) 0, transparent 24%),
    radial-gradient(circle at bottom left, rgba(216, 164, 143, 0.08) 0, transparent 26%),
    linear-gradient(180deg, #fffdfc 0%, var(--bg) 100%);
}

body {
  padding: 20px;
}

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

button {
  cursor: pointer;
}

.shell {
  max-width: 1580px;
  margin: 0 auto;
}

.login-shell {
  min-height: calc(100vh - 40px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 480px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 244, 240, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow);
  padding: 34px;
}

.eyebrow {
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 12px;
}

.title {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.02;
  font-weight: 800;
}

.lead {
  margin: 14px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.stack {
  display: grid;
  gap: 16px;
}

.form {
  margin-top: 26px;
}

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

.field label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px 16px;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(216, 164, 143, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 0 0 4px rgba(216, 164, 143, 0.16);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 700;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 26px rgba(253, 120, 101, 0.22);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--line);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: rgba(180, 69, 59, 0.24);
  color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.login-divider {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.login-divider-line {
  height: 1px;
  background: var(--line);
}

.google-block {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.google-placeholder {
  min-height: 44px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 14px;
  background: var(--panel-soft);
  border-radius: var(--radius-md);
  border: 1px dashed var(--line-strong);
}

.message {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  line-height: 1.5;
}

.message.error {
  border-color: rgba(180, 69, 59, 0.26);
  background: rgba(180, 69, 59, 0.08);
  color: var(--danger);
}

.message.success {
  border-color: rgba(63, 124, 88, 0.24);
  background: rgba(63, 124, 88, 0.08);
  color: var(--success);
}

.app-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  padding: 20px;
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at top right, rgba(253, 120, 101, 0.1) 0, transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 236, 233, 0.98) 100%);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  position: relative;
  padding: 20px 18px 18px 72px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.brand::before {
  content: "C";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(253, 120, 101, 0.24);
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
}

.brand p,
.sidebar-meta {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.sidebar .eyebrow {
  color: var(--accent-strong);
}

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

.nav-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid transparent;
  min-height: 50px;
  border-radius: 18px;
  padding: 0 14px;
  font-weight: 700;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.nav-btn.active {
  background: linear-gradient(180deg, rgba(253, 120, 101, 0.16), rgba(253, 120, 101, 0.08));
  border-color: rgba(253, 120, 101, 0.24);
  color: var(--accent-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sidebar-footer .btn-danger {
  background: rgba(180, 69, 59, 0.12);
  border-color: rgba(180, 69, 59, 0.16);
  color: var(--danger);
}

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

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-soft);
}

.topbar-copy {
  min-width: 0;
}

.topbar h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.04;
  font-weight: 800;
}

.topbar p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 246, 0.9);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 249, 247, 0.97));
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin: 0 0 14px;
  font-size: 21px;
  line-height: 1.15;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-subtitle {
  margin: -4px 0 12px;
  color: var(--ink-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.grid.kpis .card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
}

.grid.kpis .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(216, 164, 143, 0.08));
}

.grid.kpis .card:nth-child(4n)::before {
  background: linear-gradient(90deg, rgba(180, 69, 59, 0.72), rgba(180, 69, 59, 0.08));
}

.grid.kpis .card:nth-child(3n)::before {
  background: linear-gradient(90deg, rgba(63, 124, 88, 0.8), rgba(63, 124, 88, 0.08));
}

.kpi-label {
  color: var(--ink-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.kpi-value {
  margin-top: 14px;
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 800;
  line-height: 1;
}

.split {
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: 18px;
}

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

.list-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(98, 72, 61, 0.14);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  padding: 16px 18px;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(216, 164, 143, 0.28);
  box-shadow: 0 10px 18px rgba(43, 27, 22, 0.05);
}

.list-item.active {
  border-color: rgba(253, 120, 101, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 244, 241, 0.96));
  box-shadow: 0 14px 24px rgba(253, 120, 101, 0.1);
}

.list-item-title {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
}

.list-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.list-item-meta {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.status-chip.open,
.status-chip.new,
.status-chip.active,
.status-chip.pending {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(216, 164, 143, 0.28);
}

.status-chip.review,
.status-chip.reviewed,
.status-chip.planned,
.status-chip.suspended {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(168, 116, 46, 0.22);
}

.status-chip.closed,
.status-chip.resolved {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(63, 124, 88, 0.2);
}

.status-chip.dismissed,
.status-chip.deleted {
  background: rgba(118, 99, 93, 0.08);
  color: var(--ink-soft);
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

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

.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  color: var(--ink-soft);
  font-weight: 700;
}

.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.detail-grid {
  display: grid;
  gap: 14px;
}

.detail-row {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

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

.detail-label {
  color: var(--ink-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.detail-value {
  line-height: 1.6;
}

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

.history-item {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.history-item:first-child {
  border-top: 0;
  padding-top: 0;
}

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

.history-title {
  font-weight: 800;
}

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

.empty {
  padding: 24px;
  border-radius: 20px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink-soft);
  line-height: 1.6;
  text-align: center;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--ink-soft);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.announcement-card,
.feedback-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-copy {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

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

.metric-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(253, 244, 240, 0.9));
  padding: 18px;
}

.metric-label {
  color: var(--ink-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.metric-value {
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
}

.metric-delta {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.metric-delta.positive {
  color: var(--success);
}

.metric-delta.negative {
  color: var(--danger);
}

.growth-layout {
  align-items: start;
}

.funnel-list,
.series-list {
  display: grid;
  gap: 14px;
}

.funnel-row,
.series-row {
  display: grid;
  gap: 8px;
}

.funnel-head,
.series-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.funnel-head span,
.series-head span {
  color: var(--ink-soft);
  font-weight: 700;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(216, 164, 143, 0.14);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.sparkline {
  height: 80px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(8px, 1fr);
  gap: 6px;
  align-items: end;
}

.spark-bar {
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, rgba(216, 164, 143, 0.92), rgba(190, 127, 99, 0.74));
  min-height: 10px;
}

@media (max-width: 1120px) {
  .app-shell,
  .split,
  .two-col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}

@media (max-width: 720px) {
  body {
    padding: 12px;
  }

  .login-card,
  .sidebar,
  .topbar,
  .card {
    padding: 18px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar h2,
  .title {
    font-size: 26px;
  }

  .grid.kpis {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .grid.kpis {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
