/* ════════════════════════════════════════════════════
   MAPO — Dashboard view
   ════════════════════════════════════════════════════ */

.dash-shell {
  display: none;
  flex-direction: column;
  height: 100vh;
}
.dash-shell.active { display: flex; }

/* ── Top bar ── */
.dash-topbar {
  height: 66px;
  background: var(--white);
  border-bottom: 2px solid var(--red);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.dash-topbar .brand-wide { height: 50px; }
.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}
.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* User chip */
.user-chip {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
}
.user-chip .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.user-chip .uc-info { line-height: 1.3; }
.user-chip .uc-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.user-chip .uc-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 7px 13px;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}
.logout-btn:hover {
  border-color: var(--red-border);
  color: var(--red);
  background: var(--red-light);
}
.logout-btn i { font-size: 13px; }

/* ── Content ── */
.dash-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  background: var(--bg-subtle);
}
.dash-content::-webkit-scrollbar { width: 6px; }
.dash-content::-webkit-scrollbar-track { background: transparent; }
.dash-content::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* Welcome hero */
.welcome-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 16px;
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.welcome-hero .wh-main { flex: 1; min-width: 200px; }
.welcome-hero .wh-eyebrow {
  font-size: 10px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 2px;
}
.welcome-hero .wh-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--black);
  line-height: 1;
}
.welcome-hero .wh-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.welcome-hero .wh-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.wh-stat .wh-stat-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--red);
  line-height: 1;
}
.wh-stat .wh-stat-key {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ── Solutions grid ── */
.sol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.sol-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: box-shadow 0.15s, border-color 0.15s;
  position: relative;
}
.sol-card.active   { border-left: 3px solid var(--red); }
.sol-card.inactive { opacity: 0.55; }
.sol-card:hover    { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); }

a.sol-card { display: block; }
.sol-card.clickable { cursor: pointer; }
.sol-card.clickable:hover {
  border-color: var(--red-border);
  box-shadow: 0 4px 16px rgba(171, 22, 27, 0.08);
}
.sol-card.clickable:hover .sol-open {
  color: var(--red);
  transform: translateX(2px);
}
.sol-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: all 0.15s;
}
.sol-open i { font-size: 12px; }

/* ════════════════════════════════════════════════════
   Banner-style solution tiles (uses official CI banners)
   ════════════════════════════════════════════════════ */
.sol-card-banner {
  /* Override the default tile padding so the banner sits flush at the top */
  padding: 0;
  overflow: hidden;
}
.sol-card-banner.active { border-left: none; }

.sol-banner {
  position: relative;
  width: 100%;
  background: transparent;
  padding: 13px 13px 4px;
}
.sol-banner-img {
  display: block;
  height: 45px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  object-position: left;
}

/* Inline HTML/CSS fallback for the banner when no image is available.
   Drawn to closely match the MAPO CI lockup: black bg, red icon circle,
   thin red vertical rail, name in two weights, tagline below. */
.sol-banner-fallback {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #000;
  min-height: 72px;
}
.sol-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
.sol-banner-icon i { font-size: 22px; }
.sol-banner-rail {
  width: 2px;
  height: 40px;
  background: var(--red);
  flex-shrink: 0;
}
.sol-banner-text {
  min-width: 0;
  flex: 1;
}
.sol-banner-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sol-banner-name .thin { color: #b0b0b0; font-weight: 400; }
.sol-banner-name .bold { color: #ffffff; font-weight: 700; }
.sol-banner-tag {
  font-size: 11px;
  color: #9a9a9a;
  margin-top: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Body section below the banner — holds status, dates, "Open →". */
.sol-body {
  padding: 14px 16px 16px;
}

/* ── Info button (top-right corner of a tile that has details) ── */
.sol-info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s;
  padding: 0;
}
.sol-info-btn:hover {
  background: var(--red-light);
  border-color: var(--red-border);
  color: var(--red);
  transform: scale(1.08);
}
.sol-info-btn i { font-size: 15px; }

/* ════════════════════════════════════════════════════
   Solution details modal
   ════════════════════════════════════════════════════ */
body.sol-modal-open { overflow: hidden; }

.sol-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sol-modal-overlay.open {
  display: flex;
  animation: solModalFade 0.15s ease-out;
}
@keyframes solModalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sol-modal {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  animation: solModalSlide 0.2s ease-out;
}
@keyframes solModalSlide {
  from { transform: translateY(-16px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* Modal header — dark band with title + close */
.sol-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: var(--dkgray);
  border-bottom: 2px solid var(--red);
}
.sol-modal-head-text { line-height: 1.2; }
.sol-modal-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 3px;
}
.sol-modal-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}
.sol-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s;
}
.sol-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.sol-modal-close i { font-size: 20px; }

/* Banner image at the top of the body */
.sol-modal-banner {
  padding: 20px 22px 8px;
  display: flex;
  justify-content: flex-start;
}
.sol-modal-banner img {
  display: block;
  height: 48px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.sol-modal-body { padding: 14px 22px 18px; }

.sol-modal-field {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--bg-panel);
  font-size: 13px;
}
.sol-modal-field:last-of-type { border-bottom: none; }
.sol-modal-field-label {
  color: var(--text-muted);
  font-weight: 700;
  flex-shrink: 0;
  min-width: 160px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sol-modal-field-value {
  color: var(--text-primary);
  font-weight: 600;
  flex: 1;
}

.sol-modal-overview {
  background: var(--bg-subtle);
  border-left: 3px solid var(--red);
  border-radius: 0 6px 6px 0;
  padding: 14px 16px;
  margin-top: 16px;
}
.sol-modal-overview-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.sol-modal-overview-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Modal action buttons */
.sol-modal-actions {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.sol-modal-btn {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}
.sol-modal-btn-primary {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
}
.sol-modal-btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.sol-modal-btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.sol-modal-btn-secondary:hover { border-color: var(--red-border); color: var(--red); }
.sol-modal-btn i { font-size: 14px; }
.sol-card-banner .sol-status-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
/* Card now hosts the badge inside .sol-status-row, not the head row */
.sol-card-banner .sol-meta {
  border-top: 1px solid var(--bg-panel);
  padding-top: 10px;
  margin-top: 8px;
}

.sol-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}
.sol-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--red-light);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sol-card.inactive .sol-icon {
  background: var(--bg-panel);
  color: var(--text-muted);
}
.sol-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--black);
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
}
.sol-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  margin-top: 4px;
}
.sol-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  font-size: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--bg-panel);
}
.sol-meta-row .k {
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 1px;
}
.sol-meta-row .v {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
}

/* ── Two-column info row ── */
.info-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}
@media (max-width: 880px) {
  .info-row { grid-template-columns: 1fr; }
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.info-card-head {
  padding: 10px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-card-head i { color: var(--red); font-size: 14px; }
.info-card-head-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--bg-panel); }
.info-table tr:last-child { border-bottom: none; }
.info-table tr:hover td { background: var(--bg-subtle); }
.info-table td {
  padding: 8px 16px;
  font-size: 11.5px;
}
.info-table td:first-child {
  color: var(--text-muted);
  width: 40%;
  background: var(--bg-subtle);
  font-weight: 600;
  border-right: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}
.info-table td:last-child {
  color: var(--text-secondary);
  font-weight: 600;
}
.info-table td a { color: var(--red); text-decoration: none; }
.info-table td a:hover { text-decoration: underline; }

/* Account stat body */
.stat-body { padding: 14px 16px; }
.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-panel);
}
.stat-row:first-child { padding-top: 0; }
.stat-row:last-child  { border-bottom: none; padding-bottom: 0; }
.stat-row .label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.stat-row .val {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--red);
  line-height: 1;
}
.stat-row .val.small {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
}

/* ── OEM card ── */
.oem-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}
.oem-toolbar {
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 11px;
  flex: 1;
  max-width: 320px;
  min-width: 200px;
  transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--red-border); }
.search-bar i { color: var(--text-muted); font-size: 14px; }
.search-bar input {
  background: transparent;
  border: none;
  outline: none;
  flex: 1;
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  color: var(--text-primary);
}
.search-bar input::placeholder { color: var(--text-muted); }

.filter-chip {
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--white);
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.filter-chip:hover { border-color: var(--red-border); color: var(--red); }
.filter-chip.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.filter-spacer { flex: 1; }
.filter-count {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.filter-count strong { color: var(--text-secondary); font-weight: 700; }

.oem-grid {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}
.oem-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.15s;
  cursor: default;
  line-height: 1.2;
}
.oem-chip:hover {
  border-color: var(--red-border);
  background: var(--red-light);
  color: var(--red);
}
.oem-chip .id {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.oem-chip:hover .id { color: var(--red); }
.oem-chip.hidden { display: none; }
.oem-chip.system {
  background: var(--bg-panel);
  color: var(--text-muted);
}
.oem-chip.system .id { color: var(--text-muted); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 12px;
}
.empty-state i {
  font-size: 28px;
  display: block;
  margin: 0 auto 8px;
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 560px) {
  .welcome-hero .wh-title { font-size: 22px; }
  .user-chip .uc-info { display: none; }
}
