/* Taurus Collection CRM - design system (staff app + client portal). Bootstrap 5.3 + tokens below. */
:root {
  --tc-primary: #2563eb;
  --tc-primary-rgb: 37, 99, 235;
  --tc-navy: #0b1220;
  --tc-navy-2: #111a2e;
  --tc-accent: #f5b301;
  --tc-radius: 14px;
  --tc-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .06);
  --tc-sidebar-w: 260px;
  --bs-primary: var(--tc-primary);
  --bs-primary-rgb: var(--tc-primary-rgb);
  --bs-link-color: var(--tc-primary);
  --bs-link-color-rgb: var(--tc-primary-rgb);
  --bs-body-font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-bg: #f4f6fb;
}
[data-bs-theme="dark"] {
  --bs-body-bg: #0b1220;
  --bs-body-bg-rgb: 11, 18, 32;
  --bs-tertiary-bg: #141d33;
  --bs-border-color: #24304d;
  --tc-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --tc-primary: #5b8cff;
  --tc-primary-rgb: 91, 140, 255;
}
.btn-primary { --bs-btn-bg: var(--tc-primary); --bs-btn-border-color: var(--tc-primary); --bs-btn-hover-bg: #1d4fd8; --bs-btn-hover-border-color: #1d4fd8; --bs-btn-active-bg: #1b46c0; --bs-btn-disabled-bg: var(--tc-primary); }
.btn-outline-primary { --bs-btn-color: var(--tc-primary); --bs-btn-border-color: var(--tc-primary); --bs-btn-hover-bg: var(--tc-primary); --bs-btn-hover-border-color: var(--tc-primary); }
.btn { border-radius: 10px; font-weight: 500; }
.form-control, .form-select { border-radius: 10px; }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(var(--tc-primary-rgb), .18); border-color: var(--tc-primary); }
body.tc-app { min-height: 100vh; background: var(--bs-body-bg); -webkit-font-smoothing: antialiased; }
.min-w-0 { min-width: 0; }
.tc-prewrap { white-space: pre-wrap; }
.tc-clip { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---- sidebar ---- */
.tc-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--tc-sidebar-w); background: linear-gradient(180deg, var(--tc-navy) 0%, var(--tc-navy-2) 100%); color: #cbd5e1; overflow-y: auto; z-index: 1030; padding-bottom: 1.5rem; }
.offcanvas.tc-sidebar { position: fixed; width: min(var(--tc-sidebar-w), 86vw); }
.tc-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; color: #fff; }
.tc-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--tc-primary), #7c3aed); color: #fff; font-size: 1.25rem; box-shadow: 0 6px 18px rgba(37, 99, 235, .45); }
.tc-nav { padding: 0 .75rem; }
.tc-nav-title { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: #64748b; padding: 1rem .75rem .35rem; }
.tc-nav-link { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; margin-bottom: 2px; border-radius: 10px; color: #cbd5e1; text-decoration: none; font-size: .92rem; transition: background .15s, color .15s; }
.tc-nav-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; opacity: .85; }
.tc-nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.tc-nav-link.active { background: rgba(var(--tc-primary-rgb), .22); color: #fff; box-shadow: inset 3px 0 0 var(--tc-accent); }
.tc-nav-link.active i { color: var(--tc-accent); opacity: 1; }

/* ---- shell ---- */
.tc-main { margin-left: 0; min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 992px) { .tc-main { margin-left: var(--tc-sidebar-w); } }
.tc-topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; padding: .65rem 1rem; background: rgba(var(--bs-body-bg-rgb), .85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--bs-border-color); }
@media (min-width: 768px) { .tc-topbar { padding: .75rem 1.75rem; } }
.tc-search { position: relative; max-width: 520px; }
.tc-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.tc-search .form-control { padding-left: 2.4rem; background: var(--bs-body-bg); border-radius: 999px; }
.tc-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--tc-primary); color: #fff; font-weight: 600; font-size: .85rem; }
.tc-notif { width: min(360px, 92vw); max-height: 70vh; overflow-y: auto; }
.tc-content { flex: 1; padding: 1rem; }
@media (min-width: 768px) { .tc-content { padding: 1.5rem 1.75rem; } }
.tc-footer { padding: 1rem; text-align: center; font-size: .78rem; color: #94a3b8; }
.tc-pagehead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* ---- cards ---- */
.tc-card { border: 1px solid var(--bs-border-color); border-radius: var(--tc-radius); box-shadow: var(--tc-shadow); background: var(--bs-body-bg); }
[data-bs-theme="light"] .tc-card { background: #fff; }
.tc-card > .card-header:first-child { border-radius: var(--tc-radius) var(--tc-radius) 0 0; }
.tc-hero { border-left: 4px solid var(--tc-primary); }
.tc-sec { letter-spacing: .06em; font-size: .74rem; padding-bottom: .25rem; border-bottom: 1px solid var(--bs-border-color); }
.tc-kpi .tc-kpi-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); }
.tc-kpi .tc-kpi-value { font-size: 1.35rem; font-weight: 700; line-height: 1.25; }
.tc-kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; }
.tc-badge { font-weight: 500; letter-spacing: .01em; }
.tc-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc-dl dt { font-weight: 500; color: var(--bs-secondary-color); font-size: .82rem; padding-top: .5rem; }
.tc-dl dd { padding-top: .35rem; margin-bottom: .25rem; word-break: break-word; }

/* ---- tables ---- */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: rgba(var(--tc-primary-rgb), .05); }
.tc-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); font-weight: 600; white-space: nowrap; background: transparent; border-bottom-width: 1px; }
.tc-table td { vertical-align: middle; }
.tc-filter { min-width: 140px; }
@media (max-width: 767.98px) {
  .tc-table-wrap { overflow: visible; }
  .tc-table thead { display: none; }
  .tc-table, .tc-table tbody, .tc-table tr, .tc-table td { display: block; width: 100%; }
  .tc-table tr { border: 1px solid var(--bs-border-color); border-radius: 12px; margin: .6rem; width: auto; padding: .35rem .75rem; background: var(--bs-body-bg); }
  [data-bs-theme="light"] .tc-table tr { background: #fff; }
  .tc-table td { display: flex; justify-content: space-between; gap: 1rem; text-align: right; border: 0; padding: .35rem 0; }
  .tc-table td::before { content: attr(data-label); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); text-align: left; flex: 0 0 38%; padding-top: .15rem; }
  .tc-table td:first-child { font-size: 1.02rem; border-bottom: 1px dashed var(--bs-border-color); margin-bottom: .2rem; }
  .tc-table td[colspan] { display: block; text-align: center; }
  .tc-table td[colspan]::before { display: none; }
}

/* ---- tabs ---- */
.tc-tabs { border-bottom: 0; gap: .15rem; scrollbar-width: none; }
.tc-tabs::-webkit-scrollbar { display: none; }
.tc-tabs .nav-link { border-radius: 10px 10px 0 0; color: var(--bs-secondary-color); font-weight: 500; font-size: .9rem; }
.tc-tabs .nav-link.active { color: var(--tc-primary); background: var(--bs-body-bg); border-color: var(--bs-border-color) var(--bs-border-color) transparent; }
[data-bs-theme="light"] .tc-tabs .nav-link.active { background: #fff; }

/* ---- timeline / stepper / chat ---- */
.tc-timeline { position: relative; padding-left: 0; }
.tc-timeline li { position: relative; display: flex; gap: .85rem; padding-bottom: 1rem; }
.tc-timeline li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--bs-border-color); }
.tc-tl-dot { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--tc-primary-rgb), .12); color: var(--tc-primary); font-size: .9rem; }
.tc-stepper { display: flex; overflow-x: auto; gap: 0; padding-bottom: .25rem; }
.tc-step { flex: 1 0 92px; text-align: center; position: relative; font-size: .76rem; color: var(--bs-secondary-color); }
.tc-step::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--bs-border-color); z-index: 0; }
.tc-step:first-child::before { display: none; }
.tc-step-label { display: block; line-height: 1.2; padding: 0 2px; }
.tc-step-dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--bs-border-color); color: var(--bs-secondary-color); font-weight: 600; margin-bottom: .3rem; }
.tc-step.done .tc-step-dot { background: #16a34a; color: #fff; }
.tc-step.done::before, .tc-step.current::before { background: #16a34a; }
.tc-step.current .tc-step-dot { background: var(--tc-primary); color: #fff; box-shadow: 0 0 0 5px rgba(var(--tc-primary-rgb), .2); }
.tc-step.current { color: var(--bs-body-color); font-weight: 600; }
.tc-bubble { max-width: 88%; padding: .65rem .9rem; border-radius: 14px; margin-bottom: .6rem; }
.tc-bubble-in { background: var(--bs-tertiary-bg); border-top-left-radius: 4px; }
.tc-bubble-out { background: rgba(var(--tc-primary-rgb), .12); margin-left: auto; border-top-right-radius: 4px; }
.tc-letter-frame { width: 100%; height: 520px; border: 0; background: #fff; border-radius: 0 0 var(--tc-radius) var(--tc-radius); }

/* ---- charts (pure CSS) ---- */
.tc-bar { height: 10px; border-radius: 99px; background: var(--bs-border-color); overflow: hidden; }
.tc-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--tc-primary); }
.tc-spark { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.tc-spark > div { flex: 1; background: linear-gradient(180deg, var(--tc-primary), rgba(var(--tc-primary-rgb), .35)); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; }
.tc-spark > div span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--bs-secondary-color); white-space: nowrap; }
.tc-funnel-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .55rem; font-size: .88rem; }
.tc-funnel-row .lbl { flex: 0 0 110px; color: var(--bs-secondary-color); }
.tc-funnel-row .bar { flex: 1; }
.tc-funnel-row .val { flex: 0 0 48px; text-align: right; font-weight: 600; }

/* ---- auth pages ---- */
.tc-auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(1200px 600px at 10% -10%, rgba(37, 99, 235, .35), transparent), radial-gradient(900px 500px at 100% 110%, rgba(245, 179, 1, .22), transparent), var(--tc-navy); }
.tc-auth-card { width: 100%; max-width: 420px; border-radius: 20px; border: 0; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.tc-auth-card .tc-logo { width: 54px; height: 54px; font-size: 1.6rem; margin: 0 auto; }

/* ---- public / print ---- */
.tc-sheet { max-width: 820px; margin: 0 auto; background: #fff; color: #111; padding: 2rem; border-radius: 12px; box-shadow: var(--tc-shadow); }
@media print { .no-print, .tc-topbar, .tc-sidebar, .tc-footer { display: none !important; } .tc-main { margin: 0 !important; } .tc-sheet { box-shadow: none; padding: 0; } body { background: #fff !important; } }

/* ---- small screens ---- */
@media (max-width: 575.98px) {
  .tc-kpi .tc-kpi-value { font-size: 1.05rem; overflow-wrap: anywhere; }
  .tc-kpi .card-body { gap: .6rem !important; padding: .75rem !important; }
  .tc-kpi-icon { width: 34px; height: 34px; font-size: 1rem; flex: 0 0 34px; border-radius: 10px; }
  .tc-kpi .text-truncate { white-space: normal; }
  .tc-hero .btn { padding: .25rem .5rem; }
  .tc-pagehead h1 { font-size: 1.15rem; }
  .tc-spark { height: 90px; }
  .tc-funnel-row .lbl { flex-basis: 84px; }
}
