/* "Stripe-style" look. Applies only when <html data-look="stripe">.
   Remove the attribute (sidebar switch → Classic) and the dashboard is exactly as before. */

html[data-look="stripe"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --border: #e3e8ee;
  --border-soft: #edf1f5;
  --text: #061b31;
  --text-2: #3c4f69;
  --muted: #64748d;
  --head: #64748d;
  --primary: #533afd;
  --primary-h: #4434d4;
  --dark: #061b31;
  --radius: 8px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --shadow-sm: 0 2px 5px -1px rgba(50, 50, 93, .12), 0 1px 3px -1px rgba(0, 0, 0, .08);
  --shadow-md: 0 13px 27px -5px rgba(50, 50, 93, .18), 0 8px 16px -8px rgba(0, 0, 0, .14);
  --shadow-lg: 0 30px 60px -12px rgba(50, 50, 93, .25), 0 18px 36px -18px rgba(0, 0, 0, .3);
}
html[data-look="stripe"] body { background: var(--bg); color: var(--text); font-weight: 400; letter-spacing: -0.005em; }

/* Headings: light weight, tight tracking */
html[data-look="stripe"] h1 { font-size: 30px; font-weight: 300; letter-spacing: -0.025em; color: var(--text); }
html[data-look="stripe"] h2 { font-weight: 500; letter-spacing: -0.01em; }
html[data-look="stripe"] .muted { color: var(--muted); }

/* Moving gradient band at the top of every page (our own artwork) */
html[data-look="stripe"] .main { position: relative; overflow-x: hidden; }
html[data-look="stripe"] .main > section { position: relative; z-index: 1; }
html[data-look="stripe"] .ribbon {
  display: block; position: absolute; z-index: 0; pointer-events: none;
  top: -180px; right: -10%; width: 75%; height: 420px;
  transform: skewY(-9deg); transform-origin: top right; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%), linear-gradient(to right, transparent 0%, #000 35%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, #000 40%, transparent 100%), linear-gradient(to right, transparent 0%, #000 35%);
          mask-composite: intersect;
}
html[data-look="stripe"] .ribbon span {
  position: absolute; inset: -40%;
  background:
    radial-gradient(40% 55% at 20% 40%, #ffcb57 0%, transparent 60%),
    radial-gradient(35% 50% at 45% 60%, #ff5e9c 0%, transparent 60%),
    radial-gradient(40% 55% at 70% 35%, #a960ee 0%, transparent 60%),
    radial-gradient(45% 60% at 90% 65%, #3fc9ff 0%, transparent 60%),
    linear-gradient(120deg, #ff9e57, #ff5e9c 35%, #8b5cf6 65%, #3fc9ff);
  filter: saturate(1.15);
  animation: bfo-flow 16s var(--ease) infinite alternate;
}
@keyframes bfo-flow {
  0%   { transform: translate3d(-6%, -3%, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(4%, 2%, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) rotate(-6deg) scale(1.04); }
}
.ribbon { display: none !important; } /* gradient band switched off: plain white background */
@media (prefers-reduced-motion: reduce) { html[data-look="stripe"] .ribbon span { animation: none; } }

/* Page header sits over the band: give it room */
html[data-look="stripe"] .page-head { padding-top: 6px; margin-bottom: 26px; }
html[data-look="stripe"] .page-head .muted { color: var(--text-2); }

/* Sidebar */
html[data-look="stripe"] .sidebar { background: #ffffff; border-right: 1px solid var(--border); }
html[data-look="stripe"] .brand-mark { background: var(--primary); border-radius: 6px; }
html[data-look="stripe"] .brand-name { color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
html[data-look="stripe"] .nav-label { color: #8792a2; letter-spacing: .08em; }
html[data-look="stripe"] .nav-item { color: var(--text-2); border-radius: 6px; transition: background-color .3s var(--ease), color .3s var(--ease); }
html[data-look="stripe"] .nav-item:hover { background: #f6f9fc; color: var(--text); }
html[data-look="stripe"] .nav-item.active { background: #f1efff; color: var(--primary); }
html[data-look="stripe"] .nav-item.active .ico { color: var(--primary); }

/* Cards: no hard borders, soft layered shadows, lift on hover */
html[data-look="stripe"] .card,
html[data-look="stripe"] .kpi,
html[data-look="stripe"] .stages,
html[data-look="stripe"] .asset-card {
  border: 1px solid rgba(227, 232, 238, .6); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
html[data-look="stripe"] .kpi:hover,
html[data-look="stripe"] .asset-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: transparent; }
html[data-look="stripe"] .kpi-label { color: var(--muted); font-weight: 500; }
html[data-look="stripe"] .kpi-value { font-weight: 400; letter-spacing: -0.02em; color: var(--text); }
html[data-look="stripe"] .kpi-accent { background: linear-gradient(135deg, #f7f5ff, #ffffff 70%); border-color: #e2dcff; }
html[data-look="stripe"] .kpi-accent .kpi-value { color: var(--primary); }

/* Buttons: indigo, 4px radius, arrow that slides on hover */
html[data-look="stripe"] .btn { border-radius: 4px; transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease); }
html[data-look="stripe"] .btn-primary { background: var(--primary); box-shadow: 0 1px 2px rgba(6, 27, 49, .12); }
html[data-look="stripe"] .btn-primary:hover { background: var(--primary-h); }
html[data-look="stripe"] .btn-primary::after { content: '›'; display: inline-block; margin-left: 6px; transition: transform .3s var(--ease); }
html[data-look="stripe"] .btn-primary:hover::after { transform: translateX(3px); }
html[data-look="stripe"] .btn-dark { background: var(--text); }
html[data-look="stripe"] .btn-ghost { background: #fff; border-color: var(--border); color: var(--text); box-shadow: 0 1px 1px rgba(6, 27, 49, .04); }
html[data-look="stripe"] .btn-ghost:hover { border-color: #c1c9d2; background: #fff; color: var(--primary); }
html[data-look="stripe"] .btn:disabled { opacity: 1; background: rgba(255,255,255,.75); color: #a3acb9; border-color: rgba(227,232,238,.8); }
html[data-look="stripe"] .stage-select { border-radius: 999px; }
html[data-look="stripe"] .period { border-radius: 4px; box-shadow: 0 1px 1px rgba(6, 27, 49, .04); }

/* Inputs */
html[data-look="stripe"] input, html[data-look="stripe"] select, html[data-look="stripe"] textarea {
  border-radius: 4px; border-color: #e3e8ee; box-shadow: 0 1px 1px rgba(6, 27, 49, .03);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
html[data-look="stripe"] input:focus, html[data-look="stripe"] select:focus, html[data-look="stripe"] textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(83, 58, 253, .16);
}

/* Chips and segmented controls */
html[data-look="stripe"] .chip { border-radius: 999px; transition: all .25s var(--ease); }
html[data-look="stripe"] .chip:hover { border-color: #c1c9d2; color: var(--text); }
html[data-look="stripe"] .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
html[data-look="stripe"] .seg button.active { color: var(--primary); }

/* Tables */
html[data-look="stripe"] .grid th { background: #f6f9fc; color: #697386; font-weight: 600; font-size: 11.5px; letter-spacing: .06em; }
html[data-look="stripe"] .grid td { color: var(--text-2); }
html[data-look="stripe"] .grid tbody tr { transition: background-color .2s var(--ease); }
html[data-look="stripe"] .grid tbody tr:hover td { background: #f7f8ff; }
html[data-look="stripe"] .grid tfoot td { background: #f6f9fc; }

/* Stage card */
html[data-look="stripe"] .sp-track { height: 8px; background: #edf1f5; }
html[data-look="stripe"] .sp-track span { transition: width .6s var(--ease); }
html[data-look="stripe"] .sp-item { border-radius: 6px; transition: background-color .25s var(--ease); }
html[data-look="stripe"] .sp-item.is-active { background: #f1efff; border-color: #e2dcff; }

/* Asset cards and progress */
html[data-look="stripe"] .progress span { background: linear-gradient(90deg, #8b5cf6, var(--primary)); transition: width .6s var(--ease); }
html[data-look="stripe"] .progress.done span { background: linear-gradient(90deg, #34d399, #059669); }

/* Popup: scale-in like a Stripe menu */
html[data-look="stripe"] .modal { background: rgba(6, 27, 49, .35); backdrop-filter: blur(2px); animation: bfo-fade .25s var(--ease); }
html[data-look="stripe"] .modal-card { border-radius: 12px; box-shadow: var(--shadow-lg); animation: bfo-pop .35s var(--ease); }
@keyframes bfo-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bfo-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* Page entrance: content rises in, staggered */
html[data-look="stripe"] .view:not([hidden]) > * { animation: bfo-rise .55s var(--ease) both; }
html[data-look="stripe"] .view:not([hidden]) > *:nth-child(2) { animation-delay: .05s; }
html[data-look="stripe"] .view:not([hidden]) > *:nth-child(3) { animation-delay: .1s; }
html[data-look="stripe"] .view:not([hidden]) > *:nth-child(4) { animation-delay: .15s; }
html[data-look="stripe"] .view:not([hidden]) > *:nth-child(n+5) { animation-delay: .2s; }
@keyframes bfo-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html[data-look="stripe"] .view:not([hidden]) > *, html[data-look="stripe"] .modal, html[data-look="stripe"] .modal-card { animation: none; }
}

/* Toast and gate */
html[data-look="stripe"] .toast { background: var(--text); border-radius: 6px; box-shadow: var(--shadow-md); }
html[data-look="stripe"] .toast button { color: #b9b0ff; }
html[data-look="stripe"] .gate { background: #ffffff; }
html[data-look="stripe"] .gate-card { border: 1px solid #edf1f5; box-shadow: var(--shadow-lg); border-radius: 12px; }

/* Settings: appearance choice (shown in both looks) */
.settings-card { max-width: 720px; }
.settings-card h2 { margin-bottom: 4px; }
.look-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.look-opt { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.look-opt:hover { border-color: #c1c9d2; }
.look-opt.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(83, 58, 253, .12); }
.look-swatch { display: flex; gap: 6px; margin-bottom: 4px; }
.look-swatch i { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); display: block; }
.look-name { font-weight: 600; font-size: 14px; color: var(--text); }
.look-desc { font-size: 12.5px; color: var(--muted); }
@media (max-width: 600px) { .look-options { grid-template-columns: 1fr; } }
