:root {
    --primary:     #13AFB5;
    --dark:        #2a2a2a;
    --gold:        #C2A900;
    --yellow:      #FDE529;
    --bg:          #f0f3f4;
    --card-bg:     #ffffff;
    --text:        #2a2a2a;
    --text-muted:  #707070;
    --border:      #dde3e6;
    --radius:      10px;
    --shadow:      0 4px 20px rgba(0,0,0,0.07);
}

/* ===== RESET / BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

/* ===== NAV ===== */
.top-nav {
    background: var(--dark);
    color: #fff;
    padding: 14px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.logo-warem { font-weight: 700; font-size: 22px; color: #fff; letter-spacing: 1px; }
.logo-lab   { font-weight: 700; font-size: 22px; color: var(--primary); }
.top-nav h1 { font-size: 15px; font-weight: 400; color: #888; }

/* ===== CONTAINER / CARDS ===== */
.container {
    width: 96%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px 0 40px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

h2 {
    border-left: 4px solid var(--primary);
    padding-left: 10px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ===== FORMS ===== */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: #444; }

textarea, input[type="text"], input[type="number"], input[type="password"], select.select-styled {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
}
textarea:focus, input:focus, select.select-styled:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(19,175,181,.12);
    background: #fff;
}
.form-group { margin-bottom: 16px; }

/* ===== JD ACTION ROW ===== */
.jd-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.jd-file-attach { display: flex; align-items: center; gap: 8px; }

.btn-attach {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px dashed var(--primary);
    border-radius: 7px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: background .2s;
}
.btn-attach:hover { background: rgba(19,175,181,.08); }

.jd-file-label { font-size: 12px; color: var(--text-muted); font-style: italic; }

.btn-save-jd {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: background .2s;
    margin-left: auto;
}
.btn-save-jd:hover { background: #0e8c91; }

/* ===== BUTTONS ===== */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 11px 22px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    width: 100%;
    transition: background .2s, transform .1s;
    text-align: center;
}
.btn:hover         { background: #0e8c91; }
.btn:active        { transform: scale(0.98); }

.btn-secondary     { background: var(--dark); }
.btn-secondary:hover { background: #111; }

.btn-gold          { background: var(--gold); }
.btn-gold:hover    { background: #9c8800; }

.btn-outline-danger {
    background: transparent;
    color: #c0392b;
    border: 1.5px solid #e74c3c;
    padding: 9px 18px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    width: 100%;
    transition: all .2s;
}
.btn-outline-danger:hover { background: #fdecea; }

/* ===== UPLOAD AREA ===== */
.file-drop-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 18px 20px;
    text-align: center;
    color: var(--text-muted);
    position: relative;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.file-drop-area.is-active { border-color: var(--primary); background: #f0fbfc; }

.fake-btn {
    background: #eaeaea;
    padding: 5px 12px;
    border-radius: 5px;
    margin-right: 10px;
    color: #333;
    font-weight: 600;
    font-size: 13px;
}
#cv-files {
    position: absolute; left: 0; top: 0;
    width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}

/* ===== POSTULANTES CHIPS ===== */
.applicant-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e8f7f8;
    color: #0e6e72;
    border: 1px solid #a8dfe0;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.chip-remove {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 13px;
    padding: 0 2px;
    line-height: 1;
}

/* ===== DASHBOARD ===== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.dashboard-header h2 { margin-bottom: 0; }

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.sort-control label { margin: 0; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.sort-control select {
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: #fafafa;
    cursor: pointer;
}

.dashboard-controls .btn { width: auto; }

/* ===== TABLE ===== */
.table-responsive { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

th, td {
    border-bottom: 1px solid var(--border);
    padding: 11px 13px;
    text-align: center;
    font-size: 13px;
    vertical-align: middle;
}

th {
    background: var(--dark);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: .8px;
    white-space: nowrap;
}

/* Th Split para Criterios (2 tonos) */
.th-split { padding: 0 !important; }
.th-split-top {
    padding: 8px 10px;
}
.th-split-bottom {
    background: #3e3e3e; /* Tono secundario */
    color: #b0b0b0;
    padding: 4px 10px;
    font-size: 9px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.th-sort { cursor: pointer; transition: background 0.2s; }
.th-sort:hover, .th-sort:hover .th-split-top { background: #3a3a3a; }
.th-sort:hover .th-split-bottom { background: #4a4a4a; }

/* Tono sutil para el cuadro general */
.table-responsive table {
    background: #fdfdfd;
}
.table-responsive table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

/* Resalte visual columna CANDIDATO */
.td-name { 
    text-align: left; 
    font-weight: 600; 
    white-space: nowrap; 
    background-color: #eef2f6 !important; 
    color: #1e293b;
    border-right: 1px solid #dde3e6;
}

.dni-input { 
    width: 100px !important; 
    text-align: center; 
    font-weight: 600; 
    padding: 4px;
    font-size: 12px;
}

/* Score scale — soft palette matching Nota Final tones */
.sc-5 { background: #d1fae5; color: #065f46; font-weight: 700; }
.sc-4 { background: #d4edda; color: #155724; font-weight: 700; }
.sc-3 { background: #fff3cd; color: #856404; font-weight: 700; }
.sc-2 { background: #ffe0b2; color: #6d3a00; font-weight: 700; }
.sc-1 { background: #f8d7da; color: #721c24; font-weight: 700; }

/* Total / Nota Final */
.total-cell    { font-weight: 800; font-size: 15px; }
.sc-total-good { background: #d1fae5; color: #065f46; border-radius: 6px; }
.sc-total-mid  { background: #fff3cd; color: #856404; border-radius: 6px; }
.sc-total-bad  { background: #f8d7da; color: #721c24; border-radius: 6px; }

/* Editable columns (salary, manual) — blue border like Examen Técnico */
td.td-editable {
    border-left: 3px solid #3b82f6 !important;
    border-right: 3px solid #3b82f6 !important;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
    min-width: 95px; /* Ancho fijo para simetría */
    text-align: center;
}
/* Status — colors matching Nota Final palette */
.status-evaluar   { background: #d1fae5; color: #065f46; border: 1.5px solid #6ee7b7; }
.status-revisar   { background: #fff3cd; color: #856404; border: 1.5px solid #fcd34d; }
.status-noapto    { background: #f8d7da; color: #721c24; border: 1.5px solid #f5c2c7; }
.status-pendiente { background: #f1f5f9; color: #475569; border: 1.5px solid #cbd5e1; }

/* Status select editable */
.td-status { min-width: 130px; }
.status-select {
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    width: 100%;
    min-width: 110px; /* Un poco más ancho para el selector */
    transition: background .2s;
    display: block;
    margin: 0 auto;
}
.status-select.status-evaluar   { background: #d1fae5; color: #065f46; }
.status-select.status-revisar   { background: #fff3cd; color: #856404; }
.status-select.status-noapto    { background: #f8d7da; color: #721c24; }
.status-select.status-pendiente { background: #f1f5f9; color: #475569; }

/* DNI column */
.td-dni { min-width: 90px; }
.dni-input {
    width: 82px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 3px 6px;
    font-size: 11px;
    text-align: center;
    color: #374151;
    background: #f9fafb;
    transition: border-color .15s;
}
.dni-input:focus { outline: none; border-color: var(--primary); background: #fff; }

/* Resumen desplegable */
.resumen-cell { text-align: left; min-width: 160px; }
.resumen-toggle {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 5px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.resumen-toggle:hover { background: rgba(19,175,181,.1); }
.resumen-content {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 280px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

/* Inputs dentro de tabla */
td input[type="number"] {
    border: none;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: 13px;
    color: inherit;
    padding: 0;
    width: 70px;
}
td input[type="number"]:focus {
    background: white;
    color: #333;
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(19,175,181,.2);
    outline: none;
}

/* ===== MODALES ===== */
.modal {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}
.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    width: 95%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 60px rgba(0,0,0,.25);
}
.modal-wide { width: 660px; }
.modal-small { width: 420px; }

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    justify-content: flex-end;
}
.modal-actions .btn { width: auto; }

/* Modal tabs */
.modal-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}
.modal-tab {
    background: none;
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.modal-tab:hover  { color: var(--primary); }

.tab-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* Salary table in modal */
#salary-config-table { width: 100%; border-collapse: collapse; }
#salary-config-table th, #salary-config-table td {
    padding: 10px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
#salary-config-table th { background: transparent; color: #64748b; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
#salary-config-table td input { width: 100%; }

/* ===== CRITERIA MODAL ===== */
.criteria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.weight-indicator {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}
.weight-indicator.ok      { background: #d4edda; color: #155724; }
.weight-indicator.over    { background: #f8d7da; color: #721c24; }
.weight-indicator.neutral { background: #e9ecef; color: #555; }

.criteria-row { background: #f9fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.criteria-fields { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.criteria-fields .c-name  { flex: 2; min-width: 120px; }
.criteria-fields .c-desc  { flex: 3; min-width: 150px; }
.weight-wrap { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 90px; }
.weight-wrap input { width: 60px; flex: 0 0 auto; }
.weight-wrap span { font-weight: 600; color: #555; }

.btn-add-criteria {
    background: none;
    border: 1.5px dashed var(--primary);
    color: var(--primary);
    width: 100%;
    padding: 9px;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 4px;
    transition: background .2s;
}
.btn-add-criteria:hover { background: rgba(19,175,181,.07); }

.btn-remove-criterion {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 15px;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.btn-remove-criterion:hover { background: #fdecea; }

/* ===== SLIDER ===== */
.slider-row { display: flex; align-items: center; gap: 12px; }
input[type="range"] { flex: 1; cursor: pointer; accent-color: var(--primary); }
#ai-temp-val { font-weight: 700; color: var(--primary); min-width: 30px; }

/* ===== TOAST ===== */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}
.toast {
    background: #2a2a2a;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .3s, transform .3s;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.toast.toast-show { opacity: 1; transform: translateY(0); }
.toast.toast-success { border-left: 4px solid #27ae60; }
.toast.toast-warn    { border-left: 4px solid #f39c12; background: #3a3200; }
.toast.toast-error   { border-left: 4px solid #e74c3c; background: #3a0000; }

/* ===== UTILS ===== */
.hidden { display: none !important; }
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.col-md-4, .col-md-6, .col-md-8 { padding: 0 8px; box-sizing: border-box; }
.col-md-4 { width: 33.33%; }
.col-md-6 { width: 50%; }
.col-md-8 { width: 66.66%; }
.items-center { align-items: center; }

.input-styled { margin-bottom: 0; }

/* Field hints */
.field-hint { display: block; margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.field-hint a { color: var(--primary); text-decoration: none; }
.field-hint a:hover { text-decoration: underline; }

/* Criteria type selector */
.c-type { width: 80px; flex: 0 0 80px; padding: 7px 6px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 12px; font-family: inherit; background: #f3f3f3; cursor: pointer; }

/* Score sub-label in salary column */
.score-sub { font-size: 10px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }

/* Shake animation */
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }
.shake { animation: shake 0.5s ease; }

/* ===== EXAMEN TÉCNICO HEADER ===== */
th.th-exam {
    background: #1a3a5c;
    min-width: 140px;
    vertical-align: middle;
    line-height: 1.4;
}
.exam-weight-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 4px 8px;
}
.exam-weight-wrap span { font-size: 10px; color: #cce; font-weight: 500; }
.exam-weight-wrap input {
    width: 46px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 4px;
}
.exam-weight-wrap input:focus { outline: none; background: rgba(255,255,255,0.25); }

/* td-exam: hereda color de la clase de escala (sc-1..sc-5) pero mantiene borde azul */
td.td-exam {
    border-left: 3px solid #3b82f6 !important;
    border-right: 3px solid #3b82f6 !important;
    position: relative;
}
td.td-exam.sc-5 { background: #d4edda; }
td.td-exam.sc-4 { background: #c8e6c9; }
td.td-exam.sc-3 { background: #fff9c4; }
td.td-exam.sc-2 { background: #ffe0b2; }
td.td-exam.sc-1 { background: #ffcdd2; }
td.td-exam:not(.sc-1):not(.sc-2):not(.sc-3):not(.sc-4):not(.sc-5) { background: #eef4ff; }
td.td-exam input {
    width: 52px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    background: transparent;
}

/* ===== ANALYTICS SECTION ===== */
.analytics-panel { margin-top: 0; }

.analytics-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.analytics-header h2 { margin-bottom: 0; }

.analytics-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: .4px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.chart-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 16px 14px;
}
.chart-title {
    font-size: 13px;
    font-weight: 700;
    color: #444;
    margin-bottom: 14px;
}
.chart-wrap {
    position: relative;
    height: 260px;
}
.chart-wrap-sm {
    height: 240px;
}

@media (max-width: 1100px) {
    .analytics-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .col-md-4, .col-md-6, .col-md-8 { width: 100%; margin-bottom: 10px; }
    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .jd-action-row { flex-direction: column; align-items: flex-start; }
    .btn-save-jd { margin-left: 0; }
    .analytics-grid { grid-template-columns: 1fr; }
}

/* ===== RESUMEN POPOVER FLOTANTE ===== */
.resumen-cell { position: relative; text-align: center; min-width: 80px; }
.resumen-toggle {
    background: #f0f4ff;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.resumen-toggle:hover { background: #dbeafe; }

.resumen-popover {
    position: absolute;
    z-index: 500;
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #c7d2e8;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(30,40,80,.18), 0 2px 8px rgba(0,0,0,.08);
    padding: 0;
    overflow: hidden;
    animation: popover-in .18s ease;
}
@keyframes popover-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }

.resumen-popover-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #1e3a5f 0%, #2563eb 100%);
    padding: 10px 14px;
    color: #fff;
}
.pop-name {
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pop-copy, .pop-close {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 5px;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.pop-copy:hover { background: rgba(255,255,255,.28); }
.pop-close { font-size: 13px; padding: 2px 7px; }
.pop-close:hover { background: rgba(220,40,40,.5); }

.resumen-popover-body {
    padding: 12px 14px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #374151;
    max-height: 180px;
    overflow-y: auto;
}

/* ===== SECCIÓN 5: RESUMEN DE EVALUACIÓN ===== */
.summary-panel { margin-top: 0; }
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.summary-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    transition: box-shadow .2s, transform .2s;
}
.summary-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.10); transform: translateY(-2px); }

.summary-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rank-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.summary-name {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.summary-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.nota-badge {
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 8px;
    line-height: 1.4;
}
.nota-badge small { font-size: 10px; opacity: .8; }

.summary-body {
    font-size: 13px;
    line-height: 1.65;
    color: #475569;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
    min-height: 60px;
}
.summary-copy-btn {
    align-self: flex-start;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px;
    color: #64748b;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.summary-copy-btn:hover { background: #f0f4ff; color: #2563eb; border-color: #93c5fd; }

/* ===== QUESTION EDITOR CARDS ===== */
.question-editor-card {
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}
.question-editor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.05);
}
.question-editor-card input:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    outline: none;
}
.question-editor-card label {
    cursor: pointer;
    user-select: none;
}
.question-editor-card label input[type="radio"] {
    cursor: pointer;
    accent-color: var(--primary);
}

.correct-badge {
    background: #15803d;
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    animation: fadeIn 0.3s ease;
}

.is-correct-visual {
    background: #f0fdf4;
    border: 1px solid #bbf7d0 !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}