:root {
  --bf-navy: #0f3d5e;
  --bf-navy-2: #0b2e47;
  --bf-teal: #14a085;
  --bf-bg: #f4f6f9;
  --bs-primary: #0f3d5e;
  --bs-primary-rgb: 15, 61, 94;
  --bs-link-color: #0f5d8c;
  --bs-link-color-rgb: 15, 93, 140;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body { background: var(--bf-bg); font-size: .925rem; color: #1f2937; }

.btn-primary { --bs-btn-bg: var(--bf-navy); --bs-btn-border-color: var(--bf-navy); --bs-btn-hover-bg: var(--bf-navy-2); --bs-btn-hover-border-color: var(--bf-navy-2); --bs-btn-active-bg: var(--bf-navy-2); }
.btn-success { --bs-btn-bg: var(--bf-teal); --bs-btn-border-color: var(--bf-teal); --bs-btn-hover-bg: #10846d; --bs-btn-hover-border-color: #10846d; }
.btn-outline-primary { --bs-btn-color: var(--bf-navy); --bs-btn-border-color: var(--bf-navy); --bs-btn-hover-bg: var(--bf-navy); --bs-btn-hover-border-color: var(--bf-navy); }
.text-primary { color: var(--bf-navy) !important; }

.bf-logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--bf-teal); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .5px; }

/* Shell */
.bf-topbar { background: var(--bf-navy); }
.bf-shell { display: flex; min-height: 100vh; }
.bf-side { background: var(--bf-navy) !important; width: 250px; flex-shrink: 0; display: flex; flex-direction: column; }
@media (min-width: 992px) { .bf-shell { background: linear-gradient(to right, var(--bf-navy) 250px, transparent 250px); } .bf-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.bf-side .nav-link { color: rgba(255,255,255,.75); border-radius: 8px; padding: .55rem .75rem; display: flex; align-items: center; gap: .6rem; margin-bottom: 2px; }
.bf-side .nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.bf-side .nav-link.active { color: #fff; background: rgba(255,255,255,.14); }
.bf-main { flex: 1; min-width: 0; padding: 1.75rem 2rem; }
@media (max-width: 991.98px) { .bf-main { padding: 1.25rem 1rem; } }

.card { border: 1px solid #e6e9ee; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f3; font-weight: 600; padding: .85rem 1.1rem; border-radius: 12px 12px 0 0 !important; }
.bf-stat-icon { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; }
.bf-stat:hover { border-color: #cfd6df; }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .9rem; vertical-align: middle; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; font-weight: 600; background: #fafbfc; border-bottom-width: 1px; }
.table-hover tbody tr:hover { --bs-table-hover-bg: #f7f9fb; }
.badge { font-weight: 500; padding: .38em .6em; }

.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .3rem; }
.form-control, .form-select { border-radius: 8px; border-color: #d6dbe1; }
.form-control:focus, .form-select:focus { border-color: var(--bf-navy); box-shadow: 0 0 0 .2rem rgba(15,61,94,.12); }
.req::after { content: " *"; color: #dc3545; }

/* Candidate pipeline cards */
.cand-card { border-left: 4px solid #cbd5e1; }
.cand-card.s-Submitted { border-left-color: #f59e0b; }
.cand-card.s-Shortlisted, .cand-card.s-Interview { border-left-color: #0ea5e9; }
.cand-card.s-Selected, .cand-card.s-Offer.Accepted, .cand-card.s-Joined { border-left-color: var(--bf-teal); }
.cand-card.s-Rejected, .cand-card.s-Dropped { border-left-color: #ef4444; opacity: .8; }

.pipeline { display: flex; gap: .4rem; flex-wrap: wrap; }
.pipeline .step { flex: 1; min-width: 92px; text-align: center; background: #fff; border: 1px solid #e6e9ee; border-radius: 10px; padding: .55rem .3rem; }
.pipeline .step .n { font-size: 1.25rem; font-weight: 600; }
.pipeline .step .l { font-size: .72rem; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.2rem; border-left: 2px solid #e6e9ee; margin-left: .35rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bf-teal); }
.timeline li:last-child { border-left-color: transparent; }

/* Public pages */
.bf-main-public { min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-brand { background: linear-gradient(150deg, var(--bf-navy) 0%, #12507a 60%, var(--bf-teal) 140%); color: #fff; padding: 3.5rem; display: flex; flex-direction: column; justify-content: center; }
.auth-brand h1 { font-weight: 700; font-size: 2.1rem; line-height: 1.25; }
.auth-brand .point { display: flex; gap: .8rem; margin-top: 1.1rem; }
.auth-brand .point i { font-size: 1.3rem; color: #7ee2cb; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-form .card { width: 100%; max-width: 440px; }
@media (max-width: 991.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-brand { padding: 2rem 1.25rem; } .auth-brand .point:nth-of-type(n+3) { display: none; } }
.bf-main-public .alert { max-width: 640px; margin: 1rem auto; }

/* Invoice print */
.invoice-sheet { background: #fff; max-width: 820px; margin: auto; padding: 2.5rem; border: 1px solid #e6e9ee; border-radius: 12px; }
@media print {
  .bf-side, .bf-topbar, .no-print, .alert { display: none !important; }
  .bf-main { padding: 0; } body { background: #fff; }
  .invoice-sheet { border: 0; padding: 0; }
}

/* Voice recorder */
.voice-btn { width: 112px; height: 112px; border-radius: 50%; border: 0; background: var(--bf-teal); color: #fff; font-size: 2.8rem; box-shadow: 0 8px 24px rgba(20,160,133,.35); transition: transform .15s; }
.voice-btn:hover { transform: scale(1.05); }
.voice-btn.recording { background: #dc3545; box-shadow: 0 0 0 0 rgba(220,53,69,.6); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220,53,69,.55); } 70% { box-shadow: 0 0 0 22px rgba(220,53,69,0); } 100% { box-shadow: 0 0 0 0 rgba(220,53,69,0); } }
.choice-card { border: 2px solid #e6e9ee; border-radius: 14px; padding: 1.25rem; display: flex; gap: 1rem; align-items: center; text-decoration: none; color: inherit; background: #fff; height: 100%; }
.choice-card:hover { border-color: var(--bf-teal); color: inherit; }
.choice-card .ic { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; flex-shrink: 0; }
.approve-box { border: 2px solid var(--bf-teal); background: #f0fbf8; border-radius: 12px; }
.transcript { white-space: pre-wrap; max-height: 220px; overflow: auto; background: #f8fafc; border-radius: 8px; padding: .75rem; font-size: .85rem; }
