/* css/admin.css: Octavia staff area, on top of the shared design (app.css). */

h1, .page-head h1, .auth-side h2, .auth-form h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-family: Georgia, serif; font-weight: 700; font-size: 1.1rem; flex: none; }
.brand-word { font-family: Georgia, "Times New Roman", serif; font-weight: 600; font-size: 1.25rem; color: #fff; letter-spacing: -.01em; }
.brand-word span { color: var(--brand); }

.staff-chip { display: flex; align-items: center; gap: 10px; margin: var(--sp-2) var(--sp-2) var(--sp-1); padding: 10px 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .06); color: #fff; }
.staff-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); flex: none; }
.staff-chip .store-name { display: flex; flex-direction: column; font-weight: 600; line-height: 1.2; min-width: 0; }
.staff-chip .store-sub { font-weight: 450; font-size: var(--fs-sm); opacity: .7; }
.nav-label.static { cursor: default; }
.nav-label.static:hover { background: transparent; }
body.sidebar-collapsed .staff-chip .store-name { display: none; }

.profile-meta { display: none; flex-direction: column; line-height: 1.15; text-align: left; }
.profile-meta .pn { font-weight: 600; font-size: var(--fs-sm); }
.profile-meta .pr { font-size: .72rem; color: var(--text-3); }
@media (min-width: 768px) { .profile-meta { display: flex; } }

.dash-cols { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); margin-top: var(--sp-3); }
.kpi-strip + .kpi-strip { margin-top: var(--sp-2); }
.text-ok { color: var(--ok); }
.text-bad { color: var(--bad); }
.text-warn { color: var(--warn); }
.min-w-0 { min-width: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--surface-2); }
.tbl tr.unread td { background: var(--brand-tint); }
.tbl tr.unread .cell-main { font-weight: 700; }
.btn-danger-soft { background: var(--bad-tint); color: var(--bad); border-color: transparent; }
.btn-danger-soft:hover { background: var(--bad); color: #fff; }
.dl dd { overflow-wrap: anywhere; }

/* Drawer */
.offcanvas.offcanvas-end.oc-panel { --bs-offcanvas-width: min(640px, 100vw); width: min(640px, 100vw); }
.oc-panel .offcanvas-footer { flex-wrap: wrap; gap: var(--sp-1); }
.oc-panel .offcanvas-footer .btn { white-space: nowrap; }
.oc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--sp-1); }
.oc-stats > div { display: flex; flex-direction: column; padding: var(--sp-1) var(--sp-2); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.oc-stats strong { font-size: 1.05rem; }
.oc-stats span { color: var(--text-3); font-size: var(--fs-sm); }
.oc-section { margin-bottom: var(--sp-3); }
.oc-section > h3 { font-size: var(--fs-base); margin-bottom: var(--sp-1); display: flex; justify-content: space-between; align-items: center; }
.oc-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); }
.oc-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-1); padding: var(--sp-1) var(--sp-2); border-bottom: 1px solid var(--border); }
.oc-list li:last-child { border-bottom: 0; }
.oc-list a.row-link { color: inherit; text-decoration: none; display: flex; justify-content: space-between; gap: var(--sp-1); width: 100%; align-items: center; }

/* Questionnaire answers */
.qa-sec { margin-bottom: var(--sp-3); }
.qa-sec > h3 { font-size: var(--fs-xs); letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: var(--sp-1); }
.qa { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.qa:last-child { border-bottom: 0; }
.qa .q { font-size: var(--fs-sm); color: var(--text-3); }
.qa .a { white-space: pre-wrap; overflow-wrap: anywhere; }
.qa .a.empty-a { color: var(--text-3); font-style: italic; }
.rating { display: inline-flex; gap: 2px; color: var(--brand); }
.rating .off { color: var(--border-strong); }

/* Timeline of notes */
.tl-notes { list-style: none; margin: 0; padding: 0; }
.tl-notes li { padding: 10px 0 10px 18px; border-left: 2px solid var(--border); position: relative; }
.tl-notes li::before { content: ""; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.tl-notes li.system::before { border-color: var(--border-strong); }
.tl-notes .meta { font-size: var(--fs-xs); color: var(--text-3); }
.tl-notes .body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: var(--sp-2); overflow-x: auto; padding-bottom: var(--sp-2); }
.board-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 200px; }
.board-col > h3 { font-size: var(--fs-sm); padding: var(--sp-1) var(--sp-2); margin: 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); }
.board-col > h3 small { color: var(--text-3); font-weight: 500; }
.board-body { padding: var(--sp-1); display: flex; flex-direction: column; gap: var(--sp-1); min-height: 80px; flex: 1; }
.board-col.over { outline: 2px dashed var(--brand); outline-offset: -4px; }
.lead-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; cursor: grab; box-shadow: var(--shadow-1); }
.lead-card:hover { border-color: var(--border-strong); }
.lead-card .t { font-weight: 600; font-size: var(--fs-sm); }
.lead-card .s { font-size: var(--fs-xs); color: var(--text-3); }
.lead-card.dragging { opacity: .4; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal .dow { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 8px; background: var(--surface-2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal .day { min-height: 104px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); cursor: pointer; overflow: hidden; }
.cal .day.out { background: var(--surface-2); color: var(--text-3); }
.cal .day.today .dn { background: var(--brand); color: var(--on-brand); }
.cal .day.closed { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); }
.cal .dn { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 12px; font-size: var(--fs-sm); font-weight: 600; padding: 0 4px; }
.cal .ev { display: block; font-size: var(--fs-xs); padding: 2px 6px; margin-top: 3px; border-radius: 4px; background: var(--brand-tint); color: var(--brand-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--brand); }
.cal .ev.session { background: var(--ok-tint); color: var(--ok); border-left-color: var(--ok); }
.cal .ev.cancelled { background: var(--surface-2); color: var(--text-3); text-decoration: line-through; border-left-color: var(--border-strong); }
.cal .ev.requested { background: var(--warn-tint); color: var(--warn); border-left-color: var(--warn); }
.cal .more { font-size: var(--fs-xs); color: var(--text-3); margin-top: 3px; }
@media (max-width: 767.98px) { .cal .day { min-height: 70px; } .cal .ev { font-size: 0; padding: 0; height: 6px; } }

/* Line item editor */
.items-edit { border: 1px solid var(--border); border-radius: var(--r-md); }
.item-row-e { display: grid; grid-template-columns: minmax(0, 1fr) 70px 110px 100px 32px; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); align-items: center; }
.item-row-e.head { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); letter-spacing: .05em; }
.item-row-e .form-control { min-height: 36px; padding: 4px 8px; }
.item-row-e .lt { text-align: right; font-weight: 600; }
@media (max-width: 575.98px) { .item-row-e { grid-template-columns: 1fr 60px 90px 28px; } .item-row-e .lt { display: none; } .item-row-e.head > :nth-child(4) { display: none; } }
.totals { margin-left: auto; width: min(320px, 100%); }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { border-top: 1px solid var(--border-strong); font-weight: 700; font-size: 1.05rem; margin-top: 4px; padding-top: 8px; }

/* Bar chart (ratings, pipeline) */
.hbar { display: grid; grid-template-columns: 130px 1fr 42px; gap: 10px; align-items: center; font-size: var(--fs-sm); padding: 4px 0; }
.hbar .track { height: 10px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.hbar .fill { height: 100%; background: var(--brand); }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.slot-btn { min-width: 74px; }
.invalid-inline { color: var(--bad); font-size: var(--fs-sm); }

/* Title Case for every label (buttons, badges, tabs, nav, headings), and labels never wrap onto a second line. */
.btn, .pill, .badge, .chip, .seg button, .tabs-f button, .dropdown-item, .nav-item .t,
.card-h h2, .card-h h3, .page-head h1, .offcanvas-title, .modal-title, .legend { text-transform: capitalize; }
.btn, .pill, .badge, .chip, .seg button, .tabs-f button, .nav-item .t, .card-h h2, .card-h h3, .page-head h1,
.offcanvas-title, .modal-title { white-space: nowrap; }
.card-h { flex-wrap: nowrap; gap: 12px; }
.card-h h2, .card-h h3 { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card-h .btn { flex: none; }
.nav-item .t { overflow: hidden; text-overflow: ellipsis; }
