/* AF ShopBook V26 — customer portal visual redesign and exact logo visibility fix */
:root {
  --portal-orange: #fe790d;
  --portal-orange-2: #ff963f;
  --portal-ink: #191e29;
  --portal-ink-2: #252c39;
  --portal-bg: #f4f7fb;
  --portal-card: rgba(255,255,255,.94);
  --portal-line: #dde4ee;
  --portal-soft: #f7f9fc;
  --portal-shadow: 0 18px 55px rgba(25,30,41,.09);
}
html[data-theme="dark"] {
  --portal-bg: #070b12;
  --portal-card: rgba(16,21,30,.96);
  --portal-line: #29313d;
  --portal-soft: #111822;
  --portal-shadow: 0 20px 65px rgba(0,0,0,.33);
}

body { background: var(--portal-bg); }
.portal-shell { width: min(1240px, calc(100% - 42px)); }
.portal-header {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.portal-nav { min-height: 78px; }
.portal-brand-v26 { width: 215px; height: 54px; display: flex; align-items: center; overflow: visible; }
.portal-brand-v26 .brand-full-logo { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.brand-full-logo-dark { display: none; }
html[data-theme="dark"] .brand-full-logo-light { display: none; }
html[data-theme="dark"] .brand-full-logo-dark { display: block; }

/* Login mark uses exact final AF artwork, not the older white-only mark. */
.login-brand-mark { flex: 0 0 62px; width: 62px; height: 58px; display: grid; place-items: center; }
.login-brand-mark img { grid-area: 1 / 1; width: 62px; height: 58px; object-fit: contain; border-radius: 0; }
.login-mark-dark { display: none; }
html[data-theme="dark"] .login-mark-light { display: none; }
html[data-theme="dark"] .login-mark-dark { display: block; }

.dashboard-view {
  min-height: calc(100vh - 78px);
  padding: 32px 0 78px;
  background:
    radial-gradient(circle at 85% 2%, rgba(254,121,13,.11), transparent 25%),
    radial-gradient(circle at 8% 24%, rgba(25,30,41,.055), transparent 30%),
    var(--portal-bg);
}
html[data-theme="dark"] .dashboard-view {
  background:
    radial-gradient(circle at 85% 2%, rgba(254,121,13,.13), transparent 25%),
    radial-gradient(circle at 8% 24%, rgba(255,255,255,.035), transparent 30%),
    var(--portal-bg);
}
.dashboard-shell { position: relative; }
.dashboard-topbar {
  position: relative;
  min-height: 142px;
  margin-bottom: 18px;
  padding: 26px 30px;
  border: 1px solid var(--portal-line);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--portal-card), color-mix(in srgb, var(--portal-card) 82%, rgba(254,121,13,.08)));
  box-shadow: var(--portal-shadow);
  overflow: hidden;
}
.dashboard-topbar::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--portal-orange), var(--portal-orange-2));
}
.dashboard-topbar::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  inset-inline-end: -100px;
  top: -145px;
  background: radial-gradient(circle, rgba(254,121,13,.12), transparent 65%);
  pointer-events: none;
}
.dashboard-topbar > div { position: relative; z-index: 1; }
.dashboard-topbar .portal-kicker {
  border-color: rgba(254,121,13,.26);
  background: rgba(254,121,13,.09);
  color: var(--portal-orange);
}
.dashboard-topbar h1 { margin-top: 12px; font-size: clamp(1.8rem, 3vw, 2.65rem); letter-spacing: -.035em; }
.dashboard-topbar h1 b,
html[data-theme="dark"] .dashboard-topbar h1 b { color: var(--portal-orange); }
.dashboard-topbar p { margin-top: 5px; font-size: .88rem; }
.logout-btn {
  position: relative;
  z-index: 2;
  min-height: 46px;
  padding: 0 17px;
  border-color: color-mix(in srgb, var(--danger) 25%, var(--portal-line));
  background: color-mix(in srgb, var(--surface) 92%, var(--danger-soft));
  box-shadow: 0 8px 20px rgba(216,75,75,.07);
}
.logout-btn:hover { transform: translateY(-1px); }

.loading-state { border-radius: 22px; background: var(--portal-card); border: 1px solid var(--portal-line); box-shadow: var(--portal-shadow); }

.subscription-hero {
  grid-template-columns: minmax(0, 1fr) 330px;
  border-color: var(--portal-line);
  border-radius: 24px;
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
}
.subscription-main { padding: 30px; }
.subscription-main::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 28px;
  width: 4px;
  height: 78px;
  border-radius: 999px;
  background: var(--portal-orange);
}
.subscription-main::after { background: radial-gradient(circle, rgba(254,121,13,.13), transparent 65%); }
.subscription-title-row h2 { font-size: 2.35rem; color: var(--portal-ink); }
html[data-theme="dark"] .subscription-title-row h2 { color: #f8fafc; }
.status-pill.status-active { color: #087a4f; background: #e1f8ed; border-color: #bdebd5; }
html[data-theme="dark"] .status-pill.status-active { color: #65ddb0; background: #113d2e; border-color: #205b46; }
.subscription-dates { gap: 12px; }
.subscription-dates div {
  min-height: 74px;
  padding: 14px 16px;
  border-color: var(--portal-line);
  border-radius: 14px;
  background: var(--portal-soft);
}
.subscription-action {
  position: relative;
  padding: 30px;
  background:
    radial-gradient(circle at 22% 15%, rgba(254,121,13,.24), transparent 28%),
    linear-gradient(145deg, #1d2430, #10151d);
}
.subscription-action::after {
  content: "AF";
  position: absolute;
  inset-inline-end: 20px;
  bottom: -18px;
  color: rgba(255,255,255,.035);
  font-size: 7rem;
  font-weight: 1000;
  letter-spacing: -.08em;
  pointer-events: none;
}
.subscription-action .action-icon { background: rgba(254,121,13,.16); color: #ffad68; }
.subscription-action button {
  position: relative;
  z-index: 1;
  min-height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--portal-orange), #ff8f31);
  box-shadow: 0 12px 30px rgba(254,121,13,.24);
}
.subscription-action button:hover { background: linear-gradient(135deg, #e96800, var(--portal-orange)); }
.subscription-support { position: relative; z-index: 1; }

.stats-grid { gap: 14px; margin: 16px 0; }
.stats-grid article {
  min-height: 112px;
  padding: 20px 21px;
  border-color: var(--portal-line);
  border-radius: 18px;
  background: var(--portal-card);
  box-shadow: 0 10px 28px rgba(25,30,41,.055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stats-grid article:hover { transform: translateY(-2px); border-color: rgba(254,121,13,.28); box-shadow: 0 15px 36px rgba(25,30,41,.08); }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; }
.stat-icon.teal { background: rgba(254,121,13,.12); color: var(--portal-orange); }
.stat-icon.amber { background: #fff1dc; color: #c97000; }
.stat-icon.navy { background: #eef1f6; color: var(--portal-ink); }
html[data-theme="dark"] .stat-icon.amber { background: #422b14; color: #ffc073; }
html[data-theme="dark"] .stat-icon.navy { background: #242c38; color: #edf2f8; }
.stats-grid b { font-size: 1.45rem; }

.panel {
  border-color: var(--portal-line);
  border-radius: 20px;
  background: var(--portal-card);
  box-shadow: 0 10px 30px rgba(25,30,41,.05);
}
.panel-heading span,
html[data-theme="dark"] .panel-heading span { color: var(--portal-orange); }
.feature-plan-badge,
.locked-feature-badge { background: rgba(254,121,13,.11); color: var(--portal-orange); }
.entitlements-grid { gap: 11px; }
.entitlement-item { min-height: 78px; border-color: var(--portal-line); border-radius: 14px; background: var(--portal-soft); }
.entitlement-item.enabled > span { background: #e2f8ed; }
html[data-theme="dark"] .entitlement-item.enabled > span { background: #123b2d; }
.feature-upgrade-link { color: var(--portal-orange); }
.inventory-metrics article,
.inventory-full-block,
.inventory-advanced-block { border-color: var(--portal-line); background: var(--portal-soft); }

.portal-footer { border-top-color: var(--portal-line); background: color-mix(in srgb, var(--surface) 92%, transparent); }

@media (max-width: 980px) {
  .portal-shell { width: min(100% - 30px, 900px); }
  .portal-brand-v26 { width: 188px; height: 48px; }
  .subscription-hero { grid-template-columns: 1fr; }
  .subscription-action { min-height: 190px; }
}
@media (max-width: 760px) {
  .portal-nav { min-height: 70px; }
  .portal-brand-v26 { width: 156px; height: 42px; }
  .back-site span { display: none; }
  .dashboard-view { padding-top: 20px; }
  .dashboard-topbar { min-height: auto; padding: 22px 20px; align-items: flex-start; }
  .dashboard-topbar h1 { font-size: 1.55rem; }
  .subscription-main { padding: 24px 19px; }
}
@media (max-width: 520px) {
  .portal-shell { width: calc(100% - 22px); }
  .portal-nav-actions { gap: 6px; }
  .portal-brand-v26 { width: 136px; height: 38px; }
  .lang-btn { padding-inline: 9px; }
  .lang-btn #langLabel { display: none; }
  .dashboard-topbar { display: grid; gap: 16px; }
  .logout-btn { width: 100%; justify-content: center; }
  .subscription-title-row h2 { font-size: 2rem; }
  .subscription-action { padding: 24px 20px; }
}
