:root {
    --ryito-bg: #060816;
    --ryito-surface: rgba(12, 18, 42, 0.82);
    --ryito-surface-strong: rgba(16, 24, 56, 0.92);
    --ryito-border: rgba(91, 214, 255, 0.25);
    --ryito-cyan: #36d7ff;
    --ryito-blue: #1d6bff;
    --ryito-magenta: #d93cff;
    --ryito-orange: #ff9b2f;
    --ryito-text: #eef6ff;
    --ryito-muted: rgba(225, 237, 255, 0.72);
    --ryito-glow: 0 0 18px rgba(54, 215, 255, 0.35), 0 0 32px rgba(217, 60, 255, 0.18);
}

body {
    color: var(--ryito-text);
    background:
        radial-gradient(circle at 20% 20%, rgba(29, 107, 255, 0.28), transparent 28%),
        radial-gradient(circle at 80% 18%, rgba(217, 60, 255, 0.24), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(255, 155, 47, 0.22), transparent 18%),
        linear-gradient(135deg, #040712 0%, #0a1330 42%, #140824 70%, #080a16 100%);
    min-height: 100vh;
}

body[data-sa-theme="3"] {
    background:
        radial-gradient(circle at 18% 24%, rgba(54, 215, 255, 0.22), transparent 24%),
        radial-gradient(circle at 82% 18%, rgba(217, 60, 255, 0.24), transparent 22%),
        radial-gradient(circle at 50% 88%, rgba(255, 155, 47, 0.24), transparent 18%),
        linear-gradient(145deg, #030614 0%, #08122b 35%, #170726 68%, #050812 100%) !important;
}

body[data-sa-theme="10"] {
    background:
        radial-gradient(circle at 18% 24%, rgba(54, 215, 255, 0.22), transparent 24%),
        radial-gradient(circle at 82% 18%, rgba(217, 60, 255, 0.24), transparent 22%),
        radial-gradient(circle at 50% 88%, rgba(255, 155, 47, 0.24), transparent 18%),
        linear-gradient(145deg, #030614 0%, #08122b 35%, #170726 68%, #050812 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.78;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 0 12px rgba(255, 196, 120, 0.55)) drop-shadow(0 0 26px rgba(54, 215, 255, 0.18));
    will-change: transform, opacity, filter;
}

body[data-sa-theme="10"] .main:before {
    top: 2vh;
    left: 47vw;
    width: 9vw;
    min-width: 90px;
    height: 42vh;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 520'%3E%3Cdefs%3E%3Cfilter id='g'%3E%3CfeGaussianBlur stdDeviation='3'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M58 0 L44 34 L58 54 L35 102 L63 138 L46 184 L75 228 L53 274 L81 316 L61 366 L71 430 L52 470' stroke='%23ffd0a0' stroke-width='8' fill='none' stroke-linecap='round' stroke-linejoin='round' filter='url(%23g)'/%3E%3Cpath d='M58 0 L44 34 L58 54 L35 102 L63 138 L46 184 L75 228 L53 274 L81 316 L61 366 L71 430 L52 470' stroke='%23fff6eb' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M44 34 L28 66 M63 138 L86 164 M53 274 L30 300 M61 366 L40 390' stroke='%23ffe8cf' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    animation: rayitoBoltMain 4.8s ease-in-out infinite;
}

body[data-sa-theme="10"] .main:after {
    right: 9vw;
    bottom: 8vh;
    width: 11vw;
    min-width: 110px;
    height: 30vh;
    opacity: 0.46;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 300'%3E%3Cdefs%3E%3Cfilter id='g'%3E%3CfeGaussianBlur stdDeviation='3'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M98 0 L70 36 L94 62 L58 108 L82 144 L48 194 L68 224 L42 284' stroke='%23ffb46b' stroke-width='8' fill='none' stroke-linecap='round' stroke-linejoin='round' filter='url(%23g)'/%3E%3Cpath d='M98 0 L70 36 L94 62 L58 108 L82 144 L48 194 L68 224 L42 284' stroke='%23fff6eb' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M70 36 L48 64 M82 144 L106 170 M68 224 L92 246' stroke='%23ffe8cf' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    animation: rayitoBoltSide 3.9s ease-in-out infinite;
}

@keyframes rayitoBoltMain {
    0%, 18%, 22%, 52%, 56%, 100% {
        opacity: 0.18;
        transform: translate3d(0, 0, 0) scale(0.985);
        filter: drop-shadow(0 0 8px rgba(255, 196, 120, 0.28)) drop-shadow(0 0 12px rgba(54, 215, 255, 0.08));
    }
    19% {
        opacity: 0.88;
        transform: translate3d(1px, -2px, 0) scale(1);
        filter: drop-shadow(0 0 14px rgba(255, 196, 120, 0.65)) drop-shadow(0 0 32px rgba(54, 215, 255, 0.24));
    }
    20% {
        opacity: 0.35;
        transform: translate3d(-1px, 1px, 0) scale(0.992);
    }
    21% {
        opacity: 0.95;
        transform: translate3d(0, -1px, 0) scale(1.02);
        filter: drop-shadow(0 0 18px rgba(255, 196, 120, 0.82)) drop-shadow(0 0 36px rgba(54, 215, 255, 0.32));
    }
    53% {
        opacity: 0.76;
        transform: translate3d(0, -3px, 0) scale(1.015);
    }
    54% {
        opacity: 0.28;
        transform: translate3d(1px, 2px, 0) scale(0.99);
    }
    55% {
        opacity: 0.82;
        transform: translate3d(-1px, -2px, 0) scale(1.01);
        filter: drop-shadow(0 0 16px rgba(255, 196, 120, 0.7)) drop-shadow(0 0 28px rgba(54, 215, 255, 0.22));
    }
}

@keyframes rayitoBoltSide {
    0%, 30%, 34%, 70%, 74%, 100% {
        opacity: 0.12;
        transform: translate3d(0, 0, 0) scale(0.98);
        filter: drop-shadow(0 0 8px rgba(255, 196, 120, 0.22)) drop-shadow(0 0 12px rgba(54, 215, 255, 0.05));
    }
    31% {
        opacity: 0.55;
        transform: translate3d(1px, -1px, 0) scale(1);
    }
    32% {
        opacity: 0.82;
        transform: translate3d(-1px, -2px, 0) scale(1.025);
        filter: drop-shadow(0 0 14px rgba(255, 196, 120, 0.7)) drop-shadow(0 0 24px rgba(54, 215, 255, 0.18));
    }
    33% {
        opacity: 0.2;
        transform: translate3d(1px, 1px, 0) scale(0.985);
    }
    71% {
        opacity: 0.68;
        transform: translate3d(0, -2px, 0) scale(1.015);
    }
    72% {
        opacity: 0.16;
        transform: translate3d(-1px, 1px, 0) scale(0.98);
    }
    73% {
        opacity: 0.58;
        transform: translate3d(1px, -1px, 0) scale(1.01);
    }
}

.login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    padding: 32px 16px;
}

.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(54, 215, 255, 0.16) 0%, rgba(54, 215, 255, 0.08) 30%, transparent 54%),
        radial-gradient(circle, rgba(217, 60, 255, 0.14) 0%, rgba(217, 60, 255, 0.08) 28%, transparent 52%),
        radial-gradient(circle, rgba(255, 155, 47, 0.12) 0%, rgba(255, 155, 47, 0.05) 24%, transparent 48%);
    filter: blur(28px);
}

.login-brand-art img {
    position: relative;
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 0 20px rgba(54, 215, 255, 0.20))
        drop-shadow(0 0 36px rgba(217, 60, 255, 0.16))
        drop-shadow(0 14px 22px rgba(0, 0, 0, 0.34));
    opacity: 0.98;
}

.login-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    opacity: 0.95;
    z-index: -2;
}

.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(54, 215, 255, 0.55) 0%, rgba(29, 107, 255, 0.22) 36%, transparent 68%);
}

.login:after {
    right: -12%;
    bottom: -4%;
    background: radial-gradient(circle, rgba(217, 60, 255, 0.58) 0%, rgba(255, 155, 47, 0.24) 34%, transparent 70%);
}

.login__block {
    max-width: 520px;
    width: 100%;
    background:
        linear-gradient(180deg, rgba(10, 18, 44, 0.92), rgba(17, 10, 37, 0.9)) !important;
}

.login__block__header {
    background:
        linear-gradient(135deg, rgba(29, 107, 255, 0.28), rgba(217, 60, 255, 0.2), rgba(255, 155, 47, 0.22)) !important;
    border-bottom: 1px solid rgba(54, 215, 255, 0.22);
}

.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(10, 18, 44, 0.92), rgba(31, 13, 54, 0.88)) !important;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(7, 14, 36, 0.96), rgba(17, 11, 38, 0.96)) !important;
}

.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 14px rgba(54, 215, 255, 0.35), 0 0 22px rgba(217, 60, 255, 0.22);
}

.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(54, 215, 255, 0.55), rgba(217, 60, 255, 0.3), rgba(255, 155, 47, 0.55));
    -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, var(--ryito-blue), var(--ryito-cyan), var(--ryito-magenta));
    border: 0;
    color: #fff !important;
    box-shadow: 0 0 18px rgba(54, 215, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.btn-outline-light {
    background: linear-gradient(90deg, rgba(29, 107, 255, 0.65), rgba(217, 60, 255, 0.65));
}

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

.form-control {
    background: rgba(4, 11, 30, 0.82);
    border: 1px solid rgba(54, 215, 255, 0.24);
    color: #fff;
}

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

.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;
}

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

.quick-stats__info h2,
.top-nav b {
    color: #fff;
    text-shadow: 0 0 12px rgba(54, 215, 255, 0.35);
}

.page-loader {
    background: linear-gradient(135deg, #060816, #120a26);
}

.user__img {
    box-shadow: 0 0 16px rgba(54, 215, 255, 0.3);
}
