:root {
    --ryito-bg: #030303;
    --ryito-surface: rgba(7, 12, 24, 0.9);
    --ryito-surface-strong: rgba(10, 18, 34, 0.96);
    --ryito-border: rgba(103, 163, 255, 0.24);
    --ryito-cyan: #eaf3ff;
    --ryito-blue: #163d7a;
    --ryito-magenta: #4b7fd1;
    --ryito-orange: #8fb8ff;
    --ryito-text: #f7fbff;
    --ryito-muted: rgba(216, 230, 248, 0.78);
    --ryito-glow: 0 0 18px rgba(103, 163, 255, 0.24), 0 0 32px rgba(255, 255, 255, 0.08);
}

body {
    color: var(--ryito-text);
    background:
        radial-gradient(circle at 18% 20%, rgba(75, 127, 209, 0.16), transparent 26%),
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.06), transparent 20%),
        radial-gradient(circle at 50% 100%, rgba(22, 61, 122, 0.18), transparent 18%),
        linear-gradient(135deg, #020202 0%, #07101f 42%, #0c1a31 72%, #030406 100%);
    min-height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(103, 163, 255, 0.72) rgba(10, 18, 34, 0.34);
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(6, 10, 18, 0.26), rgba(10, 18, 34, 0.48));
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(143, 184, 255, 0.88), rgba(75, 127, 209, 0.9));
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(143, 184, 255, 0.24), 0 0 18px rgba(255, 255, 255, 0.1);
}

body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(182, 213, 255, 0.96), rgba(103, 163, 255, 0.94));
}

body[data-sa-theme="3"] {
    background:
        radial-gradient(circle at 18% 24%, rgba(75, 127, 209, 0.16), transparent 24%),
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.06), transparent 20%),
        radial-gradient(circle at 50% 88%, rgba(22, 61, 122, 0.18), transparent 18%),
        linear-gradient(145deg, #020202 0%, #07101f 35%, #0c1a31 68%, #030406 100%) !important;
}

body[data-sa-theme="10"] {
    background:
        radial-gradient(circle at 18% 24%, rgba(75, 127, 209, 0.16), transparent 24%),
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.06), transparent 20%),
        radial-gradient(circle at 50% 88%, rgba(22, 61, 122, 0.18), transparent 18%),
        linear-gradient(145deg, #020202 0%, #07101f 35%, #0c1a31 68%, #030406 100%) !important;
}

body:before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 0, transparent 45%, rgba(54, 215, 255, 0.08) 46%, transparent 47%, transparent 100%),
        linear-gradient(90deg, transparent 0, rgba(54, 215, 255, 0.08) 50%, transparent 100%);
    opacity: 0.9;
}

body[data-sa-theme="10"]:after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 22%, rgba(54, 215, 255, 0.34) 0%, rgba(54, 215, 255, 0.08) 18%, transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(217, 60, 255, 0.3) 0%, rgba(217, 60, 255, 0.08) 16%, transparent 33%),
        radial-gradient(circle at 50% 100%, rgba(255, 155, 47, 0.24) 0%, rgba(255, 155, 47, 0.05) 12%, transparent 28%);
    opacity: 0.75;
}

.login,
.main {
    position: relative;
    z-index: 1;
}

.main {
    min-height: 100vh;
}

body[data-sa-theme="10"] .main:before,
body[data-sa-theme="10"] .main:after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.38;
    background-repeat: no-repeat;
    background-size: contain;
    filter: blur(2px);
    will-change: transform, opacity;
}

body[data-sa-theme="10"] .main:before {
    top: 7vh;
    left: 42vw;
    width: 18vw;
    min-width: 180px;
    height: 48vh;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 34%, rgba(95, 146, 226, 0.14) 70%, rgba(255, 255, 255, 0));
    transform: rotate(8deg);
}

body[data-sa-theme="10"] .main:after {
    right: 6vw;
    bottom: 10vh;
    width: 22vw;
    min-width: 220px;
    height: 18vh;
    opacity: 0.3;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(95, 146, 226, 0.16), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
    transform: rotate(-12deg);
}

.login {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    padding: clamp(20px, 4vw, 32px) 16px;
    overflow-x: hidden;
}

.login-brand-art {
    position: relative;
    width: min(560px, 92vw);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    padding: 0;
}

.login-brand-art:before {
    content: "";
    position: absolute;
    inset: 8% 8% 14%;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 26%, transparent 52%),
        radial-gradient(circle, rgba(95, 146, 226, 0.16) 0%, rgba(95, 146, 226, 0.06) 28%, transparent 54%),
        radial-gradient(circle, rgba(22, 61, 122, 0.14) 0%, rgba(22, 61, 122, 0.05) 24%, transparent 48%);
    filter: blur(28px);
}

.login-brand-art img {
    position: relative;
    display: block;
    width: 100%;
    max-width: min(460px, 78vw);
    height: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 0 16px rgba(255, 255, 255, 0.08))
        drop-shadow(0 0 30px rgba(95, 146, 226, 0.16))
        drop-shadow(0 14px 22px rgba(0, 0, 0, 0.34));
    opacity: 0.98;
}

.login-reflections {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.login-reflection {
    position: absolute;
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.6;
    transform: rotate(-14deg);
}

.login-reflection--left {
    top: 10%;
    left: -8%;
    width: 34vw;
    height: 12vw;
    min-width: 260px;
    min-height: 90px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.12), rgba(95, 146, 226, 0.14), rgba(255, 255, 255, 0));
}

.login-reflection--right {
    top: 18%;
    right: -10%;
    width: 38vw;
    height: 14vw;
    min-width: 280px;
    min-height: 100px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(151, 189, 250, 0.1), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
}

.login-reflection--bottom {
    left: 50%;
    bottom: -2%;
    width: 52vw;
    height: 16vw;
    min-width: 320px;
    min-height: 100px;
    transform: translateX(-50%) rotate(-6deg);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(95, 146, 226, 0.12), rgba(255, 255, 255, 0.18), rgba(95, 146, 226, 0.12), rgba(255, 255, 255, 0));
}

.login:before,
.login:after {
    content: "";
    position: fixed;
    inset: auto;
    width: 42vw;
    height: 42vw;
    border-radius: 50%;
    filter: blur(22px);
    opacity: 0.42;
    pointer-events: none;
    z-index: -1;
}

.login:before {
    top: 8%;
    left: -10%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(95, 146, 226, 0.16) 36%, transparent 68%);
}

.login:after {
    right: -12%;
    bottom: -4%;
    background: radial-gradient(circle, rgba(95, 146, 226, 0.22) 0%, rgba(22, 61, 122, 0.18) 34%, transparent 70%);
}

.login__block {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    background:
        linear-gradient(180deg, rgba(8, 14, 28, 0.94), rgba(9, 12, 20, 0.92)) !important;
}

.login__block__body {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.login__block .btn,
.login__block button[type="submit"] {
    width: 100%;
    min-height: 48px;
}

.login__block .form-control {
    min-height: 50px;
    font-size: 1rem;
}

@media (max-width: 767.98px) {
    .login {
        justify-content: flex-start;
        gap: 14px;
        padding-top: 18px;
        padding-bottom: 24px;
    }

    .login-brand-art {
        width: min(420px, 88vw);
    }

    .login-brand-art:before {
        inset: 10% 10% 16%;
        filter: blur(22px);
    }

    .login__block {
        max-width: min(100%, 430px);
        border-radius: 18px;
    }

    .login__block__header {
        padding: 1.1rem 1rem;
    }

    .login__block__header h4 {
        margin-bottom: 0;
        font-size: clamp(1.35rem, 5vw, 1.8rem);
    }
}

@media (max-width: 479.98px) {
    .login {
        padding-left: 12px;
        padding-right: 12px;
    }

    .login-brand-art {
        width: min(320px, 82vw);
    }

    .login__block {
        max-width: 100%;
    }

    .login__block__body {
        padding: 1rem;
    }

    .login__block .form-control {
        font-size: 0.95rem;
    }

    .login:before,
    .login:after {
        width: 62vw;
        height: 62vw;
        opacity: 0.28;
    }
}

@media (max-height: 760px) {
    .login {
        justify-content: flex-start;
    }

    .login-brand-art {
        width: min(360px, 62vw);
    }
}

.login__block__header {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(75, 127, 209, 0.16), rgba(22, 61, 122, 0.2)) !important;
    border-bottom: 1px solid rgba(103, 163, 255, 0.2);
}

.header,
.sidebar,
.card,
.quick-stats__item,
.login__block,
.dropdown-menu,
.toolbar,
.listview,
.table,
.modal-content {
    background: var(--ryito-surface) !important;
    border: 1px solid var(--ryito-border);
    box-shadow: var(--ryito-glow);
    backdrop-filter: blur(10px);
}

.header {
    background: linear-gradient(90deg, rgba(5, 5, 7, 0.98), rgba(10, 18, 34, 0.94)) !important;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(4, 4, 6, 0.99), rgba(8, 14, 26, 0.97)) !important;
    height: 100vh;
    overflow: hidden;
}

.sidebar .scrollbar {
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(103, 163, 255, 0.72) rgba(10, 18, 34, 0.34);
}

.sidebar .scrollbar::-webkit-scrollbar {
    width: 8px;
}

.sidebar .scrollbar::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(6, 10, 18, 0.22), rgba(10, 18, 34, 0.42));
    border-radius: 999px;
}

.sidebar .scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(143, 184, 255, 0.88), rgba(75, 127, 209, 0.9));
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(143, 184, 255, 0.22), 0 0 18px rgba(255, 255, 255, 0.08);
}

.sidebar .scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(182, 213, 255, 0.96), rgba(103, 163, 255, 0.94));
}

.gate-checker-layout .content__inner {
    padding-bottom: 0.5rem;
}

.gate-checker-card {
    padding-bottom: 1rem;
}

.gate-checker-layout .input-group.mb-3,
.gate-checker-layout .form-group {
    margin-bottom: 0.8rem !important;
}

.gate-checker-result {
    min-height: 265px;
    max-height: 265px;
    resize: none;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .gate-checker-layout .card-body {
        padding: 1.1rem 1.2rem;
    }

    .gate-checker-layout #state_seccion + .card,
    .gate-checker-layout #state_seccion,
    .gate-checker-layout .note {
        margin-bottom: 0.8rem;
    }
}

.logo a,
.login__block__header h4,
.card-title,
.content__title h1,
.user__name {
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.14), 0 0 24px rgba(103, 163, 255, 0.12);
}

.logo .brand-mark,
.login__block__header .brand-mark {
    color: var(--ryito-cyan);
}

.logo .brand-accent,
.login__block__header .brand-accent {
    color: var(--ryito-magenta);
}

.content__title small,
.card-subtitle,
.quick-stats__info small,
.form-group small,
.top-nav,
.navigation,
.listview__attrs,
.user small,
small,
span {
    color: var(--ryito-muted);
}

.quick-stats__item,
.card,
.login__block {
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.quick-stats__item:before,
.card:before,
.login__block:before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), rgba(103, 163, 255, 0.2), rgba(22, 61, 122, 0.32));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.quick-stats__item:after,
.card:after,
.login__block:after {
    content: "";
    position: absolute;
    top: -35%;
    left: -55%;
    width: 42%;
    height: 170%;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 30%,
        rgba(255, 255, 255, 0.22) 48%,
        rgba(255, 255, 255, 0.06) 62%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-22deg);
    transition: left 0.55s ease, opacity 0.22s ease;
}

.quick-stats__item:hover:after,
.card:hover:after,
.login__block:hover:after {
    left: 120%;
    opacity: 1;
}


.btn-theme,
.btn-outline-light,
.top-nav a[href="/logout"] {
    background: linear-gradient(90deg, #0f2b58, #29579f, #5f92e2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(95, 146, 226, 0.22);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.btn-outline-light {
    background: linear-gradient(90deg, rgba(15, 43, 88, 0.78), rgba(75, 127, 209, 0.62));
}

.btn-theme:hover,
.btn-outline-light:hover,
.top-nav a[href="/logout"]:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.form-control {
    background: rgba(5, 10, 20, 0.9);
    border: 1px solid rgba(103, 163, 255, 0.18);
    color: #ffffff;
}

.form-control:focus {
    border-color: var(--ryito-cyan);
    box-shadow: 0 0 0 0.2rem rgba(103, 163, 255, 0.14);
}

.navigation a,
.dropdown-item,
.logo a,
.top-nav a {
    color: var(--ryito-text) !important;
}

.navigation a:hover,
.dropdown-item:hover,
.logo a:hover {
    color: var(--ryito-cyan) !important;
}

.navigation__sub ul a {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.08), 0 0 14px rgba(103, 163, 255, 0.16);
    transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
}

.navigation__sub ul a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.14), 0 0 18px rgba(103, 163, 255, 0.26);
}

.gate-link-icon {
    font-size: 0.9rem;
    width: 1rem;
    margin-right: 0.55rem;
    color: #ffffff;
    opacity: 0.9;
    vertical-align: middle;
    text-align: center;
}

.gate-new-badge {
    float: right;
    font-size: 8px;
}

.alert-danger,
.alert-success,
.alert-info {
    border: 1px solid var(--ryito-border);
    background: rgba(6, 10, 18, 0.92);
    color: #fff;
}

.quick-stats__info h2,
.top-nav b {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.12), 0 0 18px rgba(103, 163, 255, 0.16);
}

.sidebar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.68rem 0.9rem;
    border-radius: 6px;
    border: 1px solid rgba(123, 208, 255, 0.22);
    background: linear-gradient(90deg, #0b1f45, #15356d, #2f5fa8);
    color: #ffffff !important;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(1, 12, 32, 0.28), 0 0 14px rgba(69, 144, 255, 0.18);
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-logout:hover {
    color: #ffffff !important;
    text-decoration: none;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(1, 12, 32, 0.34), 0 0 18px rgba(69, 144, 255, 0.24);
}

.sidebar-logout i {
    font-size: 0.9rem;
    color: #ffffff;
}

.page-loader {
    background: linear-gradient(135deg, #020202, #0a1220);
}

.user__img {
    object-fit: cover;
    background: radial-gradient(circle at center, rgba(103, 163, 255, 0.18), rgba(255, 255, 255, 0.03));
    box-shadow: 0 0 16px rgba(103, 163, 255, 0.18), 0 0 8px rgba(255, 255, 255, 0.06);
}
