/* Общ вид на денталните табла на VD TMS — същият като на Моллови
   (dental-dashboard-local.html). Не променяй само тук — дръж ги еднакви. */
:root {
    --primary: #1363C6;
    --secondary: #15ACE1;
    --light: #F4F7FE;
    --dark: #14183E;
}
body { background: #f0f4fb; font-family: 'Open Sans', sans-serif; }

.admin-banner {
    background: linear-gradient(90deg, #6d28d9, #4338ca); color: #fff;
    text-align: center; padding: 8px 14px; font-size: 13px; font-weight: 600;
}
.admin-banner a { color: #fff; text-decoration: underline; margin-left: 6px; }

.dash-wrapper { display: flex; min-height: calc(100vh - 56px); }
.dash-sidebar {
    width: 220px; flex-shrink: 0;
    background: var(--dark);
    padding: 24px 0;
    position: sticky; top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
}
.dash-sidebar .sidebar-brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 12px;
}
.dash-sidebar .sidebar-brand .title { font-size: 15px; font-weight: 700; color: #fff; }
.dash-sidebar .sidebar-brand span { display: block; font-size: 11px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,.6); text-decoration: none;
    font-size: 13.5px; transition: all .2s;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-nav a.active { color: #fff; background: rgba(19,99,198,.25); border-left-color: var(--primary); }
.sidebar-nav a i { font-size: 15px; width: 18px; text-align: center; }
.sidebar-nav .nav-badge { color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 10px; margin-left: auto; }
.sidebar-section { padding: 16px 20px 6px; font-size: 10px; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .12em; }
.conn-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.1); position: absolute; bottom: 0; width: 100%; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.dot-ok   { background: #28a745; }
.dot-warn { background: #ffc107; }
.dot-err  { background: #dc3545; }

.dash-main { flex: 1; padding: 28px 32px; min-width: 0; }
.dash-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.dash-topbar h2 { font-family: 'Ubuntu', sans-serif; font-size: 20px; font-weight: 700; color: var(--dark); margin: 0; }

.metric-card { background: #fff; border-radius: 12px; padding: 16px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.metric-card .label { font-size: 11.5px; color: #6c757d; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.metric-card .value { font-size: 26px; font-weight: 700; font-family: 'Ubuntu', sans-serif; line-height: 1; }
.metric-card .sub { font-size: 11px; color: #adb5bd; margin-top: 3px; }

.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-pill {
    padding: 4px 12px; border-radius: 20px; font-size: 12.5px;
    cursor: pointer; border: 1px solid #dee2e6;
    background: #fff; color: #495057; transition: all .15s;
}
.filter-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-pill:hover:not(.active) { background: #f1f3f5; }

.dash-card { background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); overflow: hidden; }
.dash-card-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dash-card-header h5 { font-family: 'Ubuntu', sans-serif; font-size: 15px; font-weight: 700; color: var(--dark); margin: 0; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table thead th { padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #6c757d; background: #f8f9fa; border-bottom: 1px solid #e9ecef; white-space: nowrap; }
.dash-table tbody td { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover { background: #fafbff; }
.table-footer { padding: 10px 20px; font-size: 12px; color: #adb5bd; border-top: 1px solid #f0f0f0; }

.badge-status { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-to_call    { background: #e8f0fe; color: #1363C6; }
.badge-confirmed  { background: #e6f4ea; color: #1e7e34; }
.badge-rescheduled{ background: #fff3cd; color: #856404; }
.badge-cancelled  { background: #fde8e8; color: #b02a37; }
.badge-no_answer  { background: #f0f0f0; color: #6c757d; }

.toast-container-custom { position: fixed; bottom: 24px; right: 24px; z-index: 9999; }
.custom-toast {
    background: #1a2540; color: #fff; border-radius: 10px;
    padding: 12px 18px; font-size: 13px; margin-top: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
    display: flex; align-items: center; gap: 10px;
    animation: slideIn .3s ease;
}
.custom-toast.success { border-left: 4px solid #28a745; }
.custom-toast.error   { border-left: 4px solid #dc3545; }
.custom-toast.info    { border-left: 4px solid #17a2b8; }
@keyframes slideIn { from { transform: translateX(80px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.empty-state { padding: 60px 20px; text-align: center; color: #adb5bd; }
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; }
.container-fluid.sticky-top { background: var(--dark) !important; }

.action-btn { background: none; border: none; padding: 4px 7px; border-radius: 6px; cursor: pointer; font-size: 14px; transition: background .15s; line-height: 1; }
.action-btn:hover { background: #e9ecef; }
.action-btn.call  { color: #1363C6; }
.action-btn.viber { color: #7360f2; }
.action-btn.sms   { color: #28a745; }
.action-btn.edit  { color: #495057; }
.action-btn.del   { color: #dc3545; }
.actions-cell, .row-actions { display: flex; gap: 2px; align-items: center; }

/* --- допълнения за ББ Дент (настройки, слотове, редакция в реда) --- */
.form-row-flex { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.form-row-flex label, .dash-main label { display: block; font-size: 12px; font-weight: 600; color: #6c757d; margin-bottom: 4px; }
.dash-main input:not([type=checkbox]):not(.form-control),
.dash-main select:not(.form-control):not(.form-select),
.dash-main textarea {
    padding: .3rem .6rem; font-size: 13px; line-height: 1.5;
    border: 1px solid #ced4da; border-radius: .25rem; background: #fff; color: #212529;
    min-width: 150px; outline: none;
}
.dash-main input:focus, .dash-main select:focus, .dash-main textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 .15rem rgba(19,99,198,.15); }
.dash-main textarea { width: 100%; font-family: inherit; resize: vertical; }
.dash-main input[type=number] { min-width: 110px; }
select.time-select { min-width: 100px !important; }

.settings-block > summary { list-style: none; cursor: pointer; }
.settings-block > summary::-webkit-details-marker { display: none; }
.settings-block > summary h5::before {
    content: "\f054"; font-family: "Font Awesome 5 Free"; font-weight: 900;
    font-size: 11px; color: #adb5bd; margin-right: 10px; display: inline-block; transition: transform .15s;
}
.settings-block[open] > summary h5::before { transform: rotate(90deg); }
.settings-block:not([open]) > summary { border-bottom: none; }

tr.editing td { background: #f8faff; }
.dash-main tr.editing input:not([type=checkbox]), .dash-main tr.editing select { min-width: 0; width: 100%; }
.edit-actions { display: flex; gap: 6px; white-space: nowrap; }

.slots-wrap { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.slot-btn {
    border: 1px solid #dee2e6; background: #fff; border-radius: 20px;
    padding: 5px 14px; cursor: pointer; font-size: 12.5px; color: #495057; transition: all .15s;
}
.slot-btn:hover { background: #f1f3f5; }
.slot-btn.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.muted { color: #adb5bd; }

/* --- календар със свободни часове (като Google Calendar) --- */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-label { font-family: 'Ubuntu', sans-serif; font-size: 16px; font-weight: 500; color: var(--dark); margin-left: 6px; }
.cal-scroll { overflow-x: auto; border: 1px solid #eef1f8; border-radius: 10px; max-height: 620px; overflow-y: auto; }
.cal-grid { display: grid; grid-template-columns: 56px repeat(7, minmax(96px, 1fr)); min-width: 760px; position: relative; }
.cal-corner, .cal-dayhead {
    position: sticky; top: 0; z-index: 3; background: #fff;
    border-bottom: 1px solid #e9ecef; height: 58px;
}
.cal-corner { font-size: 9.5px; color: #adb5bd; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
.cal-dayhead { display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 1px solid #f1f3f5; }
.cal-dayhead span { font-size: 11px; color: #6c757d; letter-spacing: .06em; }
.cal-dayhead b { font-family: 'Ubuntu', sans-serif; font-size: 22px; font-weight: 500; color: #3c4043; line-height: 1.2; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-dayhead.today span { color: var(--primary); }
.cal-dayhead.today b { background: var(--primary); color: #fff; }
.cal-times { position: relative; }
.cal-times div { position: absolute; right: 8px; transform: translateY(-50%); font-size: 10.5px; color: #868e96; }
.cal-times div:first-child { transform: none; }
.cal-col {
    position: relative; border-left: 1px solid #f1f3f5;
    background-image: linear-gradient(to bottom, #eef0f3 1px, transparent 1px);
    background-size: 100% 52px;
}
.cal-col.today { background-color: #fafcff; }
.cal-col.can-insert { cursor: cell; }
.cal-col.can-insert:hover { background-color: #f7f9fd; }
.cal-ev.busy, .cal-ev.current { border: 1px solid #fff; cursor: cell; }
.cal-ev {
    position: absolute; left: 3px; right: 5px; border-radius: 6px; padding: 3px 7px;
    font-size: 11.5px; line-height: 1.3; overflow: hidden; box-sizing: border-box;
}
.cal-ev b { font-weight: 600; }
.cal-ev span { opacity: .8; }
.cal-ev.free {
    background: #e6f4ea; color: #1e7e34; border: 1px dashed #8fd19e; cursor: pointer; transition: all .12s;
}
.cal-ev.free:hover { background: #ccebd5; border-style: solid; }
.cal-ev.free.picked { background: var(--primary); color: #fff; border: 1px solid var(--primary); box-shadow: 0 2px 8px rgba(19,99,198,.35); }
.cal-ev.busy { background: #039be5; color: #fff; }
.cal-ev.current { background: #8e24aa; color: #fff; }
.cal-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: #6c757d; margin-top: 10px; }
.cal-legend .lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.cal-legend .lg:first-child { margin-left: 0; }
.cal-legend .lg.free { background: #e6f4ea; border: 1px dashed #8fd19e; }
.cal-legend .lg.busy { background: #039be5; }
.cal-legend .lg.current { background: #8e24aa; }

@media (max-width: 768px) {
    /* на телефон менюто става хоризонтална лента, за да има навигация */
    .dash-wrapper { flex-direction: column; }
    .dash-sidebar { width: 100%; height: auto; position: static; padding: 0; }
    .dash-sidebar .sidebar-brand, .sidebar-section, .conn-footer { display: none; }
    .sidebar-nav { display: flex; overflow-x: auto; }
    .sidebar-nav a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; padding: 12px 14px; }
    .sidebar-nav a.active { border-bottom-color: var(--primary); }
    .dash-main { padding: 16px; }
}

/* --- AIRA за Talent Hunter --- */
.stage-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; background: #f0f0f0; color: #6c757d; }
.stage-badge.s-approve { background: #fff3cd; color: #856404; }
.stage-badge.s-call    { background: #e8f0fe; color: #1363C6; }
.stage-badge.s-video   { background: #f3e8fd; color: #7b2cbf; }
.stage-badge.s-booked  { background: #e6f4ea; color: #1e7e34; }
.stage-badge.s-other   { background: #e0f7fa; color: #00838f; }
.stage-badge.s-bad     { background: #fde8e8; color: #b02a37; }
.score { font-weight: 700; font-family: 'Ubuntu', sans-serif; }
.score.hi { color: #1e7e34; } .score.mid { color: #b8860b; } .score.lo { color: #b02a37; }
.q-list { display: flex; flex-direction: column; gap: 8px; }
.q-row { display: flex; gap: 8px; align-items: center; }
.q-row .q-num { width: 22px; text-align: right; color: #adb5bd; font-size: 12px; }
.q-row input { flex: 1; min-width: 0 !important; }
.field-help { font-size: 11.5px; color: #adb5bd; margin-top: 3px; }
.pos-form .col-12, .pos-form .col-md-6, .pos-form .col-md-4, .pos-form .col-md-3 { margin-bottom: 14px; }
.pos-form input:not([type=checkbox]), .pos-form select { width: 100%; }
.aira-modal-bg { position: fixed; inset: 0; background: rgba(20,24,62,.45); z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.aira-modal { background: #fff; border-radius: 14px; width: 100%; max-width: 720px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.aira-modal .m-head { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.aira-modal .m-head h5 { margin: 0; font-family: 'Ubuntu', sans-serif; font-size: 16px; font-weight: 700; color: var(--dark); }
.aira-modal .m-body { padding: 18px 20px; font-size: 13.5px; }
.aira-modal .m-foot { padding: 12px 20px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 8px; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 12.5px; }
.timeline li { padding: 6px 0; border-bottom: 1px dashed #eee; display: flex; gap: 10px; }
.timeline li span.t { color: #adb5bd; white-space: nowrap; min-width: 112px; }
.transcript { white-space: pre-wrap; background: #f8f9fa; border-radius: 8px; padding: 12px; font-size: 12.5px; max-height: 360px; overflow-y: auto; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--dark), var(--primary)); padding: 20px; }
.login-card { background: #fff; border-radius: 16px; width: 100%; max-width: 400px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-card h1 { font-family: 'Ubuntu', sans-serif; font-size: 24px; font-weight: 700; color: var(--dark); margin: 0; }
.login-card .sub { color: #6c757d; font-size: 13px; margin: 4px 0 24px; }
.login-card label { font-size: 12px; font-weight: 600; color: #6c757d; margin-bottom: 4px; display: block; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid #dee2e6; border-radius: 10px; font-size: 14px; margin-bottom: 14px; outline: none; }
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 .15rem rgba(19,99,198,.15); }
.login-card button { width: 100%; border: none; background: var(--primary); color: #fff; font-weight: 700; padding: 12px; border-radius: 10px; font-size: 15px; }
.login-card button:disabled { opacity: .6; }
.login-card .err { display: none; background: #fde8e8; color: #b02a37; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.login-card .foot { text-align: center; font-size: 11.5px; color: #adb5bd; margin-top: 18px; }

/* Табло: картите и числата са линкове */
a.metric-link { text-decoration: none; color: inherit; display: block; }
a.metric-link .metric-card { transition: transform .12s, box-shadow .12s; cursor: pointer; }
a.metric-link:hover .metric-card { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(19,99,198,.15); }
a.num-link { color: var(--primary); font-weight: 600; text-decoration: none; display: inline-block; min-width: 28px; padding: 2px 6px; border-radius: 6px; }
a.num-link:hover { background: #e8f0fe; }
tr.row-link:hover td { background: #f4f7fe; }

/* Позиция: лентата „Запази“ винаги се вижда долу */
.form-actions-bar {
    position: sticky; bottom: 0; z-index: 50;
    display: flex; justify-content: flex-end; align-items: center; gap: 10px;
    margin: 16px -32px -28px; padding: 12px 32px;
    background: rgba(255,255,255,.97); border-top: 1px solid #e3e8f2;
    box-shadow: 0 -4px 14px rgba(20,24,62,.08); backdrop-filter: blur(4px);
}
.form-actions-bar .unsaved { margin-right: auto; font-size: 12.5px; color: #b8860b; }
.form-actions-bar .unsaved i { font-size: 8px; vertical-align: middle; }
@media (max-width: 768px) { .form-actions-bar { margin: 16px -16px -16px; padding: 10px 16px; } }
a.pos-link { font-weight: 700; color: var(--primary); text-decoration: none; }
a.pos-link:hover { text-decoration: underline; }

/* Календар: Google календар + визуален избор на свободни часове */
.gcal-frame { width: 100%; height: 760px; border: 0; display: block; }
.meet-list { max-height: 260px; overflow-y: auto; }
.meet-item { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #f1f3f5; cursor: pointer; font-size: 13px; }
.meet-item:hover { background: #f4f7fe; }
.meet-when { font-weight: 700; color: var(--primary); white-space: nowrap; min-width: 108px; }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip { min-width: 40px; padding: 6px 8px; border: 1px solid #dee2e6; border-radius: 6px; background: #f1f3f5; font-size: 12.5px; font-weight: 600; color: #6c757d; cursor: pointer; }
.day-chip:hover { background: #d0e7d6; }
.day-chip.on { background: #34a853; border-color: #34a853; color: #fff; }
.day-chip.on:hover { background: #2b8f45; }

/* Календар: превключвател Google / Microsoft и седмицата от Outlook */
.cal-switch { display: inline-flex; background: #fff; border-radius: 10px; padding: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.cal-switch button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font-size: 13px; color: #495057; }
.cal-switch button.active { background: var(--primary); color: #fff; }
/* Outlook седмица — решетка като вградения Google календар */
.msw { background: #fff; border-radius: 10px; }
.msw-bar { display: flex; align-items: center; gap: 6px; padding: 4px 4px 12px; }
.msw-today { border: 1px solid #dadce0; background: #fff; border-radius: 18px; padding: 5px 18px; font-size: 13px; font-weight: 500; color: #3c4043; }
.msw-today:hover, .msw-nav:hover { background: #f1f3f4; }
.msw-nav { border: 0; background: none; width: 32px; height: 32px; border-radius: 50%; color: #5f6368; font-size: 12px; }
.msw-month { font-size: 18px; color: #3c4043; margin-left: 10px; text-transform: capitalize; }
.msw-load { color: #adb5bd; font-size: 13px; margin-left: 8px; }
.msw-head, .msw-allday { display: grid; grid-template-columns: 52px repeat(7, 1fr); }
.msw-head { border-bottom: 1px solid #dadce0; }
.msw-dh { text-align: center; padding: 4px 0 8px; }
.msw-wd { font-size: 11px; font-weight: 500; color: #70757a; text-transform: uppercase; }
.msw-dn { font-size: 22px; color: #3c4043; width: 40px; height: 40px; line-height: 40px; margin: 2px auto 0; border-radius: 50%; }
.msw-dh.today .msw-wd { color: #1a73e8; }
.msw-dh.today .msw-dn { background: #1a73e8; color: #fff; }
.msw-allday { border-bottom: 1px solid #dadce0; }
.msw-adcell { border-left: 1px solid #dadce0; padding: 2px; min-height: 22px; }
.msw-scroll { height: 600px; overflow-y: auto; position: relative; }
.msw-body { display: grid; grid-template-columns: 52px repeat(7, 1fr); position: relative; }
.msw-gutter { position: relative; }
.msw-hl { position: absolute; right: 8px; transform: translateY(-50%); font-size: 10.5px; color: #70757a; }
.msw-col { position: relative; border-left: 1px solid #dadce0; }
.msw-line { position: absolute; left: 0; right: 0; border-top: 1px solid #dadce0; }
.msw-ev { position: absolute; background: #0078D4; color: #fff; border-radius: 4px; padding: 2px 6px; font-size: 11.5px; line-height: 1.3; overflow: hidden; cursor: default; box-shadow: 0 0 0 1px #fff; z-index: 1; }
.msw-ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msw-ev span { display: block; opacity: .9; }
.msw-ev.ad { position: static; margin-bottom: 2px; white-space: nowrap; text-overflow: ellipsis; }
.msw-ev.free { background: #e8f0fe; color: #1967d2; border: 1px dashed #8ab4f8; }
.msw-now { position: absolute; left: 0; right: 0; border-top: 2px solid #ea4335; z-index: 2; }
.msw-now::before { content: ''; position: absolute; left: -6px; top: -7px; width: 12px; height: 12px; border-radius: 50%; background: #ea4335; }
.ms-agenda { max-height: 700px; overflow-y: auto; }
.ms-day { border-bottom: 1px solid #f1f3f5; padding: 10px 2px; }
.ms-day.today .ms-day-name { color: var(--primary); }
.ms-day-name { font-weight: 700; font-size: 13px; color: var(--dark); text-transform: capitalize; margin-bottom: 4px; }
.ms-ev { display: flex; gap: 12px; font-size: 13px; padding: 5px 10px; margin: 3px 0; border-left: 3px solid #0078D4; background: #f3f8fd; border-radius: 0 6px 6px 0; }
.ms-ev.free { border-left-color: #adb5bd; background: #f8f9fa; color: #6c757d; }
.ms-time { font-weight: 600; min-width: 92px; color: #0b5cad; }
.ms-empty { font-size: 12px; color: #adb5bd; padding: 2px 10px; }


/* AIRA / Talent Hunter — approved graphite and gold theme.
   Presentation only: no identifiers, application code or data access changes. */
:root {
    --primary: #91610b;
    --secondary: #f2b632;
    --light: #f6f5f2;
    --dark: #25262b;
    --th-paper: #ffffff;
    --th-muted: #656a73;
    --th-line: #e8e6e1;
    --th-gold-soft: #fff6df;
    --bs-primary: #91610b;
    --bs-primary-rgb: 145, 97, 11;
    --bs-link-color: #91610b;
    --bs-link-hover-color: #694507;
    --bs-body-color: #25262b;
    --bs-body-font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
}
body { background: var(--light); color: var(--dark); font-family: var(--bs-body-font-family); }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #b68115; outline-offset: 3px; }
input[type=checkbox] { accent-color: #91610b; }
.container-fluid.sticky-top { background: var(--th-paper) !important; border-bottom: 1px solid var(--th-line); }
.navbar .navbar-brand { color: var(--dark) !important; font-family: var(--bs-body-font-family) !important; font-size: 18px; letter-spacing: -.4px; }
.navbar .navbar-brand > span { color: #91610b !important; font-weight: 600; }
.navbar .ms-auto > span { color: var(--th-muted) !important; }
.navbar .btn-outline-light { color: var(--th-muted); border-color: var(--th-line); background: white; }
.navbar .btn-outline-light:hover { background: var(--light); color: var(--dark); border-color: #c7c1b6; }
.dash-sidebar { width: 205px; background: #25262b; padding: 28px 12px; }
.dash-sidebar .sidebar-brand { padding: 0 12px 24px; border-color: #42434a; margin-bottom: 14px; }
.dash-sidebar .sidebar-brand .title { font-family: var(--bs-body-font-family); font-size: 16px; letter-spacing: -.2px; }
.dash-sidebar .sidebar-brand span { color: #bfc0c7; font-size: 10px; letter-spacing: .09em; margin-top: 7px; }
.sidebar-nav a { border-radius: 8px; margin: 4px 0; padding: 12px; border-left: 3px solid transparent; color: #c8c9cf; font-size: 13px; }
.sidebar-nav a:hover { background: #323339; }
.sidebar-nav a.active { color: #f9d47a; background: #3c382e; border-left-color: var(--secondary); }
.sidebar-nav a i { font-size: 14px; }
.sidebar-nav .nav-badge { background: var(--secondary) !important; color: #25262b; border-radius: 5px; font-weight: 700; }
.sidebar-section { padding: 22px 14px 7px; color: #a8aab3; font-size: 10px; }
.dash-main { padding: 28px 30px; }
.dash-topbar { margin-bottom: 24px; gap: 14px; }
.dash-topbar h2 { font-family: inherit; font-size: 27px; letter-spacing: -.7px; font-weight: 700; }
.dash-topbar > .d-flex { max-width: 100%; flex-wrap: wrap; }
.metric-card, .dash-card { border: 1px solid var(--th-line); border-radius: 12px; box-shadow: none; }
.metric-card { padding: 18px; height: 100%; }
.metric-card .label { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--th-muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-card .value { font-family: inherit; font-size: 31px; font-weight: 700; letter-spacing: -.8px; line-height: 1.3; margin: 7px 0 2px; color: var(--dark) !important; font-variant-numeric: tabular-nums; }
.metric-card .sub { font-size: 11.5px; color: var(--th-muted); }
a.metric-link { height: 100%; }
a.metric-link .metric-card { transition: border-color .15s, background .15s; }
a.metric-link:hover .metric-card { transform: none; border-color: #bba67a; box-shadow: none; background: #fffdf8; }
#tab-overview > .row.mb-4 > div { width: 33.333333%; }
#tab-overview > .row.mb-4 > div:nth-child(2) .metric-card { border-color: #e3c47a; background: #fffaf0; }
#tab-overview > .row.mb-4 > div:nth-child(2) .value { color: #91610b !important; }
#tab-overview > .row.g-3 > .col-lg-7, #tab-overview > .row.g-3 > .col-lg-5 { width: 100%; }
.dash-card-header { border-bottom-color: var(--th-line); padding: 18px 20px; }
.dash-card-header h5, .aira-modal .m-head h5 { font-family: inherit; font-weight: 700; color: var(--dark); }
.dash-table { font-size: 13px; }
.dash-table thead th { text-transform: none; font-size: 11.5px; letter-spacing: 0; background: #faf9f6; color: #5e636c; padding: 12px 14px; border-bottom-color: var(--th-line); }
.dash-table tbody td { padding: 15px 14px; border-bottom-color: #efede8; }
.dash-table tbody tr:hover, tr.row-link:hover td, .meet-item:hover { background: #fcfaf5; }
.table-footer { color: var(--th-muted); background: #fdfcf9; border-top-color: var(--th-line); }
.muted, .field-help, .metric-card .sub, .empty-state, .timeline li span.t, .q-row .q-num, .ms-empty { color: var(--th-muted); }
.field-help { line-height: 1.6; }
.filter-pills { gap: 7px; margin-bottom: 18px; }
.filter-pill { border-radius: 7px; padding: 7px 12px; border-color: var(--th-line); color: #545962; }
.filter-pill.active { background: #25262b; color: white; border-color: #25262b; }
.filter-pill:hover:not(.active) { background: var(--th-gold-soft); }
.btn { border-radius: 7px; font-weight: 600; }
.btn-primary {
    --bs-btn-color: #25262b; --bs-btn-bg: #f2b632; --bs-btn-border-color: #f2b632;
    --bs-btn-hover-color: #25262b; --bs-btn-hover-bg: #e5a722; --bs-btn-hover-border-color: #e5a722;
    --bs-btn-active-color: #25262b; --bs-btn-active-bg: #d99c19; --bs-btn-active-border-color: #d99c19;
    --bs-btn-disabled-color: #25262b; --bs-btn-disabled-bg: #f2b632; --bs-btn-disabled-border-color: #f2b632;
    --bs-btn-focus-shadow-rgb: 186, 132, 26;
}
.btn-outline-primary { --bs-btn-color: #80560b; --bs-btn-border-color: #d8c397; --bs-btn-hover-color: #25262b; --bs-btn-hover-bg: #fff3d4; --bs-btn-hover-border-color: #c3a564; --bs-btn-active-color: #25262b; --bs-btn-active-bg: #f8e6b9; --bs-btn-active-border-color: #c3a564; --bs-btn-disabled-color: #80560b; --bs-btn-disabled-border-color: #d8c397; --bs-btn-focus-shadow-rgb: 186, 132, 26; }
.btn-light { --bs-btn-bg: #f6f5f2; --bs-btn-border-color: #e8e6e1; --bs-btn-hover-bg: #eeece6; --bs-btn-hover-border-color: #d5d0c6; }
.action-btn { padding: 8px; border-radius: 6px; }
.action-btn.call { color: #91610b; }
.action-btn:hover { background: #f3eee2; }
a.num-link { color: #80560b; font-variant-numeric: tabular-nums; }
a.num-link:hover { background: #fff0ca; }
.stage-badge, .badge-status { border-radius: 5px; padding: 4px 8px; font-size: 11px; line-height: 1.6; }
.stage-badge.s-approve { background: #fff0ca; color: #80580e; }
.stage-badge.s-call { background: #edf0f5; color: #43566f; }
.stage-badge.s-video { background: #f0eaf6; color: #72538b; }
.stage-badge.s-booked { background: #eaf4ed; color: #326d46; }
.stage-badge.s-other { background: #e9f3f1; color: #356b64; }
.score { font-family: inherit; font-variant-numeric: tabular-nums; }
.score.mid { color: #91610b; }
.form-row-flex label, .dash-main label { color: #555b65; font-size: 12px; }
.dash-main input:not([type=checkbox]):not(.form-control), .dash-main select:not(.form-control):not(.form-select), .dash-main textarea,
.aira-modal input:not([type=checkbox]), .aira-modal select, .aira-modal textarea { border: 1px solid #d8d5cd; border-radius: 7px; padding: 8px 10px; background: white; color: var(--dark); font-size: 13px; max-width: 100%; }
.form-control, .form-select { border-color: #d8d5cd; border-radius: 7px; font-size: 13px; }
.dash-main input:focus, .dash-main select:focus, .dash-main textarea:focus,
.aira-modal input:focus, .aira-modal select:focus, .aira-modal textarea:focus,
.form-control:focus, .form-select:focus { border-color: #b68115; box-shadow: 0 0 0 3px #f2b63226; outline: none; }
.q-row { align-items: center; }
.q-row input { min-height: 38px; }
.pos-form .col-12, .pos-form .col-md-6, .pos-form .col-md-4, .pos-form .col-md-3 { margin-bottom: 20px; }
.form-actions-bar { margin: 20px -30px -28px; padding: 14px 30px; border-color: var(--th-line); box-shadow: 0 -3px 12px #25262b08; }
.aira-modal-bg { background: #25262b66; padding: 32px 16px; }
.aira-modal { border-radius: 14px; box-shadow: 0 18px 70px #25262b33; max-width: 800px; }
.aira-modal .m-head { padding: 20px 24px; border-color: var(--th-line); }
.aira-modal .m-body { padding: 22px 24px; }
.aira-modal .m-foot { padding: 15px 24px; border-color: var(--th-line); flex-wrap: wrap; }
.aira-modal label { color: #555b65; }
.timeline li { padding: 10px 0; border-color: var(--th-line); overflow-wrap: anywhere; }
.transcript { background: #f7f6f2; border: 1px solid var(--th-line); border-radius: 8px; line-height: 1.8; }
.pos-form [style*="background:#f4f7fe"] { background: #faf7ef !important; }
.aira-modal textarea[style] { border-color: #d8d5cd !important; border-radius: 7px !important; }
.custom-toast { background: #25262b; box-shadow: 0 8px 25px #25262b26; }
.custom-toast.info { border-left-color: var(--secondary); }
.admin-banner { background: #3c382e; color: #f9d47a; }
.cal-label, .cal-dayhead b { font-family: inherit; }
.cal-scroll { border-color: var(--th-line); }
.cal-col.today, .cal-col.can-insert:hover { background-color: #fffcf4; }
.cal-dayhead.today b, .slot-btn.selected, .cal-ev.free.picked, .cal-switch button.active { background: var(--secondary); color: #25262b; border-color: var(--secondary); box-shadow: none; }
.cal-dayhead.today span { color: #80560b; }
.cal-switch { border: 1px solid var(--th-line); box-shadow: none; }
.slot-btn { border-radius: 6px; border-color: var(--th-line); }
.slot-btn:hover { background: var(--th-gold-soft); }
.meet-when { color: #80560b; }
.meet-item { border-bottom-color: var(--th-line); }
.ms-day { border-bottom-color: var(--th-line); }
.day-chip { background: #efeee9; border-color: var(--th-line); }
.day-chip.on { background: #37835b; border-color: #37835b; }
.day-chip.on:hover { background: #296b47; }
.login-wrap { box-sizing: border-box; background: #25262b; background-image: radial-gradient(ellipse at 15% 10%, #68552b55, transparent 55%); padding: 32px 20px; }
.login-card { box-sizing: border-box; border-radius: 16px; max-width: 430px; padding: 40px 34px; box-shadow: 0 20px 65px #00000033; border-top: 4px solid var(--secondary); }
.login-card h1 { font-family: var(--bs-body-font-family); font-size: 30px; letter-spacing: -.6px; }
.login-card .sub { color: var(--th-muted); margin-bottom: 30px; line-height: 1.6; }
.login-card label { color: #555b65; font-size: 11px; letter-spacing: .05em; }
.login-card input { box-sizing: border-box; border-color: #d8d5cd; border-radius: 7px; padding: 12px; margin-top: 5px; margin-bottom: 20px; }
.login-card input:focus { border-color: #b68115; box-shadow: 0 0 0 3px #f2b63226; }
.login-card button { border-radius: 7px; background: var(--secondary); color: #25262b; }
.login-card button:hover:not(:disabled) { background: #e5a722; }
.login-card .foot { color: var(--th-muted); line-height: 1.7; }
@media (min-width: 1600px) { .dash-main { padding-left: 40px; padding-right: 40px; } .form-actions-bar { margin-left: -40px; margin-right: -40px; padding-left: 40px; padding-right: 40px; } }
@media (max-width: 1100px) { .dash-sidebar { width: 185px; } .dash-main { padding: 24px; } .form-actions-bar { margin: 20px -24px -24px; padding: 14px 24px; } #tab-calendar .col-xl-4, #tab-calendar .col-xl-8 { width: 100%; } }
@media (max-width: 768px) {
    .dash-sidebar { width: 100%; padding: 5px 8px; height: auto; }
    .sidebar-nav { gap: 4px; }
    .sidebar-nav a { padding: 11px 12px; margin: 0; border-left: 0; border-radius: 6px; }
    .dash-main { padding: 20px 16px; }
    .dash-topbar h2 { font-size: 24px; }
    .metric-card { padding: 14px; }
    .metric-card .value { font-size: 27px; }
    #tab-overview > .row.mb-4 > div { width: 50%; }
    .dash-table th, .dash-table td { overflow-wrap: anywhere; }
    #tab-overview .dash-card, #tab-positions .dash-card { overflow-x: auto; }
    #tab-overview .dash-table, #tab-positions .dash-table { min-width: 650px; }
    #tab-settings .dash-table { table-layout: fixed; }
    #tab-overview .dash-table thead th, #tab-positions .dash-table thead th { white-space: normal; }
    #tab-overview .dash-table th, #tab-overview .dash-table td, #tab-positions .dash-table th, #tab-positions .dash-table td { padding: 11px 5px; font-size: 11px; }
    #tab-overview .dash-table th:first-child, #tab-positions .dash-table th:first-child { width: 25%; }
    #tab-candidates .dash-table, #tab-calls .dash-table { min-width: 1050px; }
    .dash-topbar select, .dash-topbar input { min-width: 0 !important; width: 100%; }
    .dash-topbar > .d-flex { width: 100%; }
    .form-actions-bar { margin: 20px -16px -20px; padding: 12px 16px; flex-wrap: wrap; }
    .aira-modal-bg { padding: 14px 8px; }
    .aira-modal .m-head, .aira-modal .m-body, .aira-modal .m-foot { padding: 16px; }
    .timeline li { flex-wrap: wrap; }
    .container-fluid.sticky-top { padding-left: 12px !important; padding-right: 12px !important; }
    .navbar .ms-auto { gap: 9px !important; }
    .navbar .ms-auto > span:first-child { display: none; }
    .navbar .navbar-brand { font-size: 15px; margin-right: 8px; }
    .navbar #nav-user { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 420px) {
    .dash-topbar h2 { font-size: 22px; }
    .metric-card .label { font-size: 11px; }
    .metric-card .sub { font-size: 11px; }
    .login-card { padding: 30px 22px; }
    .aira-modal input, .aira-modal select, .aira-modal textarea, .dash-main input, .dash-main select, .dash-main textarea { font-size: 16px !important; }
    .navbar #nav-user { max-width: 70px; font-size: 11px !important; }
    .aira-modal .row { --bs-gutter-x: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .metric-link .metric-card, .sidebar-nav a, .filter-pill, .action-btn { transition: none; } .custom-toast { animation: none; } }

/* Табло: кандидати по етапи — барове и пита */
.stage-charts .dash-card { height: 100%; }
.sc-body { padding: 18px 20px 20px; }
.sc-chip { font-size: 13px; color: var(--th-muted, #6c757d); text-decoration: none; border: 1px solid var(--th-line, #e8e6e1); background: #fff; border-radius: 8px; padding: 7px 12px; }
.sc-chip b { color: var(--dark); }
.sc-chip:hover { border-color: #bba67a; background: #fffdf8; color: var(--dark); }
/* барове: стойност отгоре, етикет под линията (извън височината, за да са всички барове на една основа) */
.sc-bars { display: flex; gap: 6px; height: 300px; margin-bottom: 52px; border-bottom: 1px solid var(--th-line, #e8e6e1); }
.sc-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; }
.sc-val { font-size: 13px; font-weight: 700; color: var(--dark); font-variant-numeric: tabular-nums; line-height: 1.2; }
.sc-pct { font-size: 11px; color: var(--th-muted, #6c757d); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.sc-pos { font-size: 13px; padding: 5px 8px; border: 1px solid var(--th-line, #e8e6e1); border-radius: 8px; background: #fff; max-width: 260px; }
.sc-track { flex: 1; width: 100%; max-width: 46px; display: flex; align-items: flex-end; }
.sc-bar { display: block; width: 100%; border-radius: 5px 5px 0 0; transition: filter .12s; }
.sc-col:hover .sc-bar { filter: brightness(1.12); }
.sc-lbl { position: absolute; top: 100%; left: -4px; right: -4px; padding-top: 7px; font-size: 10.5px; line-height: 1.25; text-align: center; color: var(--th-muted, #6c757d); }
.sc-col:hover .sc-lbl { color: var(--dark); }

/* Кандидати: подредба по колона */
.th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.th-sort i { font-size: 10px; opacity: .35; margin-left: 2px; }
.th-sort:hover, .th-sort.on { color: var(--dark); }
.th-sort:hover i, .th-sort.on i { opacity: 1; }

/* Табло: двете графики — точно по половина от реда, с еднакви заглавни ленти
   (темата задава 33% на колоните в този ред — от времето на шестте карти) */
#tab-overview > .row.stage-charts > div { width: 50%; }
.stage-charts .dash-card { display: flex; flex-direction: column; }
.stage-charts .dash-card-header { min-height: 68px; flex-wrap: nowrap; }
.stage-charts .dash-card-header h5 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-charts .sc-body { flex: 1; }
.stage-charts .sc-pos { width: 60%; max-width: 320px; }
@media (max-width: 1199px) { #tab-overview > .row.stage-charts > div { width: 100%; } }

/* Разговори: избраната позиция е ярка, останалите барове — приглушени */
.sc-col.dim .sc-bar { opacity: .3; }
.sc-col.dim:hover .sc-bar { opacity: .6; }

/* Позиция: три карета — позиция, първо обаждане, второ обаждане */
.pf-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #2b2f36; color: #fff; font-size: 12.5px; font-weight: 700; margin-right: 10px; vertical-align: 1px; }
.pf-sub { font-weight: 700; font-size: 13.5px; color: var(--dark); border-top: 1px solid var(--th-line, #e8e6e1); padding-top: 16px; margin-top: 8px; }

/* Качване на много CV-та */
.aira-modal.wide { max-width: 1040px; }
.cv-drop { border: 2px dashed var(--th-line, #d8d4cb); border-radius: 12px; padding: 26px 16px; text-align: center; cursor: pointer; background: #fcfbf8; transition: border-color .12s, background .12s; }
.cv-drop i { font-size: 30px; color: #b8860b; margin-bottom: 6px; display: block; }
.cv-drop.over { border-color: #b8860b; background: #fffaf0; }
.cv-list { font-size: 12.5px; margin-top: 8px; color: var(--th-muted, #6c757d); max-height: 90px; overflow-y: auto; }
.cv-bar { height: 8px; background: #efece5; border-radius: 6px; overflow: hidden; }
.cv-bar span { display: block; height: 100%; background: #c9972b; transition: width .3s; }
.cv-review input.cv-in { width: 100%; min-width: 120px; font-size: 13px; padding: 4px 6px; border: 1px solid var(--th-line, #ddd); border-radius: 6px; }
.cv-review .cv-file { font-size: 11px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.no-phone { display: inline-block; font-size: 11px; font-weight: 600; color: #a1452f; background: #fbeae4; border-radius: 5px; padding: 1px 6px; }

/* Google Meet: връзка за срещите от Айра */
.gmeet-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 20px; font-size: 13px; border-bottom: 1px solid var(--th-line, #eee); }
.gmeet-bar:empty { display: none; }
.meet-item a { font-size: 12px; text-decoration: none; white-space: nowrap; }
