/* ===== Airas Nunes Café — checklist de persoal =====
   Paleta inspirada na cafetería: fondo marfil cálido, tinta café escura,
   dourado suave como acento. Deseñada mobile-first (uso principal: móbil
   ou tablet detrás da barra). */

:root {
    --coffee-900: #2B1E14;
    --coffee-800: #3B2A1C;
    --coffee-700: #4E3826;
    --coffee-600: #6B4E34;
    --cream-100: #FAF6EF;
    --cream-200: #F2EADC;
    --cream-300: #E8DCC6;
    --gold-500: #B08947;
    --gold-600: #96702F;
    --green-600: #3D7A4A;
    --green-100: #E4F1E6;
    --red-600: #B23B3B;
    --red-100: #F7E5E5;
    --ink-muted: #7A6C5C;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(43, 30, 20, 0.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--cream-100);
    color: var(--coffee-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--coffee-900); }
h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.4rem; color: var(--coffee-700); }

/* ---------- Topbar ---------- */
.topbar {
    background: var(--coffee-900);
    box-shadow: var(--shadow);
}
.topbar-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.topbar-brand img { height: 40px; filter: brightness(0) invert(1); display: block; }
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.topbar-nav a {
    text-decoration: none;
    color: var(--cream-200);
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
}
.topbar-nav a:hover { background: rgba(255,255,255,0.08); }
.topbar-user { color: var(--gold-500); font-weight: 600; }
.topbar-logout { color: var(--cream-300) !important; opacity: 0.8; }

/* ---------- Layout ---------- */
.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}
.page-footer {
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.8rem;
    padding: 1.5rem 1rem;
}

/* ---------- Auth pages (login/install/change password) ---------- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}
.auth-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 1.75rem;
    width: 100%;
    max-width: 400px;
}
.auth-logo { display: block; margin: 0 auto 1.25rem; max-width: 220px; width: 100%; height: auto; }
.auth-card h1 { text-align: center; font-size: 1.25rem; }

form label {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 0.9rem;
    color: var(--coffee-700);
    font-weight: 600;
}
form input[type=text], form input[type=password], form input[type=date], form select {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--cream-300);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--cream-100);
    color: var(--coffee-900);
}
form input:focus, form select:focus {
    outline: none;
    border-color: var(--gold-500);
    background: #fff;
}
.radio-row { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; margin-bottom: 0.6rem; }
.radio-row input { width: auto; }
.hint { font-size: 0.8rem; color: var(--ink-muted); margin-top: -0.4rem; }
.muted { color: var(--ink-muted); font-size: 0.9rem; }

.btn-primary {
    background: var(--coffee-900);
    color: #fff;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.btn-primary:hover { background: var(--coffee-700); }
.btn-secondary {
    background: var(--cream-200);
    color: var(--coffee-900);
    border: 1px solid var(--cream-300);
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-danger { background: var(--red-600); color: #fff; border: none; }
.btn-small { padding: 0.4rem 0.7rem; font-size: 0.82rem; }

.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: var(--red-100); color: var(--red-600); }
.alert-ok { background: var(--green-100); color: var(--green-600); }

/* ---------- Selector de quenda/posto ---------- */
.selector-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.selector-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.pill-option {
    border: 2px solid var(--cream-300);
    background: var(--cream-100);
    padding: 0.55rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--coffee-700);
}
.pill-option.selected {
    border-color: var(--gold-500);
    background: var(--gold-500);
    color: #fff;
}

/* ---------- Checklist ---------- */
.progress-bar-outer {
    background: var(--cream-300);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    margin: 0.75rem 0 1.25rem;
}
.progress-bar-inner {
    background: var(--green-600);
    height: 100%;
    transition: width 0.3s ease;
}
.progress-label { font-size: 0.85rem; color: var(--ink-muted); }

.block-title {
    background: var(--coffee-900);
    color: var(--cream-100);
    padding: 0.5rem 0.9rem;
    border-radius: 8px 8px 0 0;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-top: 1.5rem;
}
.block-sub {
    background: var(--cream-200);
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--coffee-700);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.task-list {
    background: #fff;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.task-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid var(--cream-200);
    cursor: pointer;
    user-select: none;
}
.task-row:last-child { border-bottom: none; }
.task-row.checked { background: var(--green-100); }
.task-check {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 7px;
    border: 2px solid var(--cream-300);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}
.task-row.checked .task-check {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}
.task-text { font-size: 0.95rem; line-height: 1.4; }
.task-row.checked .task-text { color: var(--green-600); text-decoration: line-through; opacity: 0.85; }
.task-meta { font-size: 0.75rem; color: var(--ink-muted); margin-top: 0.15rem; }

/* ---------- Limpeza ---------- */
.zone-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    overflow: hidden;
}
.zone-header {
    background: var(--coffee-900);
    color: var(--cream-100);
    padding: 0.6rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.zone-body { padding: 0.5rem 0.9rem 0.75rem; display: none; }
.zone-body.open { display: block; }
.clean-item { padding: 0.7rem 0; border-bottom: 1px solid var(--cream-200); }
.clean-item:last-child { border-bottom: none; }
.clean-item-name { font-weight: 700; color: var(--coffee-800); }
.clean-badge {
    display: inline-block;
    background: var(--gold-500);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    text-transform: uppercase;
}
.clean-item-method { font-size: 0.88rem; margin-top: 0.3rem; color: var(--coffee-700); }
.clean-item-products { font-size: 0.8rem; margin-top: 0.2rem; color: var(--ink-muted); }
.search-box {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--cream-300);
    margin-bottom: 1rem;
    font-size: 1rem;
    background: #fff;
}

/* ---------- Admin ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    text-align: center;
}
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--coffee-900); font-family: Georgia, serif; }
.stat-label { font-size: 0.78rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.03em; }

table.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.admin-table th, table.admin-table td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--cream-200); font-size: 0.88rem; }
table.admin-table th { background: var(--cream-200); color: var(--coffee-800); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.02em; }
table.admin-table tr:last-child td { border-bottom: none; }

.badge-role-admin { background: var(--gold-500); color: #fff; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.badge-role-staff { background: var(--cream-300); color: var(--coffee-800); padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.badge-inactive { background: var(--red-100); color: var(--red-600); padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.new-password-box { background: var(--green-100); border: 1px dashed var(--green-600); border-radius: 8px; padding: 0.85rem; font-size: 0.95rem; margin-bottom: 1rem; }
.new-password-box code { font-size: 1.1rem; font-weight: 700; }

@media (max-width: 480px) {
    .topbar-nav { font-size: 0.82rem; gap: 0.6rem; }
    .stat-value { font-size: 1.5rem; }
}

/* =========================================================
   Calendario de traballo e fichaxe
   ========================================================= */
.alert-warn { background: #FFF3D6; color: #7A5410; }
.btn-gold { background: var(--gold-500); color: #fff; border: none; padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.95rem; }
.btn-gold:hover { background: var(--gold-600); }
.btn-gold.btn-small { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.txt-warn { color: var(--red-600); font-weight: 600; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.45rem; vertical-align: middle; border: 1px solid rgba(0,0,0,0.1); }
.chip { display: inline-block; background: var(--cream-200); border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.82rem; margin: 0.15rem 0.2rem 0.15rem 0; }
.badge-small { display: inline-block; background: var(--cream-300); color: var(--coffee-800); border-radius: 999px; padding: 0.1rem 0.45rem; font-size: 0.7rem; font-weight: 700; }
.badge-small.warn { background: #FFE2B8; color: #7A5410; }
.status-pill { display: inline-block; border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.78rem; font-weight: 700; }
.status-pill.ok { background: var(--green-100); color: var(--green-600); }
.status-pill.draft { background: var(--cream-300); color: var(--coffee-700); }
.status-pill.warn { background: #FFE2B8; color: #7A5410; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.row-open td { background: #FFF8E8; }
.loc { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 0.05rem 0.35rem; border-radius: 4px; margin-right: 0.2rem; }
.loc.ok { background: var(--green-100); color: var(--green-600); }
.loc.no { background: var(--red-100); color: var(--red-600); }
textarea { font-weight: 400; display: block; width: 100%; margin-top: 0.3rem; padding: 0.65rem 0.75rem; border: 1px solid var(--cream-300); border-radius: 8px; background: var(--cream-100); color: var(--coffee-900); font: inherit; }
form input[type=time], form input[type=datetime-local], form input[type=color] {
    display: block; width: 100%; margin-top: 0.3rem; padding: 0.55rem 0.7rem; border: 1px solid var(--cream-300);
    border-radius: 8px; font-size: 1rem; background: var(--cream-100); color: var(--coffee-900);
}
form input[type=color] { padding: 0.15rem; height: 2.6rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-label { font-size: 0.9rem; color: var(--coffee-700); font-weight: 600; margin-bottom: 0.35rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.filter-row label { flex: 1 1 150px; margin-bottom: 0; }

/* Navegación do panel de administración */
.admin-nav { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.admin-nav a { text-decoration: none; background: #fff; border: 1px solid var(--cream-300); color: var(--coffee-700); padding: 0.4rem 0.8rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
.admin-nav a.active { background: var(--coffee-900); border-color: var(--coffee-900); color: var(--cream-100); }

/* Navegación por semanas / meses */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 1rem; }
.week-nav strong { font-family: Georgia, serif; text-align: center; }
.toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toolbar-actions form { margin: 0; }

/* Pantalla de fichar */
.clock-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 1.6rem 1.25rem; text-align: center; margin-bottom: 1.25rem; border-top: 6px solid var(--cream-300); }
.clock-card.is-in { border-top-color: var(--green-600); }
.clock-now { font-family: Georgia, serif; font-size: 3.2rem; font-weight: 700; line-height: 1; }
.clock-date { color: var(--ink-muted); margin-top: 0.3rem; }
.clock-status { margin: 1rem 0; font-size: 1rem; }
.clock-btn { width: 100%; max-width: 360px; border: none; border-radius: 14px; padding: 1.2rem 1rem; font-size: 1.25rem; font-weight: 800; letter-spacing: 0.02em; cursor: pointer; color: #fff; background: var(--green-600); box-shadow: 0 4px 14px rgba(61,122,74,0.35); }
.clock-card.is-in .clock-btn { background: var(--red-600); box-shadow: 0 4px 14px rgba(178,59,59,0.3); }
.clock-btn:disabled { opacity: 0.6; cursor: wait; }
.clock-msg { min-height: 1.4rem; margin-top: 0.8rem; font-weight: 600; }
.clock-msg.ok { color: var(--green-600); }
.clock-msg.error { color: var(--red-600); }
.clock-hint { font-size: 0.8rem; color: var(--ink-muted); margin: 0.8rem 0 0; }
.clock-banner { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; text-decoration: none; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.8rem 1rem; margin-bottom: 1.2rem; border-left: 5px solid var(--gold-500); font-size: 0.92rem; }
.clock-banner.is-in { border-left-color: var(--green-600); }
.clock-banner span:last-child { font-weight: 700; color: var(--gold-600); }

/* Horario semanal (liñas de tempo) */
.my-week { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.my-week .stat-value { font-size: 1.6rem; }
.week-grid { display: grid; grid-template-columns: 1fr; gap: 0.8rem; }
@media (min-width: 760px) { .week-grid { grid-template-columns: 1fr 1fr; } }
.day-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.7rem 0.8rem 0.8rem; }
.day-card.is-today { outline: 2px solid var(--gold-500); }
.day-head { display: flex; justify-content: space-between; font-weight: 700; font-family: Georgia, serif; margin-bottom: 0.3rem; }
.day-count { font-family: inherit; font-weight: 400; font-size: 0.78rem; color: var(--ink-muted); }
.day-empty { color: var(--ink-muted); font-size: 0.85rem; padding: 0.3rem 0; }
.tl-scale { position: relative; height: 1rem; margin-left: 4.6rem; margin-right: 0; font-size: 0.65rem; color: var(--ink-muted); }
.tl-scale span { position: absolute; transform: translateX(-50%); }
.tl-row { display: flex; align-items: center; gap: 0.4rem; margin: 0.22rem 0; }
.tl-row.mine .tl-name { font-weight: 800; color: var(--coffee-900); }
.tl-row.mine .tl-bar { box-shadow: 0 0 0 2px var(--coffee-900); }
.tl-name { width: 4.2rem; flex: none; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--coffee-700); }
.tl-track { position: relative; flex: 1; height: 1.45rem; background: var(--cream-100); border-radius: 5px; }
.tl-bar { position: absolute; top: 0; bottom: 0; border-radius: 5px; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; min-width: 2.2rem; }
.tl-actions { display: flex; gap: 0.2rem; flex: none; }
.tl-actions a, .tl-actions button { border: 1px solid var(--cream-300); background: var(--cream-100); border-radius: 5px; font-size: 0.75rem; padding: 0.1rem 0.35rem; cursor: pointer; text-decoration: none; color: var(--coffee-700); line-height: 1.2; }
.tl-actions form { margin: 0; }
.tl-note { margin: -0.1rem 0 0.25rem 4.6rem; font-size: 0.7rem; color: var(--ink-muted); }

/* Formulario de quendas */
.day-checks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; margin-bottom: 0.9rem; }
.day-check { margin: 0 !important; }
.day-check input { position: absolute; opacity: 0; pointer-events: none; }
.day-check span { display: block; text-align: center; padding: 0.5rem 0.1rem; border: 2px solid var(--cream-300); border-radius: 8px; font-size: 0.78rem; font-weight: 700; cursor: pointer; background: var(--cream-100); }
.day-check input:checked + span { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.preset-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.preset-row .pill-option { font-size: 0.8rem; padding: 0.35rem 0.7rem; }
.wa-text { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem; margin-bottom: 0.6rem; }
.inline-profile { display: flex; gap: 0.3rem; align-items: center; margin: 0; }
.inline-profile input[type=color] { width: 2.4rem; height: 2rem; margin: 0; padding: 0.1rem; }
.inline-profile input[type=text] { width: 3.5rem; margin: 0; padding: 0.35rem; }
.test-out { background: var(--cream-100); border-radius: 8px; padding: 0.8rem; white-space: pre-wrap; font-size: 0.9rem; margin-top: 0.8rem; }

@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .clock-now { font-size: 2.8rem; }
    .day-check span { font-size: 0.7rem; }
}

/* =========================================================
   Editor de tarefas e frecuencias
   ========================================================= */
.freq-badge { display: inline-block; background: #E7EEF8; color: #2F5785; border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.72rem; font-weight: 700; margin-left: 0.25rem; vertical-align: middle; text-decoration: none; }
.task-row.checked .freq-badge { text-decoration: none; }
.freq-badge.daily { background: var(--cream-200); color: var(--ink-muted); }
.check-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.9rem; }
.check-pill { margin: 0 !important; font-weight: 600; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span { display: inline-block; padding: 0.4rem 0.75rem; border: 2px solid var(--cream-300); border-radius: 999px; font-size: 0.8rem; cursor: pointer; background: var(--cream-100); color: var(--coffee-700); }
.check-pill input:checked + span { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.check-pill input:focus-visible + span { outline: 2px solid var(--coffee-900); }
.freq-box { background: var(--cream-100); border-radius: 8px; padding: 0.75rem; margin: 0.3rem 0 0.9rem; }
.link-btn { background: none; border: none; color: var(--gold-600); font-weight: 600; cursor: pointer; padding: 0; font-size: 0.85rem; text-decoration: underline; }
.block-title-row { display: flex; justify-content: space-between; align-items: center; }
.block-title-row small { font-weight: 400; opacity: 0.7; }
.block-add { color: var(--gold-500); text-decoration: none; font-size: 0.8rem; text-transform: none; }
.block-edit { padding: 0.5rem 0.9rem; border-bottom: 1px solid var(--cream-200); background: #FFFCF6; font-size: 0.85rem; }
.block-edit summary { cursor: pointer; color: var(--ink-muted); }
.block-edit form { margin-top: 0.7rem; }
.admin-task { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--cream-200); }
.admin-task:last-child { border-bottom: none; }
.admin-task.inactive .task-text { color: var(--ink-muted); text-decoration: line-through; }
.admin-task-body { flex: 1; min-width: 0; }
.admin-task-meta { margin-top: 0.3rem; }
.admin-task-meta .chip { font-size: 0.72rem; padding: 0.1rem 0.5rem; }
.admin-task-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; font-size: 0.85rem; flex: none; }
.admin-task-actions a { color: var(--gold-600); font-weight: 600; }
.admin-task-actions form { margin: 0; }
.move-btns { display: flex; flex-direction: column; gap: 0.15rem; flex: none; }
.move-btns form { margin: 0; }
.move-btns button { border: 1px solid var(--cream-300); background: var(--cream-100); border-radius: 4px; font-size: 0.6rem; padding: 0.15rem 0.35rem; cursor: pointer; color: var(--coffee-700); }
.move-btns button:disabled { opacity: 0.3; cursor: default; }
.badge-role-encargada { background: #DCE8F5; color: #2F5785; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.inline-profile select.role-select { width: auto; margin: 0; padding: 0.3rem; font-size: 0.8rem; display: inline-block; }
.cost-table td.num, .cost-table th.num { text-align: right; }
.cost-table tfoot th { background: var(--cream-200); }
.cost-edit { background: #FFFCF6; }
.cost-edit .form-row { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ===== Entrevistas de selección ===== */
.score { display: inline-block; min-width: 2.4rem; text-align: center; border-radius: 8px; padding: 0.2rem 0.4rem; font-weight: 800; }
.score-high { background: var(--green-100); color: var(--green-600); }
.score-mid { background: #FFF3D6; color: #7A5410; }
.score-low { background: var(--red-100); color: var(--red-600); }
.score-none { background: var(--cream-200); color: var(--ink-muted); }
.score-big { font-family: Georgia, serif; font-size: 2.4rem; font-weight: 700; border-radius: 14px; padding: 0.4rem 0.9rem; line-height: 1; flex: none; }
.score-big small { font-size: 0.9rem; font-weight: 400; margin-left: 0.15rem; }
.cand-table td { vertical-align: middle; }
.cand-table .sec-col { text-align: center; padding-left: 0.3rem; padding-right: 0.3rem; font-size: 0.72rem; }
.sec-dot { display: inline-block; width: 1.5rem; height: 1.5rem; line-height: 1.5rem; border-radius: 50%; font-weight: 700; font-size: 0.78rem; }
.sec-dot.s1, .score-opt.s1 input:checked + span { background: #E9B8B8; color: #7A1F1F; }
.sec-dot.s2, .score-opt.s2 input:checked + span { background: #F3D3B5; color: #7A3F10; }
.sec-dot.s3, .score-opt.s3 input:checked + span { background: #F1E3B0; color: #6B5410; }
.sec-dot.s4, .score-opt.s4 input:checked + span { background: #CFE6C9; color: #2E5E2A; }
.sec-dot.s5, .score-opt.s5 input:checked + span { background: #9FD3A6; color: #1D4B24; }
.status-pill.cand-nova { background: #E7EEF8; color: #2F5785; }
.status-pill.cand-entrevistada { background: var(--cream-300); color: var(--coffee-800); }
.status-pill.cand-segunda { background: #FFF3D6; color: #7A5410; }
.status-pill.cand-reserva { background: #EDE7F6; color: #5B3F86; }
.status-pill.cand-contratada { background: var(--green-100); color: var(--green-600); }
.status-pill.cand-descartada { background: var(--red-100); color: var(--red-600); }
.iv-row { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.7rem 0; border-bottom: 1px solid var(--cream-200); text-decoration: none; color: inherit; }
.iv-row-body { flex: 1; }
.iv-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.iv-cand { margin-top: 0.35rem; color: var(--coffee-700); }
.guide ol { padding-left: 1.2rem; margin: 0 0 0.6rem; }
.guide li { margin-bottom: 0.35rem; font-size: 0.92rem; }
.forbidden { background: var(--red-100); color: var(--red-600); border-radius: 8px; padding: 0.6rem 0.8rem; font-size: 0.85rem; margin: 0; }
.iv-sec-title { margin: 0 0 0.4rem; font-size: 1.15rem; }
.iv-assess { margin: 0 0 0.3rem; font-size: 0.9rem; }
.iv-signals { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.8rem; margin: 0 0 0.6rem; }
.sig-good { color: var(--green-600); }
.sig-bad { color: var(--red-600); }
.iv-q { padding: 0.55rem 0; border-top: 1px dashed var(--cream-300); }
.iv-q-text { font-weight: 600; }
.iv-q-hint { font-size: 0.8rem; color: var(--ink-muted); font-style: italic; margin-top: 0.1rem; }
.iv-q textarea.ans { margin-top: 0.35rem; min-height: 3.2rem; }
.specific { border-left: 5px solid var(--gold-500); }
.score-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--cream-300); }
.score-row-label { font-weight: 700; font-size: 0.85rem; margin-right: 0.4rem; }
.score-opt { margin: 0 !important; cursor: pointer; }
.score-opt input { position: absolute; opacity: 0; pointer-events: none; }
.score-opt span { display: inline-block; min-width: 2.6rem; text-align: center; padding: 0.5rem 0.6rem; border-radius: 8px; background: var(--cream-200); font-weight: 800; }
.score-opt input:checked + span { outline: 2px solid var(--coffee-800); }
.score-opt input:focus-visible + span { outline: 2px solid var(--gold-500); }
.cv-box summary { cursor: pointer; font-weight: 600; }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; box-shadow: 0 -2px 10px rgba(43,30,20,0.12); padding: 0.75rem 1rem; border-radius: var(--radius) var(--radius) 0 0; z-index: 5; }
.analysis p { margin: 0 0 0.45rem; }
.ans-print { border-bottom: 1px solid #bbb; background: repeating-linear-gradient(to bottom, transparent 0, transparent 1.65em, #ddd 1.65em, #ddd 1.7em); margin-top: 0.3rem; }
.ans-print.filled { background: none; border: none; font-style: italic; padding: 0.2rem 0; }
.score-print { display: inline-block; border: 1px solid #999; border-radius: 6px; padding: 0.15rem 0.5rem; margin: 0.15rem 0.2rem 0.15rem 0; font-weight: 700; font-size: 0.85rem; }
.score-print small { font-weight: 400; }
.score-print.on { background: var(--coffee-800); color: #fff; }
.flags-print { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 1rem; font-size: 0.88rem; margin-bottom: 0.6rem; }
@media (max-width: 600px) { .iv-head { flex-direction: column; align-items: flex-start; } .flags-print { grid-template-columns: 1fr; } }

@media print {
    .topbar, .admin-nav, .no-print, .page-footer { display: none !important; }
    html, body { background: #fff; }
    .page { max-width: none; padding: 0; margin: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; padding: 0.7rem 0.9rem; margin-bottom: 0.6rem; }
    .iv-sec { break-inside: auto; }
    .iv-q { break-inside: avoid; }
    .iv-sec-title { break-after: avoid; }
    .guide { font-size: 0.85rem; }
    h1 { font-size: 1.4rem; }
    .score-print.on, .forbidden, .score-big { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    @page { size: A4; margin: 14mm 13mm; }
}
.toolbar-actions .btn-primary, .save-bar .btn-primary, .iv-print .btn-primary { width: auto; display: inline-block; text-decoration: none; }
.btn-danger { padding: 0.5rem 0.9rem; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-gold { text-decoration: none; display: inline-block; }
