/* Segunda pasada visual: shell + dashboard.
 * Se carga después de acarmoto_visual.css y afina proporciones sin tocar lógica.
 */

/* --- Topbar: más aire y jerarquía --- */
.topbar {
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px clamp(22px, 2.6vw, 38px);
}

.topbar__identity {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.topbar__context {
    display: grid;
    grid-template-columns: minmax(0, auto) auto;
    grid-template-areas:
        "name switch"
        "meta meta";
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    padding-left: 48px;
}

.topbar__context::before {
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.topbar__context .eyebrow {
    grid-area: name;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.topbar__context-meta {
    grid-area: meta;
    margin: 0;
    line-height: 1.25;
}

.topbar__context-switch {
    grid-area: switch;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid #263b48;
    border-radius: 999px;
    background: rgba(16, 31, 42, 0.7);
    color: #aebdca;
    font-size: 0.66rem;
    font-weight: 720;
    white-space: nowrap;
}

.topbar__context-switch:hover {
    border-color: rgba(239, 51, 64, 0.38);
    background: rgba(239, 51, 64, 0.08);
}

.topbar__user {
    margin: 0 0 0 auto;
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    border-left: 1px solid #263a47;
    color: #f7f9fa;
    font-size: 0.86rem;
    font-weight: 780;
}

.topbar__actions {
    display: flex;
    align-items: center;
}

.topbar__actions .button {
    min-height: 38px;
    border-color: #314754;
    background: rgba(16, 31, 42, 0.82);
}

/* --- Hero: que el espacio derecho sea composición, no vacío --- */
.welcome-panel.dashboard-hero {
    min-height: 226px;
    padding: clamp(32px, 4vw, 48px);
    padding-right: min(43%, 570px);
    border-color: #263d49;
    background:
        radial-gradient(circle at 76% 46%, rgba(239, 51, 64, 0.15), transparent 13rem),
        radial-gradient(circle at 88% 24%, rgba(76, 111, 128, 0.12), transparent 16rem),
        linear-gradient(108deg, #11212c 0%, #0d1a24 55%, #09141c 100%);
}

.welcome-panel.dashboard-hero > * {
    position: relative;
    z-index: 2;
}

.welcome-panel.dashboard-hero h1 {
    max-width: 620px;
    margin-bottom: 10px;
}

.welcome-panel.dashboard-hero > p:last-child {
    max-width: 660px;
    margin-bottom: 0;
    line-height: 1.55;
}

.welcome-panel.dashboard-hero::before {
    z-index: 1;
    top: -24%;
    right: -2%;
    width: 44%;
    height: 150%;
    opacity: 0.92;
    border-left: 1px solid rgba(58, 84, 98, 0.22);
    background:
        radial-gradient(circle at 72% 48%, rgba(239, 51, 64, 0.34) 0 2px, transparent 3px),
        radial-gradient(circle at 58% 58%, rgba(239, 51, 64, 0.18) 0 54px, transparent 55px),
        linear-gradient(145deg, transparent 0 39%, rgba(239, 51, 64, 0.54) 39.4% 40%, transparent 40.4% 100%),
        linear-gradient(23deg, transparent 0 56%, rgba(69, 96, 110, 0.38) 56.3% 56.8%, transparent 57.1% 100%),
        linear-gradient(90deg, rgba(13, 29, 39, 0.28), rgba(10, 21, 29, 0.82));
    transform: none;
}

.welcome-panel.dashboard-hero::after {
    z-index: 2;
    right: clamp(28px, 4vw, 58px);
    bottom: 34px;
    width: 190px;
    padding-top: 14px;
    border-top: 2px solid var(--brand-red);
    color: rgba(233, 239, 243, 0.68);
    font-size: 0.64rem;
    letter-spacing: 0.2em;
    line-height: 1.8;
}

/* --- Resumen: iconografía funcional en vez de círculos decorativos --- */
.info-grid {
    gap: 14px;
    margin-bottom: 22px;
}

.info-card {
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 20px 18px 78px;
    border-color: #263c48;
    background: linear-gradient(145deg, #10202a, #0c1922);
}

.info-card::before {
    left: 20px;
    width: 42px;
    height: 42px;
    border: 1px solid #334b58;
    border-radius: 11px;
    background-color: #122430;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 8px 20px rgba(0, 0, 0, 0.13);
}

.info-grid .info-card:nth-child(1)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e4ebef' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16M6 20V8l6-4 6 4v12M9 10h1M14 10h1M9 14h1M14 14h1'/%3E%3C/svg%3E");
}

.info-grid .info-card:nth-child(2)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e4ebef' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3'/%3E%3Cpath d='M5.5 20c.7-4 2.9-6 6.5-6s5.8 2 6.5 6M18 6.5l1 1 2-2'/%3E%3C/svg%3E");
}

.info-grid .info-card:nth-child(3)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e4ebef' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M4 12h16M12 4c2 2.3 3 5 3 8s-1 5.7-3 8c-2-2.3-3-5-3-8s1-5.7 3-8'/%3E%3C/svg%3E");
}

.info-card__label {
    margin-bottom: 6px;
    color: #8298a7;
    font-size: 0.64rem;
    letter-spacing: 0.12em;
}

.info-card strong {
    color: #f2f6f8;
    font-size: 1.08rem;
    line-height: 1.3;
}

/* --- Dashboard: menos caja dentro de caja, más ritmo --- */
.dashboard-section {
    margin-bottom: 28px;
    padding: 4px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-section__header {
    margin-bottom: 16px;
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(48, 72, 85, 0.5);
}

.dashboard-section__header h2 {
    margin-bottom: 0;
    font-size: 1.32rem;
}

.dashboard-action-grid {
    gap: 12px;
}

.dashboard-action {
    min-height: 132px;
    padding: 18px 48px 17px 18px;
    border-color: #263b47;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(15, 30, 40, 0.96), rgba(10, 22, 30, 0.97));
    box-shadow: none;
}

.dashboard-action strong {
    margin-bottom: 6px;
    color: #f2f6f8;
    font-size: 1rem;
}

.dashboard-action p {
    max-width: 620px;
    margin-bottom: 12px;
    color: #9fb0bc;
    font-size: 0.84rem;
    line-height: 1.48;
}

.dashboard-action__status {
    margin-bottom: 8px;
    color: #6f8595;
    font-size: 0.6rem;
    letter-spacing: 0.14em;
}

.dashboard-action__link {
    margin-top: auto;
    color: #f14a56;
    font-size: 0.78rem;
}

.dashboard-action[href]::after {
    top: 16px;
    right: 17px;
    color: #647b8a;
    font-size: 1rem;
}

.dashboard-action[href]:hover {
    border-color: rgba(239, 51, 64, 0.38);
    background: linear-gradient(145deg, #142832, #0d1d27);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.dashboard-action--disabled {
    border-style: dashed;
    border-color: rgba(57, 78, 90, 0.62);
    background: rgba(10, 22, 30, 0.62);
    opacity: 0.58;
}

.dashboard-note {
    border-color: rgba(48, 71, 84, 0.72);
    background: rgba(10, 22, 30, 0.68);
    box-shadow: none;
}

/* --- Responsive --- */
@media (max-width: 1050px) {
    .welcome-panel.dashboard-hero {
        padding-right: 38%;
    }
}

@media (max-width: 900px) {
    .topbar__user {
        display: none;
    }

    .welcome-panel.dashboard-hero {
        padding-right: 34px;
    }

    .welcome-panel.dashboard-hero::before {
        width: 35%;
        opacity: 0.38;
    }

    .welcome-panel.dashboard-hero::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .topbar {
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px;
    }

    .shell-context {
        min-width: 0;
        flex: 1 1 auto;
    }

    .shell-context__summary {
        min-height: 44px;
        padding: .3rem .4rem;
    }

    .shell-context__copy {
        max-width: calc(100vw - 176px);
    }

    .shell-user-actions {
        flex: 0 0 auto;
        gap: .4rem;
    }

    .shell-icon-button {
        width: 40px;
        height: 40px;
    }

    .shell-profile__summary {
        min-height: 44px;
        padding: .2rem .25rem;
        gap: .35rem;
    }

    .shell-profile__avatar {
        width: 36px;
        height: 36px;
    }

    .topbar__identity {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
    }

    .topbar__context {
        grid-template-columns: 1fr;
        grid-template-areas:
            "name"
            "meta"
            "switch";
        padding-left: 44px;
    }

    .topbar__context-switch {
        width: fit-content;
        margin-top: 5px;
    }

    .topbar__actions {
        width: auto;
        flex: 0 0 auto;
    }

    .topbar__actions form,
    .topbar__actions .button {
        width: auto;
    }

    .info-card {
        min-height: 92px;
        padding-left: 72px;
    }

    .dashboard-section__header {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .welcome-panel.dashboard-hero {
        min-height: 0;
        padding: 26px 22px;
    }

    .welcome-panel.dashboard-hero::before {
        opacity: 0.22;
    }
}
