/* Backoffice only (D-201). Loaded after app.css and shell.css by backoffice/base.html. */
body.bo .topbar { box-shadow: inset 0 3px 0 #b45309; }
.bo-tag { margin-left: 10px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a4a06; background: #fdecd3; border: 1px solid #f2c98f; white-space: nowrap; }
.bo-role { font-size: 11.5px; font-weight: 750; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); margin-left: 6px; white-space: nowrap; }
.bo-role.super { background: #ece6fb; color: #5b3fa8; }
.bo-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 800; text-align: center; background: #b45309; color: #fff; }
.bo-scope { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin: -8px 0 18px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.bo-scope b { color: var(--text); }
.kpi-grid .metric-card a.bo-kpi-link { color: inherit; text-decoration: none; }
.kpi-grid .metric-card a.bo-kpi-link:hover { text-decoration: underline; }
.metric-card.is-hot { border-color: #f2c98f; box-shadow: inset 0 3px 0 #b45309; }
.bo-amt { font-variant-numeric: tabular-nums; }
.bo-amt b { color: #b45309; }
.bo-table td a.row-link { font-weight: 700; color: var(--text); text-decoration: none; }
.bo-table td a.row-link:hover { text-decoration: underline; }
.bo-table tr.is-hot td:first-child { box-shadow: inset 3px 0 0 #b45309; }
.bo-plan { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; border: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.bo-plan.pro { color: var(--brand-strong); background: var(--brand-soft); border-color: transparent; }
.bo-plan.trial { color: #7a5a00; background: #fff3c4; border-color: #ecd27a; }
.bo-plan.grace { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: transparent; }
.bo-plan.founder { color: #5b3fa8; background: #ece6fb; border-color: transparent; }
.bo-left { font-size: 12.5px; color: var(--muted); }
.bo-left.is-soon { color: #b45309; font-weight: 700; }
.bo-warn { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 750; color: #7a5a00; background: #fff3c4; border: 1px solid #ecd27a; white-space: nowrap; }
.bo-bad { color: var(--danger); font-weight: 700; }
.bo-dim { color: var(--muted); }
.bo-h2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bo-mt { margin-top: 8px; }
.bo-check { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.bo-check label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; cursor: pointer; }
.bo-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.bo-check small { display: block; color: var(--muted); font-size: 12.5px; }
.bo-result { padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong); font-size: 13.5px; margin: 0 0 14px; }
.bo-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bo-reject { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.bo-reject > summary { cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 650; list-style: none; }
.bo-reject > summary::-webkit-details-marker { display: none; }
.bo-reject[open] > summary { color: var(--danger); margin-bottom: 10px; }
.bo-field { display: grid; gap: 5px; align-content: start; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.bo-grant { align-items: start; }
.bo-field .form-control { color: var(--text); }
.bo-field small { font-size: 12px; }
.bo-time { list-style: none; margin: 0; padding: 0; }
.bo-time li { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.bo-time li:last-child { border-bottom: 0; }
.bo-time time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bo-time small { color: var(--muted); display: block; }
.bo-notes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.bo-notes li { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; overflow-wrap: anywhere; }
.bo-notes small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.bo-count-hint { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.bo-grant { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.bo-gifts { display: block; }
.bo-gifts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 100%; }
.bo-gifts li { display: grid; gap: 4px; font-size: 13px; }
.bo-gifts li small { display: block; color: var(--muted); }
.bo-gifts .bo-reject { margin-top: 4px; padding-top: 6px; }
.bo-roles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bo-roles label { flex: 1 1 200px; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 13.5px; }
.bo-roles label:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.bo-roles small { display: block; color: var(--muted); font-size: 12.5px; }
.bo-roles input { accent-color: var(--brand); margin: 2px 0 0; }
.bo-inline { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.bo-inline form { margin: 0; }
.bo-inline select.form-control { min-height: 32px; padding: 3px 28px 3px 8px; font-size: 13px; width: auto; }
.bo-search { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.bo-search .form-control { min-height: 36px; padding: 5px 10px; font-size: 14px; }
.bo-search input.form-control { flex: 1 1 260px; }
.bo-search select.form-control { width: auto; }
.bo-tabs { margin-bottom: 10px; }
.bo-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; color: var(--muted); font-size: 13px; }
.bo-pages { display: flex; gap: 8px; }
.bo-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bo-split.is-single { grid-template-columns: minmax(0, 1fr); }
.bo-quota { display: grid; gap: 4px; justify-items: end; }
.bo-quota span { font-size: 13px; color: var(--muted); }
.bo-quota b { color: var(--text); font-size: 15px; }
.bo-auth { display: grid; place-items: center; padding: 48px 0; }
.bo-auth .auth-card { width: min(440px, 100%); }
.bo-totp { display: grid; justify-items: center; gap: 10px; margin: 6px 0 4px; text-align: center; }
.bo-totp .totp-qr { margin: 0; order: 0; }
.bo-totp > p { margin: 0; font-size: 13.5px; }
.bo-totp .totp-manual { justify-self: stretch; text-align: left; margin: 0; }
.bo-totp code { overflow-wrap: anywhere; }
@media (max-width: 900px) { .bo-split, .bo-grant { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .bo-tag { display: none; } .bo-time li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .bo-tag { color: #f6c88f; background: #3b2408; border-color: #6e4512; }
  html[data-theme="system"] .bo-plan.trial, html[data-theme="system"] .bo-warn { color: #f3dc8f; background: #3a3111; border-color: #6d5a1c; }
  html[data-theme="system"] .bo-plan.founder, html[data-theme="system"] .bo-role.super { color: #c9b8f5; background: #2b2347; }
}
html[data-theme="dark"] .bo-tag { color: #f6c88f; background: #3b2408; border-color: #6e4512; }
html[data-theme="dark"] .bo-plan.trial, html[data-theme="dark"] .bo-warn { color: #f3dc8f; background: #3a3111; border-color: #6d5a1c; }
html[data-theme="dark"] .bo-plan.founder, html[data-theme="dark"] .bo-role.super { color: #c9b8f5; background: #2b2347; }
/* D-203: main period and renewals. */
.bo-kind { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 750; white-space: nowrap; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.bo-kind.is-renewal { color: var(--brand-strong); background: var(--brand-soft); border-color: transparent; }
.bo-run tr.is-waiting td { color: var(--muted); }
.bo-run tr.is-current td:first-child { box-shadow: inset 3px 0 0 #b45309; }
.bo-run tr.is-current td { font-weight: 650; }
.bo-table td small .bo-kind { margin-top: 3px; }
.bo-run td small { white-space: nowrap; }
/* D-205: adding a passkey: the name and the button on one line. */
.bo-passkey-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bo-passkey-add .form-control { width: 260px; max-width: 100%; }
.set-foot .bo-passkey-add .button { margin-left: 0; }

/* Kalender bursa (D-223). */
.cal-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.cal-tabs .segmented { flex-wrap: wrap; }
.cal-check { display: inline-flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.cal-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.cal-form { display: grid; gap: 12px; }
.cal-form .form-control { width: 100%; max-width: 100%; }
.cal-form .bo-field { min-width: 0; }
.cal-form textarea { min-height: 140px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.cal-table td small { display: block; color: var(--muted); font-size: 12.5px; }
.cal-table tr.cal-past td { color: var(--muted); }
.cal-table td, .cal-table th { white-space: normal; }
.cal-table td:nth-child(2) { overflow-wrap: anywhere; }
.cal-table td:first-child { min-width: 6.5rem; }
@media (max-width: 560px) { .cal-table td, .cal-table th { padding-left: 10px; padding-right: 10px; } }
.cal-row-actions { white-space: nowrap; width: 1%; }
.cal-row-actions form { display: inline; margin: 0; }
.cal-row-actions .cal-act { padding: 4px 6px; border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; }
.cal-row-actions .cal-act:hover, .cal-row-actions .cal-act:focus-visible { text-decoration: underline; }
.cal-row-actions .cal-act.is-danger { color: var(--danger); }
.cal-preview { width: 100%; table-layout: fixed; }
.cal-preview th, .cal-preview td { white-space: normal; overflow-wrap: anywhere; }
.cal-preview .st-new { color: var(--success); font-weight: 700; }
.cal-preview .st-unreadable { color: var(--danger); font-weight: 700; }
.cal-preview .st-exists, .cal-preview .st-weekend, .cal-preview .st-duplicate, .cal-preview .st-past { color: var(--muted); }
.bo-grants { justify-content: flex-start; }
.cal-older { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; }
.cal-older a[aria-current] { font-weight: 700; color: var(--text); }
@media (min-width: 561px) { .cal-table td.cal-row-actions { white-space: nowrap; } }
/* The same columns every year, whatever the names and buttons in it (user request). */
.cal-table { width: 100%; table-layout: fixed; }
.cal-table .cal-col-date { width: 10rem; }
.cal-table .cal-col-act { width: 8.5rem; }
.cal-table td.cal-row-actions { text-align: right; }
@media (max-width: 560px) {
  .cal-table .cal-col-date { width: 6.5rem; }
  .cal-table .cal-col-act { width: 4.5rem; }
}
/* One card and a drawer (D-223, like Sell in Positions). */
.cal-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.cal-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 14px 24px; border-top: 1px solid var(--line); background: color-mix(in srgb, #b7791f 7%, var(--surface)); font-size: 14px; }
.cal-banner-quiet { background: var(--surface-2); }
.cal-banner p { margin: 0; max-width: 70ch; }
.cal-banner form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.cal-drawer .cal-form { display: flex; flex-direction: column; gap: 12px; }
.cal-drawer .cal-form[hidden] { display: none; }
.cal-drawer .muted { margin: 0; color: var(--muted); }
.cal-drawer .cal-preview th:first-child { width: 34%; }
.cal-drawer .cal-preview th:last-child { width: 32%; }
