:root {
    --color-primario: #151a47;
    --color-secundario: #165b7a;
    --color-acento: #d1d12a;
    --color-cyan: #00bcc2;
    --color-fondo: #f4f5f7;
    --color-superficie: #ffffff;
    --color-texto: #151a47;
    --color-texto-claro: #e0e1e0;
    --color-error: #dc2626;
    --color-exito: #16a34a;
    --splash-bg: #165b7a;
    --radius: 0.875rem;
    --shadow: 0 10px 30px rgba(21, 26, 71, 0.08);
    font-family: Montserrat, system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--color-fondo);
    color: var(--color-texto);
}

body {
    line-height: 1.5;
}

.app-shell {
    min-height: 100dvh;
}

.noscript {
    padding: 2rem;
    text-align: center;
}

.splash {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
        linear-gradient(180deg, color-mix(in srgb, var(--splash-bg) 88%, #ffffff 12%), var(--splash-bg));
    color: var(--color-texto-claro);
    text-align: center;
    gap: 1.25rem;
}

.splash__media {
    width: min(240px, 70vw);
    animation: splash-rise 0.9s ease-out both;
}

.splash__logo {
    width: min(260px, 80vw);
    animation: splash-rise 0.9s ease-out 0.15s both;
}

.splash__tagline {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    animation: splash-rise 0.9s ease-out 0.3s both;
}

@keyframes splash-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

.page--wide {
    max-width: 960px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.page-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn--back {
    padding: 0.5rem 0.85rem;
    font-size: 0.8125rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: var(--color-superficie);
    color: var(--color-secundario);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    color: #64748b;
}

.breadcrumbs a {
    color: var(--color-secundario);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs__sep {
    color: #94a3b8;
}

.breadcrumbs__current {
    color: var(--color-texto);
    font-weight: 600;
}

.detail-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.detail-section__title {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-secundario);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-section--assignment {
    background: #f8fafc;
    margin-inline: -1.25rem;
    margin-bottom: -1.25rem;
    padding: 1rem 1.25rem 1.25rem;
    border-radius: 0 0 var(--radius) var(--radius);
    border-top: 1px solid #e2e8f0;
}

.detail-layout {
    display: grid;
    gap: 1rem;
}

.detail-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.detail-hero__date {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.82);
}

.detail-grid--panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid__full {
    grid-column: 1 / -1;
}

.detail-panel--assignment {
    background: color-mix(in srgb, var(--color-superficie) 88%, var(--color-secundario) 12%);
    border: 1px solid rgba(22, 91, 122, 0.12);
}

.evidence-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.evidence-grid__item {
    margin: 0;
}

.evidence-grid__item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.evidence-grid__item figcaption {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
}

@media (min-width: 768px) {
    .detail-grid--panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.detail-muted {
    color: #64748b;
    font-style: italic;
    font-weight: 400;
}

.caso-list__assignment {
    font-size: 0.75rem;
    color: #475569;
    margin-top: 0.35rem;
}

.page-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header__brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.page-header__brand h1 {
    margin: 0;
    font-size: 1.125rem;
}

.page-header__brand p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--color-secundario);
}

.card {
    background: var(--color-superficie);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.card + .card {
    margin-top: 1rem;
}

.stack {
    display: grid;
    gap: 1rem;
}

.field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.625rem;
    padding: 0.65rem 0.75rem;
    font: inherit;
    background: #fff;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field small {
    display: block;
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.75rem;
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.25rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn--primary {
    background: var(--color-primario);
    color: var(--color-texto-claro);
}

.btn--secondary {
    background: var(--color-secundario);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    color: var(--color-secundario);
    padding-inline: 0.5rem;
}

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

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.alert {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.alert--error {
    background: #fef2f2;
    color: var(--color-error);
}

.alert--success {
    background: #f0fdf4;
    color: var(--color-exito);
}

.hero-actions {
    display: grid;
    gap: 0.75rem;
}

.home-hero,
.page-hero {
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: calc(var(--radius) + 0.25rem);
    background:
        radial-gradient(circle at top right, rgba(0, 188, 194, 0.18), transparent 42%),
        linear-gradient(135deg, color-mix(in srgb, var(--color-primario) 92%, #000 8%), var(--color-secundario));
    color: #fff;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.home-hero__eyebrow,
.page-hero__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.home-hero__title,
.page-hero__title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.2;
}

.home-hero__text,
.page-hero__text {
    margin: 0.5rem 0 0;
    max-width: 38rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.9375rem;
}

.home-hero__actions,
.page-hero__actions {
    display: grid;
    gap: 0.75rem;
}

.page-hero .btn--primary {
    background: #ffffff;
    color: var(--color-primario);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.page-hero .btn--primary:hover:not(:disabled) {
    background: #f8fafc;
}

.page-hero .btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.92);
}

.page-hero .btn--secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
}

.home-section,
.page-section {
    margin-bottom: 1rem;
}

.home-section__head,
.page-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.home-section__title,
.page-section__title {
    margin: 0;
    font-size: 1rem;
    color: var(--color-primario);
}

.home-section__link,
.page-section__link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-secundario);
    text-decoration: none;
}

.home-section__link:hover,
.page-section__link:hover {
    text-decoration: underline;
}

.page-section__meta {
    font-size: 0.8125rem;
    color: #64748b;
}

.stats-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem;
    border-radius: 1.125rem;
    background: color-mix(in srgb, var(--color-superficie) 88%, var(--color-secundario) 12%);
    border: 1px solid rgba(22, 91, 122, 0.12);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(21, 26, 71, 0.12);
}

.stat-card--highlight {
    background: color-mix(in srgb, #fef2f2 72%, var(--color-superficie) 28%);
    border-color: rgba(220, 38, 38, 0.18);
}

.stat-card--highlight .stat-card__value {
    color: var(--color-error);
}

.stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.875rem;
    background: color-mix(in srgb, var(--color-primario) 12%, #fff 88%);
    color: var(--color-primario);
    flex-shrink: 0;
}

.stat-card__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: currentColor;
}

.stat-card__body {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.stat-card__label {
    font-size: 0.8125rem;
    color: #475569;
}

.stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-primario);
}

.stat-card__chev {
    font-size: 1.5rem;
    line-height: 1;
    color: #94a3b8;
}

.caso-list--compact {
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .home-hero,
    .page-hero {
        grid-template-columns: 1.4fr 0.9fr;
        align-items: center;
    }

    .home-hero__actions,
    .page-hero__actions {
        align-self: stretch;
        align-content: center;
    }
}

.form-section__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-secundario);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid--coords {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid .field:only-child,
    .form-section > .field {
        grid-column: 1 / -1;
    }
}

.folio-success {
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.9375rem;
    text-align: center;
}

.folio-success strong {
    color: var(--color-secundario);
    font-size: 1.05rem;
}

.caso-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.caso-list__item {
    display: block;
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    background: var(--color-superficie);
    box-shadow: var(--shadow);
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(22, 91, 122, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.caso-list__item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(21, 26, 71, 0.12);
}

.caso-list__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.caso-list__folio {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-primario);
}

.caso-list__meta--muted {
    color: #94a3b8;
}

.caso-list__meta {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.detail-grid {
    display: grid;
    gap: 0.75rem;
}

.detail-grid dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.detail-grid dd {
    margin: 0.15rem 0 0;
    font-weight: 500;
}

.legal-doc h2 {
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
}

.legal-doc p {
    margin: 0 0 0.75rem;
}

.checkbox-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.8125rem;
}

.checkbox-row input {
    margin-top: 0.2rem;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
}
