@font-face {
    font-family: 'Patria';
    src: url('Estilos Institucionales/tipografias/Patria_Regular.otf') format('opentype');
    font-weight: 400;
}

@font-face {
    font-family: 'Patria';
    src: url('Estilos Institucionales/tipografias/Patria_Bold.otf') format('opentype');
    font-weight: 700;
}

@font-face {
    font-family: 'Noto Sans Local';
    src: url('Estilos Institucionales/tipografias/NotoSans-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Noto Sans Local';
    src: url('Estilos Institucionales/tipografias/NotoSans-Bold.ttf') format('truetype');
    font-weight: 700;
}

:root {
    --gobmx-guinda: #9b2247;
    --gobmx-guinda-dark: #7a1a36;
    --gobmx-guinda-light: #fdf2f4;
    --gobmx-verde: #1e5b4f;
    --gobmx-verde-light: #f0f6f5;
    --gobmx-dorado: #a57f2c;
    --gobmx-dorado-light: #fdfaf4;
    
    --color-text-primary: #0f172a; /* Slate 900 for clean typography */
    --color-text-secondary: #475569; /* Slate 600 */
    --color-border: #e2e8f0; /* Slate 200 */
    
    --font-sans: 'Noto Sans Local', Arial, sans-serif;
    --font-heading: 'Patria', Georgia, serif;
    --page-bg: #f8fafc; /* Slate 50 background for clean, modern interface */
    --panel-border: #e2e8f0;
    --panel-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --field-shadow: none;
    
    --danger: #dc2626;
    --warning: #d97706;
    --success: #15803d;
    --ink-soft: #64748b;
    --surface-strong: #ffffff;
    --motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    background: var(--page-bg);
}

body {
    font-family: var(--font-sans);
    background: var(--page-bg);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.tracking-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.tracking-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tracking-preloader.is-error .tracking-preloader__spinner {
    border-top-color: #b42318;
    animation: none;
}

.tracking-preloader.is-error .tracking-preloader__title {
    color: #b42318;
}

.tracking-preloader__card {
    width: min(420px, 90vw);
    padding: 2rem 1.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-top: 4px solid #9b2247;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    text-align: center;
}

.tracking-preloader__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tracking-preloader__brand img {
    height: 38px;
    width: auto;
}

.tracking-preloader__brand span {
    width: 1px;
    height: 28px;
    background: rgba(15, 23, 42, 0.18);
}

.tracking-preloader__spinner {
    width: 52px;
    height: 52px;
    margin: 0.5rem auto 1rem;
    border: 4px solid rgba(155, 34, 71, 0.15);
    border-top-color: #9b2247;
    border-radius: 50%;
    animation: tracking-spin 0.85s linear infinite;
}

.tracking-preloader__title {
    margin: 0 0 0.35rem;
    color: #9b2247;
    font-family: var(--font-heading, Georgia), serif;
    font-size: 1.15rem;
    font-weight: 700;
}

.tracking-preloader__sub {
    margin: 0;
    color: #53617a;
    font-size: 0.88rem;
}

@keyframes tracking-spin {
    to { transform: rotate(360deg); }
}

/* Animations */
.animate-soft {
    animation-duration: 0.4s;
    animation-fill-mode: both;
    animation-timing-function: var(--motion-ease);
}

.animate-fade-in-up {
    animation-name: softFadeInUp;
}

.animate-delay-1 {
    animation-delay: 0.05s;
}

.animate-delay-2 {
    animation-delay: 0.1s;
}

@keyframes softFadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.shell {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

/* Page Header */
.page-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--color-border);
}

.page-header::after {
    content: '';
    display: block;
    height: 4px;
    background: var(--gobmx-guinda);
}

.page-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.brand-lockup__logo--gob {
    width: clamp(120px, 14vw, 150px);
    height: auto;
}

.brand-lockup__logo--sener {
    width: clamp(120px, 14vw, 150px);
    height: auto;
}

.brand-lockup__divider {
    width: 1px;
    height: 36px;
    background: var(--color-border);
}

.section-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gobmx-guinda);
}

.page-main {
    padding: 2.5rem 0 4rem;
}

.workspace-grid {
    display: block;
}

/* Form Card */
.form-card {
    background: var(--surface-strong);
    border: 1px solid var(--panel-border);
    box-shadow: var(--panel-shadow);
    border-radius: 12px;
    padding: 2rem;
}

.form-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.form-card__header h2 {
    margin: 0;
    color: var(--gobmx-guinda);
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3.5vw, 2.3rem);
    line-height: 1.15;
    font-weight: 700;
}

.form-card__institution {
    margin-top: 0.75rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 700;
}

.form-card__institution p {
    margin: 0;
}

/* Notice Banner */
.notice-banner {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-left-width: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.45;
}

.notice-banner--info {
    background: var(--gobmx-verde-light);
    color: var(--gobmx-verde);
    border-color: var(--gobmx-verde);
}

.notice-banner--warning {
    background: var(--gobmx-dorado-light);
    color: var(--warning);
    border-color: var(--gobmx-dorado);
}

.notice-banner--error {
    background: #fef2f2;
    color: var(--danger);
    border-color: var(--danger);
}

.notice-banner--success {
    background: #f0fdf4;
    color: var(--success);
    border-color: var(--success);
}

/* Progress Dashboard (Bento Grid) */
.progress-dashboard {
    margin-bottom: 2rem;
    padding: 0 0 2rem;
    overflow: hidden;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border-bottom: 1px solid var(--color-border);
}

.progress-dashboard__shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 2fr);
    gap: 2rem;
    padding: 0;
}

.progress-dashboard__side,
.progress-dashboard__main {
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.progress-dashboard__side {
    display: grid;
    align-content: start;
    gap: 1.25rem;
    border-right: 1px solid var(--color-border);
    padding-right: 2rem;
}

.progress-dashboard__main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.progress-dashboard__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.progress-dashboard__eyebrow {
    margin: 0 0 0.25rem;
    color: var(--gobmx-verde);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.progress-dashboard h3 {
    margin: 0;
    color: var(--gobmx-guinda);
    font-family: var(--font-heading);
    font-size: 1.35rem;
}

.progress-dashboard p {
    margin: 0.25rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.progress-dashboard__chart {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 120px;
    margin: 0.5rem 0;
}

.progress-donut-chart {
    position: relative;
    display: grid;
    place-items: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--gobmx-guinda);
}

.progress-donut-chart svg {
    width: 100%;
    height: 100%;
}

.progress-donut-chart__label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.progress-donut-chart__label strong {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    font-weight: 700;
}

.progress-donut-chart__label span {
    margin-top: 0.25rem;
    color: var(--color-text-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.progress-status-chart {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--page-bg);
}

.progress-status-row {
    display: grid;
    grid-template-columns: 90px 1fr 30px;
    align-items: center;
    gap: 1rem;
}

.progress-status-row__label {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.progress-status-row__track {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
}

.progress-status-row__track span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.progress-status-row strong {
    color: var(--color-text-primary);
    font-size: 0.85rem;
    text-align: right;
}

.progress-status-row--complete .progress-status-row__track span {
    background: var(--gobmx-verde);
}

.progress-status-row--progress .progress-status-row__track span {
    background: var(--gobmx-dorado);
}

.progress-status-row--issue .progress-status-row__track span {
    background: var(--danger);
}

.progress-status-row--pending .progress-status-row__track span {
    background: var(--color-text-secondary);
}

.progress-dashboard__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-dashboard__meta span {
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--page-bg);
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.progress-dashboard__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.progress-metric {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.progress-metric::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: var(--color-text-secondary);
}

.progress-metric--complete::after {
    background: var(--gobmx-verde);
}

.progress-metric--progress::after {
    background: var(--gobmx-dorado);
}

.progress-metric--issue::after {
    background: var(--danger);
}

.progress-metric--pending::after {
    background: var(--gobmx-guinda);
}

.progress-metric span,
.progress-metric small {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.progress-metric strong {
    display: block;
    margin: 0.25rem 0;
    color: var(--color-text-primary);
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 700;
}

.progress-metric--complete strong {
    color: var(--gobmx-verde);
}

.progress-metric--progress strong {
    color: var(--gobmx-dorado);
}

.progress-metric--issue strong {
    color: var(--danger);
}

.progress-metric--pending strong {
    color: var(--color-text-secondary);
}

.progress-dashboard__stages {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.stage-progress-card {
    position: relative;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
}

.stage-progress-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.stage-progress-card h4 {
    margin: 0;
    color: var(--color-text-primary);
    font-size: 0.85rem;
    font-weight: 700;
}

.stage-progress-card strong {
    color: var(--gobmx-guinda);
    font-size: 0.85rem;
}

.stage-progress-card__bar {
    overflow: hidden;
    height: 6px;
    margin-top: 0.75rem;
    border-radius: 999px;
    background: #e2e8f0;
}

.stage-progress-card__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gobmx-guinda);
}

.stage-progress-card p {
    margin-top: 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.progress-dashboard__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
}

.progress-dashboard__pending {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--gobmx-verde-light);
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.progress-dashboard__pending strong {
    color: var(--gobmx-verde);
    font-weight: 700;
}

.progress-dashboard__pending span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.4;
    color: var(--color-text-primary);
}

/* Stepper */
.stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.stepper__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 54px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--color-text-secondary);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.25s, background-color 0.25s, color 0.25s, transform 0.25s;
    animation: softFadeInUp 0.35s var(--motion-ease) both;
}

.stepper__item:nth-child(2) { animation-delay: 0.03s; }
.stepper__item:nth-child(3) { animation-delay: 0.06s; }
.stepper__item:nth-child(4) { animation-delay: 0.09s; }

.stepper__item:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    color: var(--color-text-primary);
}

.stepper__item span {
    display: inline-grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    transition: background-color 0.25s, color 0.25s;
}

.stepper__item.is-active {
    border-color: var(--gobmx-guinda);
    background: var(--gobmx-guinda-light);
    color: var(--gobmx-guinda);
}

.stepper__item.is-active span {
    background: var(--gobmx-guinda);
    color: #ffffff;
}

/* Form Sections */
.form-sections {
    display: grid;
    gap: 1.5rem;
}

.form-section[hidden],
.stepper__item[hidden],
.procedure-card[hidden],
#next-step-button[hidden],
#submit-button[hidden] {
    display: none !important;
}

.form-section {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.form-section:not([hidden]) {
    animation: softFadeInUp 0.35s var(--motion-ease) both;
}

.form-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.form-section__title {
    margin: 0;
    color: var(--gobmx-guinda);
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
}

.general-grid,
.procedure-grid,
.field-grid {
    display: grid;
    gap: 1.25rem;
}

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

.field,
.procedure-card {
    position: relative;
}

.field--full,
.procedure-card,
.field-grid .field--full {
    grid-column: 1 / -1;
}

.field__label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.field__required {
    color: var(--danger);
    font-weight: 700;
}

.field__control-wrap {
    position: relative;
}

.field__control,
.field__textarea,
.field__select {
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font: inherit;
    color: var(--color-text-primary);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field.is-prefilled .field__control,
.field.is-prefilled .field__textarea,
.field.is-prefilled .field__select,
.field__control[readonly] {
    background: var(--page-bg);
    border-color: var(--color-border);
    color: var(--color-text-secondary);
    box-shadow: none;
    cursor: default;
}

.field__edit-button {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--gobmx-guinda);
    border-radius: 4px;
    background: #ffffff;
    color: var(--gobmx-guinda);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.field.is-prefilled .field__edit-button:not([hidden]) {
    display: inline-flex;
}

.field__label .field__edit-button {
    margin-left: auto;
}

.field__edit-button:hover {
    background: var(--gobmx-guinda-light);
}

.field__textarea {
    min-height: 110px;
    resize: vertical;
}

.field__control:focus,
.field__textarea:focus,
.field__select:focus {
    outline: none;
    border-color: var(--gobmx-guinda);
    box-shadow: 0 0 0 3px rgba(155, 34, 71, 0.15);
}

.field__error {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--danger);
    min-height: 1.1rem;
    font-weight: 700;
}

.field.is-invalid .field__control,
.field.is-invalid .field__textarea,
.field.is-invalid .field__select {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.field.is-disabled {
    opacity: 0.6;
}

.field.is-disabled .field__control,
.field.is-disabled .field__textarea,
.field.is-disabled .field__select {
    background: var(--page-bg);
    box-shadow: none;
}

/* Procedure Cards */
.procedure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.procedure-card {
    overflow: hidden;
    padding: 1.25rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-border);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.procedure-card--complete {
    border-left-color: var(--gobmx-verde);
    border-color: var(--color-border);
}

.procedure-card--progress {
    border-left-color: var(--gobmx-dorado);
    border-color: var(--color-border);
}

.procedure-card--issue {
    border-left-color: var(--gobmx-guinda);
    border-color: var(--color-border);
}

.procedure-card--pending {
    border-left-color: var(--color-border);
}

.procedure-card:hover {
    border-color: var(--color-border);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transform: translateY(-2px);
}

.procedure-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.procedure-card__title {
    margin: 0;
    color: var(--gobmx-guinda);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.procedure-status-badge {
    flex: 0 0 auto;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--page-bg);
    color: var(--color-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.procedure-status-badge--complete {
    background: var(--gobmx-verde-light);
    border-color: transparent;
    color: var(--gobmx-verde);
}

.procedure-status-badge--progress {
    background: var(--gobmx-dorado-light);
    border-color: transparent;
    color: var(--warning);
}

.procedure-status-badge--issue {
    background: var(--gobmx-guinda-light);
    border-color: transparent;
    color: var(--gobmx-guinda);
}

.procedure-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.procedure-card__grid .field:last-child {
    grid-column: 1 / -1;
}

/* Actions and Buttons */
.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.form-actions__buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s, transform 0.2s, box-shadow 0.2s;
    border: none;
    min-width: 160px;
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: var(--gobmx-guinda);
    color: #ffffff;
}

.btn-primary:hover:not([disabled]) {
    background: var(--gobmx-guinda-dark);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--color-text-secondary);
}

.btn-secondary:hover:not([disabled]) {
    background: var(--page-bg);
    border-color: #94a3b8;
    color: var(--color-text-primary);
}

.dashboard-action {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--gobmx-guinda);
    border-radius: 4px;
    background: #ffffff;
    color: var(--gobmx-guinda);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s;
}

.dashboard-action:hover {
    background: var(--gobmx-guinda-light);
}

.dashboard-action--primary {
    background: var(--gobmx-guinda);
    color: #ffffff;
}

.dashboard-action--primary:hover {
    background: var(--gobmx-guinda-dark);
}

.progress-dashboard__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Report Panel & PDF slides */
.report-deck-panel {
    margin-top: 2.5rem;
}

.report-toolbar {
    max-width: 1280px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.report-toolbar h2 {
    margin: 0;
    color: var(--gobmx-guinda);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

.report-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.report-deck {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.report-slide {
    position: relative;
    overflow: hidden;
    width: 1280px;
    height: 720px;
    background: var(--page-bg);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.report-slide--summary {
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: #ffffff url('Estilos Institucionales/img/fondoppt.png') no-repeat center / cover;
}

.report-slide--stage {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    background: #ffffff url('Estilos Institucionales/img/fondoppt.png') no-repeat center / cover;
}

.report-slide--cover {
    display: grid;
    grid-template-rows: auto 1fr 14px;
    background: #6a172f;
    color: #ffffff;
}

.report-slide--cover h1 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.report-slide--cover p,
.report-slide--cover span {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.report-cover-bg,
.report-cover-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.report-cover-bg {
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 1;
}

.report-cover-overlay {
    z-index: 1;
    background: transparent; /* Transparent overlay so only the background PPT image is visible */
}

.report-slide__top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 56px;
    border-bottom: 4px solid var(--gobmx-dorado);
    background: #ffffff;
}

.report-slide__top img {
    height: 52px;
    width: auto;
}

.report-slide__top span {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

.report-slide__unit {
    margin-left: auto;
    color: var(--color-text-primary);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

.report-slide__body {
    position: relative;
    z-index: 2;
    padding: 40px 60px 60px 25%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.9rem;
}

.report-slide__eyebrow {
    margin: 0;
    color: var(--gobmx-dorado);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.report-slide h1,
.report-slide h2 {
    margin: 0;
    font-family: var(--font-heading);
}

.report-slide h1 {
    max-width: 900px;
    color: #ffffff;
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
}

.report-slide__body > p:not(.report-slide__eyebrow) {
    max-width: 800px;
    margin: 0;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.report-slide__body > p.report-slide__dg {
    max-width: 800px;
    border-left: 3px solid var(--gobmx-dorado);
    padding-left: 14px;
    margin-top: -6px; /* Group text closer to the previous paragraph while avoiding overlapping */
}

.report-slide__meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
    color: #ffffff;
    font-size: 0.9rem;
}

.report-slide__meta strong {
    font-size: 3rem;
    color: var(--gobmx-dorado);
    line-height: 1;
    font-weight: 700;
}

.report-slide__band {
    position: relative;
    z-index: 2;
    background: var(--gobmx-guinda);
    border-top: 4px solid var(--gobmx-dorado);
    height: 14px;
}

.report-slide__header {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1.2fr;
    align-items: center;
    gap: 1rem;
    padding: 14px 28px;
    border-bottom: 2px solid var(--gobmx-guinda);
    background: #ffffff;
}

.report-brand-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gobmx-guinda);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.report-brand-left::before {
    content: '';
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: var(--gobmx-guinda);
}

.report-ef-title {
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.report-ef-title::before,
.report-ef-title::after {
    content: '·';
    color: var(--gobmx-dorado);
    margin: 0 10px;
    font-size: 22px;
}

.report-logo-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.report-logo-right span {
    max-width: 200px;
    color: var(--color-text-secondary);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
}

.report-logo-right img {
    height: 34px;
    width: auto;
}

.report-narrative {
    padding: 14px 28px 6px;
    color: var(--color-text-primary);
    font-size: 13.5px;
    line-height: 1.5;
}

.report-narrative strong {
    color: var(--gobmx-guinda);
    font-weight: 700;
}

.report-kpi-grid,
.report-stage-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 6px 28px 8px;
}

.report-stage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-kpi {
    position: relative;
    overflow: hidden;
    min-height: 80px;
    padding: 10px 12px 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.report-kpi::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--gobmx-guinda);
}

.report-kpi:nth-child(2)::before {
    background: var(--gobmx-verde);
}

.report-kpi:nth-child(3)::before {
    background: var(--gobmx-dorado);
}

.report-kpi:nth-child(4)::before {
    background: var(--color-text-secondary);
}

.report-kpi span,
.report-kpi small {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.report-kpi strong {
    display: block;
    margin: 0.2rem 0;
    color: var(--gobmx-guinda);
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
}

/* === Enhanced Report: Summary Layout === */
.report-summary-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    padding: 8px 28px 12px;
    flex: 1;
    min-height: 0;
}

.report-summary-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.report-donut-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 180px;
    height: 180px;
}

.report-donut-wrap svg {
    position: absolute;
    inset: 0;
}

.report-donut-label {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1;
}

.report-donut-label strong {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--gobmx-guinda);
}

.report-donut-label span {
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
}

.report-stacked-bar {
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #e2e8f0;
}

.report-stacked-bar span {
    display: block;
    height: 100%;
    min-width: 4px;
}

.report-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
}

.report-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.report-legend-item i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.report-kpi-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}

.report-kpi-row .report-kpi {
    min-height: 56px;
    padding: 8px 10px 8px 14px;
}

.report-kpi-row .report-kpi strong {
    font-size: 1.4rem;
}

.report-summary-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-section-title {
    margin: 0;
    color: var(--gobmx-guinda);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--gobmx-guinda);
}

.report-stage-list {
    display: grid;
    align-content: start;
    gap: 0.5rem;
}

.report-stage-row {
    display: grid;
    grid-template-columns: 200px 1fr 50px 40px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
}

.report-stage-row small {
    color: var(--color-text-secondary);
    font-size: 0.72rem;
    text-align: right;
}

.report-stage-row__bar,
.report-stage-row div:not(.report-stage-row__bar) {
    overflow: hidden;
    height: 10px;
    border-radius: 4px;
    background: #e2e8f0;
}

.report-stage-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gobmx-guinda);
}

.report-narrative--small {
    font-size: 0.78rem;
    line-height: 1.5;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--color-text-secondary);
}

.report-narrative--small strong {
    color: var(--gobmx-guinda);
    font-weight: 700;
}

/* === Enhanced Report: Stage Hero === */
.report-stage-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 28px;
    border-bottom: 1px solid var(--color-border);
}

.report-stage-arc {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
}

.report-stage-arc svg {
    position: absolute;
    inset: 0;
}

.report-stage-arc__label {
    position: relative;
    z-index: 1;
    text-align: center;
}

.report-stage-arc__label strong {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gobmx-guinda);
}

.report-stage-stats {
    display: flex;
    gap: 12px;
}

.report-stage-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #ffffff;
    min-width: 80px;
}

.report-stage-stat strong {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-text-primary);
}

.report-stage-stat span {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.report-stage-stat--complete strong { color: var(--gobmx-verde); }
.report-stage-stat--progress strong { color: var(--gobmx-dorado); }
.report-stage-stat--issue strong { color: var(--danger, #dc2626); }
.report-stage-stat--pending strong { color: var(--color-text-secondary); }

.report-stage-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-stage-bar-wrap small {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

/* === Enhanced Report: Procedure Cards === */
.report-procedure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px 28px;
    align-content: start;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.report-proc-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #ffffff;
}

.report-proc-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-proc-card__dot {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-text-secondary);
}

.report-proc-card--complete .report-proc-card__dot { background: var(--gobmx-verde); }
.report-proc-card--progress .report-proc-card__dot { background: var(--gobmx-dorado); }
.report-proc-card--issue .report-proc-card__dot { background: var(--danger, #dc2626); }

.report-proc-card__header strong {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.report-proc-card__status {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gobmx-guinda);
    margin-left: 18px;
}

.report-proc-card__note {
    margin: 2px 0 0;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--color-text-secondary);
    margin-left: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Legacy table (kept for backwards compatibility) */
.report-procedure-table {
    display: grid;
    align-content: start;
    padding: 4px 28px 20px;
    min-height: 0;
}

.report-procedure-row {
    display: grid;
    grid-template-columns: 240px 120px 1fr;
    gap: 1rem;
    align-items: start;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    border-left: 4px solid var(--color-border);
    background: #ffffff;
    font-size: 0.8rem;
}

.report-procedure-row--complete { border-left-color: var(--gobmx-verde); }
.report-procedure-row--progress { border-left-color: var(--gobmx-dorado); }
.report-procedure-row--issue { border-left-color: var(--gobmx-guinda); }
.report-procedure-row strong { color: var(--color-text-primary); }
.report-procedure-row span { color: var(--gobmx-guinda); font-weight: 700; }
.report-procedure-row p { margin: 0; color: var(--color-text-secondary); line-height: 1.4; }

.report-slide__footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 8px;
    background: var(--gobmx-guinda);
    border-top: 2px solid var(--gobmx-dorado);
}

/* Page Footer */
.page-footer {
    border-top: 1px solid var(--color-border);
    background: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 1fr;
    gap: 3rem;
    padding: 3rem 0 3.5rem;
}

.footer-logo {
    width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
}

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

.footer-list li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 0.75rem;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.footer-icon,
.footer-heading__icon {
    color: var(--gobmx-guinda);
}

.footer-icon svg,
.footer-heading__icon svg,
.footer-link svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.footer-heading__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.footer-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.footer-heading__icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--gobmx-guinda-light);
    border: 1px solid rgba(155, 34, 71, 0.1);
}

.footer-heading h2,
.footer-gob h3 {
    margin: 0;
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
}

.footer-gob p {
    margin: 0 0 1rem;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.footer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
}

.footer-link span {
    color: var(--gobmx-guinda);
    transition: transform 0.2s;
}

.footer-link:hover span {
    transform: translateX(3px);
}

.footer-gob h3 {
    margin-top: 1.5rem;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.footer-social a {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gobmx-guinda-light);
    border: 1px solid rgba(155, 34, 71, 0.1);
    color: var(--gobmx-guinda);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    background: var(--gobmx-guinda);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Reduced Motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
    .stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .progress-dashboard__shell {
        grid-template-columns: 1fr;
    }

    .progress-dashboard__side {
        border-left: none;
        border-top: 4px solid var(--gobmx-guinda);
    }

    .progress-dashboard__metrics,
    .progress-dashboard__stages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .procedure-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-gob {
        grid-column: 1 / -1;
    }
    
    .report-deck {
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 820px) {
    .general-grid,
    .procedure-grid,
    .procedure-card__grid,
    .field-grid,
    .stepper {
        grid-template-columns: 1fr;
    }

    .page-header__inner,
    .form-card__header,
    .progress-dashboard__header,
    .form-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .progress-dashboard__chart {
        width: 100%;
        min-height: 120px;
    }

    .progress-status-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .progress-status-row strong {
        text-align: left;
    }

    .progress-dashboard__metrics,
    .progress-dashboard__stages {
        grid-template-columns: 1fr;
    }

    .progress-dashboard__footer,
    .progress-dashboard__pending {
        align-items: flex-start;
        flex-direction: column;
    }

    .progress-dashboard__pending span {
        white-space: normal;
    }

    .report-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-actions__buttons,
    .btn {
        width: 100%;
    }

    .btn {
        min-width: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-gob {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(100% - 1rem, 100%);
    }

    .page-main {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .form-card,
    .form-section,
    .procedure-card {
        border-radius: 8px;
    }

    .brand-lockup {
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .brand-lockup__divider {
        height: 28px;
    }

    .brand-lockup__logo--gob,
    .brand-lockup__logo--sener {
        width: min(35vw, 110px);
    }

    .form-card {
        padding: 1.25rem;
    }

    .form-section,
    .procedure-card {
        padding: 1rem;
    }

    .form-card__header h2 {
        font-size: 1.5rem;
    }

    .form-card__institution {
        font-size: 0.8rem;
    }

    .stepper__item {
        min-height: 48px;
        padding: 0.5rem 0.75rem;
    }
}

@media print {
    @page {
        size: 13.333in 7.5in;
        margin: 0;
    }

    html,
    body {
        width: 13.333in;
        margin: 0;
        padding: 0;
        background: #ffffff;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .page-header,
    .form-card,
    .page-footer,
    .report-toolbar {
        display: none !important;
    }

    .page-main,
    .shell,
    .workspace-grid,
    .report-deck-panel,
    .report-deck {
        display: block !important;
        width: 13.333in;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .report-deck-panel[hidden] {
        display: none !important;
    }

    .report-slide {
        width: 13.333in;
        height: 7.5in;
        box-shadow: none;
        break-after: page;
        page-break-after: always;
    }

    .report-slide:last-child {
        break-after: auto;
        page-break-after: auto;
    }
}
