/* =============================================================
   Universidad Intercultural Maya de Quintana Roo Design System
   Archivo: resources/css/design-system.css
   Descripcion: Tokens y componentes base reutilizables para SIADMIN
                y sistemas institucionales relacionados.
   ============================================================= */

/* Alpine.js: ocultar elementos con x-cloak hasta que Alpine los inicialice */
[x-cloak] { display: none !important; }

:root {
    /* Paleta institucional */
    --ds-color-primary: #002F22;
    --ds-color-primary-hover: #001F17;
    --ds-color-primary-active: #001710;
    --ds-color-primary-soft: #E8F0EE;
    --ds-color-primary-subtle: #F3F8F6;
    --ds-color-primary-border: #C9DAD4;
    --ds-color-accent-gold: #B9975B;
    --ds-color-accent-gold-hover: #9B7F44;
    --ds-color-accent-gold-soft: #F7F1E7;

    /* Superficies */
    --ds-color-page: #F5F7FA;
    --ds-color-surface: #FFFFFF;
    --ds-color-surface-muted: #F9FAFB;
    --ds-color-surface-soft: #F3F4F6;
    --ds-color-overlay: rgba(17, 24, 39, 0.45);

    /* Texto */
    --ds-color-text: #111827;
    --ds-color-text-secondary: #374151;
    --ds-color-text-muted: #6B7280;
    --ds-color-text-subtle: #9CA3AF;
    --ds-color-text-inverse: #FFFFFF;

    /* Estados */
    --ds-color-success: #167A4A;
    --ds-color-success-soft: #E9F6EF;
    --ds-color-success-border: #BFE7D0;
    --ds-color-warning: #A16207;
    --ds-color-warning-soft: #FEF6E7;
    --ds-color-warning-border: #F8DEA8;
    --ds-color-danger: #B42318;
    --ds-color-danger-soft: #FEF3F2;
    --ds-color-danger-border: #F8C9C4;
    --ds-color-info: #175CD3;
    --ds-color-info-soft: #EFF6FF;
    --ds-color-info-border: #C7D7FE;

    /* Bordes */
    --ds-color-border: #E5E7EB;
    --ds-color-border-soft: #EEF0F3;
    --ds-color-border-strong: #D0D5DD;

    /* Tipografia */
    --ds-font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --ds-font-size-xs: 0.75rem;
    --ds-font-size-sm: 0.8125rem;
    --ds-font-size-md: 0.9375rem;
    --ds-font-size-lg: 1.125rem;
    --ds-font-size-xl: 1.375rem;
    --ds-font-size-2xl: 1.75rem;
    --ds-font-size-3xl: 2.25rem;
    --ds-line-height-tight: 1.2;
    --ds-line-height-normal: 1.5;
    --ds-line-height-relaxed: 1.65;
    --ds-font-weight-regular: 400;
    --ds-font-weight-medium: 500;
    --ds-font-weight-semibold: 600;
    --ds-font-weight-bold: 700;

    /* Radios */
    --ds-radius-xs: 6px;
    --ds-radius-sm: 8px;
    --ds-radius-md: 10px;
    --ds-radius-lg: 12px;
    --ds-radius-xl: 16px;
    --ds-radius-pill: 999px;

    /* Sombras */
    --ds-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --ds-shadow-sm: 0 4px 10px rgba(16, 24, 40, 0.06);
    --ds-shadow-md: 0 10px 24px rgba(16, 24, 40, 0.08);
    --ds-shadow-lg: 0 18px 40px rgba(16, 24, 40, 0.10);
    --ds-shadow-focus: 0 0 0 3px rgba(0, 47, 34, 0.12);

    /* Espaciados */
    --ds-space-1: 0.25rem;
    --ds-space-2: 0.5rem;
    --ds-space-3: 0.75rem;
    --ds-space-4: 1rem;
    --ds-space-5: 1.25rem;
    --ds-space-6: 1.5rem;
    --ds-space-8: 2rem;
    --ds-space-10: 2.5rem;
    --ds-space-12: 3rem;

    /* Transiciones */
    --ds-transition-fast: 120ms ease;
    --ds-transition-base: 180ms ease;
    --ds-transition-slow: 240ms ease;

    /* Compatibilidad SIADMIN/Bootstrap */
    --color-primary: var(--ds-color-primary);
    --color-primary-dark: var(--ds-color-primary-hover);
    --color-primary-light: var(--ds-color-primary-soft);
    --color-primary-muted: var(--ds-color-primary-soft);
    --color-primary-50: var(--ds-color-primary-soft);
    --color-primary-100: var(--ds-color-primary-border);
    --color-primary-200: #A8C8BD;
    --color-primary-300: #6E9E8E;
    --color-primary-400: #2D6654;
    --color-primary-500: var(--ds-color-primary);
    --color-primary-600: var(--ds-color-primary-hover);
    --color-primary-700: var(--ds-color-primary);
    --color-primary-800: var(--ds-color-primary-hover);
    --color-primary-900: var(--ds-color-primary-active);
    --color-secondary: var(--ds-color-accent-gold);
    --color-secondary-light: #D8C28B;
    --color-secondary-dark: var(--ds-color-accent-gold-hover);
    --color-bg: var(--ds-color-page);
    --color-card-bg: var(--ds-color-surface);
    --color-white: var(--ds-color-surface);
    --color-border: var(--ds-color-border);
    --color-border-light: var(--ds-color-border-soft);
    --color-text: var(--ds-color-text);
    --color-text-muted: var(--ds-color-text-muted);
    --color-text-subtle: var(--ds-color-text-subtle);
    --color-text-inverse: var(--ds-color-text-inverse);
    --color-success: var(--ds-color-success);
    --color-success-bg: var(--ds-color-success-soft);
    --color-warning: var(--ds-color-warning);
    --color-warning-bg: var(--ds-color-warning-soft);
    --color-danger: var(--ds-color-danger);
    --color-danger-bg: var(--ds-color-danger-soft);
    --color-info: var(--ds-color-info);
    --color-info-bg: var(--ds-color-info-soft);
    --font-base: var(--ds-font-family);
    --radius-sm: var(--ds-radius-sm);
    --radius-md: var(--ds-radius-md);
    --radius-lg: var(--ds-radius-lg);
    --shadow-dropdown: var(--ds-shadow-md);
    --transition-base: var(--ds-transition-base);

    --bs-primary: var(--ds-color-primary);
    --bs-primary-rgb: 0, 47, 34;
    --bs-secondary: var(--ds-color-accent-gold);
    --bs-secondary-rgb: 185, 151, 91;
    --bs-success: var(--ds-color-success);
    --bs-success-rgb: 22, 122, 74;
    --bs-warning: var(--ds-color-warning);
    --bs-warning-rgb: 161, 98, 7;
    --bs-danger: var(--ds-color-danger);
    --bs-danger-rgb: 180, 35, 24;
    --bs-info: var(--ds-color-info);
    --bs-info-rgb: 23, 92, 211;
    --bs-body-bg: var(--ds-color-page);
    --bs-body-color: var(--ds-color-text);
    --bs-border-color: var(--ds-color-border);
    --bs-link-color: var(--ds-color-primary);
    --bs-link-hover-color: var(--ds-color-primary-hover);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
    background: var(--ds-color-page);
    color: var(--ds-color-text);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-md);
    line-height: var(--ds-line-height-normal);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--ds-color-primary); }
a:hover { color: var(--ds-color-primary-hover); }
button, input, textarea, select { font-family: var(--ds-font-family); }

.page-title {
    color: var(--ds-color-text);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-2xl);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-tight);
    margin: 0;
}
.page-subtitle {
    color: var(--ds-color-text-muted);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-md);
    line-height: var(--ds-line-height-relaxed);
    margin: var(--ds-space-2) 0 0;
}
.section-title {
    color: var(--ds-color-text);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-lg);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-tight);
    margin: 0;
}
.card-title {
    color: var(--ds-color-text);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-md);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-normal);
    margin: 0 0 var(--ds-space-3);
}
.card-description {
    color: var(--ds-color-text-muted);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-sm);
    line-height: var(--ds-line-height-relaxed);
    margin: var(--ds-space-2) 0 0;
}

.table-title {
    color: var(--ds-color-text);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-lg);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-tight);
    margin: 0;
}
.kpi-number {
    color: var(--ds-color-primary);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-3xl);
    font-weight: var(--ds-font-weight-bold);
    line-height: 1;
    margin: 0;
}
.kpi-label {
    color: var(--ds-color-text-muted);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-medium);
    line-height: var(--ds-line-height-normal);
    margin: var(--ds-space-2) 0 0;
}

.ds-page-shell {
    background: var(--ds-color-page);
    color: var(--ds-color-text);
    font-family: var(--ds-font-family);
    min-height: 100%;
    padding: var(--ds-space-8);
}
.ds-section { display: block; margin-bottom: var(--ds-space-8); }
.ds-card,
.card,
.table-card,
.form-card {
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    box-shadow: var(--ds-shadow-xs);
    color: var(--ds-color-text);
}
.ds-card { padding: var(--ds-space-6); }
.card { margin-bottom: var(--ds-space-5); }
.card-body { padding: var(--ds-space-5); }
.ds-card-hover,
.kpi-card-modern,
.module-card {
    transition: border-color var(--ds-transition-base), box-shadow var(--ds-transition-base), transform var(--ds-transition-base);
}
.ds-card-hover:hover,
.kpi-card-modern:hover {
    border-color: var(--ds-color-border-strong);
    box-shadow: var(--ds-shadow-md);
    transform: translateY(-2px);
}

.ds-page-header {
    padding: var(--ds-space-5) var(--ds-space-6);
    margin-bottom: var(--ds-space-5);
}
.ds-page-header-title {
    color: var(--ds-color-primary) !important;
    font-size: var(--ds-font-size-xl);
    font-weight: var(--ds-font-weight-bold);
}
.page-header {
    border-bottom: 1px solid var(--ds-color-border);
    margin-bottom: var(--ds-space-6);
    padding-bottom: var(--ds-space-4);
}

.ds-badge,
.badge {
    align-items: center;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-pill);
    display: inline-flex;
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-semibold);
    gap: var(--ds-space-2);
    line-height: 1;
    min-height: 24px;
    padding: 0 var(--ds-space-3);
    white-space: nowrap;
}
.ds-badge-primary,
.badge-green {
    background: var(--ds-color-primary-soft);
    border-color: var(--ds-color-primary-border);
    color: var(--ds-color-primary);
}
.ds-badge-success,
.badge-estatus-activo { background: var(--ds-color-success-soft); border-color: var(--ds-color-success-border); color: var(--ds-color-success); }
.ds-badge-warning,
.badge-estatus-vacaciones { background: var(--ds-color-warning-soft); border-color: var(--ds-color-warning-border); color: var(--ds-color-warning); }
.ds-badge-danger,
.badge-estatus-baja { background: var(--ds-color-danger-soft); border-color: var(--ds-color-danger-border); color: var(--ds-color-danger); }
.ds-badge-info,
.badge-estatus-licencia { background: var(--ds-color-info-soft); border-color: var(--ds-color-info-border); color: var(--ds-color-info); }
.ds-badge-muted,
.badge-estatus-inactivo { background: var(--ds-color-surface-soft); border-color: var(--ds-color-border); color: var(--ds-color-text-muted); }
.badge-blue { background: var(--ds-color-info-soft); color: var(--ds-color-info); border-color: var(--ds-color-info-border); }
.badge-yellow { background: var(--ds-color-warning-soft); color: var(--ds-color-warning); border-color: var(--ds-color-warning-border); }
.badge-red { background: var(--ds-color-danger-soft); color: var(--ds-color-danger); border-color: var(--ds-color-danger-border); }
.badge-purple { background: #F3F0FF; color: #6941C6; border-color: #D9D6FE; }
.badge-gray { background: var(--ds-color-surface-soft); color: var(--ds-color-text-muted); border-color: var(--ds-color-border); }

.ds-button-primary,
.ds-button-outline,
.ds-button-soft,
.btn {
    align-items: center;
    border-radius: var(--ds-radius-sm);
    display: inline-flex;
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-semibold);
    gap: var(--ds-space-2);
    justify-content: center;
    min-height: 38px;
    padding: 0 var(--ds-space-4);
    text-decoration: none;
    transition: background var(--ds-transition-base), border-color var(--ds-transition-base), box-shadow var(--ds-transition-base), color var(--ds-transition-base), transform var(--ds-transition-base);
}
.ds-button-primary,
.btn-primary,
.siadmin-btn-primary {
    background: var(--ds-color-primary) !important;
    border-color: var(--ds-color-primary) !important;
    color: var(--ds-color-text-inverse) !important;
}
.ds-button-primary:hover,
.btn-primary:hover,
.btn-primary:focus,
.siadmin-btn-primary:hover {
    background: var(--ds-color-primary-hover) !important;
    border-color: var(--ds-color-primary-hover) !important;
    color: var(--ds-color-text-inverse) !important;
    transform: translateY(-1px);
}
.ds-button-outline,
.btn-outline,
.btn-outline-primary {
    background: transparent !important;
    border: 1px solid var(--ds-color-border-strong) !important;
    color: var(--ds-color-primary) !important;
}
.ds-button-outline:hover,
.btn-outline:hover,
.btn-outline-primary:hover {
    background: var(--ds-color-primary-subtle) !important;
    border-color: rgba(0, 47, 34, 0.28) !important;
    color: var(--ds-color-primary) !important;
}
.ds-button-soft {
    background: var(--ds-color-primary-soft);
    border: 1px solid transparent;
    color: var(--ds-color-primary);
}
.ds-button-soft:hover {
    background: var(--ds-color-primary-subtle);
    border-color: rgba(0, 47, 34, 0.14);
    color: var(--ds-color-primary);
}
.btn-secondary {
    background: var(--ds-color-accent-gold) !important;
    border-color: var(--ds-color-accent-gold) !important;
    color: var(--ds-color-primary-active) !important;
}
.btn-secondary:hover {
    background: var(--ds-color-accent-gold-hover) !important;
    border-color: var(--ds-color-accent-gold-hover) !important;
    color: var(--ds-color-text-inverse) !important;
}
.btn-success,
.btn-success:focus {
    background: var(--ds-color-success) !important;
    border-color: var(--ds-color-success) !important;
    color: var(--ds-color-text-inverse) !important;
}
.btn-success:hover {
    background: var(--ds-color-success) !important;
    border-color: var(--ds-color-success) !important;
    color: var(--ds-color-text-inverse) !important;
    filter: brightness(0.92);
    transform: translateY(-1px);
}
.ds-button-primary:focus-visible,
.ds-button-outline:focus-visible,
.ds-button-soft:focus-visible,
.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: var(--ds-shadow-focus) !important;
    outline: none;
}

.ds-empty-state {
    align-items: center;
    background: var(--ds-color-surface);
    border: 1px dashed var(--ds-color-border-strong);
    border-radius: var(--ds-radius-lg);
    color: var(--ds-color-text-muted);
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-3);
    justify-content: center;
    min-height: 180px;
    padding: var(--ds-space-8);
    text-align: center;
}
.ds-empty-row td { color: var(--ds-color-text-muted); padding: var(--ds-space-10) var(--ds-space-4) !important; text-align: center; }
.ds-empty-icon { color: #A8C8BD; font-size: 2rem; }

.ds-table,
.table {
    --bs-table-bg: var(--ds-color-surface);
    --bs-table-color: var(--ds-color-text-secondary);
    --bs-table-border-color: var(--ds-color-border-soft);
    color: var(--ds-color-text-secondary);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-sm);
    margin-bottom: 0;
}
.ds-table th,
.ds-table td,
.table th,
.table td {
    border-color: var(--ds-color-border-soft);
    padding: var(--ds-space-4);
    vertical-align: middle;
}
.ds-table th,
.table thead th,
.table thead.table-light th {
    background: var(--ds-color-surface-muted) !important;
    color: var(--ds-color-text-secondary);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.table-hover tbody tr:hover td,
.ds-table tbody tr:hover td { background: var(--ds-color-primary-subtle); }

.ds-form-section {
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    display: grid;
    gap: var(--ds-space-5);
    padding: var(--ds-space-6);
}
.form-label,
label {
    color: var(--ds-color-text-secondary);
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-semibold);
}
.form-control,
.form-select,
input,
textarea,
select {
    border-color: var(--ds-color-border);
    border-radius: var(--ds-radius-sm);
    color: var(--ds-color-text);
    font-size: var(--ds-font-size-sm);
}
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--ds-color-primary) !important;
    box-shadow: var(--ds-shadow-focus) !important;
}
.form-check-input:checked {
    background-color: var(--ds-color-primary);
    border-color: var(--ds-color-primary);
}

.ds-muted { color: var(--ds-color-text-muted) !important; }
.ds-divider { background: var(--ds-color-border-soft); border: 0; height: 1px; margin: var(--ds-space-6) 0; }
.ds-icon-box {
    align-items: center;
    background: var(--ds-color-primary-soft);
    border: 1px solid rgba(0, 47, 34, 0.12);
    border-radius: var(--ds-radius-md);
    color: var(--ds-color-primary);
    display: inline-flex;
    flex-shrink: 0;
    height: 42px;
    justify-content: center;
    width: 42px;
}
.ds-icon-box-lg { height: 48px; width: 48px; }
.ds-icon-box i { font-size: 1.125rem; line-height: 1; }

.navbar-dark.bg-primary,
.ds-topbar {
    background: var(--ds-color-primary) !important;
    border-bottom: 2px solid var(--ds-color-accent-gold);
}
.ds-brand-title { font-size: var(--ds-font-size-md); }
.sidebar {
    background: var(--ds-color-primary);
    min-height: calc(100vh - 56px);
    padding-top: var(--ds-space-4);
    padding-bottom: var(--ds-space-10);
}
.sidebar .brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--ds-color-text-inverse);
    font-weight: var(--ds-font-weight-semibold);
    margin-bottom: var(--ds-space-2);
    padding: 0 var(--ds-space-4) var(--ds-space-4);
}
.sidebar-link {
    align-items: center;
    border-left: 3px solid transparent;
    border-radius: var(--ds-radius-sm);
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    font-size: var(--ds-font-size-sm);
    margin: 2px var(--ds-space-2);
    padding: 0.6rem var(--ds-space-4);
    text-decoration: none;
    transition: background var(--ds-transition-base), border-color var(--ds-transition-base), color var(--ds-transition-base);
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.22);
    color: var(--ds-color-text-inverse);
}
.sidebar-link.active {
    background: var(--ds-color-accent-gold-soft);
    border-left-color: var(--ds-color-accent-gold);
    color: var(--ds-color-primary);
    font-weight: var(--ds-font-weight-bold);
}
.sidebar-link i { font-size: 0.95rem; margin-right: var(--ds-space-2); text-align: center; width: 1.25rem; }
.sidebar-section {
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.68rem;
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.08em;
    padding: var(--ds-space-4) var(--ds-space-4) var(--ds-space-2);
    text-transform: uppercase;
}

.kpi-card,
.kpi-card-modern,
.ds-kpi-card {
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    box-shadow: var(--ds-shadow-xs);
    padding: var(--ds-space-5);
}
.kpi-card { border-left: 4px solid var(--ds-color-primary); }
.kpi-card .kpi-value,
.ds-kpi-value {
    color: var(--stat-color, var(--ds-color-primary));
    font-size: var(--ds-font-size-2xl);
    font-weight: var(--ds-font-weight-bold);
    line-height: 1;
}
.ds-kpi-icon {
    align-items: center;
    background: var(--stat-bg, var(--ds-color-primary-soft));
    border-radius: var(--ds-radius-md);
    color: var(--stat-color, var(--ds-color-primary));
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.alert-success { background: var(--ds-color-success-soft); border-color: var(--ds-color-success-border); color: var(--ds-color-success); }
.alert-warning { background: var(--ds-color-warning-soft); border-color: var(--ds-color-warning-border); color: var(--ds-color-warning); }
.alert-danger { background: var(--ds-color-danger-soft); border-color: var(--ds-color-danger-border); color: var(--ds-color-danger); }
.alert-info { background: var(--ds-color-info-soft); border-color: var(--ds-color-info-border); color: var(--ds-color-info); }
.page-link { color: var(--ds-color-primary); }
.page-link:hover { color: var(--ds-color-primary-hover); }
.page-item.active .page-link { background: var(--ds-color-primary); border-color: var(--ds-color-primary); }
.nav-tabs .nav-link { color: var(--ds-color-text-muted); }
.nav-tabs .nav-link:hover { color: var(--ds-color-primary); }
.nav-tabs .nav-link.active { color: var(--ds-color-primary); font-weight: var(--ds-font-weight-semibold); }

.wizard-stepper {
    align-items: flex-start;
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    display: flex;
    justify-content: space-between;
    padding: var(--ds-space-4) var(--ds-space-6);
    position: relative;
}
.wizard-stepper::before {
    background: var(--ds-color-border);
    content: '';
    height: 2px;
    left: 60px;
    position: absolute;
    right: 60px;
    top: 18px;
    z-index: 0;
}
.wizard-step { align-items: center; display: flex; flex: 1; flex-direction: column; position: relative; z-index: 1; }
.wizard-step-circle {
    align-items: center;
    background: var(--ds-color-surface);
    border: 2px solid var(--ds-color-border);
    border-radius: 50%;
    color: var(--ds-color-text-muted);
    display: flex;
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-semibold);
    height: 36px;
    justify-content: center;
    transition: all var(--ds-transition-base);
    width: 36px;
}
.wizard-step-label { color: var(--ds-color-text-muted); font-size: var(--ds-font-size-xs); margin-top: var(--ds-space-2); }
.wizard-step.is-current .wizard-step-circle { background: var(--ds-color-primary); border-color: var(--ds-color-primary); box-shadow: 0 0 0 4px var(--ds-color-primary-soft); color: var(--ds-color-text-inverse); }
.wizard-step.is-current .wizard-step-label,
.wizard-step.is-done .wizard-step-label { color: var(--ds-color-primary); font-weight: var(--ds-font-weight-semibold); }
.wizard-step.is-done .wizard-step-circle { background: var(--ds-color-success); border-color: var(--ds-color-success); color: var(--ds-color-text-inverse); }
.wizard-step-title {
    align-items: center;
    border-bottom: 1px solid var(--ds-color-border);
    color: var(--ds-color-primary);
    display: flex;
    font-size: var(--ds-font-size-md);
    font-weight: var(--ds-font-weight-bold);
    gap: var(--ds-space-2);
    margin-bottom: var(--ds-space-4);
    padding-bottom: var(--ds-space-3);
}
.wizard-step-num {
    align-items: center;
    background: var(--ds-color-primary);
    border-radius: 50%;
    color: var(--ds-color-text-inverse);
    display: flex;
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: var(--ds-font-weight-bold);
    height: 24px;
    justify-content: center;
    width: 24px;
}
.wizard-solo-lectura label .text-danger,
.wizard-solo-lectura label small.text-muted { display: none !important; }
.wizard-foto-drop {
    align-items: center;
    background: var(--ds-color-page);
    border: 2px dashed var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 190px;
    padding: var(--ds-space-6) var(--ds-space-4);
    text-align: center;
    transition: border-color var(--ds-transition-base), background var(--ds-transition-base);
}
.wizard-foto-drop:hover,
.wizard-foto-drop.is-over { background: var(--ds-color-primary-subtle); border-color: var(--ds-color-primary); }
.wizard-resumen {
    background: var(--ds-color-primary-soft);
    border: 1px solid var(--ds-color-primary-border);
    border-left: 3px solid var(--ds-color-primary);
    border-radius: 0 var(--ds-radius-sm) var(--ds-radius-sm) 0;
    padding: var(--ds-space-4);
}

.ds-auth-brand-panel {
    background: var(--ds-color-primary);
    border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.ds-auth-form-panel { background: var(--ds-color-page); }
.ds-auth-logo { height: 56px; object-fit: contain; width: auto; }
.ds-auth-logo-sm { height: 40px; object-fit: contain; width: auto; }
.ds-auth-brand-muted { color: rgba(255, 255, 255, 0.74); }
.ds-auth-brand-subtle { color: rgba(255, 255, 255, 0.56); }
.ds-auth-mobile-title { color: var(--ds-color-primary); }
.siadmin-link { color: var(--ds-color-primary); text-decoration: underline; text-underline-offset: 2px; }
.siadmin-link:hover { color: var(--ds-color-primary-hover); }

@media (max-width: 768px) {
    .ds-page-shell { padding: var(--ds-space-5); }
    .page-title { font-size: var(--ds-font-size-xl); }
    .ds-card,
    .ds-form-section,
    .card-body { padding: var(--ds-space-5); }
    .ds-table { display: block; overflow-x: auto; }
    .wizard-stepper { overflow-x: auto; }
}


.welcome-title,
.profile-name-title {
    color: var(--ds-color-text-inverse);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-2xl);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-tight);
}

.module-title,
.doc-name-title {
    color: var(--ds-color-text);
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-md);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-normal);
}


.ds-module-navbar {
    background: var(--ds-color-primary-active);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--ds-color-text-inverse);
}

.ds-module-navbar__inner {
    align-items: center;
    display: flex;
    gap: var(--ds-space-4);
    justify-content: space-between;
    min-height: 52px;
    padding: 0 var(--ds-space-4);
}

.ds-module-brand {
    align-items: center;
    color: var(--ds-color-text-inverse);
    display: inline-flex;
    flex-shrink: 0;
    gap: var(--ds-space-2);
    text-decoration: none;
}

.ds-module-brand:hover {
    color: var(--ds-color-text-inverse);
}

.ds-module-brand__logo {
    flex-shrink: 0;
    height: 36px;
    object-fit: contain;
    width: auto;
}

.ds-module-brand__text {
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    flex-direction: column;
    line-height: var(--ds-line-height-tight);
}

.ds-module-brand__text strong,
.ds-module-brand__text span,
.ds-module-user,
.ds-module-link,
.ds-module-user__logout {
    font-size: var(--ds-font-size-xs);
}

.ds-module-brand__text strong {
    color: rgba(255, 255, 255, 0.84);
    font-weight: var(--ds-font-weight-semibold);
}

.ds-module-brand__text span {
    color: rgba(255, 255, 255, 0.54);
}

.ds-module-links {
    align-items: center;
    display: flex;
    flex: 1;
    gap: var(--ds-space-1);
    justify-content: center;
    min-width: 0;
}

.ds-module-link {
    align-items: center;
    border-radius: var(--ds-radius-sm);
    color: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    gap: var(--ds-space-2);
    min-height: 34px;
    padding: 0 var(--ds-space-3);
    text-decoration: none;
    transition: background var(--ds-transition-base), color var(--ds-transition-base);
    white-space: nowrap;
}

.ds-module-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ds-color-text-inverse);
}

.ds-module-link.is-active {
    background: var(--ds-color-accent-gold-soft);
    color: var(--ds-color-primary);
    font-weight: var(--ds-font-weight-bold);
}

.ds-module-user {
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    flex-shrink: 0;
    gap: var(--ds-space-2);
    min-width: 0;
}

.ds-module-user__avatar {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--ds-color-accent-gold);
    border-radius: 50%;
    color: var(--ds-color-accent-gold);
    display: inline-flex;
    flex-shrink: 0;
    height: 28px;
    justify-content: center;
    overflow: hidden;
    width: 28px;
}

.ds-module-user__photo {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.ds-module-user__name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ds-module-user__logout-form {
    margin: 0;
}

.ds-module-user__logout {
    align-items: center;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    gap: var(--ds-space-1);
    padding: 0;
}

.ds-module-user__logout:hover {
    color: var(--ds-color-text-inverse);
}

@media (max-width: 768px) {
    .ds-module-navbar__inner {
        align-items: stretch;
        flex-direction: column;
        gap: var(--ds-space-2);
        padding: var(--ds-space-2) var(--ds-space-4);
    }

    .ds-module-links {
        justify-content: flex-start;
        overflow-x: auto;
        width: 100%;
    }

    .ds-module-user {
        justify-content: space-between;
        width: 100%;
    }
}

/* ── Hero institucional de módulo ───────────────────────────── */
.ds-hero {
    background: var(--ds-color-primary);
    border-radius: var(--ds-radius-xl);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--ds-space-8);
    margin-bottom: var(--ds-space-8);
    overflow: hidden;
    padding: var(--ds-space-10) var(--ds-space-8);
    position: relative;
}
.ds-hero::after {
    background: linear-gradient(135deg, transparent 50%, rgba(185, 151, 91, 0.10) 100%);
    bottom: 0;
    content: '';
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 0;
}
.ds-hero__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--ds-space-5);
    min-width: 0;
    position: relative;
    z-index: 1;
}
.ds-hero__eyebrow {
    color: var(--ds-color-accent-gold);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
}
.ds-hero__title {
    color: var(--ds-color-text-inverse);
    font-size: var(--ds-font-size-2xl);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-tight);
    margin: var(--ds-space-1) 0 0;
}
.ds-hero__subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--ds-font-size-sm);
    margin: var(--ds-space-1) 0 0;
}
.ds-hero__description {
    color: rgba(255, 255, 255, 0.56);
    font-size: var(--ds-font-size-sm);
    line-height: var(--ds-line-height-relaxed);
    margin: var(--ds-space-2) 0 0;
    max-width: 520px;
}
.ds-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-3);
    margin-top: var(--ds-space-2);
}
.ds-hero__btn-outline {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--ds-radius-sm);
    color: rgba(255, 255, 255, 0.84);
    display: inline-flex;
    font-family: var(--ds-font-family);
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-semibold);
    gap: var(--ds-space-2);
    justify-content: center;
    min-height: 38px;
    padding: 0 var(--ds-space-4);
    text-decoration: none;
    transition: background var(--ds-transition-base), border-color var(--ds-transition-base), color var(--ds-transition-base);
}
.ds-hero__btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.48);
    color: var(--ds-color-text-inverse);
}
.ds-hero__side {
    display: flex;
    flex-shrink: 0;
    gap: var(--ds-space-3);
    position: relative;
    z-index: 1;
}
.ds-hero__stat {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--ds-radius-lg);
    min-width: 110px;
    padding: var(--ds-space-4) var(--ds-space-5);
    text-align: center;
}
.ds-hero__stat-value {
    color: var(--ds-color-text-inverse);
    font-size: var(--ds-font-size-2xl);
    font-weight: var(--ds-font-weight-bold);
    line-height: 1;
}
.ds-hero__stat-label {
    color: rgba(255, 255, 255, 0.60);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-medium);
    line-height: var(--ds-line-height-normal);
    margin-top: var(--ds-space-1);
}

@media (max-width: 768px) {
    .ds-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: var(--ds-space-6) var(--ds-space-5);
    }
    .ds-hero__side {
        width: 100%;
    }
    .ds-hero__stat {
        flex: 1;
        min-width: 0;
    }
}

/* ── Toolbar interna de tarjeta de tabla ────────────────────── */
.ds-table-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--ds-color-border-soft);
    display: flex;
    gap: var(--ds-space-3);
    justify-content: space-between;
    padding: var(--ds-space-4) var(--ds-space-5);
}
.ds-table-toolbar__title {
    align-items: center;
    color: var(--ds-color-text-secondary);
    display: inline-flex;
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-semibold);
    gap: var(--ds-space-2);
    letter-spacing: 0;
}
.ds-table-toolbar__title i {
    color: var(--ds-color-text-muted);
    font-size: 0.9rem;
}
.ds-table-toolbar__actions {
    align-items: center;
    display: flex;
    gap: var(--ds-space-2);
}

/* ── Botón icono para acciones en tabla ─────────────────────── */
.ds-icon-btn {
    align-items: center;
    background: transparent;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-sm);
    color: var(--ds-color-text-muted);
    display: inline-flex;
    flex-shrink: 0;
    height: 32px;
    justify-content: center;
    text-decoration: none;
    transition: background var(--ds-transition-base), border-color var(--ds-transition-base), color var(--ds-transition-base);
    width: 32px;
}
.ds-icon-btn:hover {
    background: var(--ds-color-primary-subtle);
    border-color: var(--ds-color-primary-border);
    color: var(--ds-color-primary);
}
.ds-icon-btn i {
    font-size: 0.875rem;
    line-height: 1;
}

/* ── Utilidades tipográficas DS ──────────────────────────────── */
.ds-fw-medium { font-weight: var(--ds-font-weight-medium) !important; }

/* ── Formularios institucionales ─────────────────────────────── */
/* Reutilizable en: Encuestas, SISAU, SIADMIN, Transparencia     */

/* Encabezado de formulario con identidad visual */
.ds-form-header {
    background: var(--ds-color-primary);
    display: flex;
    gap: var(--ds-space-5);
    overflow: hidden;
    padding: var(--ds-space-8) var(--ds-space-6);
    position: relative;
}
.ds-form-header::after {
    background: linear-gradient(135deg, transparent 50%, rgba(185, 151, 91, 0.10) 100%);
    content: '';
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}
.ds-form-header__icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--ds-radius-lg);
    color: var(--ds-color-text-inverse);
    display: inline-flex;
    flex-shrink: 0;
    height: 64px;
    justify-content: center;
    position: relative;
    width: 64px;
    z-index: 1;
}
.ds-form-header__icon i { font-size: 1.75rem; line-height: 1; }
.ds-form-header__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.ds-form-header .page-title { color: var(--ds-color-text-inverse); }
.ds-form-header .page-subtitle {
    color: rgba(255, 255, 255, 0.72);
    margin-top: var(--ds-space-1);
}
.ds-form-header__meta {
    color: rgba(255, 255, 255, 0.52);
    font-size: var(--ds-font-size-xs);
    margin-top: var(--ds-space-3);
}
.ds-form-header__stats {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: var(--ds-space-2);
    position: relative;
    z-index: 1;
}
.ds-form-header__stat {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--ds-radius-sm);
    min-width: 100px;
    padding: var(--ds-space-2) var(--ds-space-3);
    text-align: right;
}
.ds-form-header__stat-label {
    color: rgba(255, 255, 255, 0.50);
    font-size: 0.625rem;
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.ds-form-header__stat-value {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-semibold);
    margin-top: 2px;
}

/* Cuerpo de formulario institucional */
.ds-form-body {
    background: var(--ds-color-page);
    padding: var(--ds-space-5);
}

/* Sección / parte dentro de un formulario multi-sección */
.ds-form-part {
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    padding: var(--ds-space-5);
}
.ds-form-part + .ds-form-part { margin-top: var(--ds-space-4); }
.ds-form-part .card-description { margin-bottom: var(--ds-space-4); }

/* Bloque de pregunta individual */
.ds-form-question { margin-bottom: var(--ds-space-4); }
.ds-form-question:last-child { margin-bottom: 0; }
.ds-form-question + .ds-form-question {
    border-top: 1px solid var(--ds-color-border-soft);
    padding-top: var(--ds-space-4);
}

/* Grupo de escala lineal / rating */
.ds-scale-group {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-3);
    margin-top: var(--ds-space-1);
}
.ds-scale-group__label {
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-medium);
    white-space: nowrap;
}
.ds-scale-group .form-check {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-1);
    margin: 0;
}
.ds-scale-group .form-check-label {
    font-size: var(--ds-font-size-xs);
    text-align: center;
}

/* Footer de formulario: privacidad + acción principal */
.ds-form-footer {
    background: var(--ds-color-surface-muted);
    border-top: 1px solid var(--ds-color-border-soft);
    padding: var(--ds-space-4) var(--ds-space-6);
}
.ds-form-footer__privacy {
    align-items: flex-start;
    color: var(--ds-color-text-subtle);
    display: flex;
    font-size: var(--ds-font-size-xs);
    gap: var(--ds-space-2);
    line-height: var(--ds-line-height-relaxed);
    margin-bottom: var(--ds-space-4);
}
.ds-form-footer__privacy i {
    color: var(--ds-color-text-subtle);
    flex-shrink: 0;
    font-size: 0.875rem;
    margin-top: 1px;
}

/* Banner informativo: instrucciones, avisos contextuales */
.ds-info-banner {
    align-items: flex-start;
    background: var(--ds-color-surface-muted);
    border: 1px solid var(--ds-color-border-soft);
    border-radius: var(--ds-radius-md);
    color: var(--ds-color-text-muted);
    display: flex;
    font-size: var(--ds-font-size-xs);
    gap: var(--ds-space-3);
    line-height: var(--ds-line-height-relaxed);
    margin-bottom: var(--ds-space-5);
    padding: var(--ds-space-3) var(--ds-space-4);
}
.ds-info-banner i {
    color: var(--ds-color-text-subtle);
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 1px;
}
.ds-info-banner--primary {
    background: var(--ds-color-primary-subtle);
    border-color: var(--ds-color-primary-border);
    color: var(--ds-color-primary);
}
.ds-info-banner--primary i { color: var(--ds-color-primary); }

@media (max-width: 768px) {
    .ds-form-header {
        flex-direction: column;
        gap: var(--ds-space-4);
        padding: var(--ds-space-6) var(--ds-space-5);
    }
    .ds-form-header__stats {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .ds-form-header__stat { min-width: 0; text-align: left; }
    .ds-form-body { padding: var(--ds-space-4); }
    .ds-form-footer { padding: var(--ds-space-4) var(--ds-space-5); }
}

/* Public premium response form */
.ds-public-form {
    margin: 0 auto;
    max-width: 980px;
    padding: var(--ds-space-6) var(--ds-space-4) var(--ds-space-12);
    width: 100%;
}

.ds-public-form-card {
    background: var(--ds-color-surface);
    border: 1px solid rgba(208, 213, 221, 0.92);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.12);
    overflow: hidden;
}

.ds-public-form-hero {
    background: var(--ds-color-surface);
    border-bottom: 1px solid var(--ds-color-border-soft);
    color: var(--ds-color-text);
    display: grid;
    gap: var(--ds-space-8);
    grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
    padding: var(--ds-space-10) var(--ds-space-10) var(--ds-space-8);
    position: relative;
}

.ds-public-form-hero::after {
    background: linear-gradient(90deg, var(--ds-color-primary), var(--ds-color-accent-gold));
    bottom: 0;
    content: '';
    height: 3px;
    left: var(--ds-space-10);
    position: absolute;
    right: var(--ds-space-10);
}

.ds-public-form-hero__main {
    align-items: flex-start;
    display: flex;
    gap: var(--ds-space-5);
    min-width: 0;
}

.ds-public-form-hero__icon {
    align-items: center;
    background: var(--ds-color-primary-subtle);
    border: 1px solid var(--ds-color-primary-border);
    border-radius: 18px;
    color: var(--ds-color-primary);
    display: inline-flex;
    flex-shrink: 0;
    height: 76px;
    justify-content: center;
    width: 76px;
}

.ds-public-form-hero__icon i {
    font-size: 2.1rem;
    line-height: 1;
}

.ds-public-form-hero__content {
    min-width: 0;
}

.ds-public-form-hero__eyebrow {
    color: var(--ds-color-accent-gold-hover);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.08em;
    margin-bottom: var(--ds-space-2);
    text-transform: uppercase;
}

.ds-public-form-hero__title {
    color: var(--ds-color-text);
    font-size: clamp(2rem, 3.6vw, 2.75rem);
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0;
}

.ds-public-form-hero__description {
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-size-md);
    line-height: var(--ds-line-height-relaxed);
    margin: var(--ds-space-4) 0 0;
    max-width: 650px;
}

.ds-public-form-application {
    align-items: center;
    color: var(--ds-color-text-secondary);
    display: flex;
    flex-wrap: wrap;
    font-size: var(--ds-font-size-sm);
    gap: var(--ds-space-2);
    margin-top: var(--ds-space-4);
}

.ds-public-form-application i {
    color: var(--ds-color-primary);
}

.ds-public-form-application span {
    color: var(--ds-color-text-muted);
    font-weight: var(--ds-font-weight-semibold);
}

.ds-public-form-application strong {
    color: var(--ds-color-text);
    font-weight: var(--ds-font-weight-bold);
}

.ds-public-form-hero__meta-grid {
    align-self: start;
    display: grid;
    gap: var(--ds-space-3);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ds-public-form-meta-card {
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.045);
    display: grid;
    gap: var(--ds-space-1);
    min-height: 86px;
    padding: var(--ds-space-3);
}

.ds-public-form-meta-card__icon {
    align-items: center;
    color: var(--ds-color-primary);
    display: inline-flex;
    font-size: 0.85rem;
    height: 18px;
    justify-content: flex-start;
}

.ds-public-form-meta-card__label {
    color: var(--ds-color-text-muted);
    font-size: 0.68rem;
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.06em;
    line-height: 1.15;
    text-transform: uppercase;
}

.ds-public-form-meta-card__value {
    color: var(--ds-color-text);
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-tight);
    overflow-wrap: anywhere;
}

.ds-public-form-body {
    background: #F8FAFC;
    display: grid;
    gap: var(--ds-space-6);
    padding: var(--ds-space-8);
}

.ds-public-form-section {
    background: var(--ds-color-surface);
    border: 1px solid rgba(229, 231, 235, 0.96);
    border-radius: var(--ds-radius-xl);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.045);
    overflow: hidden;
}

.ds-public-form-section__header {
    background: var(--ds-color-surface);
    border-bottom: 1px solid var(--ds-color-border-soft);
    padding: var(--ds-space-6) var(--ds-space-7, 1.75rem);
}

.ds-public-form-section__number {
    color: var(--ds-color-accent-gold-hover);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.08em;
    margin-bottom: var(--ds-space-2);
    text-transform: uppercase;
}

.ds-public-form-section__title {
    color: var(--ds-color-text);
    font-size: var(--ds-font-size-xl);
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0;
    line-height: var(--ds-line-height-tight);
    margin: 0;
}

.ds-public-form-section__description {
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-size-sm);
    line-height: var(--ds-line-height-relaxed);
    margin: var(--ds-space-3) 0 0;
    max-width: 760px;
}

.ds-public-form-section__questions {
    display: grid;
}

.ds-public-form-question {
    padding: var(--ds-space-7, 1.75rem);
}

.ds-public-form-question + .ds-public-form-question {
    border-top: 1px solid var(--ds-color-border-soft);
}

.ds-public-form-question__label {
    color: var(--ds-color-text);
    display: block;
    font-size: 1rem;
    font-weight: var(--ds-font-weight-semibold);
    line-height: var(--ds-line-height-normal);
    margin-bottom: var(--ds-space-4);
}

.ds-public-form-question__control {
    max-width: none;
}

.ds-public-form .form-control,
.ds-public-form .form-select {
    background-color: #FCFCFD;
    border: 1px solid var(--ds-color-border-strong);
    border-radius: var(--ds-radius-lg);
    color: var(--ds-color-text);
    font-size: var(--ds-font-size-md);
    min-height: 54px;
    padding: 0.86rem 1rem;
    transition: background var(--ds-transition-base), border-color var(--ds-transition-base), box-shadow var(--ds-transition-base);
    width: 100%;
}

.ds-public-form textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.ds-public-form .form-control[type="file"] {
    padding-bottom: 0.78rem;
    padding-top: 0.78rem;
}

.ds-public-form .form-control:hover,
.ds-public-form .form-select:hover {
    background-color: var(--ds-color-surface);
    border-color: #B8C1CC;
}

.ds-public-form .form-control:focus,
.ds-public-form .form-select:focus {
    background-color: var(--ds-color-surface);
    border-color: var(--ds-color-primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 47, 34, 0.14) !important;
}

.ds-choice-list {
    display: grid;
    gap: var(--ds-space-3);
}

.ds-choice-list__item {
    align-items: center;
    background: #FCFCFD;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    display: flex;
    gap: var(--ds-space-4);
    margin: 0;
    min-height: 60px;
    padding: var(--ds-space-4);
    transition: background var(--ds-transition-base), border-color var(--ds-transition-base), box-shadow var(--ds-transition-base), transform var(--ds-transition-base);
}

.ds-choice-list__item:hover {
    background: var(--ds-color-surface);
    border-color: var(--ds-color-primary-border);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.06);
    transform: translateY(-1px);
}

.ds-choice-list .form-check-input {
    border: 1.5px solid #AEB8C4;
    flex-shrink: 0;
    height: 1.2rem;
    margin: 0;
    width: 1.2rem;
}

.ds-choice-list .form-check-label {
    color: var(--ds-color-text-secondary);
    cursor: pointer;
    flex: 1;
    font-size: var(--ds-font-size-md);
    font-weight: var(--ds-font-weight-medium);
    line-height: var(--ds-line-height-normal);
}

.ds-choice-list__item:has(.form-check-input:checked) {
    background: var(--ds-color-primary-subtle);
    border-color: var(--ds-color-primary-border);
    box-shadow: 0 8px 20px rgba(0, 47, 34, 0.10);
}

.ds-choice-list .form-check-input:checked + .form-check-label {
    color: var(--ds-color-primary);
    font-weight: var(--ds-font-weight-semibold);
}

.ds-public-form .form-check-input:checked {
    background-color: var(--ds-color-primary);
    border-color: var(--ds-color-primary);
}

.ds-public-form .form-check-input:focus {
    border-color: var(--ds-color-primary);
    box-shadow: 0 0 0 4px rgba(0, 47, 34, 0.14) !important;
}

.ds-scale-group {
    align-items: center;
    background: #FCFCFD;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-xl);
    display: grid;
    gap: var(--ds-space-5);
    grid-template-columns: minmax(84px, max-content) 1fr minmax(84px, max-content);
    margin-top: 0;
    padding: var(--ds-space-5);
}

.ds-scale-group__label {
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-semibold);
    line-height: var(--ds-line-height-normal);
    text-align: center;
    white-space: normal;
}

.ds-scale-group__options {
    display: grid;
    gap: var(--ds-space-2);
    grid-auto-columns: minmax(50px, 1fr);
    grid-auto-flow: column;
}

.ds-scale-group__item {
    margin: 0;
    min-width: 50px;
    position: relative;
}

.ds-scale-group .form-check-input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.ds-scale-group .form-check-label {
    align-items: center;
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    color: var(--ds-color-text-secondary);
    cursor: pointer;
    display: inline-flex;
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-bold);
    height: 48px;
    justify-content: center;
    min-width: 100%;
    transition: background var(--ds-transition-base), border-color var(--ds-transition-base), box-shadow var(--ds-transition-base), color var(--ds-transition-base), transform var(--ds-transition-base);
}

.ds-scale-group__item:hover .form-check-label,
.ds-scale-group .form-check-input:focus-visible + .form-check-label {
    border-color: var(--ds-color-primary-border);
    box-shadow: var(--ds-shadow-focus);
    color: var(--ds-color-primary);
    transform: translateY(-1px);
}

.ds-scale-group__item:has(.form-check-input:checked) .form-check-label {
    background: var(--ds-color-primary);
    border-color: var(--ds-color-primary);
    box-shadow: 0 10px 18px rgba(0, 47, 34, 0.16);
    color: var(--ds-color-text-inverse);
}

.ds-public-form .ds-form-footer {
    background: var(--ds-color-surface);
    border-top: 1px solid var(--ds-color-border);
    display: grid;
    gap: var(--ds-space-5);
    padding: var(--ds-space-6) var(--ds-space-8) var(--ds-space-8);
}

.ds-public-form .ds-form-footer__privacy {
    margin-bottom: 0;
}

.ds-public-form .ds-info-banner {
    align-items: center;
    background: #F8FAFC;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-size-sm);
    margin-bottom: 0;
    padding: var(--ds-space-4);
}

.ds-public-form .ds-info-banner i {
    align-items: center;
    background: var(--ds-color-primary-soft);
    border-radius: var(--ds-radius-sm);
    color: var(--ds-color-primary);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1rem;
    height: 34px;
    justify-content: center;
    margin-top: 0;
    width: 34px;
}

.ds-form-footer__actions {
    display: flex;
    justify-content: flex-end;
}

.ds-public-form-submit {
    border-radius: var(--ds-radius-lg);
    box-shadow: 0 12px 24px rgba(0, 47, 34, 0.16);
    font-size: 1rem;
    min-height: 60px;
    min-width: 280px;
    padding-left: var(--ds-space-8);
    padding-right: var(--ds-space-8);
}

.ds-public-form-submit:hover {
    box-shadow: 0 16px 30px rgba(0, 47, 34, 0.22);
}

@media (max-width: 992px) {
    .ds-public-form-hero {
        grid-template-columns: 1fr;
    }

    .ds-public-form-hero__meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .ds-public-form {
        padding: 0 var(--ds-space-3) var(--ds-space-8);
    }

    .ds-public-form-card {
        border-radius: var(--ds-radius-xl);
    }

    .ds-public-form-hero {
        gap: var(--ds-space-5);
        padding: var(--ds-space-7, 1.75rem) var(--ds-space-5) var(--ds-space-6);
    }

    .ds-public-form-hero::after {
        left: var(--ds-space-5);
        right: var(--ds-space-5);
    }

    .ds-public-form-hero__main {
        flex-direction: column;
        gap: var(--ds-space-4);
    }

    .ds-public-form-hero__icon {
        height: 68px;
        width: 68px;
    }

    .ds-public-form-hero__icon i {
        font-size: 1.85rem;
    }

    .ds-public-form-hero__meta-grid {
        grid-template-columns: 1fr;
    }

    .ds-public-form-body {
        gap: var(--ds-space-4);
        padding: var(--ds-space-4);
    }

    .ds-public-form-section {
        border-radius: var(--ds-radius-lg);
    }

    .ds-public-form-section__header,
    .ds-public-form-question,
    .ds-public-form .ds-form-footer {
        padding-left: var(--ds-space-4);
        padding-right: var(--ds-space-4);
    }

    .ds-scale-group {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .ds-scale-group__options {
        grid-auto-flow: row;
        grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    }

    .ds-form-footer__actions,
    .ds-public-form-submit {
        width: 100%;
    }
}

/* Public form status icons */
.ds-status-icon {
    color: var(--ds-color-primary);
}

.ds-status-open {
    color: #34D399;
}

.ds-status-upcoming {
    color: #FBBF24;
}

.ds-status-closed {
    color: #F87171;
}

/* Public form meta icon colors */
.ds-meta-icon-start {
    color: #FBBF24;
}

.ds-meta-icon-end {
    color: #F87171;
}

/* Public institutional navbar brand */
.ds-public-navbar-brand {
    align-items: flex-start;
    display: inline-flex;
    gap: var(--ds-space-2);
    line-height: var(--ds-line-height-tight);
}

.ds-public-navbar-brand__icon {
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.ds-public-navbar-brand__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ds-public-navbar-brand__title {
    color: var(--ds-color-text-inverse);
    font-size: 0.98rem;
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0;
    line-height: var(--ds-line-height-tight);
}

.ds-public-navbar-brand__subtitle {
    color: rgba(255, 255, 255, 0.68);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-medium);
    line-height: var(--ds-line-height-tight);
}

/* Institutional app launcher */
.ds-app-launcher {
    position: relative;
}

.ds-app-launcher__trigger {
    align-items: center;
    border-radius: var(--ds-radius-sm);
    color: rgba(255, 255, 255, 0.82) !important;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    padding: 0 !important;
    transition: background var(--ds-transition-base), color var(--ds-transition-base);
    width: 38px;
}

.ds-app-launcher__trigger:hover,
.ds-app-launcher__trigger[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.10);
    color: var(--ds-color-text-inverse) !important;
}

.ds-app-launcher__panel {
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-xl);
    box-shadow: 0 22px 55px rgba(16, 24, 40, 0.18);
    left: auto !important;
    margin-top: 0 !important;
    max-width: calc(100vw - 24px);
    min-width: 360px;
    padding: var(--ds-space-4);
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 8px) !important;
    transform: none !important;
    z-index: 1080;
}

.ds-app-launcher__header {
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.06em;
    padding: var(--ds-space-1) var(--ds-space-1) var(--ds-space-3);
    text-transform: uppercase;
}

.ds-app-launcher__grid {
    display: grid;
    gap: var(--ds-space-3);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ds-app-launcher__item {
    align-items: center;
    background: var(--ds-color-surface);
    border: 1px solid transparent;
    border-radius: var(--ds-radius-lg);
    color: var(--ds-color-text);
    display: flex;
    flex-direction: column;
    min-height: 126px;
    padding: var(--ds-space-4) var(--ds-space-3);
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: background var(--ds-transition-base), border-color var(--ds-transition-base), box-shadow var(--ds-transition-base), transform var(--ds-transition-base);
}

.ds-app-launcher__item:hover {
    background: var(--ds-color-surface-muted);
    border-color: var(--ds-color-border);
    color: var(--ds-color-text);
    transform: translateY(-1px);
}

.ds-app-launcher__item.is-active {
    background: var(--ds-color-primary-subtle);
    border-color: var(--ds-color-primary-border);
}

.ds-app-launcher__icon {
    align-items: center;
    background: var(--ds-color-primary-soft);
    border-radius: var(--ds-radius-md);
    color: var(--ds-color-primary);
    display: inline-flex;
    flex-shrink: 0;
    height: 44px;
    justify-content: center;
    margin-bottom: var(--ds-space-3);
    width: 44px;
}

.ds-app-launcher__icon i {
    font-size: 1.35rem;
    line-height: 1;
}

.ds-app-launcher__name {
    color: var(--ds-color-text);
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-bold);
    line-height: var(--ds-line-height-tight);
}

.ds-app-launcher__description {
    color: var(--ds-color-text-muted);
    display: -webkit-box;
    font-size: var(--ds-font-size-xs);
    line-height: var(--ds-line-height-normal);
    margin-top: var(--ds-space-1);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ds-app-launcher__badge {
    background: var(--ds-color-primary);
    border-radius: var(--ds-radius-pill);
    color: var(--ds-color-text-inverse);
    font-size: 0.65rem;
    font-weight: var(--ds-font-weight-bold);
    line-height: 1;
    padding: 0.28rem 0.45rem;
    position: absolute;
    right: var(--ds-space-2);
    top: var(--ds-space-2);
}

.ds-app-launcher__footer {
    border-top: 1px solid var(--ds-color-border-soft);
    margin-top: var(--ds-space-3);
    padding-top: var(--ds-space-3);
}

.ds-app-launcher__footer a {
    align-items: center;
    border-radius: var(--ds-radius-sm);
    color: var(--ds-color-text-muted);
    display: inline-flex;
    font-size: var(--ds-font-size-sm);
    gap: var(--ds-space-2);
    min-height: 34px;
    padding: 0 var(--ds-space-2);
    text-decoration: none;
}

.ds-app-launcher__footer a:hover {
    background: var(--ds-color-surface-muted);
    color: var(--ds-color-primary);
}

@media (max-width: 576px) {
    .ds-app-launcher__panel {
        min-width: min(340px, calc(100vw - 24px));
        right: -48px !important;
    }

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

/* ENC-UX-005 — experiencia compartida de preview y formulario público */
.ds-public-form {
    max-width: 900px;
}

.ds-public-form-card {
    border-color: rgba(0, 71, 52, 0.10);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.10);
}

.ds-survey-context {
    display: grid;
    gap: var(--ds-space-3);
    margin-top: var(--ds-space-5);
}

.ds-survey-context__item {
    align-items: flex-start;
    background: #F8FAF9;
    border: 1px solid rgba(0, 71, 52, 0.10);
    border-radius: var(--ds-radius-lg);
    display: grid;
    gap: var(--ds-space-3);
    grid-template-columns: 36px minmax(0, 1fr);
    padding: var(--ds-space-4);
}

.ds-survey-context__icon {
    align-items: center;
    background: var(--ds-color-primary-soft);
    border-radius: 10px;
    color: var(--ds-color-primary);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.ds-survey-context__title {
    color: var(--ds-color-primary);
    font-size: var(--ds-font-size-xs);
    font-weight: var(--ds-font-weight-bold);
    letter-spacing: 0.07em;
    margin: 0 0 var(--ds-space-1);
    text-transform: uppercase;
}

.ds-survey-context__text {
    color: var(--ds-color-text-secondary);
    font-size: var(--ds-font-size-sm);
    line-height: var(--ds-line-height-relaxed);
    margin: 0;
}

.ds-public-form-question__heading {
    align-items: flex-start;
    display: grid;
    gap: var(--ds-space-3);
    grid-template-columns: 32px minmax(0, 1fr);
    margin-bottom: var(--ds-space-4);
}

.ds-public-form-question__number {
    align-items: center;
    background: var(--ds-color-primary-soft);
    border: 1px solid var(--ds-color-primary-border);
    border-radius: 50%;
    color: var(--ds-color-primary);
    display: inline-flex;
    flex-shrink: 0;
    font-size: var(--ds-font-size-sm);
    font-weight: var(--ds-font-weight-bold);
    height: 32px;
    justify-content: center;
    line-height: 1;
    width: 32px;
}

.ds-public-form-question__label {
    font-size: 1.125rem;
    line-height: 1.45;
    margin: 2px 0 0;
    text-align: left;
}

.cbgrid-wrap {
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    overflow: auto;
}

.cbgrid {
    border-collapse: separate !important;
    border-spacing: 0;
    min-width: 620px;
}

.cbgrid th,
.cbgrid td {
    border: 0 !important;
    border-bottom: 1px solid var(--ds-color-border-soft) !important;
    padding: var(--ds-space-4) !important;
}

.cbgrid tr:last-child th,
.cbgrid tr:last-child td {
    border-bottom: 0 !important;
}

.cbgrid__corner,
.cbgrid__col-hd,
.cbgrid__row-hd {
    background: #F7F9F8 !important;
}

.cbgrid__col-hd {
    color: var(--ds-color-text-muted) !important;
    font-size: var(--ds-font-size-xs) !important;
    letter-spacing: 0.03em;
}

.cbgrid__row-hd {
    color: var(--ds-color-text-secondary) !important;
    min-width: 190px;
}

.cbgrid__cell {
    transition: background var(--ds-transition-base);
}

.cbgrid__cell:hover {
    background: var(--ds-color-primary-subtle);
}

.cbgrid__cell-label {
    border-radius: var(--ds-radius-sm);
    min-height: 42px !important;
}

.cbgrid__check {
    height: 1.25rem;
    width: 1.25rem;
}

@media (prefers-reduced-motion: no-preference) {
    .ds-public-form-card,
    .preview-viewport {
        animation: ds-survey-enter 360ms ease-out both;
    }

    @keyframes ds-survey-enter {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

@media (max-width: 768px) {
    .ds-public-form-hero__title {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }

    .ds-public-form-question {
        padding-bottom: var(--ds-space-6);
        padding-top: var(--ds-space-6);
    }

    .ds-public-form-question__heading {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .ds-public-form-question__number {
        height: 28px;
        width: 28px;
    }

    .ds-public-form-question__label {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ds-choice-list__item,
    .ds-scale-group .form-check-label,
    .preview-viewport {
        scroll-behavior: auto;
        transition: none !important;
    }
}
.preview-footer .ds-info-banner {
    align-items: center;
    background: #F7F9F8;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-lg);
    color: var(--ds-color-text-muted);
    display: flex;
    gap: var(--ds-space-3);
    padding: var(--ds-space-4);
}

.preview-footer .ds-form-footer__actions {
    display: flex;
    justify-content: flex-end;
}

.preview-footer .ds-public-form-submit {
    min-height: 44px;
    min-width: 220px;
}

/* ENC-UX-010 — refinamiento compacto y progreso compartido */
.ds-public-form {
    padding-bottom: var(--ds-space-8);
}

.ds-public-form-hero {
    gap: var(--ds-space-6);
    padding: var(--ds-space-8) var(--ds-space-8) var(--ds-space-7);
}

.ds-public-form-hero::after {
    left: var(--ds-space-8);
    right: var(--ds-space-8);
}

.ds-public-form-hero__main {
    gap: var(--ds-space-4);
}

.ds-public-form-hero__icon {
    border-radius: var(--ds-radius-lg);
    height: 60px;
    width: 60px;
}

.ds-public-form-hero__icon i {
    font-size: 1.65rem;
}

.ds-public-form-hero__title {
    font-size: clamp(1.625rem, 3vw, 1.875rem);
    line-height: 1.2;
}

.ds-public-form-hero__description {
    font-size: 0.9375rem;
    line-height: 1.55;
    margin-top: var(--ds-space-2);
}

.ds-public-form-application {
    margin-top: var(--ds-space-3);
}

.ds-public-form-hero__meta-grid {
    gap: var(--ds-space-2);
}

.ds-public-form-meta-card {
    min-height: 76px;
    padding: var(--ds-space-3);
}

.ds-survey-context {
    gap: var(--ds-space-2);
    margin-top: var(--ds-space-3);
}

.ds-survey-context__item {
    gap: var(--ds-space-2);
    grid-template-columns: 32px minmax(0, 1fr);
    padding: var(--ds-space-3);
}

.ds-survey-context__icon {
    height: 32px;
    width: 32px;
}

.ds-survey-context__text {
    line-height: 1.5;
}

.ds-public-form-body {
    gap: var(--ds-space-5);
    padding: var(--ds-space-6);
}

.ds-public-form-section__header {
    padding: var(--ds-space-5) var(--ds-space-6);
}

.ds-public-form-section__title {
    font-size: 1.25rem;
    line-height: 1.3;
}

.ds-public-form-section__description {
    line-height: 1.55;
    margin-top: var(--ds-space-2);
}

.ds-public-form-question {
    padding: var(--ds-space-5) var(--ds-space-6);
}

.ds-public-form-question__heading {
    gap: var(--ds-space-3);
    margin-bottom: var(--ds-space-3);
}

.ds-public-form-question__label {
    font-size: 1.0625rem;
    line-height: 1.45;
}

.ds-public-form .form-control,
.ds-public-form .form-select {
    font-size: 0.9375rem;
    min-height: 46px;
    padding: 0.68rem 0.875rem;
}

.ds-public-form textarea.form-control {
    min-height: 112px;
}

.ds-choice-list {
    gap: var(--ds-space-2);
}

.ds-choice-list__item {
    gap: var(--ds-space-3);
    min-height: 50px;
    padding: var(--ds-space-3);
}

.ds-choice-list .form-check-label {
    font-size: 0.9375rem;
}

.ds-scale-group {
    gap: var(--ds-space-4);
    padding: var(--ds-space-4);
}

.ds-scale-group .form-check-label {
    height: 44px;
}

.ds-public-form .ds-form-footer {
    gap: var(--ds-space-4);
    padding: var(--ds-space-5) var(--ds-space-6) var(--ds-space-6);
}

.ds-public-form-submit {
    font-size: 0.9375rem;
    min-height: 48px;
}

.has-survey-progress main {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom)) !important;
}

.ds-survey-progress {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(0, 71, 52, 0.14);
    bottom: 0;
    box-shadow: 0 -8px 28px rgba(16, 24, 40, 0.10);
    left: 0;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 300;
}

.ds-survey-progress__inner {
    margin: 0 auto;
    max-width: 900px;
}

.ds-survey-progress__summary {
    align-items: center;
    color: var(--ds-color-text-secondary);
    display: flex;
    font-size: 0.8125rem;
    gap: var(--ds-space-3);
    justify-content: space-between;
    line-height: 1.35;
    margin-bottom: 0.45rem;
}

.ds-survey-progress__percentage {
    color: var(--ds-color-primary);
    flex-shrink: 0;
    font-size: 0.875rem;
}

.ds-survey-progress__track {
    background: #DDE5E2;
    border-radius: var(--ds-radius-pill);
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.ds-survey-progress__bar {
    background: linear-gradient(90deg, var(--ds-color-primary), #1F6B50);
    border-radius: inherit;
    display: block;
    height: 100%;
    transition: width 220ms ease;
    width: 0;
}

@media (max-width: 768px) {
    .ds-public-form-hero {
        padding: var(--ds-space-6) var(--ds-space-4) var(--ds-space-5);
    }

    .ds-public-form-hero::after {
        left: var(--ds-space-4);
        right: var(--ds-space-4);
    }

    .ds-public-form-hero__title {
        font-size: clamp(1.3125rem, 6vw, 1.5rem);
    }

    .ds-public-form-section__title {
        font-size: 1.125rem;
    }

    .ds-public-form-body,
    .ds-public-form-section__header,
    .ds-public-form-question,
    .ds-public-form .ds-form-footer {
        padding: var(--ds-space-4);
    }

    .ds-public-form-question__label {
        font-size: 1rem;
    }

    .ds-survey-progress {
        padding-left: var(--ds-space-3);
        padding-right: var(--ds-space-3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ds-survey-progress__bar {
        transition: none;
    }
}

/* FIX-ENC-UX-010A — bordes, puntajes y separación del progreso */
:root {
    --survey-progress-height: 76px;
}

.ds-public-form-card,
.preview-viewport {
    border: 1px solid rgba(0, 71, 52, 0.14);
    border-radius: 24px;
}

.ds-public-form-hero,
.preview-survey-header {
    border-radius: 23px 23px 0 0;
}

.ds-public-form-hero {
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 2rem;
}

.ds-public-form-hero__meta-grid {
    gap: var(--ds-space-3);
    min-width: 0;
}

.ds-public-form-meta-card {
    min-width: 0;
}

.ds-survey-context {
    margin-bottom: var(--ds-space-6);
}

.ds-survey-context__item:last-child {
    margin-bottom: 0;
}


.ds-public-form-question__heading {
    grid-template-columns: 32px minmax(0, 1fr) auto;
}

.ds-public-form-question__score {
    align-self: start;
    background: var(--ds-color-surface-muted);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-pill);
    color: var(--ds-color-text-muted);
    font-size: 0.8125rem;
    font-weight: var(--ds-font-weight-semibold);
    line-height: 1.2;
    margin-left: var(--ds-space-4);
    padding: 0.35rem 0.65rem;
    text-align: right;
    white-space: nowrap;
}

.has-survey-progress main {
    padding-bottom: calc(
        var(--survey-progress-height) + var(--ds-space-8) + env(safe-area-inset-bottom)
    ) !important;
}

.has-survey-progress [data-survey-root] {
    margin-bottom: calc(var(--survey-progress-height) + var(--ds-space-5));
}

.ds-survey-progress {
    min-height: var(--survey-progress-height);
}

@media (max-width: 768px) {
    :root {
        --survey-progress-height: 86px;
    }

    .ds-public-form-hero,
    .preview-survey-header {
        padding-left: var(--ds-space-5);
        padding-right: var(--ds-space-5);
        padding-top: var(--ds-space-5);
    }

    .ds-public-form-hero__meta-grid {
        gap: var(--ds-space-3);
    }

    .ds-survey-context {
        margin-bottom: var(--ds-space-5);
    }

    .ds-public-form-question__heading {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .ds-public-form-question__score {
        grid-column: 2 / -1;
        justify-self: end;
        margin-left: 0;
        margin-top: var(--ds-space-1);
    }

    .has-survey-progress [data-survey-root] {
        margin-bottom: calc(var(--survey-progress-height) + var(--ds-space-4));
    }
}
