:root {
  --bg: #f1f4f8;
  --bg-fade: #e7edf5;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #111827;
  --muted: #5b677a;
  --line: #dde4ef;
  --line-strong: #cbd6e5;
  --primary: #0d2f4f;
  --primary-2: #246194;
  --positive: #18794e;
  --positive-soft: #eaf8f0;
  --negative: #b42336;
  --negative-soft: #fff1f2;
  --accent: #8a6b2d;
  --accent-soft: #fef7e6;
  --radius: 14px;
  --radius-sm: 11px;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, #dde6f2 0%, transparent 24%),
    radial-gradient(circle at 85% 4%, #dfeaf5 0%, transparent 22%),
    radial-gradient(circle at 48% 100%, #e9eff6 0%, transparent 18%),
    var(--bg);
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 272px;
  display: none;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: linear-gradient(182deg, #f8fafc 0%, #ffffff 78%);
  box-shadow: 8px 0 22px rgba(15, 23, 42, 0.05);
  z-index: 20;
}

.brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--line);
}

.brand h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
  font-size: 19px;
}

.brand p {
  margin: 6px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
}

.app-shell nav {
  padding: 14px 10px;
  display: grid;
  gap: 6px;
}

.nav-link {
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #2b3647;
  padding: 11px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  transition: 0.18s ease;
}

.nav-link span:last-child {
  color: #718097;
  font-size: 12px;
  font-weight: 600;
}

.nav-link:hover {
  background: #f0f5fb;
  border-color: var(--line-strong);
}

.nav-link.active {
  border-color: transparent;
  background: linear-gradient(165deg, #12365a, #2a6594);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(18, 54, 90, 0.25);
}

.nav-link.active span:last-child {
  color: rgba(255, 255, 255, 0.85);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid var(--line);
}

.auth-box {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7fbff;
}

.auth-user {
  margin: 0 0 8px;
  font-size: 12px;
  color: #42566f;
  word-break: break-all;
}

.auth-actions {
  display: grid;
  gap: 8px;
}

.sidebar-buttons {
  display: grid;
  gap: 8px;
}

.ghost-button {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button:hover {
  background: #f3f7fc;
}

.ghost-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mobile-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.mobile-header h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
}

.mobile-header button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  font-weight: 700;
  padding: 8px 12px;
}

.mobile-overlay {
  position: fixed;
  inset: 62px 0 0 0;
  z-index: 29;
  background: rgba(9, 20, 35, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  width: min(84vw, 290px);
  height: 100%;
  background: #ffffff;
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: 0.2s ease;
  display: flex;
  flex-direction: column;
}

.mobile-drawer nav {
  border-bottom: 1px solid var(--line);
}

.mobile-drawer-footer {
  padding: 12px 10px 14px;
  overflow-y: auto;
}

.mobile-drawer .nav-link {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  justify-content: flex-start;
}

.mobile-drawer .nav-link span:last-child {
  display: none;
}

.mobile-drawer .ghost-button {
  padding: 9px 10px;
  font-size: 14px;
}

.mobile-overlay.open .mobile-drawer {
  transform: translateX(0);
}

.main-content {
  flex: 1;
  width: 100%;
}

.content-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 86px 16px 30px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  margin-bottom: 16px;
  padding: 24px;
  color: #eaf5ff;
  border: none;
  background: linear-gradient(132deg, #0f2f4d 0%, #1b4e78 62%, #2f78ad 100%);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  top: -80px;
  right: -60px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-topline {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 11px;
  opacity: 0.82;
  margin-bottom: 9px;
}

.hero h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
  font-size: 27px;
}

.hero p {
  margin: 0;
  max-width: 700px;
  line-height: 1.5;
}

.currency-picker {
  margin-top: 14px;
  width: 220px;
}

.currency-picker label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  opacity: 0.9;
}

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

.stat-card {
  padding: 16px;
}

.stat-card .label {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-card .value {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

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

.page-section {
  padding: 22px;
  margin-bottom: 14px;
}

.page-section h3 {
  margin: 0 0 14px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
}

.proposal-headline {
  font-size: clamp(28px, 4.8vw, 42px);
  line-height: 1.05;
  margin-bottom: 8px !important;
}

.proposal-meta {
  font-size: 14px;
  color: #66758a;
  margin-bottom: 14px;
}

.impact-bars,
.mini-chart {
  display: grid;
  gap: 10px;
}

.impact-row {
  display: grid;
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) minmax(110px, 160px);
  gap: 10px;
  align-items: center;
}

.impact-row.no-value {
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr);
}

.impact-row span {
  font-size: 13px;
  color: #334155;
}

.impact-row strong {
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  height: 13px;
  border-radius: 999px;
  background: #edf3fb;
  overflow: hidden;
  min-width: 0;
}

.bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.22s ease;
}

.bar.loss {
  background: linear-gradient(90deg, #b42336, #dd4b60);
}

.bar.gain {
  background: linear-gradient(90deg, #18794e, #2ea86b);
}

.bar.invest {
  background: linear-gradient(90deg, #64748b, #8b9ab0);
}

.kpi-boxes {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.kpi {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 14px;
}

.kpi p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.kpi strong {
  margin-top: 7px;
  display: block;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.projection-controls {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbfe;
}

.projection-horizon {
  margin: 3px 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #172b41;
}

.projection-slider {
  width: 100%;
  accent-color: #246194;
}

.projection-chart {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
}

.projection-stack {
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: #e9eff7;
  margin-bottom: 14px;
}

.projection-segment {
  height: 100%;
  min-width: 4px;
}

.projection-segment.loss {
  background: linear-gradient(90deg, #b42336, #dd4b60);
}

.projection-segment.cost {
  background: linear-gradient(90deg, #b07a22, #d8a14c);
}

.projection-segment.invest {
  background: linear-gradient(90deg, #64748b, #8b9ab0);
}

.projection-segment.net-positive {
  background: linear-gradient(90deg, #18794e, #2ea86b);
}

.projection-segment.net-negative {
  background: linear-gradient(90deg, #7a1f2b, #b42336);
}

.projection-legend {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.projection-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  background: #fbfdff;
}

.projection-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-top: 3px;
}

.projection-swatch.loss {
  background: #c73a4e;
}

.projection-swatch.cost {
  background: #c9923c;
}

.projection-swatch.invest {
  background: #74869d;
}

.projection-swatch.net-positive {
  background: #1d8b58;
}

.projection-swatch.net-negative {
  background: #a52a3b;
}

.projection-legend-item p {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #62748a;
}

.projection-legend-item strong {
  margin-top: 5px;
  display: block;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-graph {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
  margin-bottom: 12px;
}

.trend-grid {
  display: grid;
  gap: 10px;
}

.trend-row {
  display: grid;
  grid-template-columns: minmax(72px, 90px) minmax(0, 1fr) minmax(92px, 160px);
  gap: 10px;
  align-items: center;
}

.trend-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4f6075;
}

.trend-track {
  height: 14px;
  border-radius: 999px;
  background: #e6eef8;
  overflow: hidden;
}

.trend-fill {
  height: 100%;
  border-radius: 999px;
}

.trend-fill.good {
  background: linear-gradient(90deg, #0f7a43, #18a75c);
}

.trend-fill.warn {
  background: linear-gradient(90deg, #b87b12, #e4a93a);
}

.trend-fill.bad {
  background: linear-gradient(90deg, #a61b1b, #d64848);
}

.trend-fill.neutral {
  background: linear-gradient(90deg, #334155, #64748b);
}

.trend-value {
  font-size: 13px;
  color: #1f2f45;
  min-width: 92px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .trend-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "label value"
      "bar bar";
    gap: 6px 10px;
    align-items: center;
  }

  .trend-label {
    grid-area: label;
    min-width: 0;
  }

  .trend-track {
    grid-area: bar;
  }

  .trend-value {
    grid-area: value;
    min-width: 0;
    font-size: 12px;
  }
}

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

.circle-gauge {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 14px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.circle-gauge .ring {
  --p: 0;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: conic-gradient(#18794e calc(var(--p) * 1%), #e8eef7 0);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 12px 24px rgba(15, 23, 42, 0.09);
}

.circle-gauge .ring-inner {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #12253a;
  padding: 0 10px;
  text-align: center;
  line-height: 1;
}

.circle-gauge .ring-value {
  margin: 0;
  color: #2b3c52;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.circle-gauge p {
  margin: 0;
  color: #607089;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.circle-gauge.good .ring {
  background: conic-gradient(#18794e calc(var(--p) * 1%), #e8eef7 0);
}

.circle-gauge.warn .ring {
  background: conic-gradient(#b07a22 calc(var(--p) * 1%), #e8eef7 0);
}

.circle-gauge.bad .ring {
  background: conic-gradient(#b42336 calc(var(--p) * 1%), #e8eef7 0);
}

.circle-gauge.neutral .ring {
  background: conic-gradient(#66758a calc(var(--p) * 1%), #e8eef7 0);
}

.toolbar {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  padding: 12px 10px;
}

th {
  color: #617286;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.07em;
}

tr:last-child td {
  border-bottom: none;
}

.list-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.list-link:hover {
  text-decoration: underline;
}

.input,
.select,
.app-shell textarea {
  width: 100%;
  border: 1px solid #cbd8e9;
  border-radius: 11px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
}

.proposal-setup {
  display: grid;
  gap: 16px;
}

.setup-nav {
  position: sticky;
  top: 72px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #c7d7ea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.setup-nav-item {
  border: 1px solid #ccdaec;
  background: #f8fbff;
  color: #1d3552;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.setup-nav-item:hover {
  background: #edf5ff;
  border-color: #9fbede;
}

.setup-nav-item.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(160deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 0 4px rgba(27, 110, 165, 0.2);
}

.setup-section {
  border: 1px solid #cfdced;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
  padding: 14px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.setup-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.setup-section.is-active {
  border-color: #6faad5;
  box-shadow: 0 0 0 4px rgba(31, 126, 190, 0.14);
}

.setup-head {
  margin: 0 0 10px;
}

.setup-head h4 {
  margin: 0;
  font-size: 15px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.01em;
}

.setup-head p {
  margin: 5px 0 0;
  color: #4f6075;
  font-size: 12px;
}

.select.compact {
  max-width: 180px;
}

.app-shell textarea {
  resize: vertical;
  min-height: 118px;
}

.input:focus,
.select:focus,
.app-shell textarea:focus {
  outline: 3px solid rgba(22, 106, 162, 0.18);
  border-color: #2f86b6;
}

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

.textarea-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field-block {
  border: 1px solid #cfdbec;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field-block:hover {
  border-color: #aec8e2;
}

.field-block:focus-within {
  border-color: #2f86b6;
  box-shadow: 0 0 0 4px rgba(47, 134, 182, 0.2);
  transform: translateY(-1px);
}

.field-block .label {
  margin-bottom: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field-toggle {
  display: flex;
  align-items: center;
}

.field-toggle .toggle-row {
  margin: 0;
}

.image-block {
  display: grid;
  gap: 10px;
}

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.toggle-row {
  margin: 12px 0 2px;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: #334155;
}

.toggle-label input {
  width: 18px;
  height: 18px;
}

.app-shell .hidden {
  display: none !important;
}

.hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.feedback-panel {
  margin-top: 0;
  border-radius: var(--radius);
  border: 1px solid #c4d5e8;
  background: linear-gradient(165deg, #eff6ff 0%, #f8fbff 85%);
  padding: 16px;
}

.feedback-header h4 {
  margin: 0;
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
}

.feedback-header p {
  margin: 5px 0 0;
  font-size: 13px;
  color: #4f6075;
}

.feedback-grid {
  margin: 12px 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-box {
  border: 1px solid #d6e0ed;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  padding: 14px;
  min-height: 92px;
}

.metric-box p {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6a788d;
}

.metric-box strong {
  margin-top: 8px;
  display: block;
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.metric-box.is-positive {
  border-color: #93d8b1;
  background: var(--positive-soft);
}

.metric-box.is-positive strong {
  color: var(--positive);
}

.metric-box.is-negative {
  border-color: #f0b2bc;
  background: var(--negative-soft);
}

.metric-box.is-negative strong {
  color: var(--negative);
}

.actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.setup-actions {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed #cddced;
}

.button {
  border: none;
  border-radius: 11px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  font: inherit;
  background: linear-gradient(160deg, var(--primary), var(--primary-2));
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(13, 59, 102, 0.2);
  filter: saturate(1.05);
}

.button.secondary {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: #1e293b;
}

.button.danger {
  background: #af1b1b;
}

.empty {
  border: 1px dashed #bed1e6;
  border-radius: 12px;
  background: #f5f9ff;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.auth-required {
  max-width: 700px;
}

.detail-gauges {
  margin: 2px 0 12px;
}

.detail-paragraph {
  line-height: 1.6;
  white-space: pre-wrap;
}

.attachment-list {
  margin: 0 0 12px;
  padding-left: 18px;
}

.attachment-list li {
  margin-bottom: 6px;
}

.image-preview {
  margin-top: 6px;
  max-width: 100%;
  border-radius: 11px;
  border: 1px solid var(--line);
}

.link-preview-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.link-card {
  border: 1px solid #cfdced;
  border-radius: 11px;
  background: #f8fbff;
  overflow: hidden;
  text-decoration: none;
  color: #0f172a;
  display: grid;
  grid-template-columns: 82px 1fr;
  min-height: 82px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: #aac7e2;
  box-shadow: 0 10px 22px rgba(18, 63, 104, 0.14);
}

.link-card img {
  width: 82px;
  height: 100%;
  object-fit: cover;
  background: #e7effb;
}

.card-title {
  margin: 8px 10px 4px;
  font-size: 13px;
  font-weight: 800;
  color: #1d3552;
}

.card-url {
  margin: 0 10px 8px;
  font-size: 11px;
  color: #5f7085;
  word-break: break-all;
}

.source-panel {
  margin-bottom: 16px;
}

.source-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.source-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}

.status-row {
  margin-top: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.ok {
  background: #dff9ea;
  color: #0f7a43;
  border: 1px solid #91dcb3;
}

.status-badge.error {
  background: #fee3e3;
  color: #a61b1b;
  border: 1px solid #f6b4b4;
}

.status-badge.pending {
  background: #e9f1fb;
  color: #2c4f74;
  border: 1px solid #bfd2e8;
}

.inbox-actions {
  margin-top: 0;
  gap: 6px;
}

.inbox-actions .button {
  padding: 6px 10px;
  font-size: 12px;
}

.inbox-preview {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.inbox-preview summary {
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #1f3a57;
}

.inbox-preview-grid,
.inbox-preview-text {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}

.inbox-preview-grid p,
.inbox-preview-text p {
  margin: 0;
  font-size: 12px;
  white-space: normal;
  line-height: 1.4;
}

.loading-row {
  min-height: 130px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: #1f3a57;
}

.loading-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--primary), var(--primary-2));
  animation: pulse 0.9s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (min-width: 860px) {
  .sidebar {
    display: flex;
  }

  .mobile-header,
  .mobile-overlay {
    display: none;
  }

  .content-inner {
    margin-left: 272px;
    padding: 26px 24px;
  }

  .setup-nav {
    top: 18px;
  }

  .dashboard-grid {
    grid-template-columns: 1.6fr 1fr;
  }

  .kpi-boxes {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr auto;
  }

  .source-grid {
    grid-template-columns: 220px 1fr auto;
    align-items: end;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .textarea-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .link-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .setup-section,
  .field-block,
  .setup-nav-item,
  .button,
  .link-card,
  .bar {
    transition: none !important;
    animation: none !important;
  }
}
