/* SIPD · tema institucional Cootranshuila (verde, blanco, rojo) */
:root {
    --cth-green: #006837;
    --cth-green-dark: #004225;
    --cth-green-mid: #0B7A40;
    --cth-green-bright: #1A9B52;
    --cth-green-soft: #E7F5EC;
    --cth-green-text: #14532D;
    --cth-red: #C8102E;
    --cth-red-dark: #9A0C23;
    --cth-red-soft: #FDE8EC;
    --cth-gold: #C4A35A;
    --cth-ink: #111827;
    --cth-muted: #5B6470;
    --cth-border: #B6BFC8;
    --cth-line: #D2D8DE;
    --cth-bg: #F3F6F4;
    --cth-sidebar: #003520;
    --cth-sidebar-2: #002416;
    --cth-white: #fff;
    --cth-shadow: 0 1px 2px rgba(0, 36, 18, .06);
    --radius: 16px;
    --sipd-sidebar-w: clamp(220px, 18vw, 260px);
    --sipd-pad: clamp(14px, 2.1vw, 32px);
    --sipd-title: clamp(1.2rem, 1rem + 1.2vw, 1.65rem);

    --c-green: var(--cth-green-bright);
    --c-green-dk: var(--cth-green);
    --c-navy: var(--cth-sidebar);
    --c-slate: var(--cth-ink);
    --c-muted: var(--cth-muted);
    --c-border: var(--cth-border);
    --c-bg: var(--cth-bg);
}

html, body {
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    font-family: Inter, system-ui, -apple-system, sans-serif !important;
    background: var(--cth-bg) !important;
    color: var(--cth-ink);
    font-size: clamp(14px, 0.35vw + 13px, 16px);
    -webkit-font-smoothing: antialiased;
}
img, svg {
    max-width: 100%;
    height: auto;
}

a { color: var(--cth-green); }
a:hover { color: var(--cth-green-mid); }

.card {
    border: 1px solid var(--cth-border) !important;
    border-radius: 16px !important;
    box-shadow: var(--cth-shadow);
}
.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--cth-border) !important;
    border-radius: 16px 16px 0 0 !important;
}
.card-title {
    font-weight: 700 !important;
    color: var(--cth-ink) !important;
}
.btn-primary,
.btn-success {
    background-color: var(--cth-green) !important;
    border-color: var(--cth-green) !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-success:hover {
    background-color: var(--cth-green-dark) !important;
    border-color: var(--cth-green-dark) !important;
}
.btn-danger {
    background-color: var(--cth-red) !important;
    border-color: var(--cth-red) !important;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--cth-green-mid) !important;
    box-shadow: 0 0 0 .2rem rgba(0, 104, 55, .18) !important;
}

/* Tablas: límites visibles entre filas y columnas */
.theme-cootranshuila table {
    border-collapse: collapse;
}
.theme-cootranshuila table th,
.theme-cootranshuila table td {
    border: 1px solid var(--cth-line) !important;
}
.theme-cootranshuila table thead th {
    background: #f4f6f8 !important;
    border-bottom-width: 1px !important;
    border-bottom-color: var(--cth-border) !important;
}

.theme-cootranshuila table .st,
.theme-cootranshuila table .sb,
.theme-cootranshuila table .dias {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.theme-cootranshuila table .st i { font-size: 8px; }
.dot-pend { color: #f59e0b; }
.dot-proc { color: #3b82f6; }
.dot-sanc { color: #f43f5e; }
.dot-arch { color: #94a3b8; }
.dot-green { color: var(--cth-green-bright); }
.dot-purple { color: #8b5cf6; }
.theme-cootranshuila table .st:has(.dot-pend),
.theme-cootranshuila table .sb.pendiente,
.theme-cootranshuila table .dias.warn { background: #fffbeb; color: #d97706; }
.theme-cootranshuila table .st:has(.dot-proc),
.theme-cootranshuila table .sb.en-proceso { background: #eff6ff; color: #1d4ed8; }
.theme-cootranshuila table .st:has(.dot-sanc),
.theme-cootranshuila table .sb.sancionado,
.theme-cootranshuila table .dias.late { background: #fef2f2; color: #dc2626; }
.theme-cootranshuila table .st:has(.dot-arch),
.theme-cootranshuila table .sb.archivado { background: #f1f5f9; color: #475569; }

.sipd-estado {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: default;
    box-shadow: none;
}
button.sipd-estado { cursor: pointer; }
.sipd-estado--pendiente { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.sipd-estado--pendiente.is-on { background: #f59e0b; color: #fff; border-color: #d97706; }
.sipd-estado--proceso { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.sipd-estado--proceso.is-on,
button.sipd-estado--proceso {
    background: #3b82f6;
    color: #fff;
    border-color: #2563eb;
}
button.sipd-estado--proceso:hover { background: #2563eb; color: #fff; }
.sipd-estado--sancionado { background: #fef2f2; color: #e11d48; border-color: #fecaca; }
.sipd-estado--sancionado.is-on { background: #f43f5e; color: #fff; border-color: #e11d48; }
button.sipd-estado--sancionado:hover { background: #f43f5e; color: #fff; border-color: #e11d48; }
.sipd-estado--archivado { background: #f1f5f9; color: #64748b; border-color: var(--cth-border); }
.sipd-estado--archivado.is-on { background: #64748b; color: #fff; border-color: #475569; }
button.sipd-estado--archivado:hover { background: #475569; color: #fff; border-color: #334155; }
.sipd-flujo .sipd-estado { margin-bottom: 4px; }
.sipd-flujo-fallo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}
.sipd-flujo-now {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
    background: #f8fafc;
}
.sipd-flujo-now__copy { min-width: 220px; flex: 1; }
.sipd-flujo-now__kicker {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 2px;
}
.sipd-flujo-now__title {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}
.sipd-flujo-now__detail {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}
.sipd-flujo-now__meter { min-width: 140px; width: 180px; }
.sipd-flujo-now__count {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-align: right;
    margin-bottom: 6px;
}
.sipd-flujo-now__bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.sipd-flujo-now__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--cth-green, #0d7a4f);
}
.sipd-flujo-step.is-done .sipd-estado {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.sipd-flujo-step.is-done small,
.sipd-flujo-step.is-wait small { color: #94a3b8; }
.sipd-flujo-step.is-wait { opacity: .72; }
.sipd-flujo-step small { min-height: 2.4em; }
.theme-cootranshuila table .st:has(.dot-green),
.theme-cootranshuila table .dias.ok { background: #f0fdf4; color: #15803d; }
.theme-cootranshuila table .st:has(.dot-purple) { background: #f5f3ff; color: #6d28d9; }
.theme-cootranshuila table a.id,
.theme-cootranshuila table a.pro,
.theme-cootranshuila table a.proc-lnk {
    color: var(--cth-green);
    font-weight: 700;
    text-decoration: none;
}

/* ── App shell ── */
.sipd-app {
    display: grid;
    grid-template-columns: var(--sipd-sidebar-w) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.sipd-sidebar {
    background: linear-gradient(180deg, var(--cth-sidebar) 0%, var(--cth-sidebar-2) 100%);
    color: #f1f5f9;
    padding: 20px 14px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    border-right: 1px solid rgba(255,255,255,.06);
    z-index: 40;
}
.sipd-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--cth-green-bright) 0%, #fff 48%, var(--cth-red) 100%);
}

.sipd-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}
.sipd-sidebar-nav::-webkit-scrollbar { width: 4px; }
.sipd-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.12);
    border-radius: 4px;
}

.sipd-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 18px;
    text-decoration: none;
    color: #fff;
}
.sipd-brand-logo,
.sipd-brand-mark {
    flex-shrink: 0;
}
.sipd-brand-logo {
    width: clamp(52px, 5.2vw, 68px);
    height: auto;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    overflow: visible;
    box-shadow: none;
    filter: brightness(0) invert(1);
}
.sipd-brand-mark {
    background: var(--cth-green-mid);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    border-bottom: 3px solid var(--cth-red);
}
.sipd-brand strong {
    display: block;
    font-size: 15px;
    letter-spacing: .04em;
}
.sipd-brand small {
    display: block;
    color: rgba(255,255,255,.62);
    font-size: 9px;
    letter-spacing: .1em;
}

.sipd-nav-label {
    color: rgba(255,255,255,.42);
    font-size: 11px;
    letter-spacing: .12em;
    font-weight: 700;
    padding: 10px 12px 6px;
}
.sipd-nav { display: grid; gap: 4px; }
.sipd-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,.68);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .2s ease;
}
.sipd-nav a i { width: 18px; text-align: center; opacity: .85; }
.sipd-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sipd-nav a.active {
    background: rgba(26, 155, 82, .22);
    color: #fff;
    font-weight: 600;
    border-left: 4px solid var(--cth-red);
    border-radius: 0 8px 8px 0;
    padding-left: 10px;
}
.sipd-nav a.active i { color: #86efac; opacity: 1; }
.sipd-nav-count {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--cth-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sipd-side-user {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sipd-side-user .who {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px 12px;
}
.sipd-side-user .ava,
.sipd-user .ava,
.user-menu-head .ava {
    background: linear-gradient(135deg, var(--cth-green-mid), var(--cth-green-dark));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.sipd-side-user .ava {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 104, 55, .3);
}
.sipd-side-user b,
.sipd-side-user small { display: block; color: #fff !important; }
.sipd-side-user b { font-size: 13px; }
.sipd-side-user small { font-size: 11px; text-transform: capitalize; opacity: .9; }

.sipd-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 13px;
    padding: 6px;
}
.sipd-logout:hover { color: #fff; }

.sipd-main { min-width: 0; display: flex; flex-direction: column; }
.sipd-top {
    min-height: 64px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px var(--sipd-pad);
    background: #fff;
    border-bottom: 1px solid var(--cth-border);
    box-shadow: 0 1px 0 rgba(200, 16, 46, .08);
    position: sticky;
    top: 0;
    z-index: 30;
}
.sipd-nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--cth-border);
    border-radius: 10px;
    background: #fff;
    color: var(--cth-ink);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.sipd-nav-toggle:hover { border-color: var(--cth-green-mid); color: var(--cth-green); }
.sipd-nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 36, 18, .4);
    z-index: 55;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.sipd-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cth-muted);
    font-size: 13px;
}
.sipd-crumb a { color: var(--cth-muted); text-decoration: none; }
.sipd-crumb strong { color: var(--cth-ink); font-weight: 600; }

.sipd-search { margin: 0; flex: 1 1 200px; max-width: 420px; min-width: 0; }
.sipd-search-inner { position: relative; }
.sipd-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cth-muted);
    font-size: 13px;
}
.sipd-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 34px;
    border: 1px solid var(--cth-border);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    outline: none;
    box-shadow: var(--cth-shadow);
}
.sipd-search input:focus { border-color: var(--cth-green-mid); }

.sipd-top-actions { display: flex; align-items: center; gap: 10px; }
.sipd-bell,
.sipd-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border-radius: 999px;
    box-shadow: var(--cth-shadow);
    border: 1px solid #eef3ef;
    transition: all .2s ease;
}
.sipd-bell:hover, .sipd-user:hover {
    box-shadow: 0 4px 10px rgba(0, 53, 32, .08);
    border-color: var(--cth-border);
}
.sipd-bell {
    width: 42px;
    height: 42px;
    justify-content: center;
    color: var(--cth-muted);
    position: relative;
}
.sipd-bell:hover { color: var(--cth-ink); }
.sipd-bell .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--cth-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: grid;
    place-items: center;
    animation: sipd-badge-pulse 2.2s ease-out infinite;
}
@keyframes sipd-badge-pulse {
    0% { box-shadow: 0 0 0 0 rgba(200, 16, 46, .45); }
    70% { box-shadow: 0 0 0 7px rgba(200, 16, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}
@keyframes sipd-bell-shake {
    0% { transform: rotate(0); }
    10% { transform: rotate(18deg); }
    20% { transform: rotate(-14deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-6deg); }
    50% { transform: rotate(0); }
    100% { transform: rotate(0); }
}
.sipd-bell.has-new-notif i {
    animation: sipd-bell-shake 2.8s ease infinite;
    transform-origin: top center;
    color: var(--cth-red);
}
.sipd-bell.has-new-notif:hover i {
    animation: none;
    color: var(--cth-ink);
}

.notif-menu {
    width: min(400px, calc(100vw - 24px));
    padding: 0;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 36, 18, .14), 0 0 0 1px rgba(15,23,42,0.05);
    margin-top: 12px !important;
    overflow: hidden;
    animation: menuFadeIn 0.2s ease-out;
}
@keyframes menuFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Header ── */
.notif-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 22px 14px;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
    border-bottom: 1px solid #e2e8f0;
}
.notif-menu-head-left { display: flex; flex-direction: column; gap: 2px; }
.notif-menu-head h4 {
    margin: 0; padding: 0;
    font-size: 16px; font-weight: 800;
    letter-spacing: -0.02em; color: #0f172a;
}
.notif-menu-count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: none;
    padding: 0;
    display: inline;
    box-shadow: none;
    min-width: auto;
    height: auto;
    border-radius: 0;
}
.notif-menu-count.is-zero { background: none; color: #94a3b8; }
.notif-menu-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}
.notif-menu-live i {
    font-size: 6px;
    animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

/* ── Body (scrollable) ── */
.notif-menu-body {
    max-height: 380px;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.notif-menu-body::-webkit-scrollbar { width: 4px; }
.notif-menu-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* ── Notification rows ── */
.notif-row {
    display: grid !important;
    grid-template-columns: 42px 1fr 10px !important;
    gap: 14px !important;
    align-items: start !important;
    padding: 16px 20px !important;
    color: #334155 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-left: 3px solid transparent !important;
    transition: all 0.15s ease !important;
    background: #fff !important;
}
.notif-row:hover {
    background: #f8faf9 !important;
    border-left-color: var(--cth-green) !important;
}
.notif-row.is-coord {
    background: #fffcf5 !important;
    border-left-color: #f59e0b !important;
}
.notif-row.is-coord:hover { background: #fffbeb !important; }
.notif-row.is-unread { background: #f0fdf4 !important; }
.notif-row.is-unread:hover {
    background: #ecfdf5 !important;
    border-left-color: var(--cth-green) !important;
}
.notif-row:last-child { border-bottom: 0 !important; }

.notif-row-body {
    min-width: 0;
    display: block !important;
    color: inherit !important;
}
.notif-row-body b {
    display: block !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
    margin-bottom: 2px !important;
}
.notif-row-desc {
    font-size: 12.5px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.notif-row-time {
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    margin-top: 4px !important;
}

/* ── Unread dot ── */
.notif-new-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cth-green);
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(13, 122, 79, .15);
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(13, 122, 79, .15); }
    50% { box-shadow: 0 0 0 6px rgba(13, 122, 79, .08); }
}

/* ── Tags ── */
.notif-tag {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    font-style: normal !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
    color: #c2410c !important;
    background: #ffedd5;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 5px !important;
}
.notif-tag i { font-size: 9px; }
.notif-tag-sys {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-style: normal;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 5px;
}
.notif-tag-sys i { font-size: 9px; }

/* ── Notification item (with dismiss) ── */
.notif-item {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: stretch;
    border-bottom: 1px solid #f1f5f9;
}
.notif-item > a.notif-row { border-bottom: 0 !important; }
.notif-item > form {
    margin: 0;
    display: flex;
    align-items: center;
    padding: 0 14px 0 0;
    background: transparent;
}
.notif-mute {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: #94a3b8;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.15s;
    font-size: 12px;
}
.notif-mute:hover { background: #fee2e2; color: #be123c; }

/* ── Icons ── */
.notif-ico {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 17px;
    transition: transform 0.15s ease;
}
.notif-row:hover .notif-ico { transform: scale(1.06); }

/* 🔴 Veredicto / Sentencia — requiere acción urgente */
.notif-ico.danger { background: #fff1f2; color: #be123c; }
/* 🟡 Solicitud de permiso — pendiente de decisión */
.notif-ico.warn   { background: #fffbeb; color: #b45309; }
/* 🟢 Permiso respondido — completado con éxito */
.notif-ico.ok     { background: #f0fdf4; color: #15803d; }
/* 🟣 Aviso de coordinación — directiva oficial */
.notif-ico.coord  { background: #f5f3ff; color: #6d28d9; }
/* 🔵 Sistema / informativo */
.notif-ico.info   { background: #eff6ff; color: #1d4ed8; }

/* Colores de borde izquierdo en el dropdown por tipo */
.notif-row.is-unread { background: #f8fafc !important; }
.notif-row.is-danger { border-left-color: #f43f5e !important; background: #fff1f2 !important; }
.notif-row.is-warn   { border-left-color: #f59e0b !important; background: #fffbeb !important; }
.notif-row.is-ok     { border-left-color: #22c55e !important; background: #f0fdf4 !important; }
.notif-row.is-coord  { border-left-color: #7c3aed !important; background: #f5f3ff !important; }
.notif-row.is-info   { border-left-color: #3b82f6 !important; background: #eff6ff !important; }

/* ── Empty state ── */
.notif-empty {
    padding: 36px 20px;
    text-align: center;
    color: var(--cth-muted);
    font-size: 13px;
}
.notif-empty-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 22px;
    color: #22c55e;
    border: 2px solid #bbf7d0;
}
.notif-empty b {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}
.notif-empty span {
    display: block;
    font-size: 13px;
    color: #94a3b8;
}

/* ── Footer ── */
.notif-footer {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800 !important;
    font-size: 13px !important;
    color: var(--cth-green) !important;
    padding: 14px 20px !important;
    border-top: 1px solid #e2e8f0 !important;
    background: linear-gradient(180deg, #fff 0%, #f8faf9 100%) !important;
    border-bottom: 0 !important;
    border-left: none !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
}
.notif-footer:hover {
    background: #f0fdf4 !important;
    color: var(--cth-green-dark) !important;
}
.notif-footer i { font-size: 14px; }

/* ── Permiso request button ── */
.sipd-req-btn {
    height: 40px;
    padding: 0 14px;
    font-size: 12px;
}

/* ── Modal / dialog overlay ── */
.sipd-dialog-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    align-items: center;
    justify-content: center;
    z-index: 400;
    padding: 20px;
}
.sipd-dialog-bg.open { display: flex; }
.sipd-dialog {
    display: block;
    background: #fff;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
    border-radius: 18px;
    padding: 24px;
    position: relative;
}
.sipd-dialog h3 { margin: 0 0 8px; font-size: 18px; }
.sipd-dialog-lead { margin: 0 0 16px; color: #64748b; font-size: 13px; }
.sipd-dialog label { display: block; font-size: 13px; color: #64748b; margin-bottom: 6px; font-weight: 600; }
.sipd-dialog input, .sipd-dialog select, .sipd-dialog textarea {
    width: 100%;
    border: 1px solid var(--cth-border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font: inherit;
    font-size: 14px;
}
.sipd-dialog textarea { min-height: 72px; resize: vertical; }
.sipd-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-ghost, .btn-ok {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}
.btn-ghost { background: #f1f5f9; color: #475569; }
.btn-ok { background: var(--cth-green); color: #fff; }
.is-hidden { display: none !important; }

.sipd-user .ava {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 12px;
}
.sipd-user { padding: 4px 12px 4px 4px; max-width: min(260px, 42vw); }
.sipd-user-meta { min-width: 0; }
.sipd-user b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sipd-user small { display: block; color: var(--cth-muted); font-size: 12px; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sipd-user .chev { color: var(--cth-muted); font-size: 10px; margin-left: 2px; flex-shrink: 0; transition: transform .15s; }
.sipd-user-drop.show .sipd-user,
.sipd-user-drop .sipd-user[aria-expanded="true"] {
    border-color: var(--cth-green-mid);
    background: #f8fafc;
}
.sipd-user-drop.show .sipd-user .chev { transform: rotate(180deg); color: var(--cth-green); }
.sipd-user.dropdown-toggle::after,
.sipd-bell.dropdown-toggle::after { display: none; }

.sipd-user-drop { position: relative; }
.user-menu {
    width: min(340px, calc(100vw - 24px));
    padding: 0 0 8px;
    border: 1px solid var(--cth-border);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
    margin-top: 8px !important;
    overflow: hidden;
    z-index: 1050;
}
.user-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid #eef2f6;
}
.user-menu-head .ava {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #bbf7d0;
}
.user-menu-meta { min-width: 0; flex: 1; }
.user-menu-head b {
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--cth-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.user-menu-head .mail {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-head small {
    display: inline-block;
    margin-top: 6px;
    background: #f0fdf4;
    color: var(--cth-green-text);
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: .01em;
}
.user-menu-actions { padding: 6px 8px 2px; }
.user-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 9px 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}
.user-menu .umi {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 12px;
}
.user-menu .dropdown-item i { width: auto; color: inherit; }
.user-menu .dropdown-item:hover { background: var(--cth-green-soft); color: var(--cth-green-text); }
.user-menu .dropdown-item:hover .umi { background: #fff; color: var(--cth-green); }
.user-menu .dropdown-item.danger { color: var(--cth-red); }
.user-menu .dropdown-item.danger .umi { background: #fef2f2; color: var(--cth-red); }
.user-menu .dropdown-item.danger:hover { background: #fef2f2; color: var(--cth-red); }
.user-menu .dropdown-divider { margin: 6px 4px; }

.sipd-wrap { padding: clamp(12px, 1.5vw, 22px) var(--sipd-pad) 28px; flex: 1; min-width: 0; }
.sipd-wrap > .container-fluid {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}
.sipd-wrap > .container-fluid > .row {
    margin-left: 0;
    margin-right: 0;
}
.sipd-wrap > .container-fluid > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}
.sipd-page-title {
    margin: 0 0 24px;
    font-size: var(--sipd-title);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--cth-ink);
}
.dropdown-menu { font-size: 14px; }

.pwd-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 36, 18, .45);
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pwd-modal.open { display: flex; }
.pwd-box {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 20px;
    padding: 24px 24px 20px;
    box-shadow: 0 24px 60px rgba(0, 36, 18, .2);
}
.pwd-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.pwd-top h3 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.pwd-top p { margin: 0; color: var(--cth-muted); font-size: 14px; }
.pwd-close {
    border: 0;
    background: none;
    color: var(--cth-muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.pwd-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
.pwd-field { position: relative; margin-bottom: 14px; }
.pwd-field input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--cth-border);
    border-radius: 12px;
    padding: 0 64px 0 14px;
    font: inherit;
    font-size: 14px;
    outline: none;
}
.pwd-field input:focus { border-color: var(--cth-green-mid); }
.pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: var(--cth-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.pwd-error { color: var(--cth-red); font-size: 12px; margin: -8px 0 12px; }
.pwd-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.pwd-cancel,
.pwd-save {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.pwd-cancel { background: #f1f5f9; color: #475569; }
.pwd-save { background: var(--cth-green); color: #fff; }
.pwd-save:hover { background: var(--cth-green-dark); }

.pf-box {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 36, 18, .2);
}
.pf-hero {
    background: linear-gradient(135deg, var(--cth-green) 0%, var(--cth-green-dark) 100%);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 4px solid var(--cth-red);
}
.pf-hero-user { display: flex; align-items: center; gap: 12px; }
.pf-hero .ava {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--cth-green);
    display: grid;
    place-items: center;
    font-weight: 800;
}
.pf-hero b { display: block; font-size: 16px; }
.pf-hero small { display: block; opacity: .9; font-size: 13px; }
.pf-hero .pwd-close { color: #fff; }
.pf-body { padding: 20px 22px 18px; }
.pf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    margin-bottom: 14px;
}
.pf-grid label {
    display: block;
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--cth-muted);
    font-weight: 700;
    margin-bottom: 6px;
}
.pf-grid input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--cth-border);
    border-radius: 10px;
    padding: 0 12px;
    font: inherit;
    font-size: 14px;
    background: #fff;
}
.pf-grid input[readonly] { background: #f8fafc; color: #334155; }
.pf-status {
    background: var(--cth-green-soft);
    color: var(--cth-green-text);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.sipd-page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    padding: 26px 30px;
    border: 1px solid #cfe6d9;
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 0%, rgba(0,112,67,.07), transparent 30%),
        linear-gradient(115deg, #fbfefc 0%, #f2faf5 100%);
    box-shadow: 0 12px 32px rgba(0, 73, 45, .055);
}
.sipd-page-hero > .proc-head {
    margin: 0;
    padding: 0;
    border: 0;
}
.sipd-page-hero > .pf-head {
    margin: 0;
}
.sipd-page-hero h1,
.sipd-page-hero .proc-head h1,
.sipd-page-hero .pf-head h1 {
    color: var(--cth-ink);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.15;
}
.sipd-page-hero p,
.sipd-page-hero .proc-head p,
.sipd-page-hero .pf-head p {
    color: #607568;
    line-height: 1.55;
}
.sipd-page-hero .proc-head-side {
    align-self: center;
}
.sipd-page-hero .sipd-page-title {
    margin: 0;
}

.proc-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cth-line);
}
.proc-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.proc-head h1 {
    margin: 0 0 4px;
    font-size: var(--sipd-title);
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--cth-ink);
}
.proc-head p { margin: 0; color: var(--cth-muted); font-size: 14px; }
.proc-head-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 1 auto;
    max-width: 100%;
}
.sipd-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid var(--cth-green);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cth-sidebar), var(--cth-green));
    box-shadow: 0 4px 12px rgba(0, 73, 45, .18);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.sipd-back-button:hover {
    color: #fff !important;
    filter: brightness(1.08);
    box-shadow: 0 6px 16px rgba(0, 73, 45, .24);
    transform: translateY(-1px);
}
.sipd-back-button:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}
.sipd-back-button i { font-size: 15px; }
.stat-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #fff;
    border: 1px solid var(--cth-border);
    color: var(--cth-muted);
    white-space: nowrap;
}
.stat-chip.green {
    background: var(--cth-green-soft);
    color: var(--cth-green-text);
    border-color: #bbf7d0;
}
.stat-chip.yellow {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}
.stat-chip.red {
    background: var(--cth-red-soft);
    color: var(--cth-red);
    border-color: #fca5a5;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    background: #fff;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--cth-border);
    box-shadow: none;
}
.chip:hover { color: var(--cth-green-text); border-color: #9aa4ae; }
.chip.active { background: #ecfdf5; color: var(--cth-green-text); border-color: #bbd4c4; }
.chip i { font-size: 8px; }
.chip .n { color: #94a3b8; font-weight: 500; }
.chip.active .n { color: var(--cth-green-text); }
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cth-green);
    color: #fff;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: filter .15s;
}
.btn-add:hover { color: #fff; filter: brightness(1.08); }
button.btn-add { cursor: pointer; }
.btn-alt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--cth-border);
    box-shadow: var(--cth-shadow);
}
.btn-alt:hover { border-color: var(--cth-green-mid); color: var(--cth-green); }

.case-hero,
.case-info-bar.hero-brand {
    background: linear-gradient(135deg, var(--cth-sidebar) 0%, var(--cth-green) 100%) !important;
}

@media (max-width: 1100px) {
    .sipd-user-meta { display: none; }
    .sipd-user .chev { display: none; }
    .sipd-user { max-width: none; padding: 4px; }
}

@media (max-width: 900px) {
    .sipd-app { grid-template-columns: 1fr; }
    .sipd-nav-toggle { display: grid; }
    .sipd-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(272px, 88vw);
        height: 100vh;
        height: 100dvh;
        padding: 18px 14px 14px;
        transform: translateX(-105%);
        transition: transform .28s ease;
        z-index: 70;
        box-shadow: 8px 0 32px rgba(0, 36, 18, .22);
    }
    .sipd-app.is-nav-open .sipd-sidebar { transform: none; }
    .sipd-app.is-nav-open .sipd-nav-scrim { display: block; }
    .sipd-sidebar-nav { overflow-y: auto; }
    .sipd-nav-label { display: block; }
    .sipd-nav {
        display: grid;
        gap: 4px;
        margin-bottom: 8px;
    }
    .sipd-nav a {
        padding: 10px 14px;
        font-size: 13.5px;
        border-radius: 8px;
    }
    .sipd-nav a.active {
        border-left: 4px solid var(--cth-red);
        border-bottom: 0;
        padding-left: 10px;
        border-radius: 0 8px 8px 0;
    }
    .sipd-side-user { display: block; }
    .sipd-search { flex-basis: 100%; max-width: none; order: 5; }
    .sipd-top { padding: 10px 16px; }
    .sipd-wrap { padding: 14px 16px 24px; }
    .sipd-page-hero { padding: 22px; border-radius: 20px; }
    .proc-head { flex-direction: column; align-items: stretch; justify-content: flex-start; }
    .proc-head-side { justify-content: flex-start; }
    .sipd-wrap .table-card { overflow-x: auto; }
    .pf-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .sipd-crumb span { display: none; }
}

/* ── Guest / login / consulta ── */
html:has(.guest-split),
body:has(.guest-split) {
    height: 100%;
    overflow: auto;
}
html:has(.guest-split) *,
html:has(.guest-split) *::before,
html:has(.guest-split) *::after {
    box-sizing: border-box;
}
.guest-split {
    display: grid;
    grid-template-columns: minmax(280px, 40%) 1fr;
    height: 100dvh;
    min-height: 100dvh;
    overflow: auto;
}
.guest-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 480px at -10% -20%, rgba(255,255,255,.08), transparent 55%),
        linear-gradient(180deg, #004225 0%, #006837 58%, #003520 100%);
    color: #fff;
    padding: clamp(14px, 2.2vh, 28px) clamp(18px, 3vw, 32px) clamp(14px, 2vh, 22px);
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.6vh, 16px);
    min-height: 0;
}
.guest-hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1A9B52 0%, #fff 50%, #C8102E 100%);
}
.guest-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: relative;
    z-index: 1;
    color: #fff;
    text-decoration: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    max-width: 400px;
    box-shadow: none;
    flex-shrink: 0;
}
.guest-logo {
    display: block;
    background: transparent;
    padding: 0;
    max-width: clamp(260px, 34vh, 400px);
    box-shadow: none;
    border-radius: 0;
}
.guest-logo img {
    display: block;
    width: 100%;
    height: auto;
    filter: none;
}
.guest-brand-text {
    display: block;
    padding: 8px 0 0;
    border-top: 1px solid rgba(255,255,255,.18);
    background: transparent;
    width: 100%;
}
.guest-sipd-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
.guest-sipd-row strong {
    display: inline-block;
    width: auto;
}
.guest-sipd-mark {
    width: 68px;
    height: auto;
    border-radius: 0;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    background: transparent;
    filter: brightness(0) invert(1);
}
.guest-brand-text strong {
    display: block;
    letter-spacing: .08em;
    font-size: clamp(38px, 5vh, 48px);
    line-height: 1;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.guest-brand-text small {
    display: block;
    font-size: 18px;
    letter-spacing: .01em;
    color: rgba(255,255,255,.88);
    text-transform: none;
    margin-top: 6px;
    font-weight: 600;
    line-height: 1.35;
}
.guest-brand-mark {
    display: none;
}
.guest-copy {
    position: relative;
    z-index: 1;
    margin: auto 0;
    max-width: 440px;
}
.guest-badge {
    display: inline-flex;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #e8f5ee;
    font-size: 10px;
    letter-spacing: .14em;
    font-weight: 600;
    margin-bottom: 8px;
}
.guest-copy h1 {
    margin: 0 0 8px;
    font-size: clamp(20px, 2.4vh, 26px);
    line-height: 1.22;
    letter-spacing: -.02em;
    font-weight: 700;
}
.guest-copy p {
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: 13px;
    line-height: 1.4;
    max-width: 380px;
}
.guest-points {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.guest-points li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: rgba(255,255,255,.82);
    font-size: 13px;
    line-height: 1.4;
}
.guest-points li::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 999px;
    background: #1A9B52;
    box-shadow: 0 0 0 3px rgba(26, 155, 82, .22);
    flex-shrink: 0;
}
.guest-public {
    position: relative;
    z-index: 1;
    margin-top: 0;
    background: rgba(255,255,255,.18);
    border-radius: 16px;
    padding: 14px 16px 16px;
    border: 1px solid rgba(255,255,255,.38);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
    backdrop-filter: blur(6px);
    flex-shrink: 0;
}
.guest-public small {
    display: block;
    letter-spacing: .14em;
    font-size: 10px;
    font-weight: 700;
    color: #e8f8ee;
    margin-bottom: 6px;
}
.guest-public p { margin: 0 0 12px; color: #fff; font-size: 14px; line-height: 1.4; font-weight: 500; }
.btn-public {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #fff;
    color: var(--cth-green);
    font-weight: 800;
    text-decoration: none;
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.btn-public:hover {
    color: var(--cth-green-dark);
    background: #f3fbf6;
}
.guest-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: auto;
    padding: clamp(10px, 2vh, 28px) clamp(16px, 3vw, 32px);
    background: #f6f8f7;
}
.guest-panel-inner {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--cth-border);
    border-radius: 18px;
    padding: clamp(14px, 2vh, 22px) 22px 12px;
    box-shadow: 0 16px 40px rgba(0, 36, 18, .08);
    box-sizing: border-box;
}
.guest-panel h2 {
    margin: 0 0 4px;
    font-size: clamp(20px, 2.4vh, 26px);
    font-weight: 750;
    letter-spacing: -.03em;
    color: #163021;
}
.guest-lead { color: var(--cth-muted); margin: 0 0 12px; font-size: 13px; }
.guest-field { margin-bottom: 10px; }
.guest-field label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 4px; color: #334155; }
.guest-field .req { color: var(--cth-red); }
.guest-field input[type="email"],
.guest-field input[type="password"],
.guest-field input[type="text"] {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 44px;
    box-sizing: border-box;
    border: 1px solid var(--cth-border);
    border-radius: 10px;
    padding: 0 14px;
    font: inherit;
    background: #fff;
}
.guest-field input.is-invalid {
    border-color: #fca5a5;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, .08);
}
.guest-field input:focus {
    outline: none;
    border-color: var(--cth-green-mid);
    box-shadow: 0 0 0 3px rgba(0, 104, 55, .12);
}
.password-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.password-wrap input {
    padding-right: 52px;
}
.guest-field input:-webkit-autofill,
.guest-field input:-webkit-autofill:hover,
.guest-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--cth-ink);
    box-shadow: 0 0 0 1000px #fff inset;
    transition: background-color 9999s ease-out;
}
.toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    height: 28px;
    padding: 0 8px;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--cth-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0 12px;
    font-size: 13px;
}
.remember { display: flex; align-items: center; gap: 8px; color: #334155; }
.remember input { width: auto; height: auto; accent-color: var(--cth-green); }
.forgot { color: var(--cth-green); text-decoration: none; font-weight: 600; }
.btn-submit {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--cth-green);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.btn-submit:hover { background: var(--cth-green-dark); }
.btn-submit:disabled { opacity: .72; cursor: wait; }
.quick { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cth-line); }
.quick-title {
    font-size: 10px;
    letter-spacing: .14em;
    color: #7a8780;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.quick-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    border: 1px solid var(--cth-border);
    background: #fff;
    border-radius: 12px;
    padding: 7px 10px;
    margin-bottom: 6px;
    cursor: pointer;
    box-sizing: border-box;
}
.quick-btn:hover { border-color: #b7d0c0; background: #f3faf6; }
.quick-copy { flex: 1; min-width: 0; }
.quick-copy strong { display: block; font-size: 12px; color: #163021; }
.quick-copy span { display: block; font-size: 11px; color: var(--cth-muted); }
.quick-go { color: var(--cth-green); font-weight: 700; font-size: 12px; }
.guest-note { margin-top: 8px; font-size: 11px; color: #8a958e; text-align: center; }
.guest-back {
    display: block;
    text-align: center;
    margin: 14px 0 0;
    color: var(--cth-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}
.guest-back:hover { text-decoration: underline; }
.guest-error { color: var(--cth-red); font-size: 12px; margin-top: 6px; }

.guest-focus-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(700px 460px at 12% 4%, rgba(0,104,55,.1), transparent 70%),
        radial-gradient(520px 420px at 96% 90%, rgba(200,16,46,.045), transparent 70%),
        #f4f7f5;
    color: var(--cth-ink);
    font-family: Inter, sans-serif;
    overflow-x: hidden;
}
.guest-focus-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 44px 20px;
    position: relative;
}
.guest-focus-main::before,
.guest-focus-main::after {
    content: "";
    position: fixed;
    z-index: 0;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(0,104,55,.09);
    border-radius: 50%;
    pointer-events: none;
}
.guest-focus-main::before {
    top: -205px;
    right: -145px;
    box-shadow: 0 0 0 28px rgba(0,104,55,.025), 0 0 0 58px rgba(0,104,55,.018);
}
.guest-focus-main::after {
    bottom: -245px;
    left: -155px;
    width: 390px;
    height: 390px;
    border-color: rgba(200,16,46,.08);
    box-shadow: 0 0 0 30px rgba(200,16,46,.018), 0 0 0 64px rgba(200,16,46,.012);
}
.guest-focus-brand {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    margin: 0 0 32px;
    color: var(--cth-green);
    text-decoration: none;
    position: relative;
    z-index: 1;
}
.guest-focus-brand img {
    display: block;
    width: 104px;
    height: 104px;
    object-fit: contain;
}
.guest-focus-brand span { display: grid; gap: 2px; }
.guest-focus-brand strong { font-size: 40px; font-weight: 850; line-height: 1; letter-spacing: .04em; }
.guest-focus-brand small { color: var(--cth-muted); font-size: 18px; font-weight: 650; }
.guest-focus-card {
    width: min(540px, 100%);
    padding: 40px 42px 34px;
    border: 1px solid #dce5df;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 68px rgba(0, 54, 29, .15), 0 3px 10px rgba(0, 54, 29, .04);
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.guest-focus-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, #008348 0%, #18a45a 72%, #c8102e 100%);
}
.guest-focus-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 142px;
    height: 118px;
    overflow: hidden;
    pointer-events: none;
}
.guest-focus-icon {
    position: absolute;
    top: 29px;
    right: 34px;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid #d9ebdf;
    border-radius: 17px;
    background: linear-gradient(145deg, #f1faf4, #fff);
    box-shadow: 0 5px 14px rgba(0,104,55,.09);
    color: var(--cth-green);
    font-size: 21px;
}
.guest-focus-orbit {
    position: absolute;
    border: 1px solid rgba(0,104,55,.11);
    border-radius: 50%;
}
.guest-focus-orbit-one { width: 118px; height: 118px; top: -64px; right: -28px; }
.guest-focus-orbit-two { width: 88px; height: 88px; top: -48px; right: -13px; }
.guest-focus-card > h2,
.guest-focus-card > .guest-lead,
.guest-focus-card > form,
.guest-focus-card > .guest-back {
    position: relative;
    z-index: 1;
}
.guest-focus-card h2 {
    max-width: 390px;
    margin: 2px 0 10px;
    color: #163021;
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.15;
}
.guest-focus-card .guest-lead {
    max-width: 420px;
    margin: 0 0 27px;
    color: #64736a;
    font-size: 15px;
    line-height: 1.65;
}
.guest-focus-card .guest-field { margin-bottom: 20px; }
.guest-focus-card .guest-field label { margin-bottom: 8px; font-size: 14px; }
.guest-focus-card .guest-field input[type="email"],
.guest-focus-card .guest-field input[type="password"] { height: 54px; border-radius: 13px; font-size: 15px; }
.guest-focus-card .btn-submit { height: 54px; border-radius: 13px; font-size: 15px; box-shadow: 0 6px 16px rgba(0,104,55,.2); }
.guest-focus-card .guest-back {
    width: fit-content;
    margin: 22px auto 0;
    padding: 9px 15px;
    border-radius: 999px;
    font-size: 14px;
}
.guest-focus-card .guest-back:hover { background: #f0f7f2; text-decoration: none; }
.guest-focus-card .sipd-alert { margin-bottom: 18px; }
.guest-focus-card .sipd-alert ul { margin: 6px 0 0; padding-left: 20px; }
@media (max-width: 520px) {
    .guest-focus-main { justify-content: center; padding: 32px 16px; }
    .guest-focus-brand { margin-bottom: 18px; }
    .guest-focus-brand img { width: 84px; height: 84px; }
    .guest-focus-brand strong { font-size: 34px; }
    .guest-focus-brand small { font-size: 16px; }
    .guest-focus-card { padding: 34px 23px 27px; border-radius: 19px; }
    .guest-focus-decoration { transform: scale(.8); transform-origin: top right; }
    .guest-focus-card h2 { max-width: 270px; font-size: 26px; }
    .guest-focus-card .guest-lead { font-size: 14px; }
}

.guest-auth-card {
    max-width: 520px;
    margin: 48px auto;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--cth-border);
    box-shadow: 0 10px 30px rgba(0, 36, 18, .06);
    overflow: hidden;
}
.guest-auth-card .card-header {
    background: var(--cth-green);
    color: #fff;
    font-weight: 700;
    border: 0;
    padding: 16px 20px;
    border-bottom: 4px solid var(--cth-red);
}
.guest-auth-wrap { min-height: 100vh; background: var(--cth-bg); }
.guest-auth-top {
    background: var(--cth-sidebar);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.guest-auth-top::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cth-green-bright), #fff 50%, var(--cth-red));
}
.guest-auth-top a { color: #fff; text-decoration: none; font-weight: 700; }

.consulta-page { background: #f6f8f7; min-height: 100vh; }
.consulta-hero {
    background:
        radial-gradient(520px 360px at 12% 12%, rgba(255,255,255,.09), transparent 70%),
        radial-gradient(700px 380px at 92% 5%, rgba(26,155,82,.2), transparent 68%),
        linear-gradient(135deg, #003b24 0%, #006837 58%, #004225 100%);
    color: #fff;
    padding: 26px 24px 112px;
    position: relative;
    overflow: hidden;
}
.consulta-hero::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 4px;
    background: linear-gradient(90deg, #1A9B52 0%, #fff 50%, #C8102E 100%);
}
.consulta-hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: max(-150px, calc((100vw - 1120px) / 2));
    bottom: -300px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 78px rgba(255,255,255,.02);
    pointer-events: none;
}
.consulta-inner { max-width: 1000px; margin: 0 auto; position: relative; z-index: 1; }
.consulta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
}
.consulta-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 22px;
    text-decoration: none;
    color: #fff;
    max-width: 620px;
}
.consulta-brand > img {
    display: block;
    width: clamp(190px, 24vw, 270px);
    height: auto;
    filter: none;
}
.consulta-brand > span {
    display: block;
    width: auto;
    padding: 0 0 0 20px;
    border-top: 0;
    border-left: 1px solid rgba(255,255,255,.26);
}
.consulta-brand .guest-sipd-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
.consulta-brand .guest-sipd-mark,
.consulta-brand img.guest-sipd-mark {
    width: 48px;
    height: 48px;
    border-radius: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
    background: transparent;
    padding: 0;
    box-shadow: none;
}
.consulta-brand strong {
    display: block;
    font-size: 30px;
    letter-spacing: .06em;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.consulta-brand small {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: rgba(255,255,255,.88);
    font-weight: 600;
}
.consulta-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.95);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.consulta-back:hover {
    color: #fff;
    border-color: rgba(255,255,255,.55);
    background: rgba(255,255,255,.15);
    transform: translateY(-1px);
}
.consulta-back:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 3px;
}
.consulta-inner > .guest-badge {
    display: table;
    margin: 0 auto 14px;
    padding: 7px 13px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.17);
    color: #d7f4e1;
}
.consulta-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 3vw + 12px, 42px);
    letter-spacing: -.03em;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}
.consulta-hero p {
    color: rgba(255,255,255,.78);
    margin: 0;
    line-height: 1.6;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
    text-align: center;
}
.consulta-wrap { max-width: 860px; margin: -64px auto 60px; padding: 0 20px; position: relative; z-index: 1; }
.consulta-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px 32px;
    box-shadow: 0 18px 48px rgba(0, 36, 18, .14);
    margin-bottom: 16px;
    border: 1px solid var(--cth-border);
}
.consulta-card .guest-field label {
    display: block;
    margin-bottom: 9px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 750;
}
.consulta-card .guest-field input {
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
}
.consulta-submit {
    width: auto;
    min-width: 158px;
    padding: 0 24px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 5px 14px rgba(0, 104, 55, .2);
}
.consulta-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #7a8780;
    line-height: 1.4;
}
.consulta-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}
.consulta-reset {
    color: var(--cth-green);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}
.consulta-reset:hover { color: var(--cth-green-dark); }
.consulta-found {
    margin: 4px 4px 14px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}
.consulta-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}
.consulta-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--cth-border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(0, 36, 18, .06);
    cursor: pointer;
    font: inherit;
}
.consulta-row:hover,
.consulta-row:focus-visible {
    border-color: #b7d0c0;
    outline: none;
}
.consulta-row.is-pendiente { border-left: 4px solid #f59e0b; }
.consulta-row.is-en-proceso { border-left: 4px solid var(--cth-green); }
.consulta-row.is-sancionado { border-left: 4px solid var(--cth-red); }
.consulta-row.is-archivado { border-left: 4px solid #94a3b8; }
.consulta-row-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.consulta-row .consulta-name { margin: 0; font-size: 15px; }
.consulta-row-meta { color: var(--cth-muted); font-size: 13px; }
.consulta-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.consulta-row-go {
    color: var(--cth-green);
    font-size: 12px;
    font-weight: 800;
}
.consulta-locked { overflow: hidden; }
.consulta-dialog-bg {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: rgba(15, 23, 42, .58);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    overflow: auto;
}
.consulta-dialog-bg[hidden] { display: none !important; }
.consulta-dialog {
    width: min(780px, 100%);
    max-height: calc(100dvh - 40px);
    margin: auto;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    padding: 26px 28px 28px;
    box-shadow: 0 28px 80px rgba(0, 24, 12, .3);
    border: 1px solid rgba(255,255,255,.9);
    scrollbar-color: #b8cfc0 transparent;
    scrollbar-width: thin;
}
.consulta-dialog-head { display: flex; align-items: center; gap: 10px; }
.consulta-dialog-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 15px;
    cursor: pointer;
    transition: color .15s ease, background .15s ease, transform .15s ease;
}
.consulta-dialog-close:hover { background: #e2e8f0; color: #0f172a; transform: rotate(4deg); }
.consulta-dialog-close:focus-visible {
    outline: 3px solid var(--cth-green-bright);
    outline-offset: 2px;
}
.consulta-result.is-pendiente { border-left: 4px solid #f59e0b; }
.consulta-result.is-en-proceso { border-left: 4px solid var(--cth-green); }
.consulta-result.is-sancionado { border-left: 4px solid var(--cth-red); }
.consulta-result.is-archivado { border-left: 4px solid #94a3b8; }
.consulta-dialog-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--cth-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.consulta-dialog-title {
    margin: 0;
    color: var(--cth-green);
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -.03em;
    line-height: 1.15;
}
.consulta-empty strong { display: block; color: #163021; margin-bottom: 6px; }
.consulta-empty p { margin: 0; }
.consulta-result-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: -2px 0 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eeea;
}
.consulta-code { color: var(--cth-green); font-weight: 800; letter-spacing: .02em; }
.consulta-exp { color: var(--cth-muted); font-size: 12px; margin-top: 3px; }
.consulta-estado {
    font-weight: 700;
    font-size: 12px;
    color: #334155;
    border-radius: 999px;
    padding: 6px 12px;
    background: #f1f5f4;
    white-space: nowrap;
}
.consulta-estado--pendiente { background: #fff7e6; color: #9a6b00; }
.consulta-estado--en-proceso { background: var(--cth-green-soft); color: var(--cth-green-text); }
.consulta-estado--sancionado { background: var(--cth-red-soft); color: var(--cth-red-dark); }
.consulta-estado--archivado { background: #eef2f1; color: #475569; }
.consulta-meta { color: var(--cth-muted); font-size: 14px; line-height: 1.55; }
.consulta-name { color: var(--cth-ink); font-weight: 750; font-size: 16px; margin-bottom: 2px; }
.consulta-empty { color: var(--cth-muted); }
.consulta-status-msg {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 18px 0 0;
    padding: 13px 15px;
    border-radius: 12px;
    background: linear-gradient(110deg, #f2f8f4, #f8fbf9);
    color: #334155;
    font-size: 14px;
    line-height: 1.55;
    border: 1px solid #dce9df;
}
.consulta-status-msg > i { flex: 0 0 auto; margin-top: 2px; color: var(--cth-green); font-size: 16px; }
.consulta-status-msg p { margin: 0; }
.consulta-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    position: relative;
}
.consulta-steps::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 11px;
    height: 2px;
    background: #d9e6dd;
    z-index: 0;
}
.consulta-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 2px 4px 10px;
}
.consulta-step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #c7d5cc;
    background: #fff;
    box-shadow: 0 0 0 4px #fff;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
}
.consulta-step--completada .consulta-step-dot {
    background: var(--cth-green);
    border-color: var(--cth-green);
    color: #fff;
}
.consulta-step--actual .consulta-step-dot {
    background: #fff;
    border-color: var(--cth-green-bright);
    color: var(--cth-green);
    box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(26, 155, 82, .22);
}
.consulta-step strong {
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
}
.consulta-step small {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
    max-width: 140px;
}
.consulta-step--completada strong { color: var(--cth-green-text); }
.consulta-step--actual strong { color: var(--cth-green); }
.consulta-timeline-wrap { margin-top: 26px; }
.consulta-timeline-wrap h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #475569;
}
.consulta-timeline-wrap h2 i { color: var(--cth-green); font-size: 14px; }
.consulta-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 6px;
    border-left: 2px solid #d9e6dd;
}
.consulta-timeline li {
    position: relative;
    padding: 0 0 18px 22px;
}
.consulta-timeline li:last-child { padding-bottom: 0; }
.consulta-timeline li::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cth-green);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #d9e6dd;
}
.consulta-timeline li.is-current::before {
    background: #fff;
    border-color: var(--cth-green-bright);
    box-shadow: 0 0 0 2px rgba(26, 155, 82, .35);
}
.consulta-timeline-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--cth-green);
    margin-bottom: 2px;
}
.consulta-timeline-body strong {
    display: block;
    font-size: 14px;
    color: var(--cth-ink);
}
.consulta-timeline-body p {
    margin: 3px 0 0;
    font-size: 13px;
    color: var(--cth-muted);
    line-height: 1.5;
}
.consulta-privacy {
    margin: 8px 4px 0;
    font-size: 12px;
    color: #7a8780;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 640px) {
    .consulta-hero { padding: 22px 18px 94px; }
    .consulta-top { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 34px; }
    .consulta-brand { gap: 10px; }
    .consulta-brand > img { width: min(42vw, 190px); }
    .consulta-brand > span { padding-left: 10px; }
    .consulta-brand .guest-sipd-mark,
    .consulta-brand img.guest-sipd-mark { width: 32px; height: 32px; }
    .consulta-brand strong { font-size: 24px; }
    .consulta-brand small { max-width: 150px; font-size: 11px; line-height: 1.35; }
    .consulta-back { min-height: 38px; padding: 0 13px; font-size: 13px; }
    .consulta-hero h1 { font-size: 30px; }
    .consulta-hero p { font-size: 14px; }
    .consulta-wrap { margin-top: -52px; padding: 0 14px; }
    .consulta-card { padding: 22px 18px; border-radius: 16px; }
    .consulta-submit { width: 100%; }
    .consulta-actions { align-items: stretch; }
    .consulta-reset { align-self: center; }
    .consulta-steps {
        grid-template-columns: 1fr 1fr;
        gap: 16px 8px;
    }
    .consulta-steps::before { display: none; }
    .consulta-step { align-items: flex-start; text-align: left; }
    .consulta-dialog-bg { align-items: flex-start; padding: 12px; }
    .consulta-dialog { max-height: calc(100dvh - 24px); padding: 20px 17px 22px; border-radius: 16px; }
    .consulta-result-top { flex-wrap: wrap; align-items: flex-start; }
    .consulta-dialog-head { gap: 7px; }
    .consulta-dialog-title { font-size: 22px; }
    .consulta-row { align-items: flex-start; }
    .consulta-row-side { align-items: flex-start; }
}

.guest-auth-wrap .card {
    border: 1px solid var(--cth-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 36, 18, .06);
}
.guest-auth-wrap .card-header {
    background: var(--cth-green) !important;
    color: #fff !important;
    font-weight: 700;
    border: 0;
    border-bottom: 4px solid var(--cth-red);
}
.guest-auth-wrap .btn-primary {
    border-radius: 999px;
    font-weight: 700;
}

@media (max-width: 720px) {
    html:has(.guest-split),
    body:has(.guest-split) {
        height: auto;
        overflow: auto;
    }
    .guest-split {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }
    .guest-hero { min-height: auto; padding: 20px 18px 18px; gap: 14px; }
    .guest-brand { max-width: 100%; }
    .guest-logo { max-width: 280px; }
    .guest-brand-text strong { font-size: 24px; }
    .guest-copy h1 { font-size: 22px; }
    .guest-panel { padding: 16px 16px 28px; }
    .guest-panel-inner { padding: 18px 16px 14px; }
}
@media (max-height: 680px) and (min-width: 721px) {
    .guest-copy p,
    .guest-points { display: none; }
}

/* Alertas, toasts y confirmaciones SIPD */
.sipd-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.45;
    border: 1px solid transparent;
}
.sipd-alert i { margin-top: 2px; }
.sipd-alert ul { margin: 6px 0 0; padding-left: 18px; }
.sipd-alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.sipd-alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.sipd-alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.sipd-alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

.swal2-container {
    z-index: 20050 !important;
}
.sipd-toast-wrap {
    padding-top: 72px !important;
    padding-right: 18px !important;
}
.swal2-popup.sipd-toast {
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0, 36, 18, .16) !important;
    border: 1px solid var(--cth-border) !important;
    font-family: Inter, system-ui, sans-serif !important;
    padding: 12px 16px !important;
}
.swal2-popup.sipd-toast .swal2-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--cth-ink) !important;
}
.swal2-popup.sipd-toast .swal2-html-container {
    font-size: 13px !important;
    color: var(--cth-muted) !important;
    margin: 4px 0 0 !important;
}
.swal2-popup.sipd-toast-success { border-left: 4px solid var(--cth-green) !important; }
.swal2-popup.sipd-toast-error { border-left: 4px solid var(--cth-red) !important; }
.swal2-popup.sipd-toast-warning { border-left: 4px solid #d97706 !important; }
.swal2-popup.sipd-toast-info { border-left: 4px solid #2563eb !important; }
.sipd-toast .swal2-timer-progress-bar { background: var(--cth-green); }

.swal2-popup.sipd-modal {
    border-radius: 18px !important;
    padding: 24px 22px 18px !important;
    font-family: Inter, system-ui, sans-serif !important;
    box-shadow: 0 24px 64px rgba(0, 36, 18, .22) !important;
    width: min(420px, calc(100vw - 32px)) !important;
}
.sipd-modal-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: var(--cth-ink) !important;
}
.sipd-modal-text {
    font-size: 14px !important;
    color: var(--cth-muted) !important;
    line-height: 1.5 !important;
}
.sipd-modal-icon { margin-bottom: 8px !important; }
.sipd-modal-actions { gap: 8px !important; margin-top: 8px !important; }
.sipd-swal-confirm,
.sipd-swal-danger,
.sipd-swal-cancel {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    min-width: 110px;
}
.sipd-swal-confirm { background: var(--cth-green); color: #fff; }
.sipd-swal-confirm:hover { background: var(--cth-green-dark); }
.sipd-swal-danger { background: var(--cth-red); color: #fff; }
.sipd-swal-danger:hover { background: var(--cth-red-dark); }
.sipd-swal-cancel { background: #f1f5f9; color: #334155; }
.sipd-swal-cancel:hover { background: #e2e8f0; }

.sipd-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: #64748b;
    font-size: 13px;
    border-top: 1px solid var(--cth-line);
}
.sipd-pager-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}
.sipd-page {
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: #64748b;
    background: #fff;
    border: 1px solid var(--cth-border);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
a.sipd-page:hover { background: #ecfdf5; color: var(--cth-green-text); border-color: #bbf7d0; }
.sipd-page.is-current {
    background: var(--cth-green);
    border-color: var(--cth-green);
    color: #fff;
    font-weight: 700;
}
.sipd-page.is-off,
.sipd-page:disabled {
    opacity: .4;
    cursor: default;
    pointer-events: none;
}
.doc-optional-clause {
    margin: 14px 0;
    border: 1.5px dashed #22d3ee;
    border-radius: 12px;
    background: #ecfeff;
    overflow: visible;
    position: relative;
    z-index: 2;
}
.doc-optional-bar {
    padding: 10px 12px 12px;
    background: #cffafe;
    border-bottom: 1px solid #a5f3fc;
    position: relative;
    z-index: 3;
}
.doc-optional-toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #0e7490;
    cursor: pointer;
    user-select: none;
}
.doc-optional-toggle input,
.doc-optional-modes input {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    pointer-events: auto;
    cursor: pointer;
    accent-color: #0e7490;
}
.doc-optional-toggle em { font-weight: 600; color: #155e75; }
.doc-optional-hint {
    margin: 4px 0 0 22px;
    font-size: 11px;
    color: #0f766e;
}
.doc-optional-modes {
    display: none;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 8px 0 0 22px;
    font-size: 12px;
    color: #155e75;
    position: relative;
    z-index: 4;
}
.doc-optional-modes .doc-optional-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.7);
    border: 1px solid transparent;
    user-select: none;
}
.doc-optional-modes .doc-optional-choice:hover { border-color: #67e8f9; }
.doc-optional-modes .doc-optional-choice label {
    margin: 0;
    cursor: pointer;
    font-weight: 600;
}
.doc-optional-clause[data-mode="no_presento"] .doc-optional-choice:has(input[value="no_presento"]),
.doc-optional-clause[data-mode="extemporaneo"] .doc-optional-choice:has(input[value="extemporaneo"]) {
    background: #fff;
    border-color: #22d3ee;
}
.doc-optional-body { display: none; padding: 8px 12px 10px; }
.doc-optional-clause[data-mode="no_presento"] .doc-optional-modes,
.doc-optional-clause[data-mode="extemporaneo"] .doc-optional-modes {
    display: flex;
}
.doc-optional-clause[data-mode="no_presento"] .doc-optional-body,
.doc-optional-clause[data-mode="extemporaneo"] .doc-optional-body {
    display: block;
}
.doc-optional-clause[data-mode="no_presento"] [data-optional-part="extemporaneo"] {
    display: none;
}
.doc-optional-clause[data-mode="omit"] .doc-optional-body,
.doc-optional-clause[data-mode="omit"] .doc-optional-modes {
    display: none;
}

/* Dashboard */
.dash-pipeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.dash-pipe {
    background: #fff;
    border: 1px solid var(--cth-border);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--cth-shadow);
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
}
a.dash-pipe:hover { border-color: #9cbcab; color: inherit; }
.dash-pipe-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dash-pipe-ico {
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center; font-size: 14px;
}
.dash-pipe-ico.y { background: #fef3c7; color: #d97706; }
.dash-pipe-ico.b { background: #eff6ff; color: #2563eb; }
.dash-pipe-ico.r { background: #fff1f2; color: #e11d48; }
.dash-pipe-ico.g { background: #f8fafc; color: #64748b; }
.dash-pipe-num { font-size: 24px; font-weight: 700; color: var(--cth-ink); letter-spacing: -.03em; }
.dash-pipe-title { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 10px; }
.dash-bar { height: 4px; background: #f1f5f9; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.dash-bar > span { display: block; height: 100%; border-radius: 999px; }
.dash-bar.yellow > span { background: #f59e0b; }
.dash-bar.blue > span { background: #3b82f6; }
.dash-bar.rose > span { background: #e11d48; }
.dash-bar.gray > span { background: #94a3b8; }
.dash-pipe small { color: #94a3b8; font-size: 11px; font-weight: 600; }

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}
.dash-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.dash-col > .dash-card { margin-bottom: 16px; }
.dash-col > .dash-card:last-child { margin-bottom: 0; flex: 1; }
.dash-card {
    background: #fff;
    border: 1px solid var(--cth-border);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: var(--cth-shadow);
    margin-bottom: 16px;
}
.dash-card-wide { margin-bottom: 0; }
.dash-recent {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
}
.dash-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cth-line);
    font-weight: 700;
    font-size: 15px;
    color: var(--cth-ink);
}
.dash-card-title a { color: var(--cth-green); font-size: 13px; font-weight: 600; text-decoration: none; }
.dash-chip {
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    background: #fff1f2;
    color: #e11d48;
}
.dash-chip.blue { background: #eff6ff; color: #2563eb; }
.dash-chip.yellow { background: #fffbeb; color: #d97706; }
.dash-chip.green { background: #f0fdf4; color: #15803d; }

.dash-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--cth-line);
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.dash-row:last-child { border-bottom: 0; }
a.dash-row:hover { color: inherit; background: #fafdfb; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 10px; }
.dash-dot {
    width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
    background: #f0fdf4; color: var(--cth-green-text); border: 1px solid #bbf7d0;
}
.dash-dot.warn { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.dash-dot.late { background: #fff1f2; color: #e11d48; border-color: #fecaca; }
.dash-dot.blue { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.dash-main { flex: 1; min-width: 0; }
.dash-main b { display: block; font-size: 14px; font-weight: 600; color: var(--cth-ink); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-main small { color: #64748b; font-size: 12px; }

.dash-status {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}
.dash-status.pend { background: #fffbeb; color: #d97706; }
.dash-status.proc { background: #eff6ff; color: #2563eb; }
.dash-status.sanc { background: #fff1f2; color: #e11d48; }
.dash-status.arch { background: #f8fafc; color: #475569; }
.dash-status.late { background: #fff1f2; color: #e11d48; }
.dash-status.warn { background: #fffbeb; color: #d97706; }
.dash-status.info { background: #eff6ff; color: #2563eb; }
.dash-status.ok { background: #f0fdf4; color: #15803d; }

.dash-stat { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; color: #475569; font-size: 13px; border-bottom: 1px solid var(--cth-line); text-decoration: none; }
.dash-stat:last-child { border-bottom: 0; }
a.dash-stat:hover { color: var(--cth-green-text); }
.dash-stat b { color: var(--cth-ink); }
.dash-stat .n-late { color: #e11d48; }
.dash-stat .n-warn { color: #d97706; }

.dash-team { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--cth-line); }
.dash-team:last-child { border-bottom: 0; }
.dash-team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 36px;
}
.dash-team-grid .dash-team { min-width: 0; }
.dash-ava {
    width: 32px; height: 32px; border-radius: 50%;
    background: #f0fdf4; color: var(--cth-green-text);
    display: grid; place-items: center; font-size: 11px; font-weight: 700; border: 1px solid #bbf7d0;
}
.dash-team b { display: block; font-size: 13px; color: var(--cth-ink); }
.dash-team small { color: #64748b; font-size: 11px; }
.dash-team .n { margin-left: auto; text-align: right; font-size: 12px; color: #64748b; font-weight: 600; }
.dash-team .n em { display: block; font-style: normal; color: #2563eb; font-size: 11px; }
.dash-team.is-inactive { opacity: .55; }
.dash-team.is-inactive .dash-ava { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

.dash-links a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 0; color: #334155; text-decoration: none; font-size: 13px;
    border-bottom: 1px solid var(--cth-line);
}
.dash-links a:last-child { border-bottom: 0; }
.dash-links a span { display: flex; align-items: center; gap: 10px; }
.dash-links a i.left { color: var(--cth-green); width: 14px; }
.dash-links a i.right { color: #cbd5e1; font-size: 11px; }
.dash-links .count { color: #64748b; font-size: 12px; font-weight: 700; margin-right: 8px; }
.dash-empty { color: #94a3b8; font-size: 13px; padding: 12px 0; text-align: center; }
.dash-ok {
    background: #f0fdf4; color: #166534; border-radius: 12px;
    padding: 14px 16px; font-size: 13px; text-align: center;
}

.dash-assign { display: flex; gap: 8px; align-items: center; }
.dash-assign select {
    height: 36px; border: 1px solid var(--cth-border); border-radius: 10px;
    padding: 0 10px; font: inherit; font-size: 13px; min-width: 0; flex: 1; background: #fff;
}
.dash-assign button {
    height: 36px; border: 0; border-radius: 10px; background: var(--cth-green); color: #fff;
    font-weight: 700; padding: 0 14px; cursor: pointer; font-size: 12px; white-space: nowrap;
}
.dash-stack { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--cth-line); }
.dash-stack:last-child { border-bottom: 0; }

.dash-hoy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
.dash-hoy a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid var(--cth-border);
    border-radius: 12px;
    padding: 12px 14px;
    text-decoration: none;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}
.dash-hoy a:hover { border-color: #9cbcab; color: var(--cth-green-text); }
.dash-hoy b { font-size: 22px; font-weight: 700; color: var(--cth-ink); letter-spacing: -.03em; }
.dash-hoy b.n-late { color: #e11d48; }
.dash-hoy b.n-warn { color: #d97706; }

body.theme-cootranshuila .wrapper,
body.theme-cootranshuila .content-wrapper {
    min-height: 0 !important;
    background: transparent !important;
}

@media (max-width: 1100px) {
    .dash-pipeline { grid-template-columns: 1fr 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .dash-recent { grid-template-columns: 1fr; }
    .dash-team-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .dash-pipeline { grid-template-columns: 1fr; }
    .dash-hoy { grid-template-columns: 1fr 1fr; }
}

/* Separación suave: cada bloque, buscador y tabla se lee aparte */
body.theme-cootranshuila .table-card,
body.theme-cootranshuila .hub-table,
body.theme-cootranshuila .case-tbl,
body.theme-cootranshuila .anexo-upload,
body.theme-cootranshuila .form-card,
body.theme-cootranshuila .sol-card,
body.theme-cootranshuila .ver-card,
body.theme-cootranshuila .nt-card,
body.theme-cootranshuila .nt-preview,
body.theme-cootranshuila .av-item,
body.theme-cootranshuila .info-box,
body.theme-cootranshuila .kpi,
body.theme-cootranshuila .kpi-card,
body.theme-cootranshuila .ch-card,
body.theme-cootranshuila .rp-filters,
body.theme-cootranshuila .global-pager-card,
body.theme-cootranshuila .dash-card,
body.theme-cootranshuila .dash-pipe {
    border: 1px solid var(--cth-border) !important;
}

body.theme-cootranshuila .toolbar,
body.theme-cootranshuila .hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--cth-border) !important;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

body.theme-cootranshuila .toolbar .search,
body.theme-cootranshuila .hub-toolbar .search {
    position: relative;
    flex: 1 1 220px;
    min-width: 0;
    width: 100%;
}

body.theme-cootranshuila .search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

body.theme-cootranshuila .search input,
body.theme-cootranshuila .toolbar select,
body.theme-cootranshuila .sipd-search input,
body.theme-cootranshuila .hub-toolbar input,
body.theme-cootranshuila input[type="search"],
body.theme-cootranshuila .sipd-pager-size select,
body.theme-cootranshuila .sipd-pager-size input[type="number"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--cth-border) !important;
    box-shadow: none !important;
}

body.theme-cootranshuila .search input {
    height: 44px;
    border-radius: 12px;
    padding: 0 14px 0 40px;
    font: inherit;
    font-size: 14px;
    background: #fff;
    outline: none;
}

body.theme-cootranshuila .chip {
    border: 1px solid var(--cth-border) !important;
    box-shadow: none !important;
}

body.theme-cootranshuila .campo-editable {
    border: 1px solid var(--cth-line) !important;
}
body.theme-cootranshuila .campo-editable[readonly],
body.theme-cootranshuila .campo-editable:disabled {
    background: #f7f8fa !important;
    border: 1px solid var(--cth-line) !important;
    padding: 8px !important;
}

body.theme-cootranshuila .hist,
body.theme-cootranshuila .ver-row,
body.theme-cootranshuila .worker-header {
    border-bottom-color: var(--cth-line) !important;
}

/* Gris pálido único: login, consulta pública, coordinación y RH */
body.theme-cootranshuila .card,
body.theme-cootranshuila .form-control,
body.theme-cootranshuila .form-select,
body.theme-cootranshuila .custom-select,
body.theme-cootranshuila .input-group-text,
body.theme-cootranshuila select,
body.theme-cootranshuila textarea,
body.theme-cootranshuila input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="image"]),
body.theme-cootranshuila .btn-alt,
body.theme-cootranshuila .stat-chip,
body.theme-cootranshuila .sipd-page,
body.theme-cootranshuila .pager a,
body.theme-cootranshuila .pager span,
body.theme-cootranshuila .action-btn,
body.theme-cootranshuila .acts a,
body.theme-cootranshuila .acts button,
body.theme-cootranshuila .sipd-bell,
body.theme-cootranshuila .sipd-user,
body.theme-cootranshuila .sipd-nav-toggle,
html:has(.guest-split) .guest-panel-inner,
html:has(.guest-split) .guest-field input,
html:has(.guest-split) .quick-btn,
html:has(.guest-split) .consulta-card,
html:has(.guest-split) .consulta-row,
html:has(.guest-split) .consulta-dialog,
html:has(.guest-split) .consulta-status-msg,
html:has(.guest-split) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]) {
    border-color: var(--cth-border) !important;
}

body.theme-cootranshuila .chip.active { border-color: #bbd4c4 !important; }
body.theme-cootranshuila .stat-chip.green { border-color: #bbf7d0 !important; }
body.theme-cootranshuila .stat-chip.yellow { border-color: #fde68a !important; }
body.theme-cootranshuila .stat-chip.red { border-color: #fca5a5 !important; }
body.theme-cootranshuila .sipd-page.is-current,
body.theme-cootranshuila .pager span.current { border-color: var(--cth-green) !important; }
body.theme-cootranshuila .btn-add,
body.theme-cootranshuila .btn-submit,
body.theme-cootranshuila .anexo-cargar,
body.theme-cootranshuila .hub-btn,
body.theme-cootranshuila .action-btn.download,
body.theme-cootranshuila .action-btn.veredicto,
body.theme-cootranshuila .rbtn.g { border-color: transparent !important; }

/* Proporciones y lectura consistentes en las tablas de los módulos. */
body.theme-cootranshuila .sipd-wrap .table-card,
body.theme-cootranshuila .sipd-wrap .hub-table,
body.theme-cootranshuila .sipd-wrap .case-tbl,
body.theme-cootranshuila .sipd-wrap .table-responsive {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
}

body.theme-cootranshuila .sipd-wrap .table-card table,
body.theme-cootranshuila .sipd-wrap .hub-table table,
body.theme-cootranshuila .sipd-wrap .case-tbl table,
body.theme-cootranshuila .sipd-wrap .table-responsive table {
    width: 100%;
    min-width: 760px;
    table-layout: auto !important;
}

body.theme-cootranshuila .sipd-wrap .case-tbl table:has(thead th:nth-child(8)) {
    min-width: 1120px;
}

body.theme-cootranshuila .sipd-wrap .case-tbl table:has(thead th:nth-child(12)) {
    min-width: 1450px;
}

body.theme-cootranshuila .sipd-wrap .table-card th,
body.theme-cootranshuila .sipd-wrap .table-card td,
body.theme-cootranshuila .sipd-wrap .hub-table th,
body.theme-cootranshuila .sipd-wrap .hub-table td,
body.theme-cootranshuila .sipd-wrap .case-tbl th,
body.theme-cootranshuila .sipd-wrap .case-tbl td,
body.theme-cootranshuila .sipd-wrap .table-responsive th,
body.theme-cootranshuila .sipd-wrap .table-responsive td {
    padding: 9px 11px;
    line-height: 1.4;
    vertical-align: middle;
}

body.theme-cootranshuila .sipd-wrap .table-card th,
body.theme-cootranshuila .sipd-wrap .hub-table th,
body.theme-cootranshuila .sipd-wrap .case-tbl th,
body.theme-cootranshuila .sipd-wrap .table-responsive th {
    white-space: nowrap;
}

body.theme-cootranshuila .form-control:focus,
body.theme-cootranshuila .form-select:focus,
body.theme-cootranshuila select:focus,
body.theme-cootranshuila textarea:focus,
body.theme-cootranshuila input:focus,
html:has(.guest-split) input:focus {
    border-color: var(--cth-green-mid) !important;
}

body.theme-cootranshuila .pager,
body.theme-cootranshuila .sipd-pager,
body.theme-cootranshuila .casos-pager,
body.theme-cootranshuila .info-header,
body.theme-cootranshuila .sipd-top,
body.theme-cootranshuila .dash-card-title {
    border-color: var(--cth-line) !important;
}

/* Verdict Banners */
.verdict-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    margin-bottom: 24px;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(194, 65, 12, 0.1);
}
.verdict-banner div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.verdict-banner b {
    color: #9a3412;
    font-size: 1.1rem;
    font-weight: 700;
}
.verdict-banner span {
    color: #c2410c;
    font-size: 0.95rem;
    font-weight: 500;
}
.verdict-banner a {
    display: inline-flex;
    align-items: center;
    background: #c2410c;
    color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.verdict-banner a:hover {
    background: #9a3412;
    color: #fff;
}

.sipd-intro {
    position: fixed;
    inset: 0;
    z-index: 2000000;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(ellipse at 50% 38%, rgba(26, 155, 82, .38), transparent 43%),
        linear-gradient(145deg, var(--cth-sidebar-2) 0%, var(--cth-green-dark) 52%, var(--cth-green) 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity .65s ease, visibility .65s ease;
}

.sipd-intro-hidden,
.sipd-intro-suppressed .sipd-intro {
    display: none;
}

.sipd-intro-leaving {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sipd-intro-glow {
    position: absolute;
    width: min(58vw, 680px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    pointer-events: none;
}

.sipd-intro-glow::before,
.sipd-intro-glow::after {
    position: absolute;
    inset: 9%;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: inherit;
    content: "";
}

.sipd-intro-glow::after {
    inset: 19%;
}

.sipd-intro-glow-one {
    animation: sipd-intro-orbit 22s linear infinite;
}

.sipd-intro-glow-two {
    width: min(78vw, 920px);
    border-color: rgba(255, 255, 255, .045);
    animation: sipd-intro-orbit 30s linear infinite reverse;
}

.sipd-intro-card {
    position: relative;
    z-index: 1;
    width: min(92vw, 760px);
    padding: 38px 20px 30px;
    text-align: center;
    animation: sipd-intro-arrive .8s cubic-bezier(.2, .75, .25, 1) both;
}

.sipd-intro-emblem {
    position: relative;
    display: grid;
    width: min(86vw, 650px);
    height: clamp(150px, 27vw, 260px);
    margin: 0 auto 34px;
    place-items: center;
}

.sipd-intro-emblem::before {
    position: absolute;
    inset: -10px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 28px;
    content: "";
}

.sipd-intro-ring {
    position: absolute;
    inset: -10px;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-right-color: rgba(255, 255, 255, .35);
    border-radius: 28px;
    animation: sipd-intro-orbit 2.8s linear infinite;
}

.sipd-intro-emblem img {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 18px 26px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(0, 20, 10, .3);
    clip-path: inset(0 100% 0 0 round 20px);
    animation: sipd-intro-logo-reveal 1.25s steps(16, end) .2s forwards,
        sipd-intro-logo 2.2s ease-in-out 1.55s infinite;
}

.sipd-intro-emblem::after {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .8) 49%, transparent 63%);
    content: "";
    pointer-events: none;
    transform: translateX(-130%);
    animation: sipd-intro-sheen .85s ease-out 1.2s both;
}

.sipd-intro-kicker {
    color: rgba(255, 255, 255, .74);
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .2em;
}

.sipd-intro-card h1 {
    margin: 13px 0 5px;
    color: #fff;
    font-size: clamp(1.9rem, 6vw, 2.55rem);
    font-weight: 700;
    letter-spacing: -.055em;
}

.sipd-intro-title-letters {
    display: inline-flex;
    gap: .025em;
}

.sipd-intro-title-letters span {
    display: inline-block;
    color: #b9f3cd;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px) rotateX(-65deg);
    animation: sipd-intro-letter .38s cubic-bezier(.2, .75, .25, 1) forwards;
}

.sipd-intro-title-letters span:nth-child(1) { animation-delay: 1.32s; }
.sipd-intro-title-letters span:nth-child(2) { animation-delay: 1.48s; }
.sipd-intro-title-letters span:nth-child(3) { animation-delay: 1.64s; }
.sipd-intro-title-letters span:nth-child(4) { animation-delay: 1.8s; }

.sipd-intro-title-letters[aria-label] {
    color: transparent;
}

.sipd-intro-card p {
    margin: 0;
    color: rgba(255, 255, 255, .8);
    font-size: .94rem;
}

.sipd-intro-loader {
    width: 150px;
    height: 3px;
    margin: 30px auto 12px;
    overflow: hidden;
    border-radius: 9px;
    background: rgba(255, 255, 255, .2);
}

.sipd-intro-loader span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fff 0%, #a8e6bc 75%, #e9425a 100%);
    animation: sipd-intro-progress 1.45s ease-in-out infinite;
}

.sipd-intro-status {
    color: rgba(255, 255, 255, .7);
    font-size: .76rem;
    letter-spacing: .025em;
}

.sipd-intro-skip {
    margin-top: 25px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .07);
    font: inherit;
    font-size: .78rem;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.sipd-intro-skip:hover,
.sipd-intro-skip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .65);
    background: rgba(255, 255, 255, .15);
}

.sipd-intro-footer {
    position: absolute;
    bottom: max(26px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .55);
    font-size: .66rem;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.sipd-intro-footer span {
    width: 28px;
    height: 1px;
    background: rgba(255, 255, 255, .28);
}

@keyframes sipd-intro-arrive {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sipd-intro-logo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes sipd-intro-logo-reveal {
    to { clip-path: inset(0 0 0 0 round 20px); }
}

@keyframes sipd-intro-letter {
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes sipd-intro-sheen {
    to { transform: translateX(130%); }
}

@keyframes sipd-intro-progress {
    from { transform: translateX(-110%); }
    to { transform: translateX(370%); }
}

@keyframes sipd-intro-orbit {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .sipd-intro-card { padding-inline: 12px; }
    .sipd-intro-emblem { width: 86vw; height: 145px; margin-bottom: 30px; }
    .sipd-intro-emblem img { padding: 16px; }
    .sipd-intro-glow { width: 94vw; }
    .sipd-intro-glow-two { width: 130vw; }
}

@media (prefers-reduced-motion: reduce) {
    .sipd-intro *,
    .sipd-intro::before,
    .sipd-intro::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .sipd-intro-emblem img {
        animation-delay: 0s !important;
        clip-path: none;
    }

    .sipd-intro-emblem::after {
        display: none;
    }

    .sipd-intro-title-letters span {
        animation-delay: 0s !important;
        opacity: 1;
        transform: none;
    }
}

.sipd-intro {
    background: var(--cth-sidebar-2);
}

.sipd-intro-video-wrap {
    display: grid;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    place-items: center;
}

.sipd-intro-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    background: var(--cth-sidebar-2);
    box-shadow: none;
    transform: translateY(-5vh) scale(1.35);
}

.sipd-intro-skip {
    position: absolute;
    z-index: 1;
    top: max(20px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
    margin: 0;
    background: rgba(0, 36, 22, .72);
    backdrop-filter: blur(8px);
}

@media (max-width: 480px) {
    .sipd-intro-video-wrap {
        padding: 0;
    }

    .sipd-intro-video {
        transform: translateY(-2vh) scale(1.2);
    }

    .sipd-intro-skip {
        top: max(14px, env(safe-area-inset-top));
        right: max(14px, env(safe-area-inset-right));
    }
}
