/* Briefing results dashboard — mockup-aligned layout (app-shell only) */

html[data-layout="app-shell"] .briefing-dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
html[data-layout="app-shell"] .briefing-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
  width: 100%;
  max-width: 100%;
}

html[data-layout="app-shell"] .briefing-dash-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

html[data-layout="app-shell"] .briefing-dash-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

html[data-layout="app-shell"] .briefing-dash-meta {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

html[data-layout="app-shell"] .briefing-dash-tier {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

html[data-layout="app-shell"] .briefing-dash-tier--plus {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
}

html[data-layout="app-shell"] .briefing-dash-tier--pro {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

/* ── Main + sidebar grid ────────────────────────────────────────────────── */
html[data-layout="app-shell"] .briefing-dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 16px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

html[data-layout="app-shell"] .briefing-dash-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* ── Glance row (Weather / Water / Tides / Solunar) ─────────────────────── */
html[data-layout="app-shell"] .briefing-glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

html[data-layout="app-shell"] .briefing-glance-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 92px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.06)),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

html[data-layout="app-shell"] .briefing-glance-icon {
  font-size: 1.1rem;
  line-height: 1;
  margin-bottom: 2px;
}

html[data-layout="app-shell"] .briefing-glance-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

html[data-layout="app-shell"] .briefing-glance-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

html[data-layout="app-shell"] .briefing-glance-sub {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

html[data-layout="app-shell"] .briefing-glance-card--weather {
  border-top: 3px solid #f59e0b;
}

html[data-layout="app-shell"] .briefing-glance-card--water {
  border-top: 3px solid #0ea5e9;
}

html[data-layout="app-shell"] .briefing-glance-card--tides {
  border-top: 3px solid #6366f1;
}

html[data-layout="app-shell"] .briefing-glance-card--solunar {
  border-top: 3px solid #ec4899;
}

/* ── More conditions toggle ─────────────────────────────────────────────── */
html[data-layout="app-shell"] .briefing-more-details {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

html[data-layout="app-shell"] .briefing-more-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

html[data-layout="app-shell"] .briefing-more-details-summary::-webkit-details-marker {
  display: none;
}

html[data-layout="app-shell"] .briefing-more-details[open] .briefing-more-details-summary {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-layout="app-shell"] .briefing-more-details .briefing-details-grid {
  padding: 12px 14px 14px;
}

/* ── Preamble (reg alerts + catch gallery) ──────────────────────────────── */
html[data-layout="app-shell"] .briefing-preamble:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html[data-layout="app-shell"] .briefing-preamble .reg-warning {
  border-radius: var(--radius);
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  padding: 12px 14px;
}

html[data-layout="app-shell"] .briefing-preamble .catch-gallery-strip,
html[data-layout="app-shell"] .briefing-preamble .catch-gallery-shell {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
}

/* ── Hero row: species + game plan preview ──────────────────────────────── */
html[data-layout="app-shell"] .briefing-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr);
  gap: 12px;
}

html[data-layout="app-shell"] .briefing-hero-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.06)),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 16px 18px;
  min-height: 140px;
}

html[data-layout="app-shell"] .briefing-hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

html[data-layout="app-shell"] .briefing-hero-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

html[data-layout="app-shell"] .briefing-viability-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

html[data-layout="app-shell"] .briefing-viability-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

html[data-layout="app-shell"] .briefing-viability-pill--low {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

html[data-layout="app-shell"] .briefing-viability-pill--low::before {
  background: #f59e0b;
}

html[data-layout="app-shell"] .briefing-viability-pill--blocked {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

html[data-layout="app-shell"] .briefing-viability-pill--blocked::before {
  background: #ef4444;
}

html[data-layout="app-shell"] .briefing-hero-card-body {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

html[data-layout="app-shell"] .briefing-hero-card-body ul {
  margin: 0;
  padding-left: 18px;
}

html[data-layout="app-shell"] .briefing-hero-card-body li {
  margin-bottom: 6px;
}

html[data-layout="app-shell"] .briefing-hero-card-body li::marker {
  color: var(--accent);
}

html[data-layout="app-shell"] .briefing-species-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html[data-layout="app-shell"] .briefing-species-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

html[data-layout="app-shell"] .briefing-species-card .briefing-hero-card-body {
  flex: 0 0 auto;
  margin-bottom: 0;
}

html[data-layout="app-shell"] .briefing-species-art {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: 2px;
  padding-top: 0;
}

html[data-layout="app-shell"] .briefing-species-art img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 132px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.12));
  user-select: none;
  pointer-events: none;
  background: transparent;
}

html[data-layout="app-shell"] .briefing-gameplan-card {
  border-color: color-mix(in srgb, var(--accent) 18%, transparent);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.92),
    rgba(239, 246, 255, 0.75)
  );
}

html[data-layout="app-shell"] .briefing-gameplan-expand-hint {
  margin: 10px 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Tackle strip ───────────────────────────────────────────────────────── */
html[data-layout="app-shell"] .briefing-tackle-strip {
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--blue) 22%, transparent);
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.06));
  padding: 14px 16px;
}

html[data-layout="app-shell"] .briefing-tackle-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

html[data-layout="app-shell"] .briefing-tackle-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

html[data-layout="app-shell"] .briefing-tackle-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  max-width: 100%;
}

html[data-layout="app-shell"] .briefing-tackle-chip-thumb {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  object-fit: contain;
  flex-shrink: 0;
}

html[data-layout="app-shell"] .briefing-tackle-chip-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Section accordions ─────────────────────────────────────────────────── */
html[data-layout="app-shell"] .briefing-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html[data-layout="app-shell"] .recommendations.recommendations--dashboard {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  line-height: 1.6;
}

html[data-layout="app-shell"] .recommendations--dashboard.recommendations--accordion {
  padding: 0;
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.78);
  margin: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.05));
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc[open] {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow, 0 4px 14px rgba(15, 23, 42, 0.08)),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc-summary {
  display: grid;
  grid-template-columns: 11.75rem 24px 1fr 18px;
  align-items: center;
  column-gap: 8px;
  justify-content: initial;
  padding: 14px 16px;
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc-title {
  grid-column: 1;
  font-size: 0.95rem;
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc-count {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 0;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--blue);
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc-chevron {
  grid-column: 4;
  justify-self: end;
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc-body {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc-body h2 {
  display: none;
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc-body h3 {
  font-size: 0.98rem;
  margin-top: 14px;
}

html[data-layout="app-shell"] .recommendations--dashboard .briefing-acc--hero .briefing-acc-summary {
  color: var(--text-muted);
}

/* ── Sidebar actions ────────────────────────────────────────────────────── */
html[data-layout="app-shell"] .briefing-dash-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 12px;
  width: 176px;
  max-width: 176px;
  flex-shrink: 0;
}

html[data-layout="app-shell"] .briefing-action-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.06));
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

html[data-layout="app-shell"] .briefing-action-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: rgba(255, 255, 255, 0.98);
}

html[data-layout="app-shell"] .briefing-action-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html[data-layout="app-shell"] .briefing-action-icon {
  font-size: 1.1rem;
  line-height: 1;
  margin-bottom: 4px;
}

html[data-layout="app-shell"] .briefing-action-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
}

html[data-layout="app-shell"] .briefing-action-sub {
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
}

/* ── Chat panel (below dashboard, full width) ─────────────────────────────── */
html[data-layout="app-shell"] .briefing-dashboard .chat-section.briefing-chat-panel {
  margin-top: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.06));
}

html[data-layout="app-shell"] .briefing-chat-panel.briefing-chat-panel--highlight {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent),
    var(--shadow, 0 4px 14px rgba(15, 23, 42, 0.08));
}

/* ── Trip map inside dashboard ──────────────────────────────────────────── */
html[data-layout="app-shell"] .briefing-dash-main .briefing-acc--wrap .trip-map-shell {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-layout="app-shell"] .briefing-dash-main .briefing-acc--wrap .trip-map-head {
  display: none;
}

html[data-layout="app-shell"] .briefing-dash-main .trip-map-shell:not(.briefing-acc--wrap *) {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

/* Wide screens: keep dashboard sections full-width within the capped column */
@media (min-width: 1101px) {
  html[data-layout="app-shell"] .briefing-sections,
  html[data-layout="app-shell"] .briefing-hero-row,
  html[data-layout="app-shell"] .briefing-glance,
  html[data-layout="app-shell"] .briefing-tackle-strip,
  html[data-layout="app-shell"] .recommendations--dashboard {
    width: 100%;
    max-width: 100%;
  }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  html[data-layout="app-shell"] .briefing-dash-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-layout="app-shell"] .briefing-dash-actions {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    max-width: none;
  }

  html[data-layout="app-shell"] .briefing-action-btn {
    flex: 1 1 140px;
  }
}

@media (max-width: 900px) {
  html[data-layout="app-shell"] .briefing-glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-layout="app-shell"] .briefing-hero-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  html[data-layout="app-shell"] .briefing-glance {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-layout="app-shell"] .briefing-dash-actions {
    flex-direction: column;
  }
}
