/* ─────────────────────────────────────────────────────────────
   EXEC B2B Partner Portal — b2b.execalbania.com
   Self-contained dashboard styling on top of the brand tokens in
   main.css (--gold, --black, --card, --gray, …). Dark, premium, gold.
   ───────────────────────────────────────────────────────────── */

:root {
  --b2b-radius: 14px;
  --b2b-radius-sm: 10px;
  --b2b-sidebar: 264px;
  --b2b-ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

body.b2b {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(201,169,110,.08), transparent 60%), var(--black);
  color: var(--white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; }
::selection { background: rgba(201,169,110,.3); }

/* ─── App shell ─────────────────────────────────────────── */
.b2b-app { display: flex; min-height: 100vh; }

.b2b-side {
  width: var(--b2b-sidebar);
  flex: 0 0 var(--b2b-sidebar);
  background: linear-gradient(180deg, var(--black-2), var(--black));
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}
.b2b-brand {
  padding: 26px 24px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.b2b-brand img { height: 30px; width: auto; }
.b2b-brand .mark { font-family: 'Playfair Display', Georgia, serif; font-size: 1.35rem; letter-spacing: .08em; }
.b2b-brand .mark b { color: var(--gold); font-weight: 700; }
.b2b-brand .tag { font-size: .6rem; letter-spacing: .28em; color: var(--gold); text-transform: uppercase; margin-top: 3px; }

.b2b-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.b2b-navlink {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 4px;
  border-radius: var(--b2b-radius-sm);
  color: var(--gray-light); font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: all .18s var(--b2b-ease);
  border: 1px solid transparent;
}
.b2b-navlink svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .8; }
.b2b-navlink:hover { background: var(--card); color: var(--white); }
.b2b-navlink.active {
  background: linear-gradient(90deg, rgba(201,169,110,.16), rgba(201,169,110,.04));
  color: var(--gold-light); border-color: rgba(201,169,110,.28);
}
.b2b-navlink.active svg { opacity: 1; }
.b2b-navlink .count {
  margin-left: auto; background: var(--gold); color: var(--black);
  font-size: .62rem; font-weight: 700; border-radius: 10px; padding: 1px 7px;
}
.b2b-side-foot { padding: 16px; border-top: 1px solid var(--border); }
.b2b-side-org { font-size: .82rem; font-weight: 600; }
.b2b-side-org small { display: block; color: var(--gray); font-weight: 400; font-size: .72rem; margin-top: 2px; }

/* ─── Main column ───────────────────────────────────────── */
.b2b-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.b2b-top {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 32px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(12px); z-index: 30;
}
.b2b-top h1 { margin: 0; font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.b2b-top .sub { color: var(--gray); font-size: .8rem; margin-top: 2px; }
.b2b-top .spacer { flex: 1; }
.b2b-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: 999px; padding: 7px 14px; font-size: .78rem; color: var(--gray-light);
}
.b2b-chip b { color: var(--gold); }
.b2b-burger { display: none; background: none; border: 0; color: var(--white); cursor: pointer; }

.b2b-view { padding: 32px; display: none; animation: b2bfade .25s var(--b2b-ease); }
.b2b-view.active { display: block; }
@keyframes b2bfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── KPI cards ─────────────────────────────────────────── */
.b2b-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 28px; }
.b2b-kpi {
  background: linear-gradient(160deg, var(--card), var(--black-3));
  border: 1px solid var(--border); border-radius: var(--b2b-radius);
  padding: 20px 22px; position: relative; overflow: hidden;
}
.b2b-kpi::after { content: ''; position: absolute; inset: 0 0 auto auto; width: 90px; height: 90px; background: radial-gradient(circle at top right, rgba(201,169,110,.12), transparent 70%); }
.b2b-kpi .label { color: var(--gray); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.b2b-kpi .value { font-size: 1.9rem; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }
.b2b-kpi .value.gold { color: var(--gold); }
.b2b-kpi .foot { color: var(--gray); font-size: .74rem; margin-top: 6px; }

/* ─── Cards / panels ────────────────────────────────────── */
.b2b-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--b2b-radius); margin-bottom: 24px; overflow: hidden; }
.b2b-card-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.b2b-card-head h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.b2b-card-head .spacer { flex: 1; }
.b2b-card-body { padding: 22px; }
.b2b-card-body.flush { padding: 0; }

/* ─── Tables ────────────────────────────────────────────── */
.b2b-table-wrap { overflow-x: auto; }
table.b2b-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.b2b-table th { text-align: left; padding: 13px 18px; color: var(--gray); font-weight: 500; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap; }
.b2b-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.b2b-table tr:last-child td { border-bottom: 0; }
.b2b-table tbody tr { transition: background .15s; }
.b2b-table tbody tr:hover { background: rgba(255,255,255,.02); }
.b2b-ref { font-family: 'SFMono-Regular', ui-monospace, monospace; font-size: .8rem; color: var(--gold); letter-spacing: .04em; }
.b2b-muted { color: var(--gray); }
.b2b-empty { text-align: center; padding: 40px 20px; color: var(--gray); font-size: .86rem; }

/* ─── Badges ────────────────────────────────────────────── */
.b2b-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.b2b-badge.ok      { background: rgba(46,204,113,.12);  color: #6ee7a8; border-color: rgba(46,204,113,.25); }
.b2b-badge.warn    { background: rgba(243,156,18,.12);  color: #f6c26b; border-color: rgba(243,156,18,.25); }
.b2b-badge.info    { background: rgba(201,169,110,.12); color: var(--gold-light); border-color: rgba(201,169,110,.25); }
.b2b-badge.bad     { background: rgba(231,76,60,.12);   color: #f0908a; border-color: rgba(231,76,60,.25); }
.b2b-badge.neutral { background: var(--card-2); color: var(--gray-light); border-color: var(--border-2); }

/* ─── Buttons ───────────────────────────────────────────── */
.b2b-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: var(--b2b-radius-sm); font-size: .86rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .18s var(--b2b-ease); text-decoration: none; white-space: nowrap; }
.b2b-btn:disabled { opacity: .55; cursor: not-allowed; }
.b2b-btn.gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--black); }
.b2b-btn.gold:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.b2b-btn.ghost { background: var(--card-2); color: var(--white); border-color: var(--border-2); }
.b2b-btn.ghost:hover:not(:disabled) { background: var(--border); }
.b2b-btn.outline { background: transparent; color: var(--gold-light); border-color: rgba(201,169,110,.4); }
.b2b-btn.outline:hover:not(:disabled) { background: rgba(201,169,110,.08); }
.b2b-btn.danger { background: transparent; color: #f0908a; border-color: rgba(231,76,60,.4); }
.b2b-btn.danger:hover:not(:disabled) { background: rgba(231,76,60,.1); }
.b2b-btn.sm { padding: 7px 13px; font-size: .78rem; }
.b2b-btn.block { width: 100%; }

/* ─── Forms ─────────────────────────────────────────────── */
.b2b-grid { display: grid; gap: 16px; }
.b2b-grid.two { grid-template-columns: 1fr 1fr; }
.b2b-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.b2b-field { display: flex; flex-direction: column; gap: 7px; }
.b2b-field label { font-size: .78rem; color: var(--gray-light); font-weight: 500; }
.b2b-field .hint { font-size: .72rem; color: var(--gray); }
.b2b-input, .b2b-select, .b2b-textarea {
  width: 100%; background: var(--black-3); border: 1px solid var(--border-2); color: var(--white);
  border-radius: var(--b2b-radius-sm); padding: 12px 14px; font-size: .9rem; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.b2b-input:focus, .b2b-select:focus, .b2b-textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,110,.14); }
.b2b-textarea { resize: vertical; min-height: 84px; }
.b2b-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* selectable chips (ride type, class) */
.b2b-choice { display: grid; gap: 12px; }
.b2b-choice.row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.b2b-opt {
  border: 1px solid var(--border-2); background: var(--black-3); border-radius: var(--b2b-radius-sm);
  padding: 16px; cursor: pointer; transition: all .16s var(--b2b-ease); position: relative;
}
.b2b-opt:hover { border-color: rgba(201,169,110,.4); }
.b2b-opt.sel { border-color: var(--gold); background: rgba(201,169,110,.08); }
.b2b-opt .t { font-weight: 600; font-size: .92rem; }
.b2b-opt .d { color: var(--gray); font-size: .76rem; margin-top: 4px; }
.b2b-opt .p { color: var(--gold); font-size: .8rem; margin-top: 8px; font-weight: 600; }

/* addon rows */
.b2b-addon { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: var(--b2b-radius-sm); background: var(--black-3); }
.b2b-addon.sel { border-color: rgba(201,169,110,.4); }
.b2b-addon .info { flex: 1; }
.b2b-addon .info .t { font-size: .88rem; font-weight: 500; }
.b2b-addon .info .d { color: var(--gray); font-size: .74rem; }
.b2b-addon .price { color: var(--gold); font-size: .82rem; font-weight: 600; }
.b2b-qty { display: flex; align-items: center; gap: 8px; }
.b2b-qty button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--card-2); color: var(--white); cursor: pointer; font-size: 1rem; line-height: 1; }
.b2b-qty span { min-width: 20px; text-align: center; font-size: .86rem; }
.b2b-check { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }

/* ─── Reservation layout ────────────────────────────────── */
.b2b-reserve { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.b2b-summary { position: sticky; top: 96px; }
.b2b-price-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: .88rem; border-bottom: 1px dashed var(--border); }
.b2b-price-row.total { border-bottom: 0; padding-top: 16px; font-size: 1.15rem; font-weight: 700; }
.b2b-price-row .strike { color: var(--gray); text-decoration: line-through; }
.b2b-price-row .save { color: #6ee7a8; }
.b2b-price-row .gold { color: var(--gold); }

/* ─── Modal ─────────────────────────────────────────────── */
.b2b-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.b2b-overlay.open { display: flex; }
.b2b-modal { background: var(--card); border: 1px solid var(--border-2); border-radius: var(--b2b-radius); width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.b2b-modal-head { display: flex; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.b2b-modal-head h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.b2b-modal-head .x { margin-left: auto; background: none; border: 0; color: var(--gray); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.b2b-modal-body { padding: 24px; }
.b2b-dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: .88rem; }
.b2b-dl dt { color: var(--gray); }
.b2b-dl dd { margin: 0; text-align: right; }

/* ─── Toast ─────────────────────────────────────────────── */
.b2b-toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.b2b-toast { background: var(--card); border: 1px solid var(--border-2); border-left: 3px solid var(--gold); border-radius: var(--b2b-radius-sm); padding: 13px 18px; font-size: .86rem; min-width: 240px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: b2btoast .3s var(--b2b-ease); }
.b2b-toast.ok { border-left-color: var(--green); }
.b2b-toast.err { border-left-color: var(--red); }
@keyframes b2btoast { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ─── Mini bar chart (dashboard) ────────────────────────── */
.b2b-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.b2b-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.b2b-chart .bar i { width: 100%; max-width: 40px; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); border-radius: 6px 6px 0 0; min-height: 3px; transition: height .4s var(--b2b-ease); }
.b2b-chart .bar span { font-size: .68rem; color: var(--gray); }
.b2b-chart .bar b { font-size: .72rem; color: var(--gray-light); }

/* ─── Loading / utility ─────────────────────────────────── */
.b2b-spin { width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.25); border-top-color: currentColor; border-radius: 50%; display: inline-block; animation: b2bspin .7s linear infinite; }
@keyframes b2bspin { to { transform: rotate(360deg); } }
.b2b-center { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--gray); }
.b2b-hide { display: none !important; }
.b2b-section-title { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); margin: 0 0 14px; }

/* Google Places autocomplete dropdown on dark bg */
.pac-container { background: var(--card); border: 1px solid var(--border-2); border-radius: 8px; margin-top: 4px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.pac-item { border-top: 1px solid var(--border); color: var(--gray-light); padding: 8px 12px; }
.pac-item:hover { background: var(--card-2); }
.pac-item-query { color: var(--white); }
.pac-matched { color: var(--gold); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 980px) {
  .b2b-reserve { grid-template-columns: 1fr; }
  .b2b-summary { position: static; }
  .b2b-grid.two, .b2b-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .b2b-side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .28s var(--b2b-ease); box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .b2b-app.nav-open .b2b-side { transform: none; }
  .b2b-burger { display: inline-flex; }
  .b2b-view, .b2b-top { padding-left: 18px; padding-right: 18px; }
  .b2b-app.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }
}

/* ─────────────────────────────────────────────────────────
   Login page (b2b/index.html)
   ───────────────────────────────────────────────────────── */
body.b2b-login { display: flex; align-items: center; justify-content: center; padding: 24px; }
.b2b-login-card { width: 100%; max-width: 420px; background: linear-gradient(160deg, var(--card), var(--black-3)); border: 1px solid var(--border); border-radius: 18px; padding: 40px 34px; box-shadow: 0 40px 100px rgba(0,0,0,.5); }
.b2b-login-brand { text-align: center; margin-bottom: 8px; }
.b2b-login-brand .mark { font-family: 'Playfair Display', Georgia, serif; font-size: 2rem; letter-spacing: .1em; }
.b2b-login-brand .mark b { color: var(--gold); }
.b2b-login-brand .tag { font-size: .62rem; letter-spacing: .3em; color: var(--gold); text-transform: uppercase; margin-top: 6px; }
.b2b-login-card h1 { font-size: 1.25rem; text-align: center; margin: 22px 0 4px; font-weight: 600; }
.b2b-login-card .lead { text-align: center; color: var(--gray); font-size: .84rem; margin-bottom: 26px; }
.b2b-login-err { background: rgba(231,76,60,.1); border: 1px solid rgba(231,76,60,.3); color: #f0908a; border-radius: 10px; padding: 11px 14px; font-size: .82rem; margin-bottom: 16px; display: none; }
.b2b-login-err.show { display: block; }
.b2b-login-foot { text-align: center; margin-top: 22px; font-size: .78rem; color: var(--gray); }
.b2b-login-foot a { color: var(--gold-light); text-decoration: none; }
