﻿html {
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(13,61,61,.55) rgba(15,23,42,.05);
}

*, *::before, *::after {
    scrollbar-width: thin;
    scrollbar-color: rgba(13,61,61,.55) rgba(15,23,42,.05);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: rgba(15,23,42,.06);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(13,61,61,.62) 0%, rgba(21,94,94,.86) 100%);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.88);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(15,78,78,.8) 0%, rgba(13,61,61,.98) 100%);
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Topbar (barra de navegación superior) ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 260;
    height: 78px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 30px;
    background: linear-gradient(170deg, #0d6a67 0%, #0a4c4a 54%, #083b40 100%);
    box-shadow: 0 14px 34px rgba(4,40,41,.28), inset 0 1px 0 rgba(255,255,255,.16);
}
.topbar::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #e89c1e 12%, #fbbf24 35%, #fef3c7 50%, #fbbf24 65%, #e89c1e 88%, transparent 100%);
    box-shadow: 0 0 10px rgba(251,191,36,.55), 0 0 22px rgba(232,156,30,.28);
    pointer-events: none;
}
.topbar::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    right: -110px;
    top: -290px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 72%);
    pointer-events: none;
}
@keyframes brandFadeIn {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}
.topbar-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: default;
    padding-right: 8px;
}
.topbar-brand:hover, .topbar-brand:focus { opacity: 1; background: none; outline: none; }
.topbar-logo {
    height: 54px;
    width: auto;
    display: block;
    image-rendering: auto;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.38)) drop-shadow(0 0 28px rgba(255,255,255,.14));
    animation: brandFadeIn .55s cubic-bezier(.2,.7,0,1) both;
    transition: transform .22s ease, filter .22s ease;
}
.topbar-brand:hover .topbar-logo {
    transform: translateY(-2px) scale(1.04);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.42)) drop-shadow(0 0 32px rgba(255,255,255,.22));
}
.topbar-nav {
    position: relative;
    z-index: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 8px;
    border-radius: 15px;
    border: 1px solid rgba(184,255,245,.2);
    background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.05));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 8px 22px rgba(3,35,37,.22);
    backdrop-filter: blur(4px);
}
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 8px 13px;
    border-radius: 11px;
    border: 1px solid rgba(255,255,255,0);
    color: rgba(232,255,251,.88);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .01em;
    background: transparent;
    transition: transform .18s ease, border-color .18s ease, background .2s ease, color .18s ease, box-shadow .2s ease;
}
.topbar-nav a i {
    width: 19px;
    height: 19px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .76rem;
    color: #d7faf3;
    background: rgba(255,255,255,.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}
.topbar-nav a:hover {
    color: #fff;
    border-color: rgba(186,255,246,.34);
    background: rgba(255,255,255,.18);
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    transform: translateY(-1px);
}
.topbar-nav a.active {
    color: #082523;
    border-color: rgba(210,255,247,.55);
    background: linear-gradient(135deg, #c9fff5 0%, #9ef3e7 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 8px 20px rgba(4,39,40,.28);
}
.topbar-nav a.active i { color: #0a4c4a; background: rgba(9,128,120,.16); }
.topbar-nav a.logout { color: rgba(255,234,234,.93); }
.topbar-nav a.logout:hover {
    border-color: rgba(255,197,197,.45);
    background: linear-gradient(135deg, rgba(248,113,113,.38), rgba(220,38,38,.42));
    color: #fff;
}
@media (max-width: 1180px) {
    .topbar { height: 72px; padding: 0 16px; gap: 10px; }
    .topbar-nav { padding: 7px; border-radius: 13px; }
    .topbar-nav a { padding: 7px 10px; font-size: .78rem; }
}
@media (max-width: 860px) {
    .topbar { height: 66px; padding: 0 12px; }
    .topbar-logo { height: 40px; }
    .topbar-nav { gap: 5px; padding: 6px; border-radius: 12px; }
    .topbar-nav a { border-radius: 9px; padding: 7px 9px; }
}

.topbar-logo {
    height: 54px;
    width: auto;
    display: block;
    image-rendering: auto;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.38)) drop-shadow(0 0 28px rgba(255,255,255,.14));
}

.app-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.app-alert i {
    flex-shrink: 0;
    font-size: 1rem;
    margin-top: 2px;
}

.app-alert-success {
    background: #ecfdf5;
    color: #166534;
    border-color: #a7f3d0;
}

.app-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.app-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
}

.app-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

