html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a,
.btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/* ── Variables corporativas CMSA ── */
:root {
    --cmsa-primary: #1A56DB;
    --cmsa-primary-dk: #163F7A;
    --cmsa-primary-lt: #3D8BFF;
    --cmsa-bg: #EEF2FF;
    --cmsa-surface: #FFFFFF;
    --cmsa-border: #E2E8F0;
    --cmsa-text: #0F172A;
    --cmsa-text-muted: #64748B;
}

/* ── Reset de body ── */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--cmsa-bg);
}

/* ── Scrollbar personalizado ── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--cmsa-border);
    border-radius: 10px;
}

/* ── Tarjetas ── */
.cmsa-card {
    background: var(--cmsa-surface);
    border-radius: 16px;
    border: 1px solid var(--cmsa-border);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ── Badge de estado ── */
.cmsa-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.cmsa-badge-ok {
    background: #DCFCE7;
    color: #166534;
}

.cmsa-badge-warn {
    background: #FEF9C3;
    color: #92400E;
}

.cmsa-badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.cmsa-badge-error {
    background: #FEE2E2;
    color: #991B1B;
}

/* ── Etiqueta PM ── */
.cmsa-pm {
    background: rgba(26, 86, 219, 0.1);
    color: var(--cmsa-primary);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
}

.cmsa-pm-03 {
    background: rgba(245, 158, 11, 0.15);
    color: #92400E;
}

/* ── Footer de marca ── */
.cmsa-footer {
    text-align: center;
    font-size: 11px;
    color: var(--cmsa-text-muted);
    font-style: italic;
    padding: 10px 0;
    border-top: 1px solid var(--cmsa-border);
}

/* ════════════════════════════════════
   LOGIN
════════════════════════════════════ */
.login-bg {
    min-height: 100vh;
    background: var(--cmsa-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    position: relative;
    overflow: hidden;
}

/* Formas decorativas */
.login-deco {
    position: absolute;
    border-radius: 50%;
    opacity: .08;
    pointer-events: none;
}

.login-deco.d1 {
    width: 220px;
    height: 220px;
    background: var(--cmsa-primary);
    top: -60px;
    right: -60px;
}

.login-deco.d2 {
    width: 160px;
    height: 160px;
    background: var(--cmsa-primary-lt);
    bottom: 40px;
    left: -50px;
}

.login-deco.d3 {
    width: 80px;
    height: 80px;
    background: var(--cmsa-primary-dk);
    bottom: 160px;
    right: 20px;
    border-radius: 16px;
    transform: rotate(20deg);
}

.login-deco.d4 {
    width: 50px;
    height: 50px;
    background: var(--cmsa-primary);
    top: 120px;
    left: 24px;
    border-radius: 10px;
    transform: rotate(10deg);
}

/* Tarjeta */
.login-card {
    background: #fff;
    border-radius: 24px;
    padding: 32px 24px 28px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 40px rgba(26, 86, 219, .12);
    position: relative;
    z-index: 1;
}

/* Logo */
.login-logo-wrap {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo-img {
    height: auto;
    display: block;
    margin: 0 auto 16px;
}

/* Campos */
.login-field {
    width: 100%;
    margin-bottom: 14px;
}

.login-field .mud-input-outlined-border {
    border-radius: 12px !important;
    border-color: #E2E8F0 !important;
}

.login-field .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #1A56DB !important;
}

.login-field .mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: #1A56DB !important;
    border-width: 2px !important;
}

.login-field input {
    font-size: 14px !important;
    color: #0F172A !important;
}

/* Ojo contraseña */
.login-field .mud-input-adornment button,
.login-field .mud-input-adornment .mud-icon-button,
.login-field .mud-input-adornment svg {
    color: #1A56DB !important;
}

/* Texto ¿Olvidaste? */
.login-forgot {
    font-size: 12px;
    color: #64748B;
    margin-bottom: 20px;
    margin-top: 4px;
}

/* Botón */
.login-btn {
    border-radius: 14px !important;
    padding: 13px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 16px rgba(26, 86, 219, .3) !important;
}

/* Separador */
.login-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 14px;
}

.login-sep-line {
    flex: 1;
    height: 1px;
    background: var(--cmsa-border);
}

.login-sep-txt {
    font-size: 12px;
    color: #94A3B8;
    font-weight: 500;
    padding: 0 4px;
}

/* Footer */
.login-foot {
    text-align: center;
    font-size: 12px;
    color: var(--cmsa-text-muted);
}


/* ════════════════════════════════════
   LAYOUT PRINCIPAL
════════════════════════════════════ */
.cmsa-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--cmsa-bg);
}

/* Topbar */
.cmsa-topbar {
    background: linear-gradient(135deg, #163F7A, #1A56DB);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.cmsa-topbar-left {
    width: 40px;
    display: flex;
    align-items: center;
}

.cmsa-topbar-right {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cmsa-topbar-title {
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.01em;
}

.cmsa-topbar-logo {
    width: 30px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Botones de navegación */
.cmsa-btn-nav {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.cmsa-btn-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.cmsa-btn-logout {
    background: rgba(239, 68, 68, 0.25);
}

.cmsa-btn-logout:hover {
    background: rgba(239, 68, 68, 0.4);
}

/* Contenido */
.cmsa-content {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

/* Footer */
.cmsa-footer {
    text-align: center;
    font-size: 10px;
    color: var(--cmsa-text-muted);
    font-style: italic;
    padding: 10px 0 14px;
    border-top: 1px solid var(--cmsa-border);
}


/* ════════════════════════════════════
   HOME
════════════════════════════════════ */
.home-greet {
    background: linear-gradient(135deg, #0F172A, #1A56DB);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.home-greet-ico {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tarjetas */
.home-card {
    background: white;
    border-radius: 18px;
    border: 1.5px solid var(--cmsa-border);
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color .2s, box-shadow .2s;
}

.home-card:hover {
    border-color: var(--cmsa-primary);
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.12);
}

.home-card-ico {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-card-ico.blue {
    background: #EFF6FF;
}

.home-card-ico.amber {
    background: #FFFBEB;
}

.home-card-txt {
    flex: 1;
}

.home-card-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--cmsa-text);
    margin-bottom: 3px;
}

.home-card-sub {
    font-size: 12px;
    color: var(--cmsa-text-muted);
}

.home-card-arr {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--cmsa-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ════════════════════════════════════
   LISTADO
════════════════════════════════════ */
.search-bar {
    background: white;
    border: 1px solid var(--cmsa-border);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--cmsa-text);
    background: transparent;
}

.search-input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    min-height: 24px;
}

.search-input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
}

.search-input::placeholder {
    color: #94A3B8;
}

.list-date-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1.5px solid var(--cmsa-border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* Contenido */
.list-content {
    padding-top: 12px;
}

/* Items */
.list-item {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--cmsa-border);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color .15s, box-shadow .15s;
}

.list-item:hover {
    border-color: var(--cmsa-primary);
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.1);
}

.list-item-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-ok {
    background: #10B981;
}

.dot-info {
    background: #3B82F6;
}

.dot-default {
    background: var(--cmsa-primary);
}

.list-item-body {
    flex: 1;
}

.list-item-date {
    font-size: 11px;
    font-weight: 700;
    color: var(--cmsa-primary);
    margin-bottom: 2px;
}

.list-item-desc {
    font-size: 13px;
    font-weight: 600;
    color: var(--cmsa-text);
    margin-bottom: 2px;
    line-height: 1.3;
}

.list-item-sub {
    font-size: 11px;
    color: var(--cmsa-text-muted);
}

/* Estados vacío / cargando */
.list-loading,
.list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

/* Barra de acciones inferior */
.list-actions-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--cmsa-border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 50;
}

.list-action-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.5px solid var(--cmsa-border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s;
}

.list-action-btn.primary {
    background: linear-gradient(135deg, #163F7A, #1A56DB);
    border: none;
    box-shadow: 0 4px 14px rgba(26, 86, 219, 0.35);
    width: 52px;
    height: 52px;
}

.list-action-btn:hover {
    border-color: var(--cmsa-primary);
}

/* ════════════════════════════════════
   SELECCIONAR ORDEN
════════════════════════════════════ */
.sel-wrap {
    padding-top: 8px;
}

.sel-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--cmsa-border);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sel-field {
    margin-bottom: 18px;
}

.sel-field:last-child {
    margin-bottom: 0;
}

.sel-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--cmsa-text);
    text-align: center;
    margin-bottom: 8px;
}

.sel-picker {
    width: 100%;
}

/* Botón continuar */
.btn-continuar {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #163F7A, #1A56DB);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(26, 86, 219, 0.3);
    transition: opacity .2s;
}

.btn-continuar.disabled,
.btn-continuar:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/* ════════════════════════════════════
   FORMULARIO
════════════════════════════════════ */
.form-wrap {
    padding-top: 8px;
}

.form-section {
    background: white;
    border-radius: 18px;
    border: 1px solid var(--cmsa-border);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--cmsa-text-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fg {
    margin-bottom: 14px;
    overflow: hidden;
}

.fg:last-child {
    margin-bottom: 0;
}

.fl {
    font-size: 12px;
    font-weight: 600;
    color: var(--cmsa-text);
    margin-bottom: 5px;
    display: block;
}

.fl.req::before {
    content: "* ";
    color: var(--cmsa-error, #EF4444);
}

.fr2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fi {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--cmsa-border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--cmsa-text);
    background: #F8FAFC;
    outline: none;
    transition: border-color .2s;
}

.fi:focus {
    border-color: var(--cmsa-primary);
    background: white;
}

textarea.fi {
    resize: vertical;
    min-height: 90px;
}

/* Info box (datos heredados) */
.form-info-box {
    background: var(--cmsa-bg);
    border-radius: 10px;
    padding: 10px 13px;
}

.form-info-label {
    font-size: 11px;
    color: var(--cmsa-text-muted);
    margin-bottom: 2px;
}

.form-info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--cmsa-text);
}

/* Cálculo automático */
.form-calculo {
    background: #EFF6FF;
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 12px;
    color: var(--cmsa-primary);
    font-weight: 500;
    margin-bottom: 14px;
}

/* Upload de imágenes */
.form-img-upload {
    width: 100%;
    height: 88px;
    border: 2px dashed var(--cmsa-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: #FAFAFA;
    transition: border-color .2s;
}

.form-img-upload:hover {
    border-color: var(--cmsa-primary);
}

.form-img-upload span {
    font-size: 11px;
    color: var(--cmsa-text-muted);
}

/* Botón cancelar */
.btn-cancelar {
    display: block;
    width: 100%;
    padding: 13px;
    background: white;
    color: var(--cmsa-text-muted);
    border: 1.5px solid var(--cmsa-border);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    margin-top: 10px;
}

/* ════════════════════════════════════
   DETALLE
════════════════════════════════════ */
.det-card {
    background: white;
    border-radius: 18px;
    border: 1px solid var(--cmsa-border);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 12px;
}

.det-header {
    background: linear-gradient(135deg, #0F172A, #1A56DB);
    padding: 16px;
}

.det-header-order {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, .6);
    margin-bottom: 4px;
}

.det-header-desc {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.det-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 16px;
    border-bottom: 1px solid var(--cmsa-bg);
}

.det-row:last-child {
    border: none;
}

.det-k {
    font-size: 11px;
    color: var(--cmsa-text-muted);
    font-weight: 500;
}

.det-v {
    font-size: 13px;
    color: var(--cmsa-text);
    font-weight: 600;
    text-align: right;
    max-width: 58%;
}

.det-desc-block {
    padding: 12px 16px;
}

.det-desc-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--cmsa-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.det-desc-text {
    font-size: 13px;
    color: var(--cmsa-text);
    line-height: 1.6;
}

/* Fotos */
.photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.photo-box {
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.photo-box.before {
    background: #EFF6FF;
}

.photo-box.after {
    background: #ECFDF5;
}

.photo-box-lbl {
    font-size: 10px;
    font-weight: 700;
}

.photo-box.before .photo-box-lbl {
    color: #1D4ED8;
}

.photo-box.after .photo-box-lbl {
    color: #059669;
}

/* Barra acciones detalle */
.det-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--cmsa-border);
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    z-index: 50;
}

.da-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 14px;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.da-btn.primary {
    background: linear-gradient(135deg, #163F7A, #1A56DB);
    box-shadow: 0 4px 14px rgba(26, 86, 219, .25);
}

.da-btn.secondary {
    background: #FFF7ED;
    border: 1.5px solid #FDE68A;
}

.da-btn.danger {
    background: #FEF2F2;
    border: 1.5px solid #FECACA;
}

.da-lbl {
    font-size: 10px;
    font-weight: 700;
}

.da-btn.primary .da-lbl {
    color: #fff;
}

.da-btn.secondary .da-lbl {
    color: #92400E;
}

.da-btn.danger .da-lbl {
    color: #991B1B;
}

/* Modales */
.mo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, .5);
    z-index: 100;
    display: flex;
    align-items: flex-end;
}

.mo.on {
    display: flex;
}

.ms {
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 6px 20px 32px;
    width: 100%;
}

.ms-handle {
    width: 40px;
    height: 4px;
    background: var(--cmsa-border);
    border-radius: 2px;
    margin: 12px auto 20px;
}

.ms-ico {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-ico.blue {
    background: #EFF6FF;
}

.ms-ico.amber {
    background: #FFFBEB;
}

.ms-ico.red {
    background: #FEF2F2;
}

.ms-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--cmsa-text);
    text-align: center;
    margin-bottom: 6px;
}

.ms-sub {
    font-size: 13px;
    color: var(--cmsa-text-muted);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 20px;
}

.mo-fi {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--cmsa-border);
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    margin-bottom: 14px;
}

.mo-btn-p {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #163F7A, #1A56DB);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    margin-bottom: 10px;
}

.mo-btn-d {
    width: 100%;
    padding: 14px;
    background: #EF4444;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    margin-bottom: 10px;
}

.mo-btn-s {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--cmsa-text-muted);
    border: none;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

/* ════════════════════════════════════
   PANEL ADMINISTRACIÓN
════════════════════════════════════ */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: white;
    border-radius: 14px;
    padding: 6px;
    border: 1px solid var(--cmsa-border);
}

.admin-tab {
    flex: 1;
    padding: 9px 4px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--cmsa-text-muted);
    cursor: pointer;
    transition: .2s;
}

.admin-tab.on {
    background: var(--cmsa-primary);
    color: white;
}

/*.admin-section {}*/

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.admin-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--cmsa-text);
}

.admin-btn-add {
    padding: 7px 14px;
    background: var(--cmsa-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.admin-item {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--cmsa-border);
    padding: 12px 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-item-body {
    flex: 1;
}

.admin-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--cmsa-text);
    margin-bottom: 2px;
}

.admin-item-sub {
    font-size: 11px;
    color: var(--cmsa-text-muted);
}

.admin-toggle {
    padding: 5px 12px;
    border-radius: 20px;
    border: none;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.admin-toggle.active {
    background: #DCFCE7;
    color: #166534;
}

.admin-toggle.inactive {
    background: #FEE2E2;
    color: #991B1B;
}

.admin-btn-del {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-btn-edit {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}