body.app {
    background: var(--gris-fondo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.app-header {
    background: var(--negro-cs);
    color: var(--blanco);
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--blanco);
    text-decoration: none;
    letter-spacing: -0.2px;
}
.brand-accent {
    color: var(--rojo-cs);
    font-weight: 700;
}

.header-bell {
    background: transparent;
    border: none;
    font-size: 17px;
    cursor: pointer;
    color: var(--blanco);
    opacity: 0.85;
    padding: 4px 6px;
    line-height: 1;
}
.header-bell:hover { opacity: 1; }

.app-subnav {
    background: var(--blanco);
    border-bottom: 1px solid var(--gris-borde);
    position: sticky;
    top: 52px;
    z-index: 99;
}
.subnav-inner {
    padding: 0 24px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.subnav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}
.subnav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--gris-oscuro);
    text-decoration: none;
}
.subnav-links a:hover { color: var(--rojo-cs); }

.subnav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-name {
    font-size: 13px;
    color: var(--gris-oscuro);
    font-weight: 500;
}

.badge {
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.6;
}
.badge-admin {
    background: var(--amarillo-warning);
    color: #1F1F23;
}
.badge-gerencia {
    background: var(--gris-fondo);
    color: var(--gris-oscuro);
    border: 1px solid var(--gris-borde);
}

.logout-form { margin: 0; }

.btn-logout {
    background: var(--rojo-cs);
    color: var(--blanco);
    font-weight: 600;
    font-size: 13px;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    line-height: 1.4;
}
.btn-logout:hover { background: var(--rojo-cs-hover); }

.app-main {
    padding: 32px 0 64px;
    min-height: calc(100vh - 52px - 48px - 44px);
}

.app-footer {
    background: var(--blanco);
    border-top: 1px solid var(--gris-borde);
}
.footer-inner {
    padding: 14px 24px;
    font-size: 13px;
    color: var(--gris-medio);
    text-align: center;
}
.footer-inner strong {
    font-weight: 700;
    color: var(--gris-oscuro);
}
.footer-link {
    color: var(--azul-info);
    text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }

.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.flash {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.flash-success { background: #E8F8EF; color: #0F5C2A; }
.flash-danger,
.flash-error   { background: #FEEBEC; color: #7A0E1F; }
.flash-info,
.flash-message { background: #EAF1FE; color: #133A85; }
.flash-warning { background: #FFF6E0; color: #7A5C00; }

.welcome-hero {
    background: var(--blanco);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--gris-borde);
}
.welcome-hero h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--texto);
}
.welcome-hero p {
    margin: 0;
    font-size: 15px;
    color: var(--gris-medio);
    max-width: 70ch;
}

.section-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gris-oscuro);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-card {
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
}
.status-card h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--texto);
}

.status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.status-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gris-borde);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--gris-oscuro);
}
.status-list li:last-child {
    border-bottom: none;
}

.status-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    line-height: 1;
}

.status-done     { color: var(--verde-ok);  font-weight: 600; }
.status-progress { color: #D97706;          font-weight: 600; }
.status-pending  { color: var(--gris-medio); }

.access-note {
    margin-top: 24px;
    padding: 16px 20px;
    background: var(--gris-fondo);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--gris-medio);
    border-left: 3px solid var(--rojo-cs);
}
