/* RitBuddy BackOffice: sidebar layout */
:root {
  --bo-ink: #1c1b33; --bo-muted: #6b6a85; --bo-line: #e6e7f2; --bo-bg: #f3f4fb;
  --bo-brand: #4a2fd8; --bo-brand-2: #7c3aed; --bo-accent: #ffc72c;
  --bo-side: #14122e; --bo-side-2: #1d1a42; --bo-side-ink: #c9c8e4;
  --bo-radius: 14px; --sb-w: 252px;
}
body.bo { background: var(--bo-bg); color: var(--bo-ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.25rem;
  background: radial-gradient(1200px 600px at 10% -10%, #5b3df0 0%, transparent 60%), radial-gradient(900px 500px at 100% 110%, #c850ff 0%, transparent 55%), #14122e; }
body.bo:has(#appBox:not(.d-none)) .login-wrap { display: none; }
.login-card { width: 100%; max-width: 420px; border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(8, 4, 40, .5); }
.login-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--bo-accent); display: flex; align-items: center; justify-content: center; margin: 0 auto .85rem; }
.login-logo svg { width: 30px; height: 30px; fill: none; stroke: #3b2a00; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* alert */
.bo-alert { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2000; max-width: min(92vw, 640px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); border-radius: 12px; }

/* shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sb-w); flex: 0 0 var(--sb-w); background: linear-gradient(180deg, var(--bo-side) 0%, var(--bo-side-2) 100%); color: var(--bo-side-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 1040; }
.sb-brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.1rem .9rem; }
.sb-logo { width: 38px; height: 38px; border-radius: 11px; background: var(--bo-accent); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.sb-logo svg { width: 22px; height: 22px; fill: none; stroke: #3b2a00; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sb-name { color: #fff; font-weight: 800; font-size: 1.1rem; line-height: 1.1; display: flex; flex-direction: column; }
.sb-name small { font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #9d9bd0; margin-top: 2px; }
.sb-scroll { flex: 1 1 auto; overflow-y: auto; padding: .25rem .7rem 1rem; scrollbar-width: thin; scrollbar-color: #3a3768 transparent; }
.sb-group { font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #7f7db0; padding: 1rem .6rem .35rem; }
.sb-nav .nav-item { margin: 1px 0; }
.sb-nav .nav-link { width: 100%; display: flex; align-items: center; gap: .7rem; text-align: left; border: 0; background: transparent; color: var(--bo-side-ink);
  padding: .55rem .7rem; border-radius: 10px; font-weight: 600; font-size: .93rem; transition: background .15s, color .15s; }
.sb-nav .nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-nav .nav-link.active { background: linear-gradient(135deg, var(--bo-brand), var(--bo-brand-2)); color: #fff; box-shadow: 0 6px 16px rgba(74, 47, 216, .45); }
.sb-nav .sb-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; opacity: .95; }
.sb-nav .badge { margin-left: auto; }
.sb-user { padding: .8rem .9rem 1rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.sb-who { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; min-width: 0; }
.sb-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--bo-accent); color: #3b2a00; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.sb-whoname { color: #fff; font-size: .82rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sb-user-btns { display: flex; gap: .4rem; }
.sb-user-btns .btn { flex: 1; font-size: .76rem; color: #fff; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); }
.sb-user-btns .btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.content-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 1.4rem 1.6rem 3rem; width: 100%; }   /* full width (like container-fluid): wide tables use the whole screen */
.mob-top, .sb-backdrop { display: none; }

/* cards, tables, buttons */
.content .card { border: 1px solid var(--bo-line); border-radius: var(--bo-radius); box-shadow: 0 1px 2px rgba(20, 18, 46, .04), 0 8px 24px rgba(20, 18, 46, .05) !important; }
.content .card .card-body { border-radius: var(--bo-radius); }
.content h2.h5, .content h2.h6 { font-weight: 800; color: var(--bo-ink); }
.content .table { --bs-table-bg: transparent; }
.content .table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bo-muted); font-weight: 700; border-bottom: 1px solid var(--bo-line); white-space: nowrap; background: #fafaff; }
.content .table-hover > tbody > tr:hover > * { background: #f6f5ff; }
.content .table > :not(caption) > * > * { padding: .6rem .7rem; }
.table-responsive.card { overflow-x: auto; }
.btn-dark { background: linear-gradient(135deg, var(--bo-brand), var(--bo-brand-2)); border-color: transparent; }
.btn-dark:hover, .btn-dark:focus { background: linear-gradient(135deg, #3d24c0, #6a2fd8); border-color: transparent; }
.btn-outline-dark { color: var(--bo-brand); border-color: #cfc8f7; }
.btn-outline-dark:hover { background: var(--bo-brand); border-color: var(--bo-brand); color: #fff; }
.form-control:focus, .form-select:focus { border-color: #8f7bf0; box-shadow: 0 0 0 .2rem rgba(74, 47, 216, .15); }
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 30px 80px rgba(8, 4, 40, .35); }
.modal-header { border-bottom-color: var(--bo-line); }
.modal-footer { border-top-color: var(--bo-line); }
.badge { font-weight: 700; }

/* dashboard numbers */
.stat-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
td.route { max-width: 340px; }
tr.clickable { cursor: pointer; }
#fareRows input { width: 90px; }

/* phone / tablet: the sidebar slides in over the page */
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .4); width: min(84vw, 300px); }
  body.sb-open .sidebar { transform: none; }
  .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 8, 30, .5); z-index: 1035; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.sb-open .sb-backdrop { opacity: 1; pointer-events: auto; }
  .mob-top { display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1030; background: var(--bo-side); color: #fff; padding: .6rem .9rem; box-shadow: 0 2px 14px rgba(0, 0, 0, .25); }
  .btn-menu { border: 0; background: rgba(255, 255, 255, .1); border-radius: 10px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
  .btn-menu svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
  .content { padding: 1rem .8rem 3rem; }
}

/* full width pages, but pages that are mostly a form stay readable instead of stretching over a wide screen */
#tab-settings #settingsForm, #tab-settings .card, #tab-admins .card.p-3 { max-width: 920px; }

/* website cards open a page */
.site-card { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.site-card:hover, .site-card:focus { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(74, 47, 216, .18) !important; outline: 0; }

/* address suggestions inside the fixed-price window */
.suggest { position: absolute; z-index: 1100; left: 0; right: 0; max-height: 240px; overflow-y: auto; border-radius: .6rem; box-shadow: 0 .5rem 1.25rem rgba(16, 24, 40, .18); }

/* website page: the menu on the left (Overzicht, Tarieven, Special For You, Vaste prijzen, Ritten, Domein) */
.sd-nav { display: flex; flex-direction: column; gap: 3px; position: sticky; top: 1rem; background: #fff; border: 1px solid var(--bo-line); border-radius: var(--bo-radius); padding: .5rem; box-shadow: 0 8px 24px rgba(20, 18, 46, .05); }
.sd-link { display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left; border: 0; background: transparent; color: var(--bo-ink); padding: .55rem .7rem; border-radius: 10px; font-weight: 600; font-size: .92rem; white-space: nowrap; transition: background .15s, color .15s; }
.sd-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.sd-link:hover { background: #f1f0ff; }
.sd-link.active { background: linear-gradient(135deg, var(--bo-brand), var(--bo-brand-2)); color: #fff; box-shadow: 0 6px 16px rgba(74, 47, 216, .35); }
.sd-count { margin-left: auto; font-size: .72rem; font-weight: 700; min-width: 1.4rem; text-align: center; border-radius: 999px; padding: .05rem .4rem; background: #ecebfb; color: var(--bo-brand); }
.sd-count:empty { display: none; }
.sd-link.active .sd-count { background: rgba(255, 255, 255, .25); color: #fff; }
.sd-tile { border: 1px solid var(--bo-line); border-radius: 12px; padding: .7rem .8rem; background: #fafaff; }
.sd-tile-n { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--bo-brand); }
.sd-tile-l { font-size: .78rem; color: var(--bo-muted); }
@media (max-width: 991.98px) {   /* phone / tablet: the menu becomes a row you can swipe */
  .sd-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .sd-nav::-webkit-scrollbar { display: none; }
  .sd-link { width: auto; flex: 0 0 auto; }
}

/* Uit / Test / Live switch (Instellingen > Mollie, PayPal ...) */
.mode-seg { display: flex; width: max-content; margin-right: auto; gap: 4px; padding: 4px; background: #eceafb; border-radius: 14px; max-width: 100%; }
.mode-opt { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 92px; border: 0; background: transparent; color: var(--bo-muted); padding: .5rem 1rem; border-radius: 10px; font-weight: 700; font-size: .92rem; transition: background .15s, color .15s, box-shadow .15s; }
.mode-opt:hover:not(.on) { background: rgba(255, 255, 255, .7); color: var(--bo-ink); }
.mode-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #b9b7d3; flex: 0 0 auto; }
.mode-opt.on { background: #fff; color: var(--bo-ink); box-shadow: 0 2px 8px rgba(20, 18, 46, .15); }
.mode-off.on .mode-dot { background: #8a889f; }
.mode-test.on .mode-dot { background: #f5a300; box-shadow: 0 0 0 3px rgba(245, 163, 0, .25); }
.mode-test.on { color: #8a5a00; }
.mode-live.on .mode-dot { background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, .25); }
.mode-live.on { color: #067647; }

/* the little "i" next to a field: click it for the explanation and an example */
.info-i { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; margin-left: .3rem; padding: 0; border: 1px solid #b9b3f0; border-radius: 50%;
  background: #ecebfb; color: var(--bo-brand); font: 700 .7rem/1 system-ui, sans-serif; cursor: help; vertical-align: text-bottom; }
.info-i:hover, .info-i:focus { background: var(--bo-brand); color: #fff; border-color: var(--bo-brand); outline: 0; }
.popover { max-width: 320px; font-size: .85rem; }
.popover-header { font-weight: 800; font-size: .88rem; }

/* phone fields (intl-tel-input): full width, in input groups and in modals */
.iti { width: 100%; }
.input-group > .iti { flex: 1 1 auto; width: 1%; }
.iti--container { z-index: 2000; }
.iti-locked .iti__selected-country { pointer-events: none; opacity: .75; }

/* Uiterlijk: logo preview and theme cards */
.lk-preview { display: flex; align-items: center; gap: .6rem; background: #1b1740; color: #fff; padding: .6rem .9rem; border-radius: .7rem; }
.lk-icon { display: inline-flex; width: 34px; height: 34px; border-radius: 10px; align-items: center; justify-content: center; background: #ffc72c; color: #2b1a00; }
.lk-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lk-text { display: inline-flex; flex-direction: column; line-height: 1.05; }
.lk-l1 { font-size: 1.25rem; font-weight: 800; }
.lk-preview[data-font="serif"] .lk-l1 { font-family: Georgia, Cambria, "Times New Roman", serif; font-weight: 700; }
.lk-l2 { font-size: .6rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; margin-top: .22rem; }
.lk-btn { margin-left: auto; font-size: .8rem; font-weight: 800; padding: .3rem .7rem; border-radius: .5rem; }
.sw-row { display: flex; gap: 0; border-radius: .5rem; overflow: hidden; border: 1px solid rgba(0, 0, 0, .12); height: 26px; }
.sw-row span { flex: 1; }
.th-opt { cursor: pointer; border: 2px solid transparent; border-radius: .7rem; padding: .55rem; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); height: 100%; }
.th-opt:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .14); }
.th-opt.on { border-color: #5b3df5; box-shadow: 0 0 0 3px rgba(91, 61, 245, .18); }
.th-opt .nm { font-weight: 700; font-size: .88rem; margin-top: .4rem; }
.th-prev { border-radius: .6rem; overflow: hidden; border: 1px solid rgba(0, 0, 0, .12); max-width: 420px; }
.th-bar { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; color: #fff; }
.th-name { font-weight: 800; }
.th-btn { margin-left: auto; font-size: .78rem; font-weight: 800; padding: .25rem .6rem; border-radius: .45rem; }
.th-page { padding: .7rem .75rem; }
.th-acc { font-weight: 800; }

/* (i) explanation next to a label */
.info-i { display: inline-flex; align-items: center; justify-content: center; width: 1.05rem; height: 1.05rem; margin-left: .35rem; padding: 0; border-radius: 50%; border: 1px solid #8b87b0; background: transparent; color: #6b6890; font: italic 700 .7rem/1 Georgia, serif; vertical-align: middle; cursor: pointer; }
.info-i:hover, .info-i:focus { background: #5b46e6; border-color: #5b46e6; color: #fff; outline: none; }
.popover { max-width: 280px; font-size: .85rem; }

/* Bezoekers: bars per day */
.vs-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; }
.vs-bar { position: relative; flex: 1 1 0; min-width: 3px; height: 100%; display: flex; align-items: flex-end; background: rgba(120, 120, 140, .08); border-radius: 4px 4px 0 0; }
.vs-fill { width: 100%; background: var(--bs-primary, #5b46e6); border-radius: 4px 4px 0 0; }
.vs-n { position: absolute; left: 0; right: 0; bottom: 100%; text-align: center; font-size: .6rem; color: #6b6880; display: none; }
.vs-bar:hover .vs-n { display: block; }
