/* DENDRON İK — base stylesheet. Light "enterprise" redesign
   (adapted from Ali's DataForge_Alternative_2_Enterprise reference). */

:root {
    --navy:      #1B365D;
    --blue:      #2563EB;
    --blue-2:    #1D4ED8;
    --blue-pale: #DBEAFE;

    --bg:        #F8FAFC;
    --surface:   #FFFFFF;
    --surface-2: #F1F5F9;
    --surface-3: #E2E8F0;

    --text:      #0F172A;
    --text-2:    #475569;
    --muted:     #64748B;
    --text-3:    #94A3B8;

    --border:    #E2E8F0;
    --border-2:  #CBD5E1;

    --ok:        #059669;
    --err:       #DC2626;
    --warn:      #D97706;
    --info:      #0284C7;

    /* Legacy aliases kept so existing var() references stay valid. */
    --primary:   #2563EB;
    --primary-2: #1D4ED8;

    --radius:    6px;
    --radius-sm: 4px;
    --shadow:    0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.14);
    --mono:      'Cascadia Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { font-size: 13px; }
html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', 'DM Sans', -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ===== App chrome: logo bar + tab bar + breadcrumb ===== */
.logo-bar {
    height: 44px; background: var(--navy); color: #fff;
    display: flex; align-items: center; gap: 16px; padding: 0 16px;
    position: sticky; top: 0; z-index: 30;
}
.logo-bar .logo { font-weight: 700; font-size: 15px; letter-spacing: 0.4px; display: flex; align-items: center; gap: 9px; }
.logo-bar .logo .mark {
    width: 26px; height: 26px; border-radius: 7px;
    background: linear-gradient(135deg, var(--blue), #3B82F6);
    display: grid; place-items: center; font-size: 14px; color: #fff;
}
.logo-bar .search-box { margin-left: auto; position: relative; width: 300px; max-width: 38vw; }
.logo-bar .search-box input {
    width: 100%; height: 30px; border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1);
    color: #fff; padding: 0 10px 0 30px; font-size: 12px; outline: none;
}
.logo-bar .search-box input::placeholder { color: rgba(255,255,255,0.5); }
.logo-bar .search-box input:focus { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.4); }
.logo-bar .search-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.5); }
.logo-bar .site-user { display: flex; align-items: center; gap: 9px; }
.logo-bar .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }
.logo-bar .site-user-name { font-weight: 600; font-size: 12px; line-height: 1.2; color: #fff; }
.logo-bar .site-user-role { font-size: 10px; color: rgba(255,255,255,0.6); }
.logo-bar .site-logout-form { display: inline; margin: 0; }
.logo-bar .site-logout { color: rgba(255,255,255,0.7); font-size: 12px; padding: 0 0 0 10px; border: 0; border-left: 1px solid rgba(255,255,255,0.2); background: none; cursor: pointer; font-family: inherit; }
.logo-bar .site-logout:hover { color: #fff; text-decoration: none; }

.tab-bar {
    height: 38px; background: var(--surface); border-bottom: 1px solid var(--border);
    display: flex; align-items: stretch; padding: 0 12px;
    position: sticky; top: 44px; z-index: 29; overflow-x: auto;
}
.tab-bar a.tab {
    display: flex; align-items: center; gap: 6px; padding: 0 14px;
    font-size: 12.5px; font-weight: 500; color: var(--text-2);
    border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab-bar a.tab:hover { color: var(--text); background: var(--surface-1, var(--surface-2)); text-decoration: none; }
.tab-bar a.tab.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tab-bar .tab-badge { background: var(--surface-2); color: var(--text-2); font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 600; }
.tab-bar a.tab.active .tab-badge { background: var(--blue-pale); color: var(--blue); }

.breadcrumb-bar {
    height: 30px; background: var(--surface); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 24px; font-size: 11.5px; color: var(--text-3); gap: 4px;
}
.breadcrumb-bar .sep { color: var(--border-2); margin: 0 2px; }
.breadcrumb-bar .current { color: var(--text); font-weight: 600; }

/* ===== Content container (full width, comfortable side padding) ===== */
.container { width: 100%; margin: 0; padding: 16px 24px 48px; }

.page-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.page-sub { color: var(--text-2); font-size: 12.5px; margin: 0 0 18px; }

/* ===== Panel / card ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin-bottom: 16px;
}
.card h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-2); margin: 0 0 14px; font-weight: 600; }
/* Data-driven names (project/company) shown as entered — no forced uppercase,
   which would otherwise apply Turkish locale casing (i -> İ) under lang="tr". */
.entity-name { text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 600; margin: 0; color: var(--text); }

.row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.row .label { color: var(--muted); }
.row .value { font-variant-numeric: tabular-nums; }

.muted-inline { color: var(--muted); font-size: 11.5px; margin-left: 8px; }
.muted-cell { color: var(--muted); font-size: 11.5px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: var(--radius-sm); font-size: 12px; font-family: var(--mono); }

/* ===== Tags / badges ===== */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 8px; border-radius: 3px; font-size: 10.5px; font-weight: 600;
    background: var(--surface-2); color: var(--text-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.badge.ok   { background: #ECFDF5; color: var(--ok); }   .badge.ok .dot   { background: var(--ok); }
.badge.err  { background: #FEF2F2; color: var(--err); }  .badge.err .dot  { background: var(--err); }
.badge.warn { background: #FFFBEB; color: var(--warn); } .badge.warn .dot { background: var(--warn); }
.badge.info { background: var(--blue-pale); color: var(--blue); } .badge.info .dot { background: var(--blue); }
.pill { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 10.5px; padding: 1px 8px; border-radius: 3px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px; justify-content: center;
    background: var(--blue); color: #fff; border: 1px solid var(--blue);
    border-radius: var(--radius-sm); padding: 7px 14px; font: inherit; font-size: 12px;
    font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--blue-2); border-color: var(--blue-2); }
.btn.ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 500; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn.sm { padding: 4px 10px; font-size: 11px; }
.btn.danger { background: var(--surface); color: var(--err); border-color: #FECACA; font-weight: 500; }
.btn.danger:hover { background: #FEF2F2; border-color: var(--err); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hint { color: var(--muted); font-size: 11.5px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title + .btn, .card-head .btn { flex: 0 0 auto; }

/* ===== Steps (legacy status list, still referenced) ===== */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: none; }
.steps .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex: none; border: 1px solid var(--border); color: var(--muted); }
.steps li.done .mark { background: #ECFDF5; color: var(--ok); border-color: transparent; }
.steps li.current .mark { background: var(--blue-pale); color: var(--blue); border-color: transparent; }
.steps li.done .name { color: var(--text); }
.steps li.current .name { color: var(--text); font-weight: 600; }
.steps li .name { color: var(--muted); }
.steps li .tag { margin-left: auto; font-size: 11.5px; color: var(--muted); }

/* ===== Projects / positions ===== */
.subblock { margin-top: 14px; }
.field-label { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.prompt {
    background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--blue);
    border-radius: var(--radius-sm); padding: 10px 12px; margin: 6px 0 0;
    white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 11.5px; color: var(--text-2);
}
.agent { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.agent-title { font-size: 14px; margin: 0; color: var(--text); }
.blocks { margin: 8px 0 0; padding-left: 0; list-style: none; counter-reset: blk; }
.blocks li { position: relative; padding: 10px 12px 10px 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--surface-2); }
.blocks li::before {
    counter-increment: blk; content: counter(blk);
    position: absolute; left: 12px; top: 11px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--blue-pale); color: var(--blue); font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.block-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.block-instruction { margin: 6px 0 0; color: var(--text-2); font-size: 12px; }

/* Accordion (projects/positions) */
.collapse-icon { font-size: 10px; color: var(--text-3); transition: transform 0.18s; width: 12px; display: inline-block; flex: none; }
.collapse-icon.collapsed { transform: rotate(-90deg); }
.collapsible.collapsed { display: none; }
.card-head.toggle { cursor: pointer; user-select: none; }
.card-head.toggle:hover { background: var(--surface-2); }
.card-head.toggle > .card-title, .card-head.toggle > .agent-title { flex: 1; }
.agent .card-head.pos-head { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; }
.agent .card-head.pos-head:hover { background: var(--surface-3); }

/* ===== Forms ===== */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
/* Shared input visuals (no width here — width is set per context below so
   inputs in flex rows, e.g. the block editor, don't all stretch to 100%). */
.form select, .form textarea, .filter-input, .hr-note,
.form input[type="file"], .form input[type="number"] {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); padding: 8px 10px; font: inherit; font-size: 12px;
}
.form textarea, .hr-note { resize: vertical; }
/* Full-width contexts (forms, stacked/row forms, explicit .full, block fields). */
.form select, .form textarea, .form input[type="file"],
.hr-note, .filter-input.full,
.form-row .filter-input, .stack-form .filter-input, .block-field .filter-input {
    width: 100%;
}
.form select:focus, .form textarea:focus, .filter-input:focus, .hr-note:focus,
.form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-pale); }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.stack-form { display: flex; flex-direction: column; gap: 8px; }
.stack-form .field-label { margin-top: 10px; }
.filter-input { height: 32px; }
.filter-input.full { width: 100%; }
.filter-input.mono { font-family: var(--mono); font-size: 12px; line-height: 1.5; resize: vertical; height: auto; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 160px; }

.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 4px 0 14px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.legend-desc { color: var(--muted); font-size: 12px; margin-right: 10px; }

/* ===== Bulk bar / candidate actions ===== */
.bulkbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bulk-spacer { flex: 1; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--text); }
.check input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.check.inline { flex-direction: row; align-items: center; }
.actions-cell { white-space: nowrap; display: flex; gap: 8px; }
.bulk-feedback { color: var(--blue); font-size: 12.5px; margin: 0 0 12px; }

/* ===== Tables ===== */
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table th { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.table td { color: var(--text-2); vertical-align: middle; }
.table tbody tr:hover { background: var(--blue-pale); }
.table .ellipsis { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.table.candidates td { vertical-align: middle; }
.table tr.row-dup { opacity: 0.62; }
.table tr.row-dup:hover { opacity: 1; }
.status-badge { white-space: nowrap; }

button.badge { border: none; cursor: pointer; font: inherit; }
button.badge.dup-info:hover { filter: brightness(0.97); }
.dup-icon { margin-left: 5px; vertical-align: -2px; opacity: 0.9; }

/* ===== Modal ===== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.modal { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 22px 24px; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; }
.modal h3 { margin: 0 0 6px; font-size: 15px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-3); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-subhead { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 600; margin: 4px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.notepeek-body { white-space: pre-wrap; word-break: break-word; font-size: 13px; color: var(--text); line-height: 1.55; max-height: 50vh; overflow-y: auto; margin: 0; }
.note-peek { cursor: pointer; }
.match-callout { display: flex; align-items: center; gap: 12px; background: #FFFBEB; border: 1px solid rgba(217,119,6,0.35); border-left: 3px solid var(--warn); border-radius: var(--radius-sm); padding: 12px 14px; margin: 14px 0 18px; }
.match-callout-icon { font-size: 20px; line-height: 1; }
.match-callout-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--warn); font-weight: 700; }
.match-callout-fields { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 2px; }

/* ===== Alerts / result ===== */
.alert { margin-top: 16px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; }
.alert.err { background: #FEF2F2; color: var(--err); border: 1px solid rgba(220,38,38,0.3); }
.form-success { background: #ECFDF5; color: var(--ok); border: 1px solid rgba(5,150,105,0.3); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }
.login-error { background: #FEF2F2; color: var(--err); border: 1px solid rgba(220,38,38,0.3); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }
.form-warning { background: #FFFBEB; color: #92400E; border: 1px solid rgba(217,119,6,0.35); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }
.result { margin-top: 18px; }
.result-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.result-text { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; white-space: pre-wrap; word-break: break-word; margin: 0; font-family: var(--mono); font-size: 12px; }

/* ===== Dashboard / metrics ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.stat-card { display: flex; flex-direction: column; gap: 3px; background: var(--surface); padding: 14px 16px; text-decoration: none; color: var(--text); }
.stat-card:hover { background: var(--surface-2); text-decoration: none; }
.stat-card.accent .stat-num { color: var(--blue); }
.stat-num { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--text); }
.stat-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
.status-breakdown { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ===== Pager ===== */
.review-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pager-info { color: var(--muted); font-size: 11.5px; }
.pager { display: flex; gap: 4px; align-items: center; }
.pager-btn { min-width: 30px; height: 30px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font-size: 12px; text-decoration: none; cursor: pointer; }
.pager-btn:hover { background: var(--surface-2); text-decoration: none; }
.pager-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; cursor: default; }
.pager-btn.disabled { opacity: 0.4; pointer-events: none; }
.pager-gap { color: var(--muted); padding: 0 2px; }

/* ===== Review filters / table ===== */
.review-filters { gap: 12px; }
.review-table td { vertical-align: middle; }
.review-table .actions-cell { display: table-cell; text-align: right; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--text); background: var(--surface-3); }
th.sortable::after { content: '\2195'; display: inline-block; width: 1em; margin-left: 6px; opacity: 0.5; font-size: 11px; }
th.sortable:hover::after { opacity: 0.8; }
th.sortable.asc, th.sortable.desc { color: var(--blue); }
th.sortable.asc::after  { content: '\2191'; opacity: 1; color: var(--blue); }
th.sortable.desc::after { content: '\2193'; opacity: 1; color: var(--blue); }
.review-empty-row td { color: var(--muted); padding: 18px 10px; text-align: center; }
#reviewCard.is-loading { opacity: 0.55; pointer-events: none; transition: opacity 0.12s; }

/* ===== Login ===== */
.login-card { max-width: 380px; margin: 7vh auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 28px 26px; }
.login-title { font-size: 18px; margin: 0 0 4px; }
.login-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 20px; }
.login-form { display: flex; flex-direction: column; gap: 6px; }
.login-form .field-label { margin-top: 10px; }
.login-input { width: 100%; padding: 9px 11px; font-size: 13px; }
.login-btn { margin-top: 18px; width: 100%; padding: 10px; }
.login-remember { margin-top: 12px; font-size: 12.5px; color: var(--text-2); }

/* ===== Profile ===== */
.profile-info { display: flex; gap: 40px; margin-top: 14px; flex-wrap: wrap; }
.profile-info .field-label { display: block; margin-bottom: 2px; }
.profile-form { max-width: 360px; }

/* ===== Interview-block editor ===== */
.block-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; background: var(--surface-2); }
.block-row-head { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 8px; flex-wrap: wrap; }
.block-field { display: flex; flex-direction: column; gap: 3px; }
.block-field .field-label { margin: 0; }
.block-field.id-field { width: 150px; }
.block-field.max-field { width: 92px; }
.block-field.grow { flex: 1; min-width: 160px; }
.block-row-head .remove-block { flex: 0 0 auto; margin-bottom: 0; }
.block-row textarea { width: 100%; resize: vertical; }
.block-row .field-label { margin-top: 8px; display: block; }

/* ===== User management ===== */
.inline-form { display: inline; margin: 0; }

/* ===== CV summary (review detail) ===== */
.cv-summary { display: flex; gap: 22px; margin-top: 16px; align-items: flex-start; }
.cv-total { flex: 0 0 auto; text-align: center; background: var(--surface-1, var(--surface-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; }
.cv-total .cv-num { display: block; font-size: 30px; font-weight: 700; color: var(--blue); line-height: 1; }
.cv-rest { flex: 1; min-width: 0; }
.cv-scores { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.eval-note { margin: 4px 0 0; color: var(--text-2); font-size: 12.5px; }

/* ===== Block-organized transcript ===== */
.review-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.review-block:first-child { border-top: none; padding-top: 0; }
.review-block-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-3); font-weight: 700; margin: 0 0 10px; }
.review-turn { margin: 0 0 12px; }
.review-role { display: block; font-size: 10.5px; font-weight: 700; color: var(--text-3); margin-bottom: 3px; }
.review-turn.bot .review-role { color: var(--blue); }
.review-content { background: var(--surface-1, var(--surface-2)); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 13px; color: var(--text); }
.review-turn.bot .review-content { background: var(--blue-pale); border-color: #BFDBFE; }
.hr-note { margin-top: 12px; padding: 10px 12px; }
.note-actions { margin-top: 12px; }

/* ===== Admin footer ===== */
.site-footer { text-align: center; color: var(--text-3); font-size: 11.5px; padding: 22px; border-top: 1px solid var(--border); margin-top: 8px; }

/* ===== Candidate-facing (public) ===== */
body.public { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.public-header { display: flex; align-items: center; gap: 12px; padding: 11px 20px; background: #fff; border-bottom: 1px solid var(--border); }
.public-logo { height: 32px; width: auto; max-width: 240px; display: block; }
.public-brand { font-size: 14px; color: var(--navy); font-weight: 700; }
.public-sub { font-size: 12px; color: var(--muted); margin-left: 2px; }
.public-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 18px; }
.public-footer { text-align: center; color: var(--muted); font-size: 11.5px; padding: 16px; border-top: 1px solid var(--border); }
.public-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 26px 22px; }
.public-card.center { text-align: center; }
.public-title { font-size: 20px; margin: 0 0 10px; }
.public-lead { color: var(--text); margin: 0 0 18px; }

.consent-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; max-height: 320px; overflow-y: auto; }
.consent-box h2 { font-size: 14px; margin: 0 0 10px; color: var(--text); }
.consent-box p { font-size: 13px; color: var(--text-2); margin: 0 0 10px; }
.consent-box h3 { font-size: 12.5px; margin: 14px 0 6px; color: var(--text); }
.consent-box ul { margin: 0 0 10px; padding-left: 18px; }
.consent-box li { font-size: 13px; color: var(--text-2); margin: 0 0 4px; }
.consent-box strong { color: var(--text); }
.consent-note { color: var(--muted); font-style: italic; }
.consent-form { display: flex; flex-direction: column; gap: 14px; }
.big-check { width: 56px; height: 56px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 700; background: #ECFDF5; color: var(--ok); }
.big-check.warn { background: #FFFBEB; color: var(--warn); }

/* ===== Chat ===== */
.chat-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; height: calc(100vh - 200px); height: calc(100dvh - 200px); min-height: 420px; overflow: hidden; }
.chat-head { padding: 13px 18px; border-bottom: 1px solid var(--border); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; }
.msg.bot { justify-content: flex-start; }
.msg.me { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.bot .bubble { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }
.msg.me .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.chat-typing { display: flex; align-items: center; gap: 5px; padding: 4px 22px 8px; }
.chat-typing .typing-label { color: var(--muted); font-size: 12px; margin-left: 8px; }
.chat-typing .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.chat-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.chat-input { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-input textarea { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 10px 12px; font: inherit; resize: none; overflow-y: auto; max-height: 160px; }
.chat-input textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-pale); }
.chat-done { text-align: center; color: var(--muted); font-size: 13px; padding: 14px; }

/* ===== Responsive ===== */
/* Internal panel: desktop-first but must not break on small screens. */
@media (max-width: 760px) {
    .logo-bar { gap: 10px; padding: 0 12px; }
    .logo-bar .search-box { display: none; }
    .logo-bar .site-user-role { display: none; }
    .container { padding: 14px 14px 48px; }
    .breadcrumb-bar { padding: 0 14px; }
    /* Wide tables scroll horizontally instead of overflowing. */
    .table { display: block; overflow-x: auto; white-space: nowrap; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

/* Public + login: fully responsive. */
@media (max-width: 600px) {
    .public-main { padding: 16px 14px; }
    .public-card { padding: 20px 18px; }
    .public-title { font-size: 18px; }
    .bubble { max-width: 88%; }
    .chat-wrap { height: calc(100dvh - 150px); }
    .login-card { margin: 4vh 14px 0; padding: 22px 18px; }
    .cv-summary { flex-direction: column; gap: 14px; }
    .form-row { flex-direction: column; gap: 8px; }
    .form-row > div { min-width: 0; }
}
