/* ==========================================================================
   Component library — all components consume variables.css tokens
   ========================================================================== */

/* ---------- Card ---------- */
.card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-card); border: 0; min-width: 0; position: relative; }
.card-body { padding: var(--card-pad); }
.card-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); margin: 0 0 4px; color: var(--heading); }
.card-sub { color: var(--text-muted); font-size: var(--fs-base); margin: 0 0 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }
.card-footer { padding: 12px var(--card-pad); border-top: 1px solid var(--border); }
.card.h-100 { height: 100%; }
.card-flush .card-body { padding: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius);
  font-size: var(--fs-base); font-weight: var(--fw-regular); line-height: 1; white-space: nowrap;
  background: var(--soft-bg); color: var(--text); transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none; user-select: none;
}
.btn:hover { color: var(--heading); }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11.5px; gap: 4px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; } .btn-icon.btn-xs { width: 24px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 6px 0 rgba(85, 110, 230, .3); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-success { background: var(--success); color: #fff; } .btn-success:hover { background: #2ca67a; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { background: #cf5a5a; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; } .btn-warning:hover { background: #cd9941; color: #fff; }
.btn-info { background: var(--info); color: #fff; } .btn-info:hover { background: #448ccd; color: #fff; }
.btn-purple { background: var(--purple); color: #fff; } .btn-purple:hover { background: #6363d2; color: #fff; }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: var(--primary); color: #fff; }
.btn-soft-success { background: var(--success-soft); color: #1f9a6d; } .btn-soft-success:hover { background: var(--success); color: #fff; }
.btn-soft-danger { background: var(--danger-soft); color: #d14b4b; } .btn-soft-danger:hover { background: var(--danger); color: #fff; }
.btn-soft-warning { background: var(--warning-soft); color: #b9801c; } .btn-soft-warning:hover { background: var(--warning); color: #fff; }
.btn-soft-purple { background: var(--purple-soft); color: var(--purple); } .btn-soft-purple:hover { background: var(--purple); color: #fff; }
.btn-light { background: #eff2f7; color: var(--text); } .btn-light:hover { background: #e2e6ee; }
.btn-outline { background: #fff; border-color: var(--input-border); color: var(--text-2); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-link { background: none; color: var(--primary); padding: 0 4px; height: auto; }
.btn-link:hover { color: var(--primary-hover); text-decoration: underline; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--soft-bg); color: var(--heading); }
.btn-group { display: inline-flex; }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.btn-group > .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.btn-group > .btn + .btn { margin-left: -1px; }
.btn-group .btn-primary + .btn-primary { border-left: 1px solid rgba(255,255,255,.18); }
.btn-group .btn-primary.active { background: var(--primary-dark); box-shadow: inset 0 2px 4px rgba(0,0,0,.12); }

/* Segmented (Week / Month / Year in ref. 1) */
.segmented { display: inline-flex; gap: 2px; }
.segmented button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: var(--radius); color: var(--text-2); font-size: var(--fs-base); }
.segmented button:hover { color: var(--primary); }
.segmented button.active { background: var(--primary); color: #fff; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 6px; font-size: var(--fs-base); font-weight: var(--fw-medium); color: var(--heading); }
.form-label .req { color: var(--danger); }
.form-control, .form-select {
  display: block; width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--input-border); border-radius: var(--radius);
  background: #fff; font-size: var(--fs-base); color: var(--text-2); outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
textarea.form-control { height: auto; min-height: 80px; padding: 8px 12px; resize: vertical; }
.form-select { appearance: none; padding-right: 30px; background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23495057' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 10px center / 11px; }
.form-control:focus, .form-select:focus { border-color: #b1bbf3; box-shadow: 0 0 0 3px var(--primary-soft); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); }
.form-control-sm, .form-select.form-control-sm { height: 30px; font-size: 12px; }
.form-hint { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: var(--fs-sm); color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-icon .form-control { padding-left: 34px; }
.search-pill .form-control { border: 0; background: var(--soft-bg); border-radius: var(--radius); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: var(--fs-base); }
.check input { width: 15px; height: 15px; accent-color: var(--primary); margin: 0; flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 34px; height: 18px; border-radius: 9px; background: #ced4da; position: relative; transition: background var(--t-fast); margin: 0; flex: none; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform var(--t-fast); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: var(--fw-semibold); line-height: 1.2; white-space: nowrap; }
.badge-pill { border-radius: var(--radius-pill); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: var(--success-soft); color: #1f9a6d; }
.badge-warning { background: var(--warning-soft); color: #b9801c; }
.badge-danger { background: var(--danger-soft); color: #d14b4b; }
.badge-info { background: var(--info-soft); color: #2d84d1; }
.badge-purple { background: var(--purple-soft); color: #5b5be0; }
.badge-muted { background: var(--muted-soft); color: var(--muted); }
.badge-solid { color: #fff; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-confirmed { background: var(--primary-soft); color: var(--primary); }
.st-pending { background: var(--warning-soft); color: #b9801c; }
.st-completed { background: var(--success-soft); color: #1f9a6d; }
.st-cancelled { background: var(--danger-soft); color: #d14b4b; }
.st-in_progress { background: var(--purple-soft); color: #5b5be0; }
.st-no_show { background: var(--muted-soft); color: var(--muted); }
.st-blocked { background: #eceff5; color: #7b84a3; }

/* ---------- Avatars & icon circles ---------- */
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-weight: 600; font-size: 13px; color: #fff; background: var(--primary); flex: none; overflow: hidden; }
.avatar-sm { width: 30px; height: 30px; font-size: 11px; } .avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; } .avatar-xl { width: 76px; height: 76px; font-size: 24px; }
.avatar-soft { background: var(--primary-soft); color: var(--primary); }
.avatar-ring { box-shadow: 0 0 0 4px #fff; }
.avatar-group { display: flex; } .avatar-group .avatar { margin-left: -8px; box-shadow: 0 0 0 2px #fff; } .avatar-group .avatar:first-child { margin-left: 0; }
.icon-circle { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; flex: none; }
.icon-circle.sm { width: 36px; height: 36px; }
.icon-soft { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.icon-soft.success { background: var(--success-soft); color: var(--success); }
.icon-soft.warning { background: var(--warning-soft); color: #d39a2f; }
.icon-soft.danger { background: var(--danger-soft); color: var(--danger); }
.icon-soft.info { background: var(--info-soft); color: var(--info); }
.icon-soft.purple { background: var(--purple-soft); color: var(--purple); }

/* ---------- KPI mini stat (ref. 1: "Orders 1,235" with blue circle) ---------- */
.mini-stat .card-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mini-stat .label { color: var(--text-muted); font-weight: var(--fw-medium); margin-bottom: 6px; font-size: var(--fs-base); }
.mini-stat .value { font-size: var(--fs-kpi); font-weight: var(--fw-semibold); color: var(--heading); margin: 0; line-height: 1.2; }
.mini-stat .delta { font-size: 12px; margin-top: 4px; color: var(--text-muted); }
.mini-stat .icon-circle { box-shadow: 0 0 0 6px var(--primary-soft); width: 46px; height: 46px; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.table th { text-align: left; font-weight: var(--fw-semibold); color: var(--heading); background: #f8f9fa; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.table tbody tr:hover td { background: #fbfbfd; }
.table tbody tr.clickable { cursor: pointer; }
.table-plain th { background: transparent; color: var(--text-muted); font-weight: 500; }
.table-sm th, .table-sm td { padding: 8px 10px; }
.table .cell-main { color: var(--heading); font-weight: var(--fw-medium); }
.cell-sub { display: block; color: var(--text-muted); font-size: 12px; font-weight: 400; }
.table .actions { text-align: right; white-space: nowrap; }
.table-empty { padding: 40px 12px; text-align: center; color: var(--text-muted); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 12.5px; }
.pagination .pages { display: flex; gap: 4px; }
.pagination .pages button { min-width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); }
.pagination .pages button.active { background: var(--primary); color: #fff; }
.pagination .pages button:hover:not(.active) { background: var(--soft-bg); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: thin; }
.tabs button { border: 0; background: none; padding: 10px 14px; color: var(--text-muted); font-weight: var(--fw-medium); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--primary); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1px solid var(--border-strong); background: #fff; color: var(--text-2); border-radius: var(--radius-pill); padding: 5px 12px; font-size: 12.5px; }
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Progress ---------- */
.progress { height: 6px; background: #eff2f7; border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 6px; transition: width .6s var(--ease); }
.progress-bar.success { background: var(--success); } .progress-bar.warning { background: var(--warning); } .progress-bar.danger { background: var(--danger); } .progress-bar.info { background: var(--info); }

/* ---------- Lists ---------- */
.list-group { list-style: none; margin: 0; padding: 0; }
.list-group-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-group-item:last-child { border-bottom: 0; }
.list-group-item .meta { margin-left: auto; text-align: right; flex: none; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: var(--fs-base); }
.kv dt { color: var(--text-muted); } .kv dd { margin: 0; color: var(--heading); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Timeline (ref. 1 "Activity") ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 30px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; border-left: 2px dashed var(--border-strong); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--primary); background: #fff; display: grid; place-items: center; }
.timeline .tl-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.timeline .tl-dot.success { border-color: var(--success); } .timeline .tl-dot.success::after { background: var(--success); }
.timeline .tl-dot.danger { border-color: var(--danger); } .timeline .tl-dot.danger::after { background: var(--danger); }
.timeline .tl-dot.warning { border-color: var(--warning); } .timeline .tl-dot.warning::after { background: var(--warning); }
.timeline .tl-dot.purple { border-color: var(--purple); } .timeline .tl-dot.purple::after { background: var(--purple); }
.timeline .tl-date { font-weight: var(--fw-semibold); color: var(--heading); font-size: 12.5px; }
.timeline .tl-text { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 1200; background: rgba(33, 37, 41, .5); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; animation: fade-in var(--t) var(--ease); }
.modal { background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-modal); width: 100%; max-width: 560px; animation: modal-in var(--t) var(--ease); display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.modal-sm { max-width: 420px; } .modal-lg { max-width: 820px; } .modal-xl { max-width: 1040px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex: none; }
.modal-header h5 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); flex: none; flex-wrap: wrap; }
.modal-footer .left { margin-right: auto; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* ---------- Drawer (right offcanvas) ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 1150; background: rgba(33, 37, 41, .35); animation: fade-in var(--t); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1160; width: 460px; max-width: 100%; background: #fff; box-shadow: var(--shadow-modal); display: flex; flex-direction: column; animation: drawer-in var(--t) var(--ease); }
.drawer-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-header h5 { margin: 0; font-size: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes drawer-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 1400; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast { display: flex; gap: 12px; align-items: flex-start; width: 360px; max-width: 100%; padding: 12px 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-drop); border-left: 3px solid var(--primary); animation: toast-in var(--t) var(--ease); }
.toast.success { border-left-color: var(--success); } .toast.error { border-left-color: var(--danger); } .toast.warning { border-left-color: var(--warning); }
.toast .t-ic { flex: none; margin-top: 1px; color: var(--primary); }
.toast.success .t-ic { color: var(--success); } .toast.error .t-ic { color: var(--danger); } .toast.warning .t-ic { color: var(--warning); }
.toast h6 { margin: 0 0 2px; font-size: 13px; }
.toast p { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.toast .t-close { margin-left: auto; border: 0; background: none; color: var(--text-light); padding: 0; }
.toast.leaving { opacity: 0; transform: translateX(20px); transition: all var(--t); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Tooltip ---------- */
.tooltip { position: fixed; z-index: 1500; pointer-events: none; background: #2a3042; color: #fff; padding: 7px 10px; border-radius: var(--radius); font-size: 12px; line-height: 1.45; box-shadow: var(--shadow-drop); max-width: 280px; opacity: 0; transition: opacity var(--t-fast); }
.tooltip.show { opacity: 1; }
.tooltip .tt-title { font-weight: 600; margin-bottom: 3px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 6px; }
.tooltip .tt-sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.tooltip .tt-row b { margin-left: auto; padding-left: 12px; font-weight: 600; }

/* ---------- Stepper / wizard ---------- */
.steps { display: flex; gap: 0; margin-bottom: 20px; background: var(--soft-bg); border-radius: var(--radius); overflow-x: auto; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--text-muted); font-weight: 500; white-space: nowrap; border: 0; background: none; font-size: 12.5px; }
.step .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--border-strong); font-size: 11.5px; flex: none; }
.step.active { color: var(--primary); background: var(--primary-soft); }
.step.active .num { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done { color: var(--heading); }
.step.done .num { background: var(--success); border-color: var(--success); color: #fff; }
.step:disabled { cursor: default; }

/* ---------- Selectable option cards ---------- */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; text-align: left; width: 100%; transition: border-color var(--t-fast), box-shadow var(--t-fast); min-width: 0; }
.opt:hover { border-color: #b1bbf3; }
.opt.selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.opt .opt-title { font-weight: 500; color: var(--heading); display: block; }
.opt .opt-sub { font-size: 12px; color: var(--text-muted); display: block; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { height: 36px; border: 1px solid #c9d1f6; border-radius: var(--radius); background: #fff; color: var(--primary); font-weight: 500; font-size: 12.5px; padding: 0 6px; }
.slot:hover { background: var(--primary-softer); }
.slot.selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.slot small { display: block; font-size: 10px; font-weight: 400; opacity: .8; line-height: 1; margin-top: 2px; }
.slot.with-pro { height: 44px; }
.slot-group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; margin: 14px 0 8px; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.date-chip { flex: none; width: 62px; padding: 8px 4px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; text-align: center; }
.date-chip .dw { font-size: 11px; color: var(--text-muted); text-transform: uppercase; display: block; }
.date-chip .dn { font-size: 17px; font-weight: 600; color: var(--heading); display: block; line-height: 1.3; }
.date-chip .dc { font-size: 10.5px; color: var(--success); display: block; }
.date-chip.none .dc { color: var(--text-light); }
.date-chip.selected { border-color: var(--primary); background: var(--primary); }
.date-chip.selected .dw, .date-chip.selected .dn, .date-chip.selected .dc { color: #fff; }
.date-chip:disabled { opacity: .5; }

/* ---------- Alerts / callouts / empty ---------- */
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); font-size: var(--fs-base); background: var(--primary-softer); color: var(--primary-dark); border: 1px solid rgba(85, 110, 230, .2); }
.alert svg { flex: none; margin-top: 2px; }
.alert-success { background: rgba(52, 195, 143, .1); border-color: rgba(52, 195, 143, .3); color: #1d7f5b; }
.alert-danger { background: rgba(244, 106, 106, .08); border-color: rgba(244, 106, 106, .3); color: #b84141; }
.alert-warning { background: rgba(241, 180, 76, .12); border-color: rgba(241, 180, 76, .35); color: #94661a; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.empty { padding: 36px 16px; text-align: center; color: var(--text-muted); }
.empty svg { color: var(--text-light); margin-bottom: 10px; }
.empty h6 { color: var(--heading); margin-bottom: 4px; }
.demo-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--warning-soft); color: #9a6b17; text-transform: uppercase; letter-spacing: .04em; }

/* Legend */
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* Charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { font-size: 11px; fill: #a3a8b8; font-family: var(--font); }
.chart .grid line { stroke: #f1f2f6; }
.chart .bar { transition: opacity var(--t-fast); }
.chart .bar-group:hover .bar { opacity: .85; }
.gauge { position: relative; display: inline-block; }
.gauge-label { position: absolute; left: 0; right: 0; text-align: center; }
.gauge-label .gv { font-size: 18px; font-weight: 600; color: var(--heading); display: block; line-height: 1.2; }
.gauge-label .gl { font-size: 12px; color: var(--text-muted); }

/* Context menu */
.ctx-menu { position: fixed; z-index: 1450; min-width: 190px; padding: 6px 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-drop); animation: dd-in var(--t-fast) var(--ease); }

/* Section heading inside cards */
.section-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; margin: 18px 0 10px; }
.section-label:first-child { margin-top: 0; }

/* Stat inline (small numbers row like "125 Projects  $1245 Revenue") */
.stat-inline { display: flex; gap: 28px; flex-wrap: wrap; }
.stat-inline h5 { font-size: 15px; margin: 0 0 2px; }
.stat-inline p { margin: 0; color: var(--text-muted); font-size: 12.5px; }

/* Color swatch */
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.color-bar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }

/* Chat bubble generic is in ai-assistant.css */

/* Collapsible side sections (calendar left panel) */
details.side-sec { border-top: 1px solid var(--border); margin-top: 14px; }
details.side-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
details.side-sec > summary::-webkit-details-marker { display: none; }
details.side-sec > summary .chev { margin-left: auto; transition: transform var(--t-fast); }
details.side-sec[open] > summary .chev { transform: rotate(180deg); }
details.side-sec > .sec-body { padding: 8px 0 2px; }
