/* ============================================================
   BOLSA DE EMPLEO — Estilos base
   ============================================================ */

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

/* ---------- VARIABLES ---------- */
:root {
    --color-primary: #1e40af;
    --color-primary-dark: #1e3a8a;
    --color-primary-light: #3b82f6;
    --color-secondary: #0ea5e9;

    --color-success: #10b981;
    --color-success-bg: #d1fae5;
    --color-success-text: #065f46;

    --color-error: #dc2626;
    --color-error-bg: #fee2e2;
    --color-error-text: #991b1b;

    --color-warning: #d97706;
    --color-warning-bg: #fef3c7;
    --color-warning-text: #92400e;

    --color-info: #0284c7;
    --color-info-bg: #dbeafe;
    --color-info-text: #075985;

    --color-bg: #f4f6f8;
    --color-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-border-strong: #d1d5db;

    --color-text: #111827;
    --color-text-muted: #6b7280;
    --color-text-soft: #9ca3af;

    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 2px 8px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.12);

    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", Menlo, Consolas, monospace;

    --sidebar-width: 250px;
    --topbar-height: 64px;
}

/* ============================================================
   BADGES DE ROLES
   ============================================================ */
.badge--super_admin { background: #fef3c7; color: #92400e; }
.badge--admin       { background: #dbeafe; color: #1e40af; }
.badge--rrhh        { background: #d1fae5; color: #065f46; }

/* ============================================================
   ACTIVITY LIST
   ============================================================ */
.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}
.activity-list__item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.activity-list__item:last-child { border-bottom: none; }
.activity-list__action { flex: 1; color: #374151; }
.activity-list__time {
    color: #9ca3af;
    font-size: 12px;
    white-space: nowrap;
}
/* ---------- BASE ---------- */
html, body { height: 100%; }
body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; display: block; }

code {
    font-family: var(--font-mono);
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

hr { border: none; border-top: 1px solid var(--color-border); margin: 12px 0; }

/* ============================================================
   LAYOUT PÚBLICO (login)
   ============================================================ */
.layout-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #1e40af 0%, #0ea5e9 100%);
}

.layout-main__content { width: 100%; max-width: 420px; }

/* ---------- LOGIN ---------- */
.login-wrapper { width: 100%; }

.login-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
}

.login-card__logo {
    text-align: center;
    margin-bottom: 24px;
}
.login-card__logo img {
    max-height: 60px;
    width: auto;
    margin: 0 auto;
}

.login-card__title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: var(--color-text);
    margin-bottom: 4px;
}
.login-card__subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.login-card__footer {
    margin-top: 24px;
    text-align: center;
    color: var(--color-text-soft);
    font-size: 12px;
}

/* ---------- FORMULARIOS ---------- */
.form-group { margin-bottom: 18px; }
.form-group--inline { display: flex; align-items: center; margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}
.form-input.is-invalid { border-color: var(--color-error); }
.form-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.12); }

.form-input-wrapper { position: relative; }
.form-input-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 16px;
    color: var(--color-text-muted);
    border-radius: 4px;
}
.form-input-toggle:hover { background: #f3f4f6; }

.form-error {
    display: block;
    margin-top: 4px;
    color: var(--color-error);
    font-size: 12px;
    font-weight: 500;
}

.form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-muted);
    cursor: pointer;
    user-select: none;
}
.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* ---------- BOTONES ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.btn--primary:hover { background: var(--color-primary-dark); }

.btn--secondary {
    background: #fff;
    color: var(--color-text);
    border-color: var(--color-border-strong);
}
.btn--secondary:hover { background: #f9fafb; }

.btn--danger { background: var(--color-error); color: #fff; }
.btn--danger:hover { background: #b91c1c; }

.btn--block { width: 100%; }

/* ---------- ALERTAS ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    border-left: 4px solid;
}
.alert--success { background: var(--color-success-bg); color: var(--color-success-text); border-color: var(--color-success); }
.alert--error   { background: var(--color-error-bg);   color: var(--color-error-text);   border-color: var(--color-error); }
.alert--warning { background: var(--color-warning-bg); color: var(--color-warning-text); border-color: var(--color-warning); }
.alert--info    { background: var(--color-info-bg);    color: var(--color-info-text);    border-color: var(--color-info); }

/* ============================================================
   LAYOUT ADMIN (dashboard)
   ============================================================ */
.layout-admin {
    display: flex;
    min-height: 100vh;
    background: var(--color-bg);
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar__logo { height: 34px; width: auto; }
.sidebar__brand-text {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}

.sidebar__nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #cbd5e1;
    font-size: 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: background .15s, color .15s;
}
.sidebar__link:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
    text-decoration: none;
}
.sidebar__link.active {
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
}
.sidebar__icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar__divider {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 12px 8px;
}

.sidebar__footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,.06);
    font-size: 11px;
    color: #64748b;
    text-align: center;
}

/* ---------- MAIN ---------- */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ---------- TOPBAR ---------- */
.topbar {
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

/* ---------- USER MENU ---------- */
.user-menu { position: relative; }
.user-menu__trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background .15s;
    font-family: inherit;
}
.user-menu__trigger:hover { background: #f3f4f6; }

.user-menu__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-menu__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.user-menu__name { font-size: 13px; font-weight: 600; color: var(--color-text); }
.user-menu__role { font-size: 11px; color: var(--color-text-muted); }
.user-menu__caret { color: var(--color-text-muted); font-size: 11px; }

.user-menu__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 240px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 6px;
    display: none;
}
.user-menu__dropdown.is-open { display: block; }

.user-menu__header {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.user-menu__header strong { font-size: 13px; }
.user-menu__header small { color: var(--color-text-muted); font-size: 12px; }

.user-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 13px;
    color: var(--color-text);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-family: inherit;
}
.user-menu__item:hover { background: #f3f4f6; }

.user-menu__form { margin: 0; }

/* ---------- CONTENT ---------- */
.content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
}

/* ---------- WELCOME BANNER ---------- */
.welcome-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff;
    padding: 24px 28px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.welcome-banner h2 { font-size: 20px; margin-bottom: 4px; }
.welcome-banner p { font-size: 14px; opacity: .9; }
.welcome-banner__date { text-align: right; }
.welcome-banner__date span { display: block; font-size: 20px; font-weight: 700; }
.welcome-banner__date small { font-size: 12px; opacity: .8; }

/* ---------- KPI GRID ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow .15s, transform .15s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.kpi-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.kpi-card__icon--blue   { background: #dbeafe; }
.kpi-card__icon--green  { background: #d1fae5; }
.kpi-card__icon--purple { background: #ede9fe; }
.kpi-card__icon--orange { background: #fed7aa; }

.kpi-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-card__label { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }
.kpi-card__value { font-size: 26px; font-weight: 700; color: var(--color-text); line-height: 1.1; }
.kpi-card__foot { font-size: 12px; color: var(--color-text-soft); }

/* ---------- GRID 2 ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 16px;
}

/* ---------- CARDS ---------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card__title { font-size: 15px; font-weight: 700; color: var(--color-text); }
.card__link { font-size: 13px; color: var(--color-primary); }
.card__body { padding: 20px; }

/* ---------- TABLES ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.table th {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--color-text-muted);
    background: #fafbfc;
}
.table tr:last-child td { border-bottom: none; }
.table small { color: var(--color-text-muted); font-size: 12px; }

/* ---------- BADGES ---------- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.badge--recibida    { background: #dbeafe; color: #1e40af; }
.badge--en_revision { background: #fef3c7; color: #92400e; }
.badge--entrevista  { background: #ede9fe; color: #5b21b6; }
.badge--prueba      { background: #cffafe; color: #155e75; }
.badge--oferta      { background: #fce7f3; color: #9d174d; }
.badge--contratado  { background: #d1fae5; color: #065f46; }
.badge--rechazado   { background: #fee2e2; color: #991b1b; }
.badge--desistio    { background: #f3f4f6; color: #4b5563; }
.badge--archivado   { background: #e5e7eb; color: #374151; }

/* ---------- FUNNEL ---------- */
.funnel-list { list-style: none; }
.funnel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}
.funnel-item:last-child { border-bottom: none; }
.funnel-item__label { color: var(--color-text); }
.funnel-item__count {
    background: var(--color-primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--color-text-muted);
}
.empty-state__icon { font-size: 42px; display: block; margin-bottom: 8px; opacity: .5; }
.empty-state p { font-size: 14px; }

/* ============================================================
   FILTERS GRID
   ============================================================ */
.filters-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.filters-grid .form-group { margin-bottom: 0; }
.filters-grid__actions {
    display: flex;
    gap: 6px;
    align-items: end;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    font-size: 14px;
}
.pagination__link {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.pagination__link:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    text-decoration: none;
}
.pagination__info { color: var(--color-text-muted); }

/* ============================================================
   BADGE INFO (si no existe aún)
   ============================================================ */
.badge--info { background: #dbeafe; color: #1e40af; }

/* ============================================================
   TIMELINE DOT COLORS POR ESTADO
   ============================================================ */
.timeline-item__dot--recibida    { background: #dbeafe; color: #1e40af; }
.timeline-item__dot--en_revision { background: #fef3c7; color: #92400e; }
.timeline-item__dot--entrevista  { background: #ede9fe; color: #5b21b6; }
.timeline-item__dot--prueba      { background: #cffafe; color: #155e75; }
.timeline-item__dot--oferta      { background: #fce7f3; color: #9d174d; }
.timeline-item__dot--contratado  { background: #d1fae5; color: #065f46; }
.timeline-item__dot--rechazado   { background: #fee2e2; color: #991b1b; }
.timeline-item__dot--desistio    { background: #f3f4f6; color: #4b5563; }
.timeline-item__dot--archivado   { background: #e5e7eb; color: #374151; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
    height: 8px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
    min-width: 100px;
}
.progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #1e40af 0%, #0ea5e9 100%);
    border-radius: 999px;
    transition: width .4s ease;
}

/* ============================================================
   CANVAS (gráficos)
   ============================================================ */
canvas {
    max-width: 100%;
}

/* ============================================================
   LOG VIEWER
   ============================================================ */
.log-viewer {
    background: #0f172a;
    color: #94e2d5;
    padding: 16px 20px;
    border-radius: 8px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    max-height: 600px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

@media (max-width: 900px) {
    .filters-grid { grid-template-columns: 1fr; }
}
/* ============================================================
   DETAIL GRID
   ============================================================ */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
.detail-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 88px;
}

/* ============================================================
   TABLE CLEAN (sin bordes, para fichas)
   ============================================================ */
.table--clean th,
.table--clean td {
    border-bottom: 1px solid #f3f4f6;
}
.table--clean th {
    width: 40%;
    background: transparent;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
}
.table--clean td {
    font-size: 13px;
    color: var(--color-text);
}
.table--clean tr:last-child th,
.table--clean tr:last-child td { border-bottom: none; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 8px;
}
.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 24px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}
.timeline-item:last-child::before { display: none; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item__dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e5e7eb;
    z-index: 1;
}

.timeline-item__content {
    background: #fafbfc;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 12px 14px;
}

.timeline-item__header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.timeline-item__arrow {
    color: #9ca3af;
    font-weight: 700;
}
.timeline-item__comment {
    font-size: 14px;
    color: #374151;
    line-height: 1.55;
    margin: 8px 0;
    padding: 8px 10px;
    background: #ffffff;
    border-left: 3px solid #e5e7eb;
    border-radius: 0 4px 4px 0;
}
.timeline-item__meta {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

/* ============================================================
   NOTES
   ============================================================ */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.note-item {
    background: #fef9c3;
    border-left: 3px solid #eab308;
    border-radius: 0 6px 6px 0;
    padding: 12px 14px;
}
.note-item__header {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: #713f12;
    margin-bottom: 6px;
}
.note-item__body {
    font-size: 14px;
    color: #422006;
    line-height: 1.55;
}

/* ============================================================
   RATING INPUT
   ============================================================ */
.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 4px;
    font-size: 28px;
    line-height: 1;
}
.rating-input input[type="radio"] {
    display: none;
}
.rating-input label {
    cursor: pointer;
    color: #d1d5db;
    transition: color .15s;
    padding: 2px;
}
.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: #fbbf24;
}

/* ============================================================
   OTHER APPLICATIONS
   ============================================================ */
.other-applications {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.other-applications__item {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 10px;
}
.other-applications__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.other-applications__item a {
    font-size: 13px;
    color: var(--color-primary);
    text-decoration: none;
}
.other-applications__item a:hover {
    text-decoration: underline;
}
.other-applications__meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

/* ============================================================
   RESPONSIVE DETAIL
   ============================================================ */
@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .detail-sidebar {
        position: static;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .2s;
    }
    .sidebar.is-open { transform: translateX(0); }
    .main { margin-left: 0; }

    .grid-2 { grid-template-columns: 1fr; }
    .welcome-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .welcome-banner__date { text-align: left; }
}
/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}
.page-header__title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}
.page-header__subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.page-header__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================================
   BOTONES SECUNDARIOS
   ============================================================ */
.btn--sm {
    padding: 5px 10px;
    font-size: 13px;
}
.btn--warning {
    background: var(--color-warning);
    color: #fff;
}
.btn--warning:hover { background: #b45309; }

.btn--info { background: var(--color-info); color: #fff; }
.btn--info:hover { background: #0369a1; }

/* ============================================================
   FORM HELPERS
   ============================================================ */
.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--color-text-muted);
}
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    resize: vertical;
    min-height: 80px;
    transition: border-color .15s, box-shadow .15s;
}
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}
.form-textarea.is-invalid { border-color: var(--color-error); }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--color-border);
}

/* ============================================================
   UTILIDADES
   ============================================================ */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.text-danger { color: var(--color-error); }

.card__body--no-padding { padding: 0; }
.card__body--no-padding .table { border-radius: 0; }

.action-group {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

/* ============================================================
   KPI SMALL
   ============================================================ */
.kpi-grid--sm {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 16px;
}
.kpi-grid--sm .kpi-card { padding: 16px; }
.kpi-grid--sm .kpi-card__icon { width: 40px; height: 40px; font-size: 18px; }
.kpi-grid--sm .kpi-card__value { font-size: 20px; }

/* ============================================================
   TABLE COMPACT
   ============================================================ */
.table--compact th,
.table--compact td {
    padding: 6px 10px;
    font-size: 13px;
}

/* ============================================================
   PREVIEW BOX
   ============================================================ */
.preview-box {
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--color-text);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================================
   BADGE INFO
   ============================================================ */
.badge--info { background: #dbeafe; color: #1e40af; }
/* ============================================================
   TABS
   ============================================================ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 16px;
    overflow-x: auto;
}
.tabs__item {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.tabs__item:hover {
    color: var(--color-text);
    text-decoration: none;
}
.tabs__item.is-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ============================================================
   SEARCH FORM
   ============================================================ */
.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-form .form-input { flex: 1; }