﻿:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-soft: #f8fbff;
    --text: #172033;
    --muted: #5f6b7a;
    --brand: #1d4ed8;
    --brand-dark: #153eaa;
    --brand-2: #0f766e;
    --danger: #b91c1c;
    --warning: #b45309;
    --success: #047857;
    --border: #d7e0ec;
    --shadow: 0 18px 45px rgba(15, 23, 42, .10);
    --radius: 22px;
    --font-size: 17px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); font-size: var(--font-size); }
body { line-height: 1.55; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: #111827; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; color: #111827; padding: 12px 16px; border-radius: 12px; z-index: 50; }
.skip-link:focus { left: 12px; box-shadow: var(--shadow); }

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background: radial-gradient(circle at top left, #dbeafe 0, transparent 28%), radial-gradient(circle at bottom right, #ccfbf1 0, transparent 28%), var(--bg);
}
.auth-card {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(219,227,239,.9);
    border-radius: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.auth-hero { padding: 48px; background: linear-gradient(135deg, #0f172a, #1d4ed8 60%, #0f766e); color: #fff; }
.auth-hero h1 { margin: 0 0 18px; font-size: clamp(34px, 5vw, 56px); line-height: 1; color: #fff; }
.auth-hero p { color: rgba(255,255,255,.9); font-size: 18px; line-height: 1.55; }
.auth-panel { padding: 44px; }
.brand-badge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); margin-bottom: 34px; }
.logo-dot { width: 14px; height: 14px; border-radius: 999px; background: #34d399; box-shadow: 0 0 0 6px rgba(52,211,153,.2); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 310px 1fr; }
.sidebar { background: #0f172a; color: #e5e7eb; padding: 24px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand-block { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #dbeafe; color: #1d4ed8; font-weight: 900; font-size: 20px; }
.sidebar h2 { margin: 0; color: #fff; font-size: 22px; }
.sidebar small { display: block; margin-top: 4px; color: #cbd5e1; }
.sidebar-helper { margin-top: 22px; padding: 18px; border-radius: 20px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); display: grid; gap: 10px; }
.sidebar-helper strong { color: #fff; font-size: 18px; }
.sidebar-helper span { color: #cbd5e1; font-size: 14px; }
.nav-call { width: 100%; text-align: center; box-shadow: none !important; }
.nav { margin-top: 24px; display: grid; gap: 9px; }
.nav-title { color: #93c5fd; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 900; margin: 8px 6px 2px; }
.nav a { color: #e0f2fe; padding: 15px 15px; border-radius: 16px; display: block; font-size: 16px; font-weight: 800; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.13); text-decoration: none; }
.main { padding: 34px; max-width: 1320px; width: 100%; }
.footer-note { color: #cbd5e1; font-size: 13px; margin-top: 26px; }
.footer-note strong { color: #fff; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 26px; }
.topbar h1, .welcome-hero h1 { margin: 0; font-size: clamp(30px, 3vw, 44px); line-height: 1.08; letter-spacing: -.03em; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.welcome-hero { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding: 30px; margin-bottom: 22px; border-radius: 28px; background: linear-gradient(135deg, #ffffff, #eff6ff 62%, #ecfdf5); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.welcome-hero.compact { padding: 26px; }
.hero-text { font-size: 19px; color: var(--muted); max-width: 800px; margin: 10px 0 0; }
.eyebrow { margin: 0 0 6px; color: var(--brand-2); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(15,23,42,.06); padding: 26px; }
.card h2, .card h3 { margin-top: 0; line-height: 1.2; }
.section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 12px; }
.simple-card { display: grid; align-content: space-between; min-height: 220px; }
.kpi { font-size: 34px; font-weight: 900; letter-spacing: -1px; }
.kpi small { font-size: 14px; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
.muted.big { font-size: 18px; }

.action-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; border: 2px solid #bfdbfe; background: linear-gradient(135deg, #fff, #eff6ff); }
.action-card-main { display: flex; align-items: flex-start; gap: 20px; }
.big-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: #dbeafe; font-size: 34px; flex: 0 0 auto; }
.action-card h2 { font-size: clamp(28px, 3vw, 40px); margin: 0 0 8px; }
.action-card-buttons { display: grid; gap: 12px; min-width: 260px; }
.progress-text { margin: 9px 0 0; color: #1e40af; font-weight: 900; }

.guide-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.guide-item { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 18px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; }
.guide-item span { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: #dbeafe; color: #1d4ed8; font-weight: 900; }
.guide-item strong { display: block; font-size: 18px; }
.guide-item small { color: var(--muted); grid-column: 2; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 8px; }
label { font-weight: 900; color: #243244; }
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea, .input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 15px 16px;
    font-size: 17px;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 5px rgba(96,165,250,.22); }
textarea { min-height: 120px; resize: vertical; }
.required::after { content: " *"; color: var(--danger); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.btn, input[type=submit], button {
    border: 0;
    border-radius: 16px;
    padding: 14px 20px;
    background: var(--brand);
    color: #fff !important;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(29,78,216,.20);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50px;
    font-size: 16px;
}
.btn:hover, input[type=submit]:hover, button:hover { background: var(--brand-dark); text-decoration: none; }
.btn.secondary { background: #e5e7eb; color: #111827 !important; box-shadow: none; }
.btn.secondary:hover { background: #d1d5db; }
.btn.success { background: var(--success); }
.btn.success:hover { background: #065f46; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 9px 12px; border-radius: 12px; font-size: 13px; min-height: 0; }
.btn-lg { padding: 16px 22px !important; font-size: 18px !important; }
.btn-xl { padding: 18px 24px; font-size: 19px; min-height: 62px; }
.btn-primary-action { min-width: 245px; }
.full { width: 100%; }
.message { padding: 16px 18px; border-radius: 16px; margin: 16px 0; border: 1px solid var(--border); background: #f8fafc; }
.message.ok { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.message.err { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.message.warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }

.progress-wrap { height: 16px; border-radius: 999px; background: #e5e7eb; overflow: hidden; margin-top: 14px; }
.progress-wrap.large { height: 18px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); width: 0%; transition: width .5s; }
.status-pill { display: inline-flex; align-items: center; padding: 8px 13px; border-radius: 999px; background: #e0f2fe; color: #075985; font-weight: 900; font-size: 14px; white-space: nowrap; }
.status-pill.large { font-size: 17px; padding: 12px 16px; }
.table-wrap { overflow-x: auto; }
table.modern { width: 100%; border-collapse: collapse; }
table.modern th, table.modern td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.modern th { color: #475569; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; background: var(--panel-soft); }
.upload-box { border: 2px dashed #93c5fd; background: #eff6ff; border-radius: 20px; padding: 24px; }

.assist-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-radius: 22px; background: #fffbeb; border: 1px solid #fde68a; margin: 0 0 22px; }
.assist-icon { width: 50px; height: 50px; border-radius: 18px; background: #fef3c7; display: grid; place-items: center; font-size: 26px; flex: 0 0 auto; }
.assist-banner > div:nth-child(2) { flex: 1; }
.assist-banner strong { display: block; font-size: 19px; }
.assist-banner span { color: #7c2d12; }
.form-helper { background: #f8fafc; border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; margin-bottom: 20px; }
.form-helper strong { display: block; font-size: 18px; }
.form-helper span { color: var(--muted); }
.safe-note { color: var(--muted); margin: 14px 0 0; font-size: 15px; }

.wizard-card { padding: 0; overflow: hidden; }
.guided-card { border: 2px solid #e0e7ff; }
.wizard-layout { display: grid; grid-template-columns: 340px 1fr; min-height: 560px; }
.wizard-steps { background: var(--panel-soft); border-right: 1px solid var(--border); padding: 22px; }
.wizard-steps-header h3 { margin: 0 0 6px; }
.wizard-steps-header p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.wizard-form { padding: 28px; }
.flow-list { display: grid; gap: 9px; }
.flow-item { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); background: #fff; padding: 13px; border-radius: 17px; color: var(--text); }
.flow-item:hover { text-decoration: none; border-color: #93c5fd; box-shadow: 0 8px 22px rgba(15,23,42,.08); }
.flow-item.current { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,.16); background: #eff6ff; }
.flow-item.done { background: #ecfdf5; border-color: #a7f3d0; }
.flow-number { width: 34px; height: 34px; border-radius: 999px; display: inline-grid; place-items: center; flex: 0 0 auto; background: #e0f2fe; color: #075985; font-weight: 900; }
.flow-item.done .flow-number { background: #d1fae5; color: #065f46; }
.flow-content { flex: 1; min-width: 0; }
.flow-content strong { display: block; line-height: 1.2; }
.flow-content small { display: block; color: var(--muted); margin-top: 3px; }
.flow-state { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; color: var(--success); font-weight: 900; }
.flow-item.current .flow-state { color: var(--brand); }
.wizard-actions { border-top: 1px solid var(--border); padding-top: 20px; }

@media (max-width: 1100px) {
    .wizard-layout { grid-template-columns: 1fr; }
    .wizard-steps { border-right: 0; border-bottom: 1px solid var(--border); }
    .guided-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
    :root { --font-size: 16px; }
    .auth-card, .app-shell { grid-template-columns: 1fr; }
    .auth-hero { padding: 34px; }
    .auth-panel { padding: 30px; }
    .sidebar { height: auto; position: static; }
    .main { padding: 20px; }
    .grid-2, .grid-3, .form-grid, .guide-strip { grid-template-columns: 1fr; }
    .topbar, .welcome-hero, .assist-banner, .action-card { align-items: flex-start; flex-direction: column; }
    .action-card { display: flex; }
    .action-card-main { flex-direction: column; }
    .action-card-buttons { width: 100%; min-width: 0; }
    .btn, input[type=submit], button { width: 100%; }
    .actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .guided-flow { grid-template-columns: 1fr; }
    .status-pill.large { white-space: normal; }
}
@media (max-width: 560px) {
    .main { padding: 14px; }
    .card, .wizard-form, .welcome-hero { padding: 20px; border-radius: 20px; }
    .wizard-steps { padding: 18px; }
    .big-icon { width: 60px; height: 60px; font-size: 28px; }
}

/* v1.3.0 - mejoras de guía, validación y formularios condicionados */
.required::after {
    content: " *";
    color: #b42318;
    font-weight: 900;
}

.field-disabled {
    opacity: .58;
}

.field-disabled label,
.field-disabled small {
    color: #6b7280;
}

.field-disabled input,
.field-disabled select,
.field-disabled textarea {
    background: #f3f4f6 !important;
    cursor: not-allowed;
}

.readonly-input {
    background: #f8fafc !important;
    border-style: dashed !important;
    font-weight: 800;
}

.confirm-box {
    margin: 22px 0;
    padding: 18px 20px;
    border: 2px solid #2563eb;
    background: #eff6ff;
    border-radius: 18px;
    font-size: 1.12rem;
    font-weight: 800;
}

.confirm-box input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

.instructions-card {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .08);
}

.instructions-card h2 {
    margin-top: 0;
    color: #1d4ed8;
    font-size: 1.8rem;
}

.instructions-card li {
    margin-bottom: 14px;
    line-height: 1.55;
    font-size: 1.05rem;
}

.confirmation-text p {
    line-height: 1.6;
    font-size: 1.05rem;
}

.sample-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.sample-images figure {
    margin: 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 10px;
    text-align: center;
}

.sample-images img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 10px;
}

.sample-images figcaption {
    margin-top: 8px;
    font-weight: 700;
    color: #334155;
}

.upload-status-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.upload-badge {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
}

.upload-badge.ok {
    border-color: #16a34a;
    background: #f0fdf4;
}

.upload-badge.pending {
    border-color: #dc2626;
    background: #fef2f2;
}

.upload-badge.optional {
    border-color: #94a3b8;
    background: #f8fafc;
}

.upload-badge small {
    color: #475569;
}

.upload-grid {
    margin-top: 10px;
}

.upload-field input[type="file"] {
    width: 100%;
    padding: 16px;
    border: 2px dashed #2563eb;
    border-radius: 16px;
    background: #eff6ff;
}

.thank-you-card {
    padding: 34px;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
    border-radius: 24px;
    border: 1px solid #bbf7d0;
    font-size: 1.12rem;
    line-height: 1.6;
}

input:disabled,
select:disabled,
textarea:disabled,
input[type="submit"]:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .sample-images,
    .upload-status-row {
        grid-template-columns: 1fr;
    }

    .instructions-card {
        padding: 18px;
    }
}

.flow-item.locked {
    opacity: .58;
    background: #f1f5f9;
    border-style: dashed;
    cursor: not-allowed;
}

.flow-item.locked .flow-number {
    background: #cbd5e1;
    color: #334155;
}

.upload-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 12px;
}

.upload-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    max-width: 100%;
}

.upload-preview.empty {
    display: block;
    color: #64748b;
    font-size: .95rem;
    margin: 6px 0 10px;
}

.upload-preview img {
    width: 92px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: white;
}

.upload-preview small {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-chip {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 700;
    text-decoration: none;
}

code {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 10px;
    background: #eef2ff;
    color: #1e1b4b;
    font-weight: 900;
    letter-spacing: .04em;
}


.admin-image-section {
    margin: 18px 0 24px;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-heading-row h3 {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.admin-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.admin-image-card {
    min-height: 220px;
    border: 1px solid #d8e2f0;
    border-radius: 20px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}

.admin-image-card h4 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.admin-image-preview {
    display: block;
    text-decoration: none;
    color: #0f172a;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 10px;
    background: #f8fafc;
    margin-bottom: 12px;
}

.admin-image-preview img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.admin-image-preview strong,
.admin-image-preview small,
.admin-image-preview em {
    display: block;
    margin-top: 6px;
}

.admin-image-preview small {
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-image-preview em {
    color: #2563eb;
    font-style: normal;
    font-weight: 800;
}

.admin-image-empty {
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 12px;
}

.admin-file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    border-radius: 14px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.admin-inline-upload {
    display: grid;
    gap: 10px;
    padding-top: 8px;
}

.admin-inline-upload small {
    color: #64748b;
}

.admin-inline-upload input[type=file] {
    width: 100%;
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    padding: 10px;
    background: #eff6ff;
}

@media (max-width: 980px) {
    .admin-image-grid {
        grid-template-columns: 1fr;
    }

    .section-heading-row {
        flex-direction: column;
    }
}

.admin-image-empty.warning {
    border-color: #facc15;
    background: #fffbeb;
    color: #92400e;
}


/* Parche v1.5.9: miniaturas administrativas compactas. */
.admin-image-preview-small {
    display: inline-block !important;
    width: 240px !important;
    max-width: 240px !important;
    vertical-align: top;
}

.admin-image-preview-small .admin-image-thumb,
.admin-image-preview-small img {
    width: 220px !important;
    max-width: 220px !important;
    height: 145px !important;
    max-height: 145px !important;
    object-fit: cover !important;
    object-position: center !important;
}

.admin-image-card {
    overflow: hidden;
}

.case-age-box {
    margin: 18px 0 22px;
    padding: 18px 22px;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: #eff6ff;
}

.case-age-box h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.case-age-box p {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.case-mail-panel {
    margin-top: 26px;
    padding: 22px;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    background: #f8fbff;
}

.case-mail-panel h2 {
    margin-top: 0;
}


/* Parche v1.6.3 - panel: imágenes y grupos de archivos */
.panel-doc-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.panel-doc-card {
    border: 1px solid #d8e2f3;
    border-radius: 16px;
    background: #f8fbff;
    padding: 12px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    justify-content: flex-start;
}
.panel-doc-card strong {
    color: #0f172a;
    font-size: 0.95rem;
}
.panel-doc-card img {
    width: 120px !important;
    height: 88px !important;
    object-fit: cover !important;
    border-radius: 12px;
    border: 1px solid #c7d2e5;
    background: #fff;
    display: block;
}
.panel-doc-card small,
.panel-doc-card span {
    color: #64748b;
    font-size: 0.85rem;
}
.panel-doc-card.empty {
    justify-content: center;
    background: #f8fafc;
    border-style: dashed;
}
.file-group-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}
.file-group-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.file-group-link span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.85rem;
    font-weight: 800;
}


/* Parche v1.7.0 - panel: estado y cita destacados */
.status-summary-card {
    margin-top: 22px;
    border: 2px solid #bfdbfe;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}
.status-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.status-summary-header h2 {
    margin: 0 0 8px;
    font-size: clamp(1.65rem, 2.4vw, 2.45rem);
}
.status-pill-strong {
    box-shadow: 0 10px 24px rgba(14, 116, 144, .14);
    border: 1px solid #bae6fd;
}
.appointment-highlight {
    border: 2px solid #22c55e;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 14px 30px rgba(22, 163, 74, .12);
}
.appointment-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 14px;
}
.appointment-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.appointment-data div {
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #bbf7d0;
}
.appointment-data span {
    display: block;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 6px;
}
.appointment-data strong {
    display: block;
    color: #052e16;
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    line-height: 1.05;
}
.appointment-highlight p {
    margin: 0;
    color: #14532d;
    font-weight: 700;
}
.no-appointment-box {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
}
.no-appointment-box strong {
    font-size: 1.05rem;
}
.no-appointment-box span {
    color: #9a3412;
}
@media (max-width: 760px) {
    .status-summary-header { flex-direction: column; }
    .appointment-data { grid-template-columns: 1fr; }
}


/* Parche v1.7.3 - afinación móvil general, panel e ingreso */
.mobile-topbar {
    display: none;
}

@media (max-width: 1100px) {
    .mobile-topbar {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 80;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        background: #0f172a;
        color: #fff;
        box-shadow: 0 10px 25px rgba(15,23,42,.18);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .mobile-brand .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 16px;
        flex: 0 0 auto;
    }

    .mobile-brand strong {
        display: block;
        color: #fff;
        line-height: 1.1;
        font-size: 1rem;
    }

    .mobile-brand small {
        display: block;
        color: #cbd5e1;
        font-size: .78rem;
        margin-top: 2px;
    }

    .mobile-menu {
        position: relative;
        flex: 0 0 auto;
    }

    .mobile-menu summary {
        list-style: none;
        cursor: pointer;
        border: 0;
        border-radius: 14px;
        background: #1d4ed8;
        color: #fff;
        font-weight: 900;
        padding: 10px 14px;
        box-shadow: 0 8px 18px rgba(29,78,216,.25);
    }

    .mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .mobile-menu-panel {
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        width: min(310px, 90vw);
        display: grid;
        gap: 8px;
        padding: 12px;
        border-radius: 18px;
        background: #fff;
        border: 1px solid #dbeafe;
        box-shadow: 0 20px 45px rgba(15,23,42,.22);
    }

    .mobile-menu-panel a {
        display: block;
        padding: 12px 14px;
        border-radius: 14px;
        background: #f8fbff;
        color: #0f172a;
        font-weight: 900;
        text-decoration: none;
        border: 1px solid #e2e8f0;
    }

    .mobile-menu-panel a:hover {
        background: #eff6ff;
        text-decoration: none;
    }

    .app-shell {
        display: block;
        min-height: auto;
    }

    .sidebar {
        display: none !important;
    }

    .main {
        padding: 16px;
        max-width: 100%;
    }

    .grid-2,
    .grid-3,
    .form-grid,
    .guide-strip {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    :root {
        --font-size: 16px;
    }

    html, body {
        overflow-x: hidden;
    }

    .main {
        padding: 12px;
    }

    .welcome-hero,
    .card,
    .wizard-form,
    .status-summary-card {
        padding: 18px !important;
        border-radius: 20px !important;
    }

    .welcome-hero {
        margin-bottom: 14px;
    }

    .welcome-hero h1,
    .topbar h1 {
        font-size: clamp(1.55rem, 7vw, 2.05rem) !important;
        line-height: 1.12;
    }

    .hero-text {
        font-size: 1rem;
        line-height: 1.45;
        margin-top: 8px;
    }

    .action-card {
        display: block !important;
        padding: 18px !important;
    }

    .action-card-main {
        display: block !important;
    }

    .action-card .big-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        font-size: 24px;
        margin-bottom: 10px;
    }

    .action-card h2 {
        font-size: 1.65rem !important;
        line-height: 1.15;
    }

    .action-card .muted.big,
    .status-summary-card .muted.big {
        font-size: .98rem;
        line-height: 1.45;
    }

    .action-card-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        min-width: 0;
        margin-top: 14px;
    }

    .btn-xl,
    .btn,
    input[type=submit],
    button {
        width: 100%;
        justify-content: center;
        text-align: center;
        min-height: 48px;
    }

    .progress-wrap.large {
        height: 12px;
        margin-top: 12px;
    }

    .progress-text {
        margin: 7px 0 0;
    }

    .status-summary-card {
        margin-top: 14px;
    }

    .status-summary-header h2 {
        font-size: 1.7rem !important;
        line-height: 1.15;
    }

    .appointment-highlight {
        padding: 16px;
        border-radius: 18px;
    }

    .appointment-data {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }

    .appointment-data div {
        padding: 14px;
    }

    .appointment-data strong {
        font-size: 1.7rem !important;
    }

    .panel-doc-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .panel-doc-card {
        min-height: 0;
        padding: 10px;
        border-radius: 14px;
    }

    .panel-doc-card img {
        width: 100% !important;
        height: 84px !important;
    }

    .file-group-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .file-group-link {
        width: 100%;
        justify-content: center;
    }

    .table-wrap,
    table.modern {
        font-size: .95rem;
    }
}

@media (max-width: 560px) {
    .mobile-topbar {
        padding: 8px 10px;
    }

    .mobile-brand small {
        display: none;
    }

    .mobile-menu summary {
        padding: 9px 12px;
        font-size: .95rem;
    }

    .main {
        padding: 10px;
    }

    .welcome-hero,
    .card,
    .wizard-form,
    .status-summary-card {
        padding: 16px !important;
    }

    .welcome-hero h1 {
        font-size: 1.55rem !important;
    }

    .hero-text {
        font-size: .95rem;
    }

    .eyebrow {
        font-size: .72rem;
    }

    .panel-doc-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* Ingreso más liviano en celulares */
@media (max-width: 760px) {
    .auth-body {
        display: block;
        padding: 0;
        min-height: 100vh;
        background: #f4f7fb;
    }

    .auth-card {
        min-height: 100vh;
        width: 100%;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        display: grid;
        grid-template-columns: 1fr;
        background: #fff;
    }

    .auth-hero {
        padding: 24px 22px;
        border-radius: 0 0 24px 24px;
    }

    .brand-badge {
        margin-bottom: 18px;
        padding: 8px 12px;
    }

    .auth-hero h1 {
        font-size: clamp(2rem, 11vw, 2.65rem);
        line-height: 1.02;
        margin-bottom: 12px;
    }

    .auth-hero p {
        font-size: 1rem;
        line-height: 1.45;
        margin: 10px 0 0;
    }

    .auth-panel {
        padding: 24px 22px 32px;
    }

    .auth-panel h2 {
        margin-top: 0;
        font-size: 1.75rem;
    }

    .auth-panel input[type=text],
    .auth-panel input[type=password] {
        min-height: 52px;
        font-size: 1.05rem;
    }

    .auth-panel .footer-note {
        font-size: .9rem;
        color: #64748b;
    }
}

/* v1.7.4 - Logo sin cuadro de iniciales */
.brand-block-no-mark {
    gap: 0;
}
.brand-block-no-mark h2 {
    margin-top: 0;
}
.mobile-brand {
    gap: 0;
}

/* v1.7.5 - Ingreso más elegante y resumido */
.auth-hero.auth-hero-elegante {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 520px;
    padding: 46px;
    background:
        radial-gradient(circle at 18% 18%, rgba(52, 211, 153, .24), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #0f766e 100%);
}

.auth-hero-summary {
    max-width: 420px;
}

.auth-hero-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.22);
    color: rgba(255,255,255,.92);
    font-weight: 900;
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-hero.auth-hero-elegante h1 {
    margin: 0 0 14px;
    font-size: clamp(2.45rem, 5vw, 4.6rem);
    line-height: .96;
    letter-spacing: -.055em;
}

.auth-hero.auth-hero-elegante p {
    max-width: 390px;
    margin: 0;
    color: rgba(255,255,255,.88);
    font-size: 1.15rem;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .auth-hero.auth-hero-elegante {
        min-height: auto;
        padding: 22px;
        border-radius: 0 0 24px 24px;
    }

    .auth-hero.auth-hero-elegante .brand-badge {
        margin-bottom: 18px;
    }

    .auth-hero-kicker {
        font-size: .72rem;
        margin-bottom: 10px;
    }

    .auth-hero.auth-hero-elegante h1 {
        font-size: 2rem;
        line-height: 1.05;
        margin-bottom: 8px;
    }

    .auth-hero.auth-hero-elegante p {
        font-size: .98rem;
        line-height: 1.42;
    }
}

/* v1.7.6 - Panel administrativo por estado */
.admin-today-dashboard {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.admin-today-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    background: linear-gradient(135deg, #f8fbff 0%, #eefdf8 100%);
    border-color: #bfdbfe;
}

.admin-today-intro h2 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    letter-spacing: -.04em;
}

.admin-today-total {
    min-width: 150px;
    padding: 18px 20px;
    border-radius: 24px;
    background: #e0f2fe;
    text-align: center;
    color: #075985;
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .16);
}

.admin-today-total span {
    display: block;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
}

.admin-today-total strong {
    display: block;
    margin-top: 4px;
    font-size: 2.4rem;
    line-height: 1;
}

.admin-state-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.admin-state-card {
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
    min-height: 190px;
}

.admin-state-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.admin-state-card-head h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.admin-state-card-head span {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 1000;
}

.admin-state-empty {
    margin: 18px 0 0;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
}

.admin-case-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding-right: 3px;
}

.admin-case-pill {
    display: block;
    padding: 12px 13px;
    border-radius: 16px;
    text-decoration: none;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.admin-case-pill:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .12);
}

.admin-case-pill strong,
.admin-case-pill small,
.admin-case-pill em {
    display: block;
}

.admin-case-pill strong {
    font-size: 1.05rem;
    color: #1d4ed8;
}

.admin-case-pill small {
    margin-top: 2px;
    color: #475569;
    font-weight: 800;
}

.admin-case-pill em {
    margin-top: 4px;
    color: #64748b;
    font-size: .8rem;
    font-style: normal;
}

@media (max-width: 1180px) {
    .admin-state-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .admin-today-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-today-total {
        min-width: 0;
        width: 100%;
    }

    .admin-state-grid {
        grid-template-columns: 1fr;
    }

    .admin-state-card {
        border-radius: 18px;
        padding: 15px;
        min-height: 0;
    }

    .admin-case-list {
        max-height: none;
    }
}

/* v1.7.8 - Panel administrativo: citas proximas y control de recordatorio */
.admin-appointments-section {
    margin-top: 22px;
}

.admin-appointments-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.admin-appointment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-appointment-card {
    border: 1px solid #d7e3f6;
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .06);
}

.admin-appointment-card.needs-reminder {
    border: 2px solid #ef4444;
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
    box-shadow: 0 16px 34px rgba(239, 68, 68, .18);
}

.admin-appointment-card.files-ok {
    border-left: 8px solid #16a34a;
}

.admin-appointment-card.files-missing {
    border-left: 8px solid #f59e0b;
}

.admin-appointment-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.admin-appointment-top strong,
.admin-appointment-top span {
    display: block;
}

.admin-appointment-top strong {
    font-size: 1.25rem;
    color: #0f172a;
}

.admin-appointment-top span {
    margin-top: 3px;
    color: #475569;
    font-weight: 800;
}

.reminder-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: .82rem;
    font-style: normal;
    font-weight: 950;
    white-space: nowrap;
}

.reminder-badge.pending {
    color: #ffffff;
    background: #dc2626;
}

.reminder-badge.sent {
    color: #065f46;
    background: #d1fae5;
}

.admin-appointment-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 10px 0 14px;
}

.admin-appointment-data p {
    margin: 0;
    color: #334155;
}

.admin-file-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.file-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    padding: 8px 10px;
    border: 1px solid #dbe7f6;
    background: #f8fafc;
}

.file-check b,
.file-check em {
    font-size: .82rem;
    font-style: normal;
}

.file-check.ok {
    border-color: #86efac;
    background: #ecfdf5;
    color: #065f46;
}

.file-check.missing {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.admin-appointment-alert {
    border-radius: 12px;
    padding: 10px 12px;
    margin: 8px 0 12px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    font-weight: 900;
}

.admin-open-case {
    margin-top: 8px;
}

@media (max-width: 900px) {
    .admin-appointment-grid {
        grid-template-columns: 1fr;
    }
    .admin-appointment-data {
        grid-template-columns: 1fr;
    }
    .admin-appointment-top {
        flex-direction: column;
    }
    .reminder-badge {
        white-space: normal;
    }
}

/* v1.8.1 - Panel administrativo: dos avisos automaticos de cita */
.reminder-badge.future {
    color: #075985;
    background: #e0f2fe;
}

.reminder-schedule-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
}

.reminder-schedule-card {
    border: 1px solid #dbe7f6;
    border-radius: 14px;
    padding: 10px 12px;
    background: #f8fafc;
}

.reminder-schedule-card strong,
.reminder-schedule-card span,
.reminder-schedule-card em,
.reminder-schedule-card p {
    display: block;
}

.reminder-schedule-card strong {
    color: #0f172a;
    font-size: .95rem;
    margin-bottom: 6px;
}

.reminder-schedule-card strong small {
    display: block;
    color: #64748b;
    font-size: .78rem;
    margin-top: 2px;
}

.reminder-schedule-card span {
    color: #334155;
    font-size: .86rem;
    margin-bottom: 4px;
}

.reminder-schedule-card em {
    font-style: normal;
    font-weight: 900;
    font-size: .88rem;
}

.reminder-schedule-card p {
    margin: 8px 0 0;
    color: #991b1b;
    font-size: .82rem;
    line-height: 1.35;
}

.reminder-schedule-card.future {
    border-color: #bae6fd;
    background: #f0f9ff;
}

.reminder-schedule-card.future em {
    color: #0369a1;
}

.reminder-schedule-card.sent {
    border-color: #86efac;
    background: #ecfdf5;
}

.reminder-schedule-card.sent em {
    color: #047857;
}

.reminder-schedule-card.pending,
.reminder-schedule-card.error {
    border-color: #fecaca;
    background: #fff1f2;
}

.reminder-schedule-card.pending em,
.reminder-schedule-card.error em {
    color: #b91c1c;
}

.admin-appointment-alert.danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

@media (max-width: 900px) {
    .reminder-schedule-list {
        grid-template-columns: 1fr;
    }
}

/* v1.8.2 */
.admin-state-card-head span.admin-state-count-alert{background:#dc2626;color:#fff;box-shadow:0 10px 22px rgba(220,38,38,.22)}
.admin-case-notes{display:block;margin-top:6px;padding-top:6px;border-top:1px dashed #cbd5e1;color:#475569;font-size:.70rem;line-height:1.28;font-weight:700;white-space:normal;overflow:visible;word-break:break-word}
.admin-case-notes b{color:#334155;font-size:.70rem}
.digitando-reminders{display:grid;grid-template-columns:1fr;gap:5px;margin-top:7px;padding-top:6px;border-top:1px dashed #dbe3ef}
.digitando-reminders>b{font-size:.68rem;color:#334155;line-height:1.1}
.digitando-reminder-item{display:grid;grid-template-columns:auto 1fr auto;gap:5px;align-items:center;border:1px solid #dbeafe;background:#f8fafc;border-radius:10px;padding:5px 7px;font-size:.66rem;line-height:1.05;color:#334155}
.digitando-reminder-item small{font-size:.65rem;font-weight:900;color:#475569}
.digitando-reminder-item em{font-size:.65rem;font-style:normal;color:#334155;white-space:nowrap}
.digitando-reminder-item strong{font-size:.62rem;color:#0369a1;text-transform:uppercase;letter-spacing:.02em}
.digitando-reminder-item.sent{background:#dcfce7;border-color:#86efac;color:#065f46}
.digitando-reminder-item.sent strong{color:#047857}
.digitando-reminder-item.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.digitando-reminder-item.error strong{color:#b91c1c}

/* v1.9.4 - Etapa actual del proceso de digitacion en panel administrativo */
.admin-case-stage{display:block;margin-top:6px;padding:7px 8px;border:1px solid #bfdbfe;border-radius:10px;background:#eff6ff;color:#1e3a8a;font-size:.70rem;line-height:1.25;font-weight:800;white-space:normal;word-break:break-word}
.admin-case-stage b{color:#1e40af;font-size:.70rem}
.admin-case-stage em{display:block;margin-top:3px;color:#475569;font-size:.66rem;font-style:normal;font-weight:900}
.admin-case-stage.warning{border-color:#fed7aa;background:#fff7ed;color:#9a3412}

/* v1.10.2 - Notas en tarjetas de citas próximas del panel administrativo */
.admin-appointment-notes {
    margin: -2px 0 12px;
    padding: 8px 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: .70rem;
    line-height: 1.35;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-appointment-notes b {
    color: #334155;
    font-size: .70rem;
}

/* v1.10.5 - Validación documental y por IA en ConsultaTramite.aspx */
.case-validation-box {
    margin: 22px 0 26px;
    padding: 22px;
    border: 2px solid #fecaca;
    border-radius: 24px;
    background: linear-gradient(145deg, #fff1f2 0%, #fff7f7 56%, #ffffff 100%);
    box-shadow: 0 18px 42px rgba(153, 27, 27, .10);
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.case-validation-box.validation-success {
    border-color: #86efac;
    background: linear-gradient(145deg, #ecfdf5 0%, #f0fdf4 56%, #ffffff 100%);
    box-shadow: 0 18px 42px rgba(5, 150, 105, .12);
}
.case-validation-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.case-validation-heading h3 { margin: 3px 0 5px; font-size: 1.45rem; color: #0f172a; }
.case-validation-heading p { margin: 0; color: #475569; line-height: 1.45; }
.case-validation-kicker { color: #b91c1c; font-size: .72rem; font-weight: 950; letter-spacing: .09em; }
.validation-success .case-validation-kicker { color: #047857; }
.validation-ai-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}
.validation-ai-status.ready { color: #065f46; background: #d1fae5; border: 1px solid #6ee7b7; }
.validation-ai-status.missing { color: #991b1b; background: #fee2e2; border: 1px solid #fca5a5; }
.validation-progress-wrap {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(148,163,184,.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.validation-progress-meta { display: flex; justify-content: space-between; gap: 16px; color: #334155; font-size: .82rem; }
.validation-progress-meta strong { color: #0f172a; font-size: .90rem; }
.validation-progress-track { height: 14px; margin: 10px 0 12px; overflow: hidden; border-radius: 999px; background: #fee2e2; box-shadow: inset 0 1px 3px rgba(15,23,42,.10); }
.validation-progress-track span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, #dc2626, #f97316); transition: width .35s ease; }
.validation-success .validation-progress-track { background: #d1fae5; }
.validation-success .validation-progress-track span { background: linear-gradient(90deg, #059669, #22c55e); }
.validation-progress-stages { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.validation-progress-stages > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 12px; font-size: .73rem; font-weight: 850; }
.validation-progress-stages .done { color: #065f46; background: #dcfce7; border: 1px solid #86efac; }
.validation-progress-stages .pending { color: #9f1239; background: #fff1f2; border: 1px solid #fecdd3; }
.validation-progress-stages em { font-style: normal; font-weight: 950; }
.case-validation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 17px 0; }
.validation-button { min-height: 44px; padding: 11px 16px !important; border-radius: 13px !important; font-size: .78rem !important; letter-spacing: .015em; box-shadow: 0 9px 18px rgba(15,23,42,.12); }
.validation-button.pre { background: #9f1239 !important; border-color: #9f1239 !important; color: #fff !important; }
.validation-button.pre:hover { background: #881337 !important; }
.validation-button.final { background: #065f46 !important; border-color: #065f46 !important; color: #fff !important; }
.validation-button.final:hover { background: #064e3b !important; }
.validation-running { align-items: center; gap: 7px; color: #7c2d12; font-size: .76rem; font-weight: 900; }
.validation-running:before { content: ""; width: 14px; height: 14px; border: 2px solid #fdba74; border-top-color: #c2410c; border-radius: 50%; animation: dbv-validation-spin .8s linear infinite; }
@keyframes dbv-validation-spin { to { transform: rotate(360deg); } }
.case-validation-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.case-validation-stage { min-width: 0; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.90); border: 1px solid rgba(148,163,184,.35); box-shadow: 0 12px 24px rgba(15,23,42,.06); }
.case-validation-stage-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.case-validation-stage-title > span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 12px; color: #fff; background: #334155; font-weight: 950; box-shadow: 0 7px 14px rgba(51,65,85,.2); }
.case-validation-stage-title strong { display: block; color: #0f172a; font-size: .96rem; }
.case-validation-stage-title small { display: block; margin-top: 2px; color: #64748b; font-size: .70rem; }
.validation-run-summary { display: grid; gap: 3px; padding: 10px 12px; margin-bottom: 11px; border-radius: 12px; font-size: .74rem; }
.validation-run-summary strong { font-size: .82rem; }
.validation-run-summary small { opacity: .84; font-size: .67rem; }
.validation-run-summary.success { color: #065f46; background: #dcfce7; border: 1px solid #86efac; }
.validation-run-summary.pending { color: #991b1b; background: #fff1f2; border: 1px solid #fecaca; }
.validation-run-summary.error { color: #7f1d1d; background: #fee2e2; border: 1px solid #f87171; }
.validation-checklist { display: grid; gap: 8px; }
.validation-check { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px; border-radius: 13px; border: 1px solid #e2e8f0; background: #fff; }
.validation-check.success { border-color: #86efac; background: #f0fdf4; }
.validation-check.pending { border-color: #fecaca; background: #fff7f7; }
.validation-check.error { border-color: #f87171; background: #fef2f2; }
.validation-check.skipped { border-color: #bae6fd; background: #f0f9ff; }
.validation-check-icon { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 9px; background: #fee2e2; color: #b91c1c; font-size: .98rem; font-weight: 950; }
.validation-check.success .validation-check-icon { background: #bbf7d0; color: #047857; }
.validation-check.error .validation-check-icon { background: #fecaca; color: #991b1b; }
.validation-check.skipped .validation-check-icon { background: #dbeafe; color: #0369a1; }
.validation-check-title { display: flex; align-items: center; gap: 7px; }
.validation-check-title strong { color: #1e293b; font-size: .75rem; line-height: 1.3; }
.validation-check-title em { display: inline-flex; padding: 2px 6px; border-radius: 999px; color: #4338ca; background: #e0e7ff; font-size: .58rem; font-style: normal; font-weight: 950; letter-spacing: .05em; }
.validation-check p { margin: 3px 0 0; color: #64748b; font-size: .68rem; line-height: 1.35; overflow-wrap: anywhere; }
.validation-check details { margin-top: 6px; color: #475569; font-size: .66rem; }
.validation-check summary { cursor: pointer; color: #2563eb; font-weight: 850; }
.validation-check details small { display: block; margin-top: 4px; padding: 6px 7px; border-radius: 8px; background: rgba(248,250,252,.9); overflow-wrap: anywhere; }
.validation-human-note { margin: 14px 2px 0; color: #475569; font-size: .70rem; line-height: 1.45; }
.validation-config-error { padding: 12px; border-radius: 12px; color: #991b1b; background: #fee2e2; border: 1px solid #fca5a5; font-size: .76rem; font-weight: 750; }
@media (max-width: 980px) {
    .case-validation-columns { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .case-validation-box { padding: 16px; border-radius: 18px; }
    .case-validation-heading { flex-direction: column; }
    .validation-ai-status { white-space: normal; }
    .validation-progress-meta { flex-direction: column; gap: 3px; }
    .validation-progress-stages { grid-template-columns: 1fr; }
    .case-validation-actions .validation-button { width: 100%; }
}


/* v1.10.11 - Indicadores de validaciones IA en citas próximas */
.ia-validation-check {
    gap: 6px;
    white-space: nowrap;
    font-weight: 900;
}

.ia-validation-check .ia-validation-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid currentColor;
    font-size: .76rem;
    font-weight: 950;
    line-height: 1;
}

.ia-validation-check.pending {
    border-color: #facc15;
    background: #fffbeb;
    color: #854d0e;
}

.ia-validation-check.ok {
    border-color: #86efac;
    background: #ecfdf5;
    color: #065f46;
}

.ia-validation-check.incomplete,
.ia-validation-check.error {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

.ia-validation-check.progress {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

@media (max-width: 520px) {
    .ia-validation-check {
        white-space: normal;
    }
}


/* v1.10.14 - restauración de recordatorios en CLIENTE REVISANDO DOCUMENTOS */
.revision-reminders{margin-top:8px}
.digitando-reminder-item.pending{background:#fff7ed;border-color:#fdba74;color:#9a3412}
.digitando-reminder-item.pending strong{color:#c2410c}
