/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #2c2c2a;
    background: #f5f6f7;
    min-height: 100vh;
}

a { color: #1db6b4; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Topbar ── */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e8e8e6;
    padding: .875rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar-logo {
    font-size: 17px;
    font-weight: 600;
    color: #1db6b4;
    letter-spacing: -.3px;
}
.topbar-logo span { color: #44546a; font-weight: 400; }

/* ── Cards ── */
.card {
    background: #fff;
    border: 1px solid #e8e8e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.card-sm { padding: 1rem 1.25rem; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s;
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary { background: #1db6b4; color: #fff; border-color: #1db6b4; }
.btn-primary:hover { background: #17a09e; text-decoration: none; color: #fff; }
.btn-outline { background: #fff; color: #44546a; border-color: #d0d0cc; }
.btn-outline:hover { background: #f5f6f7; text-decoration: none; }
.btn-danger { background: #fcebeb; color: #a32d2d; border-color: #f09595; }
.btn-danger:hover { background: #f7c1c1; text-decoration: none; }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #44546a;
    margin-bottom: 5px;
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d0d0cc;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #2c2c2a;
    background: #fff;
    transition: border-color .15s;
}
.form-control:focus {
    outline: none;
    border-color: #1db6b4;
    box-shadow: 0 0 0 3px rgba(29,182,180,.12);
}

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: #888780;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 8px 12px;
    border-bottom: 1px solid #e8e8e6;
}
.table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f0f0ee;
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafaf9; }

/* ── Badges ── */
.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 6px;
}
.badge-solido     { background: #eaf3de; color: #27500a; }
.badge-desarrollo { background: #faeeda; color: #633806; }
.badge-debil      { background: #fcebeb; color: #791f1f; }
.badge-activo     { background: #e1f5ee; color: #085041; }
.badge-cerrado    { background: #f1efe8; color: #5f5e5a; }

/* ── Alert ── */
.alert { padding: .875rem 1rem; border-radius: 8px; font-size: 14px; margin-bottom: 1rem; }
.alert-success { background: #e1f5ee; color: #085041; border: 1px solid #9fe1cb; }
.alert-error   { background: #fcebeb; color: #791f1f; border: 1px solid #f09595; }
.alert-info    { background: #e6f1fb; color: #0c447c; border: 1px solid #85b7eb; }

/* ── Page header ── */
.page-header {
    padding: 2rem 0 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-title { font-size: 22px; font-weight: 600; color: #2c2c2a; }
.page-subtitle { font-size: 14px; color: #888780; margin-top: 2px; }

/* ── Section title ── */
.section-title {
    font-size: 11px;
    font-weight: 500;
    color: #888780;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .75rem;
}

/* ── Tabs ── */
.tabs {
    display: flex;
    border-bottom: 1px solid #e8e8e6;
    margin-bottom: 1.5rem;
}
.tab-btn {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: none;
    color: #888780;
    border-bottom: 2px solid transparent;
    transition: all .15s;
    white-space: nowrap;
    font-family: inherit;
}
.tab-btn.active { color: #2c2c2a; border-bottom-color: #1db6b4; font-weight: 500; }
.tab-btn:hover:not(.active) { color: #44546a; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Escala Likert ── */
.likert-group { margin-bottom: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid #f0f0ee; }
.likert-group:last-child { border-bottom: none; }
.likert-question { font-size: 15px; color: #2c2c2a; margin-bottom: .875rem; line-height: 1.5; }
.likert-question strong { font-weight: 500; color: #888780; font-size: 12px; display: block; margin-bottom: 3px; }
.likert-scale { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.likert-labels { display: flex; justify-content: space-between; font-size: 12px; color: #888780; margin-top: 6px; }
.likert-option { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.likert-option input[type=radio] { width: 20px; height: 20px; accent-color: #1db6b4; cursor: pointer; }
.likert-option label { font-size: 13px; color: #44546a; font-weight: 500; }
.likert-options-row { display: flex; gap: 12px; align-items: center; }

/* ── Progress bar ── */
.progress-bar-wrap { height: 4px; background: #e8e8e6; border-radius: 2px; margin-bottom: 1.5rem; }
.progress-bar-fill { height: 4px; background: #1db6b4; border-radius: 2px; transition: width .3s; }

/* ── Range viz ── */
.rbar-wrap { flex: 1; position: relative; height: 6px; background: #f0f0ee; border-radius: 3px; }
.rbar-fill { position: absolute; height: 6px; border-radius: 3px; top: 0; }
.rbar-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; top: -2px; transform: translateX(-50%); border: 2px solid #fff; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .page-header { padding: 1.25rem 0 1rem; }
    .page-title { font-size: 18px; }
    .hide-mobile { display: none; }
    .likert-options-row { gap: 8px; }
}
