* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f3f6fb;
  color: #111827;
}

html {
  scroll-behavior: smooth;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
}

.container-wide {
  max-width: min(98vw, 2200px);
}

.topbar {
  background: #0f172a;
  color: #fff;
}

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

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}

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

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 4px 7px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  line-height: 1;
}

.lang-link.is-active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.75);
}

body.is-authenticated {
  background: #e7edf8;
}

body.is-authenticated .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(8, 15, 33, 0.18);
}

.app-topbar-inner {
  width: 100%;
  padding: 12px 18px;
}

.app-main {
  width: 100%;
}

.card {
  background: #fff;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.narrow {
  max-width: 520px;
}

.auth-shell {
  margin: 20px auto 24px;
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(260px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.auth-card {
  background:
    radial-gradient(420px 190px at 0 0, rgba(35, 194, 255, 0.2), transparent 70%),
    linear-gradient(160deg, #0a1a33, #102b52);
  border: 1px solid rgba(157, 198, 240, 0.34);
  color: #e6f1ff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 16px 48px rgba(8, 18, 40, 0.28);
}

.auth-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 800;
  color: #97d9ff;
}

.auth-card h1 {
  margin: 8px 0 10px;
  font-size: 32px;
  line-height: 1.05;
  font-family: "Sora", "Segoe UI", sans-serif;
}

.auth-subtitle {
  margin: 0 0 16px;
  color: #c5d9f3;
}

.auth-form label {
  color: #d8e8fb;
}

.auth-form input {
  border: 1px solid rgba(161, 197, 235, 0.5);
  background: rgba(255, 255, 255, 0.08);
  color: #f3f8ff;
}

.auth-form input::placeholder {
  color: rgba(225, 238, 255, 0.75);
}

.auth-form button {
  border: 0;
  color: #06203b;
  font-weight: 800;
  background: linear-gradient(120deg, #79ddff, #6ff2bd);
}

.auth-switch {
  margin: 14px 0 0;
  color: #bfd5f0;
}

.auth-switch a {
  color: #9fe9ff;
}

.auth-side {
  border-radius: 18px;
  border: 1px solid #d7e3f3;
  background: #ffffff;
  padding: 20px;
}

.auth-side h2 {
  margin: 0 0 12px;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 22px;
  color: #0f172a;
}

.auth-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.auth-benefits li {
  border-radius: 12px;
  border: 1px solid #d9e8f7;
  padding: 10px 12px;
  background: #f5faff;
}

.auth-benefits strong {
  display: block;
  margin-bottom: 3px;
  color: #0f172a;
  font-size: 14px;
}

.auth-benefits span {
  display: block;
  color: #334155;
  font-size: 13px;
  line-height: 1.42;
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
textarea,
select,
button {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

small {
  font-weight: 400;
  color: #475569;
}

label.has-info {
  position: relative;
  padding-right: 28px;
}

.info-inline {
  display: inline-flex;
  align-items: center;
  position: relative;
  vertical-align: middle;
}

.info-inline.is-inline {
  margin-left: 6px;
}

label.has-info > .info-inline {
  position: absolute;
  right: 0;
  top: 0;
  margin-left: 0;
}

.info-dot {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #8fb0e0;
  background: #eef4ff;
  color: #1f3d70;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-dot:hover {
  background: #deebff;
  border-color: #7fa1d6;
}

.info-dot:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.info-bubble {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: min(360px, 80vw);
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.35);
  z-index: 120;
  display: none;
}

.info-bubble::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -5px;
  width: 8px;
  height: 8px;
  background: #0f172a;
  border-left: 1px solid #334155;
  border-top: 1px solid #334155;
  transform: rotate(45deg);
}

.info-inline.is-open .info-bubble {
  display: block;
}

.tier-block {
  display: grid;
  gap: 10px;
  background: #f6f9ff;
  border: 1px solid #d5dfef;
  border-radius: 12px;
  padding: 12px;
}

.tier-block p {
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid #0f172a;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.button-link.button-link-secondary {
  border-color: #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.datastream-create-form {
  margin-bottom: 14px;
}

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

.datastream-table {
  min-width: 900px;
}

.datastream-row-link:hover {
  background: #f8fbff;
}

.datastream-row-link a {
  color: inherit;
}

.datastream-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.datastream-status.is-running {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.datastream-status.is-completed {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.datastream-status.is-failed {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #991b1b;
}

.datastream-status.is-queued {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.datastream-status.is-disabled {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #4b5563;
}

.inline-action {
  display: inline-block;
  margin: 8px 0 0;
}

.crawl-status {
  background: #f6fbff;
  border: 1px solid #cfe1f3;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.crawl-status-head {
  margin: 0;
}

.crawl-status-line {
  margin: 0;
  color: #1f2937;
  font-size: 13px;
}

.crawl-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #dbe7f3;
  overflow: hidden;
}

.crawl-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #0f172a, #1d4ed8);
  transition: width 0.35s ease;
}

button {
  cursor: pointer;
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

fieldset {
  border: 1px solid #d1d9e6;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.language-options label {
  min-width: 180px;
  align-content: start;
}

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

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

th,
td {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.flash {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.flash.success {
  background: #dcfce7;
  border: 1px solid #86efac;
}

.flash.error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - 58px);
}

.dashboard-main {
  min-width: 0;
  padding: 20px;
}

.dashboard-overview-stack {
  display: grid;
  gap: 18px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 20px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(72, 187, 120, 0.18), transparent 30%),
    linear-gradient(135deg, #07111f 0%, #0f1d36 48%, #12284b 100%);
  color: #eff6ff;
  border-color: #112746;
  overflow: hidden;
}

.dashboard-hero-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.dashboard-hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.dashboard-eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #9fb9f4;
}

.dashboard-hero-text {
  margin: 0;
  max-width: 60ch;
  color: #d8e4ff;
  font-size: 15px;
  line-height: 1.6;
}

.dashboard-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #eff6ff;
  font-size: 12px;
  font-weight: 600;
}

.dashboard-signal-grid {
  display: grid;
  gap: 12px;
  align-content: start;
}

.dashboard-signal {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-signal-label {
  display: block;
  margin-bottom: 8px;
  color: #a9c4ff;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dashboard-signal strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
}

.dashboard-signal small {
  display: block;
  margin-top: 6px;
  color: #d8e4ff;
}

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

.dashboard-kpi-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.dashboard-kpi-label {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-kpi-value {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #08111f;
}

.dashboard-kpi-footnote {
  color: #64748b;
  font-size: 13px;
}

.dashboard-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-panel-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.dashboard-panel-header h2 {
  margin: 0 0 4px;
  font-size: 21px;
}

.dashboard-panel-header p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.dashboard-panel-summary {
  min-width: 92px;
  text-align: right;
}

.dashboard-panel-summary strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: #0f172a;
}

.dashboard-panel-summary span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.dashboard-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.dashboard-bar-group {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.dashboard-bar-track {
  width: 100%;
  height: 186px;
  padding: 12px 10px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.75) 0%, rgba(226, 232, 240, 0.85) 100%);
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
}

.dashboard-bar {
  width: 18px;
  border-radius: 999px 999px 6px 6px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  animation: dashboardGrow 0.7s ease forwards;
  transform-origin: bottom center;
}

.dashboard-bar.is-count {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

.dashboard-bar.is-minutes {
  background: linear-gradient(180deg, #10b981 0%, #0f766e 100%);
}

.dashboard-bar.is-savings {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.dashboard-bars-compact .dashboard-bar-track {
  height: 154px;
}

.dashboard-bar-group strong {
  color: #0f172a;
  font-size: 18px;
}

.dashboard-bar-group small {
  color: #64748b;
  font-size: 12px;
}

.dashboard-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #475569;
  font-size: 13px;
}

.dashboard-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dashboard-legend-dot.is-count {
  background: #2563eb;
}

.dashboard-legend-dot.is-minutes {
  background: #10b981;
}

.dashboard-legend-dot.is-escalation {
  background: #f59e0b;
}

.dashboard-legend-dot.is-savings {
  background: #d97706;
}

.dashboard-activity-list {
  display: grid;
  gap: 10px;
}

.dashboard-activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #d7e3f4;
}

.dashboard-activity-item strong {
  display: block;
  color: #0f172a;
}

.dashboard-activity-item small {
  color: #64748b;
}

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

.dashboard-mini-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-mini-tag.is-positive {
  background: #dcfce7;
  color: #166534;
}

.dashboard-mini-tag.is-warn {
  background: #fef3c7;
  color: #92400e;
}

.dashboard-progress-list {
  display: grid;
  gap: 14px;
}

.dashboard-progress-item {
  display: grid;
  gap: 10px;
}

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

.dashboard-progress-head strong {
  display: block;
}

.dashboard-progress-head small {
  color: #64748b;
}

.dashboard-progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dashboard-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e 0%, #14b8a6 100%);
}

.dashboard-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #475569;
  font-size: 12px;
}

.dashboard-capacity-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.dashboard-hour-grid {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
}

.dashboard-hour-cell {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.dashboard-hour-track {
  width: 100%;
  height: 112px;
  padding: 6px 3px;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef4ff 0%, #e2e8f0 100%);
  display: flex;
  align-items: end;
}

.dashboard-hour-fill {
  display: block;
  width: 100%;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #7c3aed 0%, #4f46e5 100%);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.24);
}

.dashboard-hour-cell strong {
  color: #0f172a;
  font-size: 12px;
}

.dashboard-hour-cell small {
  color: #64748b;
  font-size: 11px;
}

.dashboard-donut-card {
  display: flex;
  justify-content: center;
}

.dashboard-donut {
  --value: 0%;
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background: conic-gradient(#0f766e 0 var(--value), #dbeafe var(--value) 100%);
}

.dashboard-donut::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d7e3f4;
}

.dashboard-donut > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.dashboard-donut strong {
  font-size: 28px;
  line-height: 1;
  color: #0f172a;
}

.dashboard-donut span {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-stat-box {
  padding: 14px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #d7e3f4;
}

.dashboard-stat-box span {
  display: block;
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-stat-box strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 24px;
}

.dashboard-status-stack {
  display: grid;
  gap: 12px;
}

.dashboard-status-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
}

.dashboard-status-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-status-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dashboard-status-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #94a3b8;
}

.dashboard-status-fill.is-completed {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.dashboard-status-fill.is-failed {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.dashboard-status-fill.is-queued,
.dashboard-status-fill.is-running {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.dashboard-status-fill.is-disabled {
  background: linear-gradient(90deg, #94a3b8 0%, #64748b 100%);
}

.dashboard-empty {
  margin: 0;
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #64748b;
}

.dashboard-table-card {
  padding: 18px;
}

@keyframes dashboardGrow {
  from {
    transform: scaleY(0.35);
    opacity: 0.25;
  }

  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.app-sidebar {
  align-self: stretch;
  min-height: calc(100vh - 58px);
  background: linear-gradient(180deg, #0b1220 0%, #111a31 100%);
  color: #d8e4ff;
  border-right: 1px solid #1e2a40;
  padding: 18px 14px;
  overflow: visible;
}

.app-sidebar h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #d8e4ff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 11px;
}

.app-nav-item:hover {
  background: rgba(123, 162, 255, 0.2);
  border-color: rgba(123, 162, 255, 0.45);
}

.app-nav-item:focus-visible {
  outline: 2px solid #8cb0ff;
  outline-offset: 1px;
}

.app-nav-item.is-active {
  background: rgba(123, 162, 255, 0.3);
  border-color: rgba(123, 162, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(140, 176, 255, 0.45);
}

.app-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #8cb0ff;
  flex: 0 0 8px;
}

.app-nav-item.is-active .app-nav-dot {
  background: #ffffff;
  transform: scale(1.2);
}

.stream-page-main {
  display: flex;
  flex-direction: column;
}

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

.stream-subnav-item {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #0b1220;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 600;
}

.stream-subnav-item:hover {
  background: #dce9ff;
  border-color: #b9d0ff;
}

.stream-subnav-item.is-active {
  background: #cfe0ff;
  border-color: #8cb0ff;
}

.stream-subnav-item:focus-visible {
  outline: 2px solid #8cb0ff;
  outline-offset: 1px;
}

.stream-order-header {
  order: 10;
}

.stream-order-subnav {
  order: 20;
}

.stream-order-crawl {
  order: 30;
}

.stream-order-crawl-pages {
  order: 35;
}

.stream-order-chunks {
  order: 40;
}

.stream-order-overview {
  order: 50;
}

.stream-order-settings {
  order: 60;
}

.stream-order-membership {
  order: 60;
}

.stream-order-filters {
  order: 60;
}

.exclude-selector-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.exclude-selector-status {
  font-size: 13px;
  color: #315b48;
}

.exclude-selector-status[data-state="error"] {
  color: #a03b2c;
}

.preview-modal[hidden] {
  display: none;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 26, 30, 0.64);
}

.preview-modal-dialog {
  position: relative;
  width: min(1200px, calc(100vw - 48px));
  height: min(85vh, 900px);
  margin: 36px auto;
  background: #fcfaf5;
  border: 1px solid #cfdbc9;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}

.preview-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #1c4938, #255d49);
  color: #f7f2e8;
}

.preview-modal-head button {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.preview-modal iframe {
  border: 0;
  width: 100%;
  flex: 1;
  background: #fff;
}

.model-subnav {
  margin-top: 4px;
}

.model-anchor {
  scroll-margin-top: 92px;
  height: 1px;
}

.model-advanced summary {
  cursor: pointer;
}

.model-advanced[open] summary {
  margin-bottom: 10px;
}

body.is-authenticated .card {
  border-radius: 14px;
  border: 1px solid #d4deed;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

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

.chunks-pill {
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.chunks-table td {
  font-size: 13px;
  line-height: 1.4;
}

.chunks-table {
  min-width: 1700px;
  table-layout: auto;
}

.chunks-table th,
.chunks-table td,
.table-scroll a,
.table-scroll code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .app-sidebar {
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid #1e2a40;
    padding: 12px;
  }

  .app-nav {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  }

  .dashboard-main {
    padding: 12px;
  }

  .dashboard-hero,
  .dashboard-kpi-grid,
  .dashboard-panel-grid,
  .dashboard-capacity-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-bars {
    gap: 8px;
  }

  .dashboard-hour-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .dashboard-bar-track {
    height: 150px;
    padding: 10px 6px;
  }

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

  .dashboard-chip-row {
    justify-content: flex-start;
  }

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

  .info-bubble {
    max-width: min(300px, 92vw);
  }
}
