        html {
            visibility: hidden;
        }

        #loginPage,
        #mainApp {
            display: none;
        }

        html[data-auth="out"] #loginPage {
            display: grid;
        }

        html[data-auth="in"] #mainApp {
            display: flex;
        }

        html[data-auth] {
            visibility: visible;
        }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    overflow-x: hidden;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

body.intro-active {
    overflow: hidden;
}

.intro-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 34%),
        radial-gradient(circle at bottom, rgba(124, 58, 237, 0.16), transparent 32%),
        linear-gradient(160deg, #020617 0%, #0f172a 48%, #111827 100%);
    z-index: 10040;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

body.intro-complete .intro-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-loader-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.intro-loader-visual {
    position: relative;
    display: grid;
    place-items: center;
}

.intro-loader-progress-ring {
    position: absolute;
    inset: -16px;
    border-radius: 42px;
    padding: 2px;
    background:
        conic-gradient(from 0deg, rgba(103, 232, 249, 0.12), rgba(103, 232, 249, 0.9), rgba(99, 102, 241, 0.7), rgba(192, 132, 252, 0.18), rgba(103, 232, 249, 0.12));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    filter: drop-shadow(0 0 12px rgba(103, 232, 249, 0.22));
    animation: introLoaderRingSpin 2.1s linear infinite;
}

.intro-loader-progress-ring::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.intro-loader-mark {
    position: relative;
    width: min(30vw, 196px);
    aspect-ratio: 1;
    border-radius: 34px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.92) 100%);
    box-shadow:
        0 32px 80px rgba(2, 6, 23, 0.72),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    animation: introMarkFloat 4s ease-in-out infinite;
}

.intro-loader-mark::before,
.intro-loader-mark::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.intro-loader-mark::before {
    background:
        radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.12), transparent 40%),
        linear-gradient(145deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.04), rgba(168, 85, 247, 0.08));
}

.intro-loader-mark::after {
    inset: 1px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.intro-loader-mark span {
    position: absolute;
    display: block;
}

.intro-t-core,
.intro-t-grid,
.intro-t-scan {
    top: 15%;
    left: 18%;
    width: 64%;
    height: 70%;
    clip-path: polygon(0 0, 100% 0, 100% 20%, 62% 20%, 62% 100%, 38% 100%, 38% 20%, 0 20%);
}

.intro-t-core {
    overflow: hidden;
    background: linear-gradient(155deg, #a5f3fc 0%, #67e8f9 14%, #38bdf8 28%, #3b82f6 50%, #4f46e5 72%, #8b5cf6 88%, #c084fc 100%);
    box-shadow:
        0 0 24px rgba(59, 130, 246, 0.22),
        0 0 62px rgba(124, 58, 237, 0.18);
    animation: introTFloat 4s ease-in-out infinite;
}

.intro-t-core::before,
.intro-t-core::after {
    content: '';
    position: absolute;
}

.intro-t-core::before {
    inset: 0;
    background:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0) 0 16px, rgba(255, 255, 255, 0.14) 16px 18px, rgba(255, 255, 255, 0) 18px 28px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.05) 34%, rgba(255, 255, 255, 0.18) 100%);
    opacity: 0.56;
    mix-blend-mode: screen;
    animation: introTData 3.2s linear infinite;
}

.intro-t-core::after {
    left: -42%;
    top: -8%;
    width: 184%;
    height: 20%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 26%, rgba(255, 255, 255, 0.96) 48%, rgba(125, 211, 252, 0.95) 52%, rgba(255, 255, 255, 0.74) 58%, transparent 84%);
    filter: blur(2px);
    transform: rotate(-10deg);
    animation: introTBeam 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.intro-t-grid {
    background:
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0 1px, rgba(255, 255, 255, 0) 1px 12px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, rgba(255, 255, 255, 0) 1px 14px);
    mix-blend-mode: screen;
    opacity: 0.16;
    animation: introTGrid 3.4s ease-in-out infinite;
}

.intro-t-glow {
    inset: 12%;
    border-radius: 28px;
    background: radial-gradient(circle at center, rgba(165, 243, 252, 0.16) 0%, rgba(56, 189, 248, 0.2) 26%, rgba(59, 130, 246, 0.16) 48%, rgba(124, 58, 237, 0.12) 66%, transparent 82%);
    opacity: 0.82;
    animation: introTGlow 3.8s ease-in-out infinite;
}

.intro-t-scan {
    overflow: hidden;
}

.intro-t-scan::before {
    content: '';
    position: absolute;
    left: -26%;
    top: -10%;
    width: 152%;
    height: 28%;
    background: linear-gradient(90deg, transparent 0%, rgba(125, 211, 252, 0.1) 18%, rgba(255, 255, 255, 0.88) 50%, rgba(125, 211, 252, 0.18) 82%, transparent 100%);
    filter: blur(3px);
    transform: rotate(-12deg);
    animation: introTScan 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.intro-loader-copy {
    text-align: center;
    color: #e2e8f0;
}

.intro-loader-copy strong {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.32em;
}

.intro-loader-copy span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    color: rgba(226, 232, 240, 0.72);
}

.intro-loader-copy span::after {
    content: '';
    width: 44px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(103, 232, 249, 0.16), rgba(103, 232, 249, 1), rgba(192, 132, 252, 0.24));
    animation: introCopyPulse 1.2s ease-in-out infinite;
}

.intro-loader-progress-bar {
    position: relative;
    width: min(280px, 56vw);
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, 0.38),
        0 8px 24px rgba(2, 6, 23, 0.28);
}

.intro-loader-progress-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(103, 232, 249, 0.12) 0%, rgba(103, 232, 249, 0.92) 42%, rgba(99, 102, 241, 0.92) 74%, rgba(192, 132, 252, 0.72) 100%);
    box-shadow: 0 0 18px rgba(103, 232, 249, 0.28);
    transform-origin: left center;
    transform: scaleX(0);
    animation: introLoaderProgressFill var(--intro-duration-ms, 5000ms) linear forwards;
}

body:not(.app-ready) #mainApp,
body.is-booting #mainApp {
    visibility: hidden;
}

.app-boot {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(248, 250, 252, 0.76);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
}

html[data-auth="in"] body:not(.app-ready) .app-boot,
body.is-booting .app-boot {
    display: flex;
}

.app-boot-card {
    width: min(420px, calc(100vw - 40px));
    padding: 22px 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.96);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-boot-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(37, 99, 235, 0.14);
    border-top-color: #2563eb;
    animation: appBootSpin 0.9s linear infinite;
    flex-shrink: 0;
}

.app-boot-copy strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
    margin-bottom: 0;
}

@keyframes appBootSpin {
    to { transform: rotate(360deg); }
}

@keyframes introMarkFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes introLoaderRingSpin {
    0% { transform: rotate(0deg); opacity: 0.82; }
    50% { opacity: 1; }
    100% { transform: rotate(360deg); opacity: 0.82; }
}

@keyframes introLoaderProgressFill {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

@keyframes introTFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.01); }
}

@keyframes introTData {
    0% { transform: translateX(0); opacity: 0.24; }
    50% { opacity: 0.52; }
    100% { transform: translateX(28px); opacity: 0.24; }
}

@keyframes introTBeam {
    0% { transform: translateY(-10%) rotate(-10deg); opacity: 0; }
    16% { opacity: 1; }
    74% { opacity: 0.95; }
    100% { transform: translateY(470%) rotate(-10deg); opacity: 0; }
}

@keyframes introTScan {
    0% { transform: translateY(-18%) rotate(-12deg); opacity: 0; }
    18% { opacity: 0.7; }
    72% { opacity: 0.62; }
    100% { transform: translateY(360%) rotate(-12deg); opacity: 0; }
}

@keyframes introTGrid {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.22; }
}

@keyframes introTGlow {
    0%, 100% { transform: scale(0.95); opacity: 0.46; }
    50% { transform: scale(1.03); opacity: 0.82; }
}

@keyframes introCopyPulse {
    0%, 100% { opacity: 0.42; transform: scaleX(0.72); }
    50% { opacity: 1; transform: scaleX(1); }
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(203, 213, 225, 0.82);
    box-shadow:
        0 14px 34px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.language-switcher button {
    border: none;
    background: transparent;
    color: #64748b;
    min-width: 50px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.22s ease;
    position: relative;
}

.language-switcher button:hover {
    color: #0f172a;
    background: rgba(241, 245, 249, 0.95);
}

.language-switcher button.active {
    background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    color: #ffffff;
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.language-switcher button.active::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-auth="out"] .language-switcher {
    top: 28px;
    right: 28px;
    left: auto;
    transform: translateX(0);
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.78) 0%, rgba(30, 41, 59, 0.74) 100%);
    border-color: rgba(125, 211, 252, 0.18);
    box-shadow:
        0 18px 44px rgba(2, 6, 23, 0.32),
        0 0 0 1px rgba(99, 102, 241, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Login v2 — language switcher repositioned via #loginPage selector at end of file */
.login-language-switcher {
    position: fixed;
    top: 22px;
    right: 26px;
    left: auto;
    transform: translateX(0);
    z-index: 10060;
    transition: left 0.3s ease, right 0.3s ease;
}

.header-language-switcher {
    padding: 3px;
    gap: 3px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(203, 213, 225, 0.96);
    box-shadow:
        0 8px 18px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.header-language-switcher button {
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

body.lang-en {
    direction: ltr;
}

html[data-auth="out"] body.lang-en .login-language-switcher {
    left: 28px;
    right: auto;
    transform: translateX(0);
}

body.lang-en .sidebar {
    left: 0;
    right: auto;
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    border-left: none;
}

body.lang-en .main-content {
    margin-left: 306px;
    margin-right: 0;
}

body.lang-en .app-container.sidebar-hidden .sidebar {
    transform: translateX(-100%);
}

body.lang-en .app-container.sidebar-hidden .main-content {
    margin-left: 0;
    margin-right: 0;
}

body.lang-en .password-input-container input {
    padding-right: 50px;
    padding-left: 16px;
}

body.lang-en .toggle-password {
    right: 14px;
    left: auto;
}

body.lang-en .sidebar-nav,
body.lang-en .nav-group-title,
body.lang-en .nav-item,
body.lang-en .nav-admin-button,
body.lang-en .user-info,
body.lang-en .current-user-meta,
body.lang-en .header-left,
body.lang-en .header-right,
body.lang-en .section-top,
body.lang-en .section-header,
body.lang-en .login-box,
body.lang-en .login-showcase,
body.lang-en .login-showcase-text,
body.lang-en .login-feature-item,
body.lang-en .login-metric,
body.lang-en .login-subtitle,
body.lang-en .login-footer,
body.lang-en .form-group label,
body.lang-en .table-controls,
body.lang-en .search-filter-row,
body.lang-en .section-actions {
    text-align: left;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(245, 199, 98, 0.26), transparent 32%),
        radial-gradient(circle at bottom left, rgba(191, 149, 63, 0.2), transparent 28%),
        linear-gradient(135deg, #0f0d09 0%, #17120b 32%, #21170d 64%, #0c0b09 100%);
    padding: 28px 20px;
    position: relative;
    overflow: hidden;
}

.login-animated-bg,
.login-animated-bg::before,
.login-animated-bg::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.login-animated-bg {
    overflow: hidden;
}

.login-animated-bg::before {
    content: '';
    background:
        linear-gradient(115deg, transparent 18%, rgba(247, 205, 110, 0.12) 32%, transparent 48%),
        linear-gradient(295deg, transparent 20%, rgba(255, 240, 202, 0.08) 36%, transparent 50%);
    transform: translateX(-18%);
    animation: loginLightSweep 14s linear infinite;
}

.login-animated-bg::after {
    content: '';
    inset: 8%;
    border-radius: 36px;
    border: 1px solid rgba(255, 232, 179, 0.06);
    mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8), transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8), transparent);
    animation: loginFramePulse 6s ease-in-out infinite;
}

.login-particle {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 231, 175, 0.92) 0%, rgba(255, 231, 175, 0.18) 38%, rgba(255, 231, 175, 0) 72%);
    box-shadow: 0 0 22px rgba(255, 216, 126, 0.24);
    opacity: 0.75;
}

.login-particle.p1 {
    width: 10px;
    height: 10px;
    top: 14%;
    left: 12%;
    animation: loginParticleDrift 9s ease-in-out infinite;
}

.login-particle.p2 {
    width: 14px;
    height: 14px;
    top: 22%;
    right: 16%;
    animation: loginParticleDrift 11s ease-in-out infinite -2.5s;
}

.login-particle.p3 {
    width: 8px;
    height: 8px;
    bottom: 18%;
    left: 22%;
    animation: loginParticleDrift 10.5s ease-in-out infinite -5s;
}

.login-particle.p4 {
    width: 12px;
    height: 12px;
    bottom: 14%;
    right: 24%;
    animation: loginParticleDrift 8.8s ease-in-out infinite -1.8s;
}

.login-container::before,
.login-container::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(10px);
    animation: loginFloat 18s ease-in-out infinite;
}

.login-container::before {
    width: 460px;
    height: 460px;
    top: -140px;
    right: -90px;
    background: radial-gradient(circle, rgba(245, 208, 119, 0.2) 0%, rgba(245, 208, 119, 0) 72%);
}

.login-container::after {
    width: 380px;
    height: 380px;
    bottom: -120px;
    left: -80px;
    background: radial-gradient(circle, rgba(255, 230, 164, 0.14) 0%, rgba(255, 230, 164, 0) 74%);
    animation-delay: -7s;
}

.login-shell {
    width: 100%;
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 440px);
    gap: 28px;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.login-showcase,
.login-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 226, 163, 0.16);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 240, 202, 0.08);
    backdrop-filter: blur(18px);
}

.login-showcase {
    padding: 42px;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(41, 29, 14, 0.88) 0%, rgba(20, 15, 10, 0.96) 100%);
    color: #f6e7be;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: loginPanelFloat 10s ease-in-out infinite, loginReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-showcase::before,
.login-showcase::after,
.login-box::before,
.login-box::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.login-showcase::before {
    inset: 0;
    background:
        linear-gradient(130deg, rgba(255, 226, 163, 0.08) 0%, rgba(255, 226, 163, 0) 38%),
        linear-gradient(330deg, rgba(255, 226, 163, 0.08) 0%, rgba(255, 226, 163, 0) 34%);
}

.login-showcase::after {
    width: 220px;
    height: 220px;
    left: -55px;
    bottom: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 205, 110, 0.22) 0%, rgba(247, 205, 110, 0) 72%);
    animation: loginOrbitalGlow 9s ease-in-out infinite;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 226, 163, 0.2);
    background: rgba(255, 240, 202, 0.06);
    color: #f6df9f;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 26px;
    animation: loginSoftPulse 4.6s ease-in-out infinite;
}

.login-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f8d784;
    box-shadow: 0 0 14px rgba(248, 215, 132, 0.72);
}

.login-showcase-title {
    color: #fff7df;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.18;
    margin-bottom: 14px;
    max-width: 540px;
}

.login-showcase-text {
    color: rgba(255, 243, 214, 0.78);
    font-size: 1.05rem;
    line-height: 1.9;
    max-width: 560px;
    margin-bottom: 28px;
}

.login-feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.login-feature-item {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 246, 222, 0.05);
    border: 1px solid rgba(255, 226, 163, 0.12);
    color: #f5e0a7;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 245, 221, 0.05);
    transform-origin: center bottom;
    animation: loginCardHoverFloat 6.4s ease-in-out infinite;
}

.login-feature-item:nth-child(2) {
    animation-delay: -1.7s;
}

.login-feature-item:nth-child(3) {
    animation-delay: -3.1s;
}

.login-feature-item small {
    display: block;
    color: rgba(255, 243, 214, 0.56);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 6px;
}

.login-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.login-metric {
    padding: 18px 18px 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 246, 222, 0.08) 0%, rgba(255, 246, 222, 0.03) 100%);
    border: 1px solid rgba(255, 226, 163, 0.12);
    animation: loginMetricGlow 7s ease-in-out infinite;
}

.login-metric:nth-child(2) {
    animation-delay: -2s;
}

.login-metric:nth-child(3) {
    animation-delay: -4.2s;
}

.login-metric strong {
    display: block;
    color: #fff2cc;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.login-metric span {
    color: rgba(255, 243, 214, 0.68);
    font-size: 0.84rem;
    line-height: 1.6;
}

.login-box {
    background:
        linear-gradient(180deg, rgba(33, 24, 14, 0.94) 0%, rgba(20, 15, 10, 0.98) 100%);
    border-radius: 30px;
    padding: 42px 40px 36px;
    width: 100%;
    max-width: 440px;
    z-index: 1;
    color: #fff9e8;
    animation: loginBoxFloat 8.8s ease-in-out infinite, loginReveal 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.08s;
}

.login-box::before {
    display: none;
}

.login-box::after {
    inset: 1px;
    border-radius: 29px;
    border: 1px solid rgba(255, 243, 214, 0.04);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.login-brand-mark {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, #6b4c17 0%, #d2a852 55%, #fff0bf 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #25180b;
    font-size: 1.7rem;
    font-weight: 900;
    box-shadow:
        0 16px 34px rgba(214, 168, 76, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.46);
    position: relative;
    overflow: hidden;
    animation: loginLogoPulse 4.2s ease-in-out infinite;
}

.login-brand-mark::before {
    inset: 1px;
    border-radius: 17px;
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.login-brand-mark::after {
    width: 38px;
    height: 38px;
    top: -12px;
    right: -10px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    filter: blur(2px);
    animation: loginLogoShimmer 3.8s ease-in-out infinite;
}

.login-brand-mark span {
    position: relative;
    z-index: 1;
    letter-spacing: 0.02em;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-align: center;
}

.login-brand-name {
    color: #fff2cc;
    font-size: 1.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.login-title {
    text-align: center;
    color: #fff6df;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: rgba(255, 243, 214, 0.76);
    font-size: 1rem;
    margin-bottom: 36px;
    line-height: 1.7;
    max-width: 290px;
    margin-left: auto;
    margin-right: auto;
}

.login-form .form-group label {
    color: #f6e7be;
    font-weight: 700;
}

.login-form .form-group label i {
    color: #f1c96f;
}

.login-form .form-group {
    opacity: 0;
    transform: translateY(18px);
    animation: loginItemReveal 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.login-form .form-group:nth-of-type(1) {
    animation-delay: 0.2s;
}

.login-form .form-group:nth-of-type(2) {
    animation-delay: 0.32s;
}

.login-form .form-group:nth-of-type(3) {
    animation-delay: 0.44s;
}

.login-form input {
    background: rgba(255, 249, 232, 0.06);
    border: 1px solid rgba(255, 226, 163, 0.14);
    border-radius: 16px;
    color: #fff8e7;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.12),
        0 0 0 0 rgba(244, 212, 138, 0);
}

.login-form input:focus {
    background: rgba(255, 249, 232, 0.1);
    border-color: rgba(244, 212, 138, 0.68);
    box-shadow: 0 0 0 4px rgba(244, 212, 138, 0.12);
}

.login-form input::placeholder {
    color: rgba(255, 243, 214, 0.42);
}

.password-input-container {
    position: relative;
}

.password-input-container input {
    padding-left: 50px;
}

.toggle-password {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 243, 214, 0.58);
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #f1c96f;
}

.remember-me {
    margin-bottom: 28px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: rgba(255, 243, 214, 0.76);
    font-weight: 600;
}

.checkbox-container input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #d5a94d;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #6f4c18 0%, #d4a953 52%, #fff0bf 100%);
    color: #21160a;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow:
        0 16px 34px rgba(212, 169, 83, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px);
    animation:
        loginItemReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.56s,
        loginButtonIdleGlow 4.4s ease-in-out infinite 1.4s;
}

.login-btn::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 -120%;
    width: 46%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 20px 42px rgba(212, 169, 83, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.login-btn:hover::after {
    left: 135%;
}

.login-footer {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 226, 163, 0.12);
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    animation: loginItemReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.68s;
}

.login-footer p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.7;
}

html[data-auth="out"] body.is-booting .login-btn {
    pointer-events: none;
    opacity: 0.92;
}

html[data-auth="out"] body.is-booting .login-btn i {
    animation: loginPulse 0.9s ease-in-out infinite;
}

@keyframes loginReveal {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes loginItemReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loginFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, 18px, 0);
    }
}

@keyframes loginLightSweep {
    0% {
        transform: translateX(-18%) translateY(0);
        opacity: 0.28;
    }
    50% {
        transform: translateX(18%) translateY(-2%);
        opacity: 0.7;
    }
    100% {
        transform: translateX(48%) translateY(0);
        opacity: 0.28;
    }
}

@keyframes loginFramePulse {
    0%, 100% {
        opacity: 0.28;
        transform: scale(1);
    }
    50% {
        opacity: 0.58;
        transform: scale(1.012);
    }
}

@keyframes loginParticleDrift {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(0.96);
        opacity: 0.35;
    }
    35% {
        transform: translate3d(12px, -18px, 0) scale(1.08);
        opacity: 0.95;
    }
    70% {
        transform: translate3d(-10px, -30px, 0) scale(0.88);
        opacity: 0.55;
    }
}

@keyframes loginPanelFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes loginBoxFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

@keyframes loginOrbitalGlow {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.38;
    }
    50% {
        transform: translate3d(16px, -12px, 0) scale(1.08);
        opacity: 0.82;
    }
}

@keyframes loginSoftPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(248, 215, 132, 0);
    }
    50% {
        box-shadow: 0 0 22px rgba(248, 215, 132, 0.12);
    }
}

@keyframes loginCardHoverFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes loginMetricGlow {
    0%, 100% {
        box-shadow: inset 0 1px 0 rgba(255, 245, 221, 0.04);
    }
    50% {
        box-shadow:
            0 12px 26px rgba(244, 212, 138, 0.08),
            inset 0 1px 0 rgba(255, 245, 221, 0.08);
    }
}

@keyframes loginLogoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 16px 34px rgba(214, 168, 76, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.46);
    }
    50% {
        transform: scale(1.045);
        box-shadow:
            0 20px 44px rgba(214, 168, 76, 0.36),
            inset 0 1px 0 rgba(255, 255, 255, 0.56);
    }
}

@keyframes loginLogoShimmer {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.45;
    }
    50% {
        transform: translate3d(-10px, 6px, 0) scale(1.15);
        opacity: 0.9;
    }
}

@keyframes loginButtonIdleGlow {
    0%, 100% {
        box-shadow:
            0 16px 34px rgba(212, 169, 83, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow:
            0 22px 44px rgba(212, 169, 83, 0.38),
            0 0 0 6px rgba(244, 212, 138, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.58);
    }
}

@keyframes loginPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.88);
        opacity: 0.72;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-animated-bg::before,
    .login-animated-bg::after,
    .login-particle,
    .login-container::before,
    .login-container::after,
    .login-showcase,
    .login-box,
    .login-badge,
    .login-feature-item,
    .login-metric,
    .login-brand-mark,
    .login-brand-mark::after,
    .login-form .form-group,
    .login-btn,
    .login-footer,
    html[data-auth="out"] body.is-booting .login-btn i {
        animation: none !important;
    }

    .login-btn,
    .login-btn::after {
        transition: none !important;
    }
}

@media (max-width: 1080px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 700px;
    }

    .login-showcase {
        padding: 32px 30px;
    }

    .login-showcase-title {
        font-size: 2.35rem;
        max-width: none;
    }
}

.login-animated-bg,
.login-showcase {
    display: none;
}

.login-shell {
    max-width: 460px;
    grid-template-columns: 1fr;
    justify-content: center;
}

.login-container {
    background:
        radial-gradient(circle at 20% 18%, rgba(103, 232, 249, 0.18), transparent 24%),
        radial-gradient(circle at 82% 78%, rgba(192, 132, 252, 0.16), transparent 28%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.14), transparent 38%),
        linear-gradient(160deg, #020617 0%, #0f172a 42%, #1e1b4b 72%, #3b0764 100%);
}

.login-container::before,
.login-container::after,
.login-box,
.login-form .form-group,
.login-footer {
    animation: none !important;
    opacity: 1;
    transform: none !important;
}

.login-container::before,
.login-container::after {
    filter: blur(36px);
    opacity: 0.86;
}

.login-container::before {
    width: 320px;
    height: 320px;
    top: -90px;
    right: -70px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.24) 0%, rgba(56, 189, 248, 0) 72%);
}

.login-container::after {
    width: 260px;
    height: 260px;
    bottom: -80px;
    left: -50px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.22) 0%, rgba(168, 85, 247, 0) 74%);
}

.login-box {
    max-width: none;
    padding: 42px 38px 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 255, 0.93) 100%);
    color: #1e293b;
    border: 1px solid rgba(191, 219, 254, 0.42);
    box-shadow:
        0 26px 70px rgba(2, 6, 23, 0.42),
        0 0 0 1px rgba(125, 211, 252, 0.06);
}

.login-brand {
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.login-brand-mark {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    position: relative;
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.92) 100%);
    box-shadow:
        0 10px 26px rgba(2, 6, 23, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: none;
}

.login-brand-mark::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.12), transparent 40%),
        linear-gradient(145deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.04), rgba(168, 85, 247, 0.08));
}

.login-brand-mark::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-brand-mark span {
    position: absolute;
    display: block;
    z-index: 2;
}

.login-brand-mark .intro-t-core,
.login-brand-mark .intro-t-grid,
.login-brand-mark .intro-t-scan {
    top: 15%;
    left: 18%;
    width: 64%;
    height: 70%;
}

.login-brand-mark .intro-t-glow {
    border-radius: 20px;
}

.login-title {
    margin-bottom: 10px;
    color: #0f172a;
}

.login-subtitle {
    margin-bottom: 28px;
    color: #475569;
}

.login-brand-name {
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 42%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-form .form-group label {
    color: #1e293b;
}

.login-form .form-group label i {
    color: #4f46e5;
}

.login-form input {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.92) 100%);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-form input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

.login-form input::placeholder {
    color: #64748b;
}

.toggle-password {
    color: #64748b;
}

.toggle-password:hover {
    color: #4f46e5;
}

.checkbox-container {
    color: #334155;
}

.checkbox-container input {
    accent-color: #4f46e5;
}

.login-btn {
    opacity: 1;
    transform: none;
    animation: loginButtonBreath 2.8s ease-in-out infinite;
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow:
        0 18px 38px rgba(59, 130, 246, 0.28),
        0 8px 18px rgba(124, 58, 237, 0.16);
}

.login-btn::after {
    left: -130%;
    transition: none;
    animation: loginButtonSweep 3.6s ease-in-out infinite 0.8s;
}

.login-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

html[data-auth="out"] body.is-booting .login-btn {
    animation: none;
}

html[data-auth="out"] body.is-booting .login-btn::after {
    animation: none;
}

@keyframes techTFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-1px) scale(1.015);
    }
}

@keyframes techTData {
    0% {
        transform: translateX(-8px);
        opacity: 0.2;
    }
    50% {
        transform: translateX(8px);
        opacity: 0.52;
    }
    100% {
        transform: translateX(-8px);
        opacity: 0.2;
    }
}

@keyframes techTScan {
    0%, 18% {
        top: -18px;
        opacity: 0;
    }
    28% {
        top: 6px;
        opacity: 1;
    }
    52% {
        top: 28px;
        opacity: 0.92;
    }
    74% {
        top: 48px;
        opacity: 0.38;
    }
    100% {
        top: 66px;
        opacity: 0;
    }
}

@keyframes techTGrid {
    0%, 100% {
        opacity: 0.16;
    }
    50% {
        opacity: 0.34;
    }
}

@keyframes techTGlow {
    0%, 100% {
        opacity: 0.16;
        transform: scale(0.96);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.04);
    }
}

@keyframes targiloTShape {
    0%, 14% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes loginButtonBreath {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow:
            0 16px 34px rgba(59, 130, 246, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: translateY(-2px) scale(1.01);
        box-shadow:
            0 22px 44px rgba(59, 130, 246, 0.34),
            0 0 0 6px rgba(59, 130, 246, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.58);
    }
}

@keyframes loginButtonSweep {
    0%, 18% {
        left: -130%;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    52% {
        left: 140%;
        opacity: 0.9;
    }
    100% {
        left: 140%;
        opacity: 0;
    }
}

.logout-btn {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.18) 0%, rgba(59, 130, 246, 0.24) 42%, rgba(139, 92, 246, 0.26) 100%);
    color: #ffffff;
    border: 1px solid rgba(125, 211, 252, 0.24);
    padding: 10px 20px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow:
        0 10px 22px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.24) 0%, rgba(59, 130, 246, 0.32) 44%, rgba(124, 58, 237, 0.34) 100%);
    border-color: rgba(125, 211, 252, 0.32);
    color: #ffffff;
    transform: translateY(-1px);
}

.hold-btn {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.94) 100%);
    color: #e2e8f0;
    border: 1px solid rgba(125, 211, 252, 0.18);
    padding: 10px 18px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow:
        0 10px 22px rgba(15, 23, 42, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.hold-btn:hover {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(17, 24, 39, 0.96) 100%);
    border-color: rgba(125, 211, 252, 0.28);
    color: #ffffff;
    transform: translateY(-1px);
}

.hold-btn:active {
    transform: translateY(0) scale(0.98);
}

.hold-btn.is-active {
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: #ffffff;
    border-color: rgba(191, 219, 254, 0.3);
    box-shadow:
        0 16px 30px rgba(59, 130, 246, 0.24),
        0 8px 18px rgba(124, 58, 237, 0.14);
}

.hold-btn i {
    font-size: 0.95rem;
}

.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.app-container::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.app-hold-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at top right, rgba(103, 232, 249, 0.12), transparent 22%),
        radial-gradient(circle at 20% 25%, rgba(59, 130, 246, 0.14), transparent 26%),
        radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.14), transparent 28%),
        rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.app-hold-overlay.is-active {
    display: flex;
}

.app-hold-backdrop {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.app-hold-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.38) 48%, rgba(2, 6, 23, 0.74) 100%);
}

.app-hold-backdrop .intro-loader-visual {
    width: min(58vw, 520px);
    aspect-ratio: 1;
    opacity: 0.2;
    filter: blur(1.2px) saturate(0.92);
    transform: scale(1.08);
}

.app-hold-backdrop .intro-loader-progress-ring {
    inset: 6px;
    opacity: 0.48;
    filter: drop-shadow(0 0 18px rgba(103, 232, 249, 0.14));
}

.app-hold-backdrop .intro-loader-mark {
    width: min(42vw, 320px);
    border-radius: 40px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.72) 0%, rgba(30, 41, 59, 0.54) 100%);
    box-shadow:
        0 28px 70px rgba(2, 6, 23, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app-hold-card {
    width: min(540px, 100%);
    padding: 36px 28px;
    border-radius: 28px;
    text-align: center;
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.94) 100%);
    border: 1px solid rgba(125, 211, 252, 0.16);
    box-shadow:
        0 28px 80px rgba(2, 6, 23, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.app-hold-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 20px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ffffff;
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    box-shadow:
        0 18px 34px rgba(59, 130, 246, 0.26),
        0 8px 18px rgba(124, 58, 237, 0.14);
}

.app-hold-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.app-hold-card p {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.app-hold-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 700;
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.18);
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.14) 42%, rgba(139, 92, 246, 0.16) 100%);
}

.sidebar {
    --sidebar-icon-size: 36px;
    --sidebar-icon-radius: 12px;
    --sidebar-icon-font-size: 1rem;
    --sidebar-item-padding-y: 12px;
    --sidebar-item-padding-x: 14px;
    --sidebar-item-gap: 12px;
    width: 306px;
    background:
        radial-gradient(circle at top, rgba(103, 232, 249, 0.16), transparent 24%),
        radial-gradient(circle at 82% 18%, rgba(59, 130, 246, 0.18), transparent 28%),
        radial-gradient(circle at 30% 70%, rgba(139, 92, 246, 0.14), transparent 32%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 42%, #111c31 74%, #0a1120 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    border-left: 1px solid rgba(148, 163, 184, 0.14);
    overflow: hidden;
    transition: transform 0.28s ease, width 0.28s ease, box-shadow 0.28s ease;
}

.sidebar-header {
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 6px 4px;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 42%),
        linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    box-shadow:
        0 10px 22px rgba(2, 6, 23, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(125, 211, 252, 0.14);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.logo-mark::before {
    content: 'T';
    background: linear-gradient(155deg, #a5f3fc 0%, #67e8f9 14%, #38bdf8 28%, #3b82f6 50%, #4f46e5 72%, #8b5cf6 88%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    transform: translateX(1px);
    position: relative;
    z-index: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
}

.logo-text::after {
    content: '';
    width: 52px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(103, 232, 249, 0.92) 0%, rgba(59, 130, 246, 0.46) 48%, rgba(139, 92, 246, 0.08) 100%);
}

.logo .brand-word {
    font-weight: 900;
    font-size: 1.42rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 34%, #60a5fa 72%, #67e8f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    white-space: nowrap;
}

.logo .brand-word {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

.sidebar-nav {
    flex: 1;
    padding: 18px 14px 12px;
    overflow-y: auto;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.22) 0%, rgba(30, 41, 59, 0.18) 100%);
    border: 1px solid rgba(125, 211, 252, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 24px rgba(2, 6, 23, 0.14);
}

.nav-group-title {
    padding: 4px 8px 8px;
    color: #dbeafe;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.nav-item {
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18) 0%, rgba(30, 41, 59, 0.12) 100%);
    border: 1px solid rgba(125, 211, 252, 0.06);
    color: #dbe7f5;
    padding: var(--sidebar-item-padding-y) var(--sidebar-item-padding-x);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--sidebar-item-gap);
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.22s ease;
    text-decoration: none;
}

.nav-item:hover {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.18) 44%, rgba(124, 58, 237, 0.18) 100%);
    border-color: rgba(125, 211, 252, 0.22);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.nav-item.active {
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    border-color: rgba(191, 219, 254, 0.34);
    color: white;
    box-shadow:
        0 16px 34px rgba(59, 130, 246, 0.26),
        0 10px 24px rgba(124, 58, 237, 0.18);
}

.nav-item i {
    width: var(--sidebar-icon-size);
    height: var(--sidebar-icon-size);
    border-radius: var(--sidebar-icon-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--sidebar-icon-font-size);
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(148, 163, 184, 0.08) 100%);
    color: #93c5fd;
    flex-shrink: 0;
}

.nav-item.active i {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.nav-admin-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px;
}

.nav-admin-button {
    width: 100%;
    border: 1px solid rgba(125, 211, 252, 0.08);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18) 0%, rgba(30, 41, 59, 0.12) 100%);
    color: #e2e8f0;
    padding: var(--sidebar-item-padding-y) var(--sidebar-item-padding-x);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: calc(var(--sidebar-item-gap) - 2px);
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-admin-button:hover {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.18) 44%, rgba(124, 58, 237, 0.18) 100%);
    border-color: rgba(125, 211, 252, 0.22);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.nav-admin-button i {
    width: calc(var(--sidebar-icon-size) - 2px);
    height: calc(var(--sidebar-icon-size) - 2px);
    border-radius: calc(var(--sidebar-icon-radius) - 1px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: calc(var(--sidebar-icon-font-size) - 0.02rem);
    color: #93c5fd;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(148, 163, 184, 0.08) 100%);
    flex-shrink: 0;
}

.section-readonly .section-actions {
    display: none !important;
}

.main-content {
    flex: 1;
    margin-right: 306px;
    display: flex;
    flex-direction: column;
    transition: margin-right 0.28s ease;
}

.top-header {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 248, 255, 0.92) 100%);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(191, 219, 254, 0.52);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-left h1 {
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 600;
}

.sidebar-toggle-btn {
    position: relative;
    border: 1px solid rgba(125, 211, 252, 0.18);
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.14) 42%, rgba(139, 92, 246, 0.16) 100%);
    color: #1d4ed8;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.12);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.sidebar-toggle-btn::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(224, 231, 255, 0.78));
}

.sidebar-toggle-btn::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
    z-index: 1;
}

.sidebar-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(59, 130, 246, 0.18), 0 8px 18px rgba(124, 58, 237, 0.1);
    border-color: rgba(125, 211, 252, 0.28);
}

.sidebar-toggle-btn:active {
    transform: translateY(0) scale(0.98);
}

.sidebar-toggle-btn i {
    position: relative;
    z-index: 2;
    width: 18px;
    text-align: center;
    font-size: 1rem;
    transition: transform 0.22s ease, color 0.22s ease;
}

.sidebar-toggle-btn[aria-expanded="true"] i {
    transform: translateX(1px);
}

.sidebar-toggle-btn[aria-expanded="false"] {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.16) 0%, rgba(59, 130, 246, 0.18) 42%, rgba(139, 92, 246, 0.18) 100%);
    border-color: rgba(125, 211, 252, 0.22);
}

.sidebar-toggle-btn[aria-expanded="false"]::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(191, 219, 254, 0.72));
}

.sidebar-toggle-btn[aria-expanded="false"]::after {
    background: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.sidebar-toggle-btn[aria-expanded="false"] i {
    transform: scale(0.98);
}

.sidebar-toggle-core {
    position: relative;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.app-container.sidebar-hidden .sidebar {
    transform: translateX(100%);
    box-shadow: none;
}

.app-container.sidebar-hidden .main-content {
    margin-right: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    padding: 8px 14px;
    border-radius: 16px;
    border: 1px solid rgba(191, 219, 254, 0.42);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 255, 0.92) 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.user-info i {
    font-size: 2rem;
    color: #3b82f6;
}

.current-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.current-user-meta small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.content-area {
    padding: 32px;
    flex: 1;
    background:
        radial-gradient(circle at top right, rgba(103, 232, 249, 0.06), transparent 22%),
        radial-gradient(circle at 18% 28%, rgba(59, 130, 246, 0.05), transparent 26%),
        radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.05), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f3f7fd 100%);
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.workspace-tabs-shell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px 0;
    overflow: hidden;
}

.workspace-tabs-list {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.workspace-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.workspace-tab.active {
    border-color: rgba(37, 99, 235, 0.28);
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.92) 0%, rgba(239, 246, 255, 0.96) 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.workspace-tab-trigger,
.workspace-tab-close {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.workspace-tab-trigger {
    gap: 8px;
    min-width: 0;
    color: #334155;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.92rem;
    font-weight: 700;
}

.workspace-tab.active .workspace-tab-trigger {
    color: #0f172a;
}

.workspace-tab-trigger:hover,
.workspace-tab-close:hover {
    background: rgba(148, 163, 184, 0.12);
}

.workspace-tab-trigger i {
    color: #2563eb;
    font-size: 0.86rem;
    flex-shrink: 0;
}

.workspace-tab-label {
    display: inline-block;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-tab-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #64748b;
    flex-shrink: 0;
}

.workspace-tab-close:active,
.workspace-tab-trigger:active {
    transform: scale(0.98);
}

.welcome-banner {
    background:
        linear-gradient(135deg, rgba(103, 232, 249, 0.14) 0%, rgba(59, 130, 246, 0.14) 42%, rgba(139, 92, 246, 0.14) 100%);
    padding: 20px 24px;
    border-radius: 18px;
    margin-bottom: 28px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    box-shadow:
        0 14px 30px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease, margin 0.35s ease, padding 0.35s ease;
    opacity: 1;
    transform: translateY(0);
    max-height: 120px;
    overflow: hidden;
}

.welcome-banner.is-hidden {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.welcome-banner p {
    color: #1e3a8a;
    font-size: 1rem;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 255, 0.94) 100%);
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.5);
    box-shadow:
        0 18px 38px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(125, 211, 252, 0.05);
}

.stat-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-text p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.stat-text h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow:
        0 14px 28px rgba(15, 23, 42, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.stat-icon.green {
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: white;
}

.stat-icon.red {
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: white;
}

.stat-icon.yellow {
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: white;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.dashboard-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(244, 248, 255, 0.95) 100%);
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.46);
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(125, 211, 252, 0.04);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(191, 219, 254, 0.42);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.78) 0%, rgba(239, 246, 255, 0.52) 100%);
}

.card-header h3 {
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
}

.card-header i {
    color: #4f46e5;
    font-size: 1.3rem;
}

.card-body {
    padding: 28px 24px;
}

.card-body.empty {
    text-align: center;
    padding: 40px 24px;
}

.card-body.empty i {
    font-size: 3.5rem;
    color: #10b981;
    margin-bottom: 16px;
}

.card-body.empty p {
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.card-body.empty span {
    color: #64748b;
    font-size: 0.9rem;
}

.alerts-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alerts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.alert-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.alerts-search {
    position: relative;
    min-width: 240px;
    flex: 1;
    max-width: 360px;
}

.alerts-search input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border-radius: 14px;
    border: 1px solid rgba(191, 219, 254, 0.5);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 100%);
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.alerts-search input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.alerts-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.alert-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.alert-summary-pill:hover {
    transform: translateY(-1px);
}

.alert-summary-pill.is-active {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.alert-summary-pill.expired {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.alert-summary-pill.warning {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 4px;
}

.alert-list::-webkit-scrollbar {
    width: 10px;
}

.alert-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.92) 0%, rgba(79, 70, 229, 0.9) 100%);
    border-radius: 999px;
    border: 2px solid #f8fafc;
}

.alert-list::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 999px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(191, 219, 254, 0.42);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 252, 0.9) 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.alert-item.expired {
    background: #fff7f7;
    border-color: #fecaca;
}

.alert-item.warning {
    background: #fffdf5;
    border-color: #fde68a;
}

.alert-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.alert-item.expired .alert-item-icon {
    background: #fee2e2;
    color: #dc2626;
}

.alert-item.warning .alert-item-icon {
    background: #fef3c7;
    color: #d97706;
}

.alert-item-content {
    min-width: 0;
    flex: 1;
}

.alert-item-content strong {
    display: block;
    color: #0f172a;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.alert-item-content p {
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.6;
}

.alert-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.alert-item.expired .alert-item-badge {
    background: #fee2e2;
    color: #b91c1c;
}

.alert-item.warning .alert-item-badge {
    background: #fef3c7;
    color: #b45309;
}

.alert-list-empty {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px dashed #dbe3ef;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    padding: 22px;
}

.alert-list-empty i {
    font-size: 1.6rem;
    color: #94a3b8;
}

.feature-blocker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.feature-blocker-overlay.is-hidden {
    display: none;
}

.feature-blocker-card {
    width: min(520px, calc(100vw - 36px));
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.24);
    padding: 18px 18px 16px;
    display: grid;
    grid-template-columns: 52px 1fr 40px;
    gap: 12px;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-blocker-spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid rgba(37, 99, 235, 0.18);
    border-top-color: #2563eb;
    animation: featureSpin 0.95s linear infinite;
}

@keyframes featureSpin {
    to { transform: rotate(360deg); }
}

.feature-blocker-content strong {
    display: block;
    color: #0f172a;
    font-size: 1.02rem;
    margin-bottom: 4px;
}

.feature-blocker-content span {
    display: block;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.feature-blocker-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #ffffff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.feature-blocker-close:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.chart-placeholder {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chart-shell.is-empty {
    align-items: center;
    justify-content: center;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

.chart-canvas-shell {
    width: 100%;
    overflow-x: auto;
}

.dashboard-bars-chart {
    display: block;
    width: 100%;
    min-width: 680px;
    height: 320px;
}

.chart-axis {
    stroke: #cbd5e1;
    stroke-width: 1.5;
}

.chart-bar {
    transition: opacity 0.2s ease;
}

.chart-bar:hover {
    opacity: 0.88;
}

.chart-bar.is-revenue {
    fill: #10b981;
}

.chart-bar.is-expense {
    fill: #ef4444;
}

.chart-month-label {
    fill: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.chart-empty-note {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.dot.green {
    background: #10b981;
}

.dot.red {
    background: #ef4444;
}

.section-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#vehicles {
    padding-top: 0;
}

#vehicles .section-top {
    margin-bottom: 0;
}

.vehicles-fixed-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.vehicles-fixed-panel .section-top {
    padding: 16px 20px;
    background: rgba(245, 247, 250, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.vehicles-cards-region {
    padding-top: 0;
}

.section-top h2 {
    font-size: 1.4rem;
    color: #0f172a;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: white;
    border: 1px solid rgba(125, 211, 252, 0.18);
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 30px rgba(59, 130, 246, 0.28),
        0 8px 18px rgba(124, 58, 237, 0.14);
}

.btn-secondary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(241, 245, 249, 0.96) 100%);
    color: #475569;
    border: 1px solid rgba(191, 219, 254, 0.42);
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(224, 231, 255, 0.88) 100%);
    color: #1e3a8a;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-excel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border: 1px solid rgba(191, 219, 254, 0.42);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    color: #334155;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-excel:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.btn-excel.import {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.14) 42%, rgba(99, 102, 241, 0.12) 100%);
    border-color: rgba(125, 211, 252, 0.28);
    color: #1d4ed8;
}

.btn-excel.export {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.1) 0%, rgba(59, 130, 246, 0.12) 40%, rgba(79, 70, 229, 0.12) 100%);
    border-color: rgba(125, 211, 252, 0.24);
    color: #2563eb;
}

.btn-excel.template {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.12) 48%, rgba(168, 85, 247, 0.14) 100%);
    border-color: rgba(167, 139, 250, 0.3);
    color: #6d28d9;
}

.btn-excel.danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.table-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    border-radius: 20px;
    border: 1px solid rgba(191, 219, 254, 0.44);
    box-shadow:
        0 18px 38px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(125, 211, 252, 0.04);
    overflow: hidden;
}

.table-cell-text {
    font-weight: 800;
    color: #0f172a;
}

.table-subtle {
    color: #64748b;
    font-weight: 700;
}

.claim-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}

.claim-status-badge.received {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.24);
}

.claim-status-badge.pending {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.28);
}

.table-months {
    display: inline-block;
    max-width: 240px;
    padding: 6px 10px;
    border-radius: 14px;
    border: 1px solid rgba(191, 219, 254, 0.42);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 100%);
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.45;
    white-space: normal;
}

.residency-years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

#residency-details-years.residency-years-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.residency-year-choice {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.residency-year-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.residency-year-payments {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.residency-payment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.residency-payment-main {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.month-chip.is-paid {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.month-chip.is-disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.residency-year-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    padding: 16px;
}

.residency-year-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.residency-year-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
}

.residency-year-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.residency-year-badge.is-outstanding {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.residency-year-months {
    margin: 10px 0 14px;
}

.residency-year-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.residency-year-metric {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 12px;
    background: #ffffff;
}

.residency-year-metric span {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.residency-year-metric strong {
    display: block;
    color: #0f172a;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

#residencies .table-container {
    overflow-x: auto;
    overflow-y: hidden;
}

#residencies .data-table {
    min-width: 1580px;
}

#residencies .data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}

#residencies .table-inline-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
}

#residencies .table-inline-actions .btn-inline-soft {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
}

#residencies .table-inline-actions .btn-inline-soft i {
    font-size: 0.95rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 16px 20px;
    text-align: right;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 16px 20px;
    text-align: right;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.table-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 800;
    direction: ltr;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.table-phone {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 800;
    direction: ltr;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.table-money {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.table-money.is-outstanding {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.vehicles-showcase {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-height: 0;
}

.vehicles-showcase-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.vehicles-showcase-head h3 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 1.02rem;
}

.vehicles-showcase-head p {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
}

.vehicles-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 700;
    white-space: nowrap;
    font-size: 0.88rem;
}

.vehicles-stats-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.vehicles-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.42);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.vehicles-stat-pill.active {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.14) 42%, rgba(99, 102, 241, 0.12) 100%);
    border-color: rgba(125, 211, 252, 0.24);
    color: #2563eb;
}

.vehicles-stat-pill.excluded {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.12) 48%, rgba(168, 85, 247, 0.14) 100%);
    border-color: rgba(167, 139, 250, 0.26);
    color: #5b21b6;
}

.vehicle-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    perspective: 1400px;
}

.vehicle-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.95) 100%);
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.46);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: box-shadow 0.28s ease, border-color 0.28s ease;
}

.vehicle-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(103, 232, 249, 0.16), transparent 32%), radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.12), transparent 28%);
    pointer-events: none;
}

.vehicle-card:hover {
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
    border-color: rgba(125, 211, 252, 0.3);
}

.vehicle-card-header,
.vehicle-card-body,
.vehicle-card-footer {
    position: relative;
    z-index: 1;
}

.vehicle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 16px 10px;
}

.vehicle-card-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.vehicle-icon-shell {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.18), 0 6px 14px rgba(124, 58, 237, 0.12);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.vehicle-title-text h3 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 0.96rem;
    line-height: 1.4;
}

.vehicle-title-text p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
}

.vehicle-plate-display,
.revenue-plate-display {
    margin-top: 4px;
}

.saudi-plate {
    display: inline-flex;
    align-items: stretch;
    direction: ltr;
    max-width: 100%;
    min-width: 148px;
    height: 54px;
    overflow: hidden;
    border-radius: 12px;
    border: 1.5px solid #0f172a;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.saudi-plate.is-white {
    border-color: #334155;
}

.saudi-plate.is-white .saudi-plate-main {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.saudi-plate.is-white .saudi-plate-side {
    background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
}

.saudi-plate.is-yellow .saudi-plate-main {
    background: linear-gradient(180deg, #fffdf2 0%, #ffffff 100%);
}

.saudi-plate.is-yellow .saudi-plate-side {
    background: linear-gradient(180deg, #fde68a 0%, #facc15 100%);
}

.saudi-plate.is-red .saudi-plate-main {
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}

.saudi-plate.is-red .saudi-plate-side {
    background: linear-gradient(180deg, #fda4af 0%, #ef4444 100%);
    color: #ffffff;
    border-right-color: rgba(127, 29, 29, 0.22);
}

.saudi-plate.is-blue .saudi-plate-main {
    background: linear-gradient(180deg, #f2f8ff 0%, #ffffff 100%);
}

.saudi-plate.is-blue .saudi-plate-side {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    color: #ffffff;
    border-right-color: rgba(30, 64, 175, 0.22);
}

.saudi-plate.is-compact {
    min-width: 134px;
    height: 46px;
    border-radius: 10px;
}

.saudi-plate.is-slim {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    height: 38px;
    border-radius: 9px;
}

.saudi-plate.is-mini {
    min-width: 118px;
    height: 40px;
    border-radius: 9px;
}

.saudi-plate-main {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.saudi-plate-number,
.saudi-plate-letters {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    min-width: 0;
}

.saudi-plate-number {
    border-left: 1px solid #cbd5e1;
}

.saudi-plate-top,
.saudi-plate-bottom {
    display: block;
    white-space: nowrap;
    text-align: center;
}

.saudi-plate-number .saudi-plate-top {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.saudi-plate-number .saudi-plate-bottom {
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.saudi-plate-letters .saudi-plate-top {
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 2px;
    direction: rtl;
}

.saudi-plate-letters .saudi-plate-bottom {
    color: #334155;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.saudi-plate-side {
    width: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background: linear-gradient(180deg, #fde68a 0%, #facc15 100%);
    border-right: 1px solid rgba(15, 23, 42, 0.18);
    color: #0f172a;
    font-size: 0.42rem;
    font-weight: 900;
    letter-spacing: 0.3px;
}

.saudi-plate.is-compact .saudi-plate-number .saudi-plate-top {
    font-size: 0.92rem;
}

.saudi-plate.is-compact .saudi-plate-letters .saudi-plate-top {
    font-size: 0.8rem;
}

.saudi-plate.is-slim .saudi-plate-number,
.saudi-plate.is-slim .saudi-plate-letters {
    padding: 2px 5px;
}

.saudi-plate.is-slim .saudi-plate-number .saudi-plate-top {
    font-size: 0.78rem;
}

.saudi-plate.is-slim .saudi-plate-number .saudi-plate-bottom {
    font-size: 0.58rem;
}

.saudi-plate.is-slim .saudi-plate-letters .saudi-plate-top {
    font-size: 0.65rem;
}

.saudi-plate.is-slim .saudi-plate-letters .saudi-plate-bottom {
    font-size: 0.55rem;
}

.saudi-plate.is-slim .saudi-plate-side {
    width: 16px;
    font-size: 0.3rem;
}

.saudi-plate.is-mini .saudi-plate-number,
.saudi-plate.is-mini .saudi-plate-letters {
    padding: 3px 6px;
}

.saudi-plate.is-mini .saudi-plate-number .saudi-plate-top {
    font-size: 0.82rem;
}

.saudi-plate.is-mini .saudi-plate-number .saudi-plate-bottom,
.saudi-plate.is-mini .saudi-plate-letters .saudi-plate-bottom {
    font-size: 0.62rem;
}

.saudi-plate.is-mini .saudi-plate-letters .saudi-plate-top {
    font-size: 0.7rem;
}

.saudi-plate.is-mini .saudi-plate-side {
    width: 18px;
    font-size: 0.36rem;
}

.vehicle-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.vehicle-status-active {
    background: #ecfdf5;
    color: #047857;
}

.vehicle-status-warning {
    background: #fff7ed;
    color: #c2410c;
}

.vehicle-status-expired {
    background: #fef2f2;
    color: #b91c1c;
}

.vehicle-status-unknown {
    background: #f1f5f9;
    color: #475569;
}

.vehicle-status-relinquished,
.vehicle-status-transferred,
.vehicle-status-sold {
    background: #eef2ff;
    color: #4338ca;
}

.vehicle-card-body {
    padding: 0 16px 14px;
}

.vehicle-highlight-row {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 8px;
    margin-bottom: 10px;
}

.vehicle-highlight-box {
    padding: 10px 11px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.vehicle-highlight-box span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 0.73rem;
}

.vehicle-highlight-box strong {
    color: #0f172a;
    font-size: 0.86rem;
    line-height: 1.35;
}

.vehicle-highlight-box.vehicle-serial-box strong,
.vehicle-highlight-box.vehicle-chassis-box strong {
    direction: ltr;
    unicode-bidi: isolate;
    display: block;
}

.vehicle-highlight-box.vehicle-serial-box strong {
    font-size: 0.8rem;
}

.vehicle-highlight-box.vehicle-chassis-box strong {
    font-size: 0.88rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.vehicle-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.vehicle-meta-item {
    padding: 10px 11px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid #e2e8f0;
}

.vehicle-meta-item span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 0.73rem;
}

.vehicle-meta-item strong {
    color: #1e293b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.vehicle-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0 16px 16px;
}

.vehicle-driver-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 0.76rem;
}

.vehicle-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vehicle-card-empty {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    padding: 46px 24px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.vehicle-card-empty i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 14px;
}

.vehicle-card-empty h3 {
    margin: 0 0 8px;
    color: #0f172a;
}

.vehicle-card-empty p {
    margin: 0;
    color: #64748b;
}

.revenue-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 360px));
    gap: 18px;
    margin-bottom: 22px;
    justify-content: start;
}

.revenues-toolbar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 14px;
    align-items: stretch;
    width: max-content;
    max-width: 100%;
    margin: 0 0 22px auto;
}

.revenues-toolbar-note,
.revenues-search-panel {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    padding: 14px 16px;
    width: 320px;
    flex: 0 0 320px;
    max-width: 320px;
}

.revenues-search-panel {
    order: 1;
    width: 360px;
    flex: 0 0 360px;
    max-width: 360px;
}

.revenues-toolbar-note {
    order: 2;
}

.revenues-toolbar-note {
    display: flex;
    align-items: center;
    gap: 10px;
}

.revenues-toolbar-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    flex-shrink: 0;
}

.revenues-toolbar-note h3,
.revenues-search-panel h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 0.94rem;
}

.revenues-toolbar-note p,
.revenues-search-panel p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.7;
}

.revenues-search-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.revenues-search-field {
    position: relative;
}

.revenues-search-field i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.revenues-search-field input {
    width: 100%;
    padding: 12px 50px 12px 14px;
    border: 1px solid #dbe3ef;
    border-radius: 13px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.88rem;
}

.revenues-search-field input:focus {
    outline: none;
    border-color: #93c5fd;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.revenues-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.revenues-overview-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.revenues-overview-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
}

.revenues-overview-content span {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.revenues-overview-content strong {
    display: block;
    color: #0f172a;
    font-size: 1.08rem;
}

.revenues-overview-card.is-outstanding {
    background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
    border-color: #fdba74;
}

.revenues-overview-card.is-outstanding .revenues-overview-icon {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.revenues-overview-card.is-outstanding .revenues-overview-content strong,
.revenues-overview-card.is-outstanding .revenues-overview-content span {
    color: #c2410c;
}

.revenues-overview-card.is-count {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    border-color: #bfdbfe;
}

.revenues-overview-card.is-count .revenues-overview-icon {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.revenues-overview-card.is-count .revenues-overview-content strong,
.revenues-overview-card.is-count .revenues-overview-content span {
    color: #1d4ed8;
}

@media (max-width: 1080px) {
    .revenues-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .revenue-summary-grid {
        grid-template-columns: 1fr;
    }
}

.revenue-summary-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.revenue-summary-header,
.revenue-summary-body,
.revenue-summary-footer {
    padding: 18px 20px;
}

.revenue-summary-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1px solid #edf2f7;
}

.revenue-summary-title {
    width: 100%;
    min-width: 0;
}

.revenue-summary-title-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.revenue-summary-main-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.revenue-plate-display {
    margin-top: 0;
    flex-shrink: 0;
}

.revenue-driver-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.revenue-driver-chip.is-inline {
    flex: 1;
    min-width: 0;
}

.revenue-driver-chip.is-name {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font-size: 0.96rem;
    font-weight: 800;
}

.revenue-driver-chip.is-name i {
    display: none;
}

.revenue-driver-chip.is-archived {
    padding: 7px 10px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: 0.75rem;
    font-weight: 900;
}

.revenue-serial-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: normal;
    align-self: flex-start;
}

.revenue-serial-chip i {
    color: #64748b;
}

.revenue-summary-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.revenue-registration-box {
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
}

.revenue-registration-box span {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

.revenue-registration-box strong {
    color: #1e3a8a;
    font-size: 0.92rem;
    line-height: 1.5;
}

.revenue-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.revenue-metric-item {
    padding: 12px 13px;
    border-radius: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.revenue-metric-item.is-outstanding {
    background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
    border-color: #fdba74;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.14);
}

.revenue-metric-item.is-outstanding span,
.revenue-metric-item.is-outstanding strong {
    color: #c2410c;
}

.revenue-metric-item span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.revenue-metric-item strong {
    color: #0f172a;
    font-size: 0.88rem;
    line-height: 1.4;
}

.revenue-form-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 0.83rem;
    line-height: 1.8;
}

.vehicle-search-wrap {
    position: relative;
}

.vehicle-search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
    z-index: 120;
    overflow: hidden;
    max-height: 280px;
    overflow-y: auto;
}

.vehicle-search-suggestions.is-hidden {
    display: none;
}

.vehicle-suggestion-item {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: right;
}

.vehicle-suggestion-item:hover,
.vehicle-suggestion-item.is-active {
    background: #f1f5f9;
}

.vehicle-suggestion-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.vehicle-suggestion-plate {
    color: #0f172a;
    font-weight: 900;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-suggestion-meta {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-suggestion-tag {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 900;
}

.vehicle-suggestion-tag.is-excluded {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.vehicle-suggestion-item.is-disabled {
    cursor: not-allowed;
    opacity: 0.78;
}

.vehicle-suggestion-item.is-disabled:hover {
    background: transparent;
}

.revenue-form-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.expense-form-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.expense-form-hero {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    border: 1px solid #fed7aa;
}

.expense-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.expense-form-hero h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.1rem;
}

.expense-form-hero p {
    margin: 0;
    color: #475569;
    line-height: 1.8;
    font-size: 0.9rem;
}

.expense-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.expense-form-panel {
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.expense-form-panel h4 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.expense-form-panel.full-width {
    grid-column: 1 / -1;
}

.expense-form-hint {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
    border: 1px dashed #fdba74;
    color: #9a3412;
    font-size: 0.85rem;
    line-height: 1.8;
}

#expense-modal .modal-content {
    max-width: 940px;
}

.violation-type-form-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.violation-type-form-hero {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
    border: 1px solid #c7d2fe;
}

.violation-type-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    color: #4338ca;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.violation-type-form-hero h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.1rem;
}

.violation-type-form-hero p {
    margin: 0;
    color: #475569;
    line-height: 1.8;
    font-size: 0.9rem;
}

.violation-type-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.violation-type-form-panel {
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.violation-type-form-panel h4 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.violation-type-form-panel.full-width {
    grid-column: 1 / -1;
}

.violation-type-form-hint {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #eef2ff;
    border: 1px dashed #a5b4fc;
    color: #4338ca;
    font-size: 0.85rem;
    line-height: 1.8;
}

.residency-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.residency-summary-item.full {
    grid-column: 1 / -1;
}

.residency-summary-label {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.residency-summary-value {
    font-weight: 800;
    color: #0f172a;
}

.residency-summary-value.accent {
    font-weight: 900;
    color: #1d4ed8;
}

.residency-summary-hint {
    margin-top: 12px;
}

.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.month-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.month-chip input {
    display: none;
}

.month-chip.is-selected {
    background: rgba(37, 99, 235, 0.12);
    border-color: #93c5fd;
    color: #1d4ed8;
}

#residency-payment-modal .month-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#violation-type-modal .modal-content {
    max-width: 820px;
}

.violation-form-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.violation-form-hero {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #bfdbfe;
}

.violation-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.violation-form-hero h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.1rem;
}

.violation-form-hero p {
    margin: 0;
    color: #475569;
    line-height: 1.8;
    font-size: 0.9rem;
}

.violation-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.violation-form-panel {
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.violation-form-panel h4 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.violation-form-panel.full-width {
    grid-column: 1 / -1;
}

.violation-form-hint {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    color: #1d4ed8;
    font-size: 0.85rem;
    line-height: 1.8;
}

#violation-modal .modal-content {
    max-width: 900px;
}

#general-daily-modal .modal-content,
#bank-daily-modal .modal-content {
    max-width: 960px;
    margin: 10px auto 16px;
    border-radius: 22px;
}

#general-daily-modal .modal-header,
#bank-daily-modal .modal-header {
    padding: 22px 28px;
}

#general-daily-modal .modal-body,
#bank-daily-modal .modal-body {
    padding: 26px 28px 18px;
}

#general-daily-modal .modal-footer,
#bank-daily-modal .modal-footer {
    padding: 18px 28px 24px;
}

#general-daily-modal .vehicle-modal-headline,
#bank-daily-modal .vehicle-modal-headline {
    padding: 22px 28px 0;
}

#residency-modal .modal-content {
    max-width: 1040px;
    margin: 10px auto 16px;
    border-radius: 22px;
}

#residency-modal .modal-header {
    padding: 22px 28px;
}

#residency-modal .modal-body {
    padding: 26px 28px 18px;
}

#residency-modal .modal-footer {
    padding: 18px 28px 24px;
}

#residency-modal .vehicle-modal-headline {
    padding: 22px 28px 0;
}

#residency-modal .form-group label {
    font-size: 1rem;
}

#residency-modal .form-group input,
#residency-modal .form-group select,
#residency-modal .form-group textarea {
    padding: 14px 16px;
    font-size: 1rem;
}

#residency-payment-modal .modal-content {
    max-width: 940px;
    margin: 10px auto 16px;
    border-radius: 22px;
}

#residency-payment-modal .modal-header {
    padding: 22px 28px;
}

#residency-payment-modal .modal-body {
    padding: 26px 28px 18px;
}

#residency-payment-modal .modal-footer {
    padding: 18px 28px 24px;
}

#residency-payment-modal .vehicle-modal-headline {
    padding: 22px 28px 0;
}

#residency-payment-modal .form-group label {
    font-size: 1rem;
}

#residency-payment-modal .form-group input,
#residency-payment-modal .form-group select,
#residency-payment-modal .form-group textarea {
    padding: 14px 16px;
    font-size: 1rem;
}

#residency-years-modal .modal-content {
    max-width: 1040px;
    margin: 10px auto 16px;
    border-radius: 22px;
}

#residency-years-modal .modal-header {
    padding: 22px 28px;
}

#residency-years-modal .modal-body {
    padding: 26px 28px 18px;
}

#residency-years-modal .modal-footer {
    padding: 18px 28px 24px;
}

#residency-years-modal .vehicle-modal-headline {
    padding: 22px 28px 0;
}

#residency-years-modal .residency-years-grid {
    margin-top: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
    #residency-years-modal .residency-years-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    #residency-years-modal .residency-years-grid {
        grid-template-columns: 1fr;
    }
}

#general-daily-modal .form-group label,
#bank-daily-modal .form-group label {
    font-size: 1rem;
}

#general-daily-modal .form-group input,
#general-daily-modal .form-group select,
#general-daily-modal .form-group textarea,
#bank-daily-modal .form-group input,
#bank-daily-modal .form-group select,
#bank-daily-modal .form-group textarea {
    padding: 14px 16px;
    font-size: 1rem;
}

.table-inline-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.revenue-form-hero {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
}

.revenue-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.revenue-form-hero h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.1rem;
}

.revenue-form-hero p {
    margin: 0;
    color: #475569;
    line-height: 1.8;
    font-size: 0.9rem;
}

.revenue-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.revenue-form-panel {
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.revenue-form-panel h4 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.revenue-form-panel.full-width {
    grid-column: 1 / -1;
}

#transfer-modal .modal-content {
    max-width: 860px;
}

#insurance-claims-modal .modal-content {
    max-width: 980px;
}

.transfer-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.transfer-form-panel {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.transfer-form-panel.full-width {
    grid-column: 1 / -1;
}

.transfer-form-panel h4 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transfer-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.transfer-summary-item {
    padding: 14px 15px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.transfer-summary-item span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.transfer-summary-item strong {
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.4;
}

.transfer-summary-item.is-net {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-color: #a7f3d0;
}

.transfer-summary-item.is-net strong,
.transfer-summary-item.is-net span {
    color: #047857;
}

.transfer-form-hint {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.84rem;
    line-height: 1.8;
}

.transfer-readonly {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
}

.debt-vehicle-card {
    border-radius: 22px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

#debts-cards.revenue-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.debt-vehicle-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
}

.debt-card-info {
    min-width: 0;
}

.debt-card-title {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.6;
}

.debt-card-line {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.debt-card-line strong {
    color: #334155;
    font-weight: 900;
}

.debt-card-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    min-width: 132px;
}

.debt-card-summary .vehicle-plate-display {
    align-self: flex-start;
}

.debt-balance-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
    border: 1px solid #fdba74;
    color: #991b1b;
    font-size: 0.86rem;
    font-weight: 900;
    white-space: normal;
    min-width: 132px;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.12);
}

.debt-balance-chip i {
    display: none;
}

.debt-balance-chip small {
    color: #7f1d1d;
    font-size: 0.82rem;
    font-weight: 900;
}

.debt-balance-chip strong {
    color: #991b1b;
    font-size: 1.05rem;
    line-height: 1.2;
}

.debt-balance-chip.is-settled {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-color: #86efac;
    color: #166534;
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.09);
}

.debt-balance-chip.is-settled small,
.debt-balance-chip.is-settled strong {
    color: #166534;
}

.debt-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.debt-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.77rem;
    font-weight: 700;
}

.debt-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
}

.debt-card-actions .btn-inline-soft {
    background: #ffffff;
    padding: 9px 11px;
    font-size: 0.78rem;
    white-space: nowrap;
}

#users-admin-modal .modal-content.users-admin-modal-content {
    max-width: 1600px;
    width: calc(100vw - 8px);
    min-height: calc(100vh - 8px);
    max-height: calc(100vh - 8px);
    height: calc(100vh - 8px);
    margin: 4px auto;
    border-radius: 22px;
}

.users-admin-layout {
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(780px, 1fr);
    gap: 22px;
    align-items: start;
}

.users-admin-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
}

.users-admin-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.users-admin-panel-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
}

.users-admin-panel-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.6;
}

.users-admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 72vh;
    overflow: auto;
    padding-inline-end: 4px;
}

.users-admin-card {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.users-admin-card.is-inactive {
    opacity: 0.78;
    background: #f8fafc;
}

.users-admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.users-admin-card-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.users-admin-card-title strong {
    color: #0f172a;
    font-size: 0.98rem;
}

.users-admin-card-title span {
    color: #64748b;
    font-size: 0.82rem;
}

.users-admin-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.users-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

.users-admin-badge.role {
    background: #eff6ff;
    color: #1d4ed8;
}

.users-admin-badge.active {
    background: #ecfdf5;
    color: #047857;
}

.users-admin-badge.inactive {
    background: #fef2f2;
    color: #b91c1c;
}

.users-admin-card-summary {
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.7;
}

.users-admin-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.users-admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.users-permissions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 12px;
}

.users-permissions-head h4 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.users-permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1320px) {
    #users-admin-modal .modal-content.users-admin-modal-content {
        width: calc(100vw - 10px);
    }

    .users-admin-layout {
        grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    }
}

@media (max-width: 980px) {
    #users-admin-modal .modal-content.users-admin-modal-content {
        width: calc(100vw - 6px);
        min-height: calc(100vh - 6px);
        max-height: calc(100vh - 6px);
        height: calc(100vh - 6px);
        margin: 3px auto;
        border-radius: 18px;
    }

    .users-admin-layout {
        grid-template-columns: 1fr;
    }
}

.users-permission-group {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 14px;
}

.users-permission-group h5 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 0.92rem;
}

.users-permission-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.users-permission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}

.users-permission-item input {
    width: 17px;
    height: 17px;
    accent-color: #2563eb;
}

.backup-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.backup-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
    border-radius: 22px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
    border: 1px solid #dbeafe;
}

.backup-hero h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.9rem;
}

.backup-hero p {
    margin: 0;
    color: #475569;
    line-height: 1.8;
}

.backup-hero-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 1.9rem;
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.14);
}

.backup-grid {
    display: grid;
    grid-template-columns: minmax(330px, 0.88fr) minmax(420px, 1.12fr);
    gap: 20px;
}

.backup-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.backup-card-head {
    padding: 18px 22px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.backup-card-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.16rem;
}

.backup-card-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.backup-card-body {
    padding: 22px;
}

.backup-status-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
}

.backup-status-badge {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    background: #22c55e;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 18px 30px rgba(34, 197, 94, 0.24);
}

.backup-status-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.backup-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.backup-status-line:last-child {
    border-bottom: none;
}

.backup-status-line span {
    color: #64748b;
    font-weight: 700;
}

.backup-status-line strong {
    color: #0f172a;
    font-weight: 800;
    text-align: left;
}

.backup-status-line strong.status-ok {
    color: #16a34a;
}

.backup-status-actions {
    margin-top: 22px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.backup-tips-list {
    margin: 0;
    padding: 0 18px 0 0;
    color: #475569;
    line-height: 2;
}

.backup-tips-list li::marker {
    color: #d4af37;
}

.backup-list-card .backup-card-body {
    padding: 0;
}

.backup-list-head {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef2f7;
}

.backup-list-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.14rem;
}

.backup-list-head .backup-count {
    color: #1d4ed8;
    font-weight: 800;
}

.backup-table-wrap {
    overflow-x: auto;
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
}

.backup-table th {
    background: #1e2a8a;
    color: #ffffff;
    padding: 14px 16px;
    font-size: 0.9rem;
    text-align: center;
}

.backup-table td {
    padding: 16px;
    border-bottom: 1px solid #eef2f7;
    text-align: center;
    color: #0f172a;
    vertical-align: middle;
}

.backup-table tr:last-child td {
    border-bottom: none;
}

.backup-file-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-weight: 800;
}

.backup-file-cell i {
    color: #4f46e5;
}

.backup-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.76rem;
    font-weight: 800;
}

.backup-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-backup-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(191, 219, 254, 0.42);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    color: #1e3a8a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-backup-icon:hover {
    transform: translateY(-2px);
}

.btn-backup-icon.download {
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.24);
}

.btn-backup-icon.restore {
    color: #4338ca;
    border-color: rgba(67, 56, 202, 0.24);
}

.btn-backup-icon.delete {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.24);
}

.backup-empty {
    padding: 34px 22px;
    text-align: center;
    color: #64748b;
}

.backup-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #94a3b8;
}

.debt-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.debt-breakdown-panel {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(191, 219, 254, 0.46);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.95) 100%);
    min-width: 0;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

.debt-breakdown-panel.is-violations {
    order: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 16px 30px rgba(59, 130, 246, 0.08);
}

.debt-breakdown-panel.is-annuals {
    order: 2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 16px 30px rgba(124, 58, 237, 0.08);
}

.debt-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
}

.debt-panel-head h4 {
    margin: 0;
    color: #0f172a;
    font-size: 1.08rem;
}

.debt-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 800;
}

.debt-count-badge.is-warning {
    color: #c2410c;
}

.debt-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.debt-mini-item {
    padding: 13px 14px;
    border-radius: 15px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.debt-mini-item span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
}

.debt-mini-item strong {
    color: #0f172a;
    font-size: 0.86rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.debt-details {
    margin-top: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
}

.debt-vehicle-body {
    padding-top: 14px;
}

.debt-details summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 800;
    color: #0f172a;
    background: #f8fafc;
}

.debt-details summary::-webkit-details-marker {
    display: none;
}

.debt-details-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.debt-details-icon {
    color: #64748b;
    transition: transform 0.2s ease;
}

.debt-details[open] .debt-details-icon {
    transform: rotate(90deg);
}

.debt-detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.debt-detail-row {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.debt-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.debt-row-top strong {
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.5;
}

.debt-row-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.74rem;
    font-weight: 700;
}

.debt-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.debt-row-meta {
    margin-bottom: 10px;
}

.debt-row-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
}

.debt-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.debt-detail-stat {
    padding: 11px 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.debt-detail-stat span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.73rem;
    font-weight: 700;
}

.debt-detail-stat strong {
    color: #0f172a;
    font-size: 0.84rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.debt-detail-stat.is-outstanding {
    background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
    border-color: #fdba74;
}

.debt-detail-stat.is-outstanding strong,
.debt-detail-stat.is-outstanding span {
    color: #c2410c;
}

.debt-empty-state {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    padding: 44px 26px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.debt-empty-state i {
    font-size: 2.9rem;
    color: #2563eb;
    margin-bottom: 14px;
}

.debt-empty-state h3 {
    margin: 0 0 8px;
    color: #0f172a;
}

.debt-empty-state p {
    margin: 0;
}

@media (max-width: 1280px) {
    #debts-cards.revenue-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

#revenue-modal .modal-content {
    max-width: 760px;
}

@media (max-width: 768px) {
    .violation-form-grid,
    .violation-type-form-grid,
    .expense-form-grid,
    .revenue-form-grid,
    .transfer-form-grid,
    .transfer-summary-grid,
    .debt-breakdown-grid,
    .debt-mini-grid,
    .debt-detail-stats,
    #debts-cards.revenue-summary-grid {
        grid-template-columns: 1fr;
    }

    .debt-vehicle-header {
        grid-template-columns: 1fr;
    }

    .debt-card-summary {
        min-width: 0;
    }
}

.annual-linked-revenues {
    margin-top: 18px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.annual-linked-revenues-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.annual-linked-revenues-header h4 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.annual-linked-revenues-header p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.84rem;
}

.annual-linked-revenues-list {
    display: grid;
    gap: 12px;
}

.annual-inline-revenue-editor {
    display: none;
    margin-bottom: 14px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #dbeafe;
    background: linear-gradient(145deg, #f8fbff 0%, #eff6ff 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.annual-inline-revenue-editor.active {
    display: block;
}

.annual-inline-revenue-editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.annual-inline-revenue-editor-head h5 {
    margin: 0;
    color: #0f172a;
    font-size: 0.98rem;
}

.annual-inline-revenue-editor-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.82rem;
}

.annual-inline-revenue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.annual-inline-revenue-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.annual-linked-revenue-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.annual-linked-revenue-item-main strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 0.92rem;
}

.annual-linked-revenue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 0.82rem;
}

.annual-linked-revenue-notes {
    margin-top: 8px;
    color: #475569;
    font-size: 0.82rem;
    line-height: 1.7;
}

.annual-revenue-classification {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.annual-revenue-classification.cash {
    background: #ecfdf5;
    color: #047857;
}

.annual-revenue-classification.bank {
    background: #eff6ff;
    color: #1d4ed8;
}

.annual-revenue-classification.other {
    background: #f8fafc;
    color: #475569;
}

.annual-linked-revenue-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.annual-revenue-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.annual-revenue-status.paid {
    background: #eff6ff;
    color: #1d4ed8;
}

.annual-revenue-status.remaining {
    background: #fff7ed;
    color: #c2410c;
}

.annual-linked-revenue-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.annual-linked-revenue-action {
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #334155;
    border-radius: 12px;
    padding: 7px 11px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.annual-linked-revenue-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.annual-linked-revenue-action.delete {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.annual-linked-revenues-empty {
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed #cbd5e1;
    background: #fff;
    text-align: center;
    color: #64748b;
    line-height: 1.9;
}

.revenue-summary-footer {
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 0.82rem;
}

.revenue-summary-footer strong {
    color: #0f172a;
}

.revenue-summary-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-revenue-manage {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-revenue-manage:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.btn-revenue-records {
    border-color: #cbd5e1;
    background: #fff;
    color: #334155;
}

.btn-revenue-records.active {
    border-color: #bfdbfe;
    background: #dbeafe;
    color: #1d4ed8;
}

.revenue-records-panel {
    margin-top: 18px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.revenue-records-panel.is-active {
    border-color: #bfdbfe;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.08);
}

.revenue-records-placeholder {
    min-height: 120px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    color: #64748b;
    padding: 24px 18px;
}

.revenue-records-placeholder i {
    font-size: 1.3rem;
    color: #94a3b8;
}

.revenue-records-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.revenue-records-header h3 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 1rem;
}

.revenue-records-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.84rem;
}

.btn-inline-soft.is-danger {
    color: #be123c;
    background: #fff1f2;
    border-color: #fecdd3;
}

.revenue-records-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.revenue-records-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe3ef;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
}

.revenue-records-meta .revenue-records-plate {
    padding: 0;
    background: transparent;
    border: 0;
}

.revenue-records-list {
    display: grid;
    gap: 12px;
}

.revenue-record-entry {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.revenue-record-main {
    flex: 1;
    min-width: 0;
}

.revenue-record-main strong {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 0.95rem;
}

.revenue-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 0.82rem;
}

.revenue-record-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.revenue-record-notes {
    margin-top: 10px;
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.8;
}

.revenue-record-side {
    min-width: 210px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.revenue-record-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    .revenue-record-entry {
        flex-direction: column;
    }

    .revenue-record-side {
        width: 100%;
        min-width: 0;
        align-items: stretch;
    }

    .revenue-record-actions {
        justify-content: flex-end;
    }
}

.annual-modal-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.annual-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 800;
    font-size: 0.86rem;
}

.annual-modal-subtitle {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.annual-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.annual-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 800;
    font-size: 0.82rem;
}

.annual-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.annual-summary-grid .form-group {
    margin: 0;
}

.annual-summary-grid input[readonly] {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 800;
}

.annual-workspace {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(620px, 1fr);
    gap: 20px;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 4px;
}

.annual-side-column,
.annual-main-column {
    min-width: 0;
}

.annual-side-column {
    width: 100%;
    max-width: 380px;
}

.annual-main-column {
    min-width: 620px;
}

.annual-years-panel {
    padding: 16px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 0;
}

.receipt-branding-panel {
    margin-top: 16px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.receipt-branding-panel h4 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 1rem;
}

.receipt-branding-panel p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.7;
}

.branding-toggle-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.branding-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    color: #334155;
    font-weight: 700;
}

.branding-check input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.branding-logo-preview {
    min-height: 110px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin: 12px 0;
    overflow: hidden;
}

.branding-logo-preview img {
    max-width: 100%;
    max-height: 96px;
    object-fit: contain;
}

.branding-logo-empty {
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.7;
}

.branding-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-inline-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-inline-soft:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.btn-inline-soft:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-inline-soft.danger {
    border-color: #fecaca;
    background: #fff1f2;
    color: #be123c;
}

.btn-inline-soft.danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.annual-years-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.annual-years-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.annual-years-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-weight: 900;
}

.annual-years-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 900;
    font-size: 0.82rem;
}

.btn-annual-delete {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.84rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-annual-delete:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.annual-years-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.annual-year-item {
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.18s ease;
    display: grid;
    gap: 6px;
}

.annual-year-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.annual-year-item.active {
    border-color: #93c5fd;
    background: #eff6ff;
}

.annual-year-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.annual-year-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-weight: 900;
    font-size: 0.84rem;
}

.annual-year-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 0.78rem;
}

.annual-year-status.settled {
    background: #dcfce7;
    color: #166534;
}

.annual-year-status.pending {
    background: #fff7ed;
    color: #9a3412;
}

.annual-year-meta {
    color: #64748b;
    font-size: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.annual-form-shell {
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.46);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.95) 100%);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    padding: 18px;
}

.annual-form-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.annual-form-intro-text h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.08rem;
}

.annual-form-intro-text p {
    margin: 8px 0 0;
    color: #64748b;
    line-height: 1.7;
    font-size: 0.9rem;
}

.annual-form-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 900;
    white-space: nowrap;
}

.annual-info-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.annual-info-card {
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 14px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.04);
}

.annual-info-card span {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.annual-info-card strong {
    color: #0f172a;
    font-size: 1rem;
}

.btn-print-receipt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(125, 211, 252, 0.24);
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.14) 42%, rgba(99, 102, 241, 0.12) 100%);
    color: #2563eb;
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-print-receipt:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(59, 130, 246, 0.14);
}

.revenue-card-empty {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.95) 100%);
    border: 1px dashed rgba(125, 211, 252, 0.32);
    border-radius: 20px;
    padding: 44px 24px;
    text-align: center;
    color: #64748b;
    margin-bottom: 22px;
}

.revenue-card-empty i {
    font-size: 2.8rem;
    color: #4f46e5;
    margin-bottom: 12px;
}

.revenue-card-empty h3 {
    margin: 0 0 8px;
    color: #0f172a;
}

.revenue-card-empty p {
    margin: 0;
}

.btn-action {
    padding: 7px 10px;
    border: 1px solid rgba(191, 219, 254, 0.4);
    border-radius: 10px;
    cursor: pointer;
    margin-left: 4px;
    transition: all 0.2s ease;
    font-size: 0.82rem;
}

.btn-edit {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.14) 42%, rgba(99, 102, 241, 0.12) 100%);
    color: #2563eb;
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-whatsapp {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12) 0%, rgba(59, 130, 246, 0.14) 42%, rgba(99, 102, 241, 0.12) 100%);
    color: #2563eb;
}

.btn-qr {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.14) 0%, rgba(16, 185, 129, 0.16) 50%, rgba(14, 165, 233, 0.14) 100%);
    color: #0f766e;
    border-color: rgba(45, 212, 191, 0.35);
}

.btn-print {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.12) 48%, rgba(168, 85, 247, 0.14) 100%);
    color: #4f46e5;
}

.btn-whatsapp:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.btn-action:hover {
    transform: scale(1.05);
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.report-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.95) 100%);
    padding: 32px 24px;
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.46);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    text-align: center;
}

.report-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 16px 30px rgba(59, 130, 246, 0.2),
        0 8px 18px rgba(124, 58, 237, 0.12);
}

.report-icon i {
    font-size: 2rem;
    color: white;
}

.report-card h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.btn-report {
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: white;
    border: 1px solid rgba(125, 211, 252, 0.18);
    padding: 12px 28px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    width: 100%;
    transition: all 0.2s ease;
}

.btn-report:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 30px rgba(59, 130, 246, 0.26),
        0 8px 18px rgba(124, 58, 237, 0.14);
}

.report-output {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.95) 100%);
    padding: 28px;
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.46);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.report-output h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.56);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 4px 0 12px;
    scroll-behavior: smooth;
}

.modal-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.96) 100%);
    margin: 8px auto 12px;
    border-radius: 22px;
    width: 90%;
    max-width: 520px;
    border: 1px solid rgba(191, 219, 254, 0.5);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.3);
    overflow-y: auto;
    max-height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(191, 219, 254, 0.42);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, rgba(239, 246, 255, 0.44) 100%);
}

.modal-header h2 {
    font-size: 1.3rem;
    color: #1e293b;
    font-weight: 600;
}

.close {
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.close:hover {
    color: #4f46e5;
}

.modal-body {
    padding: 24px;
    flex: 1 1 auto;
    min-height: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #475569;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(191, 219, 254, 0.5);
    border-radius: 14px;
    font-size: 0.95rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 100%);
    color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(191, 219, 254, 0.42);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.96) 100%);
    z-index: 2;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.06);
}

#vehicle-modal .modal-content {
    max-width: 980px;
    margin: 10px auto 16px;
}

#vehicle-annual-modal .modal-content {
    width: min(1280px, calc(100vw - 56px));
    max-width: 1280px;
    min-height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    margin: 10px auto 16px;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

#vehicle-annual-modal .modal-header {
    padding: 24px 28px;
}

#vehicle-annual-modal .modal-body {
    padding: 24px 28px 18px;
}

#vehicle-annual-modal .modal-footer {
    padding: 18px 28px 24px;
}

.vehicle-modal-headline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px 0;
}

.vehicle-title-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vehicle-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 700;
}

.vehicle-modal-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

.form-intro {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 0.95rem;
}

.vehicle-form-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.88rem;
    font-weight: 600;
}

.status-message {
    display: none;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 500;
}

.status-message.show {
    display: flex;
}

.status-message.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.status-message.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.vehicle-form-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.vehicle-form-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.vehicle-form-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: #1e293b;
    font-size: 1.05rem;
}

.vehicle-form-section h3 i {
    color: #2563eb;
}

.vehicle-form-section .form-group:last-child {
    margin-bottom: 0;
}

.vehicle-form-section.full-width {
    grid-column: 1 / -1;
}

.vehicle-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group.compact {
    margin-bottom: 16px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label .required-mark {
    color: #dc2626;
    margin-right: 4px;
}

.field-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 700;
}

.form-hint {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 0.82rem;
}

.field-error {
    display: none;
    margin-top: 8px;
    color: #dc2626;
    font-size: 0.83rem;
    font-weight: 600;
}

.field-error.show {
    display: block;
}

.form-group.has-error label {
    color: #b91c1c;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #f87171;
    background: #fff7f7;
}

.search-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-driver-note {
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 0.85rem;
    border: 1px solid #fed7aa;
}

.empty-driver-note.show {
    display: block;
}

#driver-modal .modal-content {
    max-width: 920px;
    margin: 10px auto 16px;
}

.vehicles-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    max-width: 430px;
}

.vehicles-filter-actions {
    display: flex;
    justify-content: flex-end;
}

.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    background: #eef4ff;
    border-color: #bfdbfe;
}

.filter-toggle-btn.active {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.12);
}

.drivers-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
    gap: 10px;
    padding: 14px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    max-width: 560px;
    margin-bottom: 16px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-field label {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 700;
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.84rem;
    color: #1e293b;
    font-family: inherit;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: #60a5fa;
    background: white;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.driver-form-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.driver-form-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.driver-form-section.full-width {
    grid-column: 1 / -1;
}

.driver-form-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: #1e293b;
    font-size: 1.05rem;
}

.driver-form-section h3 i {
    color: #2563eb;
}

.driver-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.driver-form-grid textarea {
    min-height: 120px;
}

.driver-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.driver-history-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.driver-history-card strong {
    display: block;
    color: #0f172a;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.driver-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.driver-history-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.78rem;
}

.driver-history-empty {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 0.88rem;
}

.drivers-showcase {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.driver-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.driver-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.95) 100%);
    border: 1px solid rgba(191, 219, 254, 0.46);
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.driver-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
}

.driver-card-header,
.driver-card-body,
.driver-card-footer {
    padding: 16px;
}

.driver-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(191, 219, 254, 0.42);
}

.driver-card-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.driver-icon-shell {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #67e8f9 0%, #38bdf8 18%, #3b82f6 44%, #4f46e5 72%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 8px 18px rgba(13, 148, 136, 0.22);
    flex-shrink: 0;
}

.driver-title-text h3 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.4;
}

.driver-title-text p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
}

.driver-phones-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0f766e;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.driver-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-meta-item {
    padding: 10px 11px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid #e2e8f0;
}

.driver-meta-item span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 0.73rem;
}

.driver-meta-item strong {
    color: #1e293b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.driver-phone-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.driver-phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.74rem;
    font-weight: 700;
}

.driver-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #eff4fb;
}

.residency-icon-shell {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.residency-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
}

.residency-status-badge.is-active {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.residency-status-badge.is-expired {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.residency-card-footer {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.residency-card-footer .btn-inline-soft {
    padding: 9px 10px;
    border-radius: 10px;
}

.residency-card-compact {
    cursor: pointer;
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

#residencies-cards.driver-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 360px));
    gap: 18px;
    justify-content: start;
}

@media (max-width: 768px) {
    #residencies-cards.driver-cards-grid {
        grid-template-columns: 1fr;
    }
}

.residency-card-compact .driver-card-header,
.residency-card-compact .driver-card-body,
.residency-card-compact .driver-card-footer {
    padding: 18px 20px;
}

.residency-card-compact .driver-card-body {
    gap: 14px;
}

.residency-card-compact .driver-meta-item {
    padding: 12px 13px;
    border-radius: 15px;
}

.residency-card-compact .driver-meta-item strong {
    font-size: 0.88rem;
}

.residency-registration-box {
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
}

.residency-registration-box span {
    font-size: 0.8rem;
}

.residency-registration-box strong {
    font-size: 0.92rem;
}

.driver-card-empty {
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    padding: 42px 24px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.driver-card-empty i {
    font-size: 2.8rem;
    color: #0f766e;
    margin-bottom: 12px;
}

.driver-card-empty h3 {
    margin: 0 0 8px;
    color: #0f172a;
}

.driver-card-empty p {
    margin: 0;
    color: #64748b;
}

.phone-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.phone-list-header .form-hint {
    margin-top: 0;
}

.phone-entry {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-entry input {
    flex: 1;
}

.btn-add-inline,
.btn-remove-inline {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-add-inline {
    padding: 10px 14px;
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-add-inline:hover {
    background: #bfdbfe;
}

.btn-remove-inline {
    padding: 10px 12px;
    background: #fee2e2;
    color: #dc2626;
    flex-shrink: 0;
}

.btn-remove-inline:hover {
    background: #fecaca;
}

.login-btn,
.nav-item,
.nav-admin-button,
.btn-primary,
.btn-secondary,
.btn-excel,
.btn-inline-soft,
.btn-report,
.btn-add-inline,
.btn-remove-inline,
.btn-backup-icon,
.btn-revenue-manage,
.btn-revenue-records,
.btn-print-receipt,
.btn-action,
.logout-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        filter 0.24s ease,
        background-color 0.24s ease,
        color 0.24s ease,
        border-color 0.24s ease;
}

.login-btn::before,
.nav-item::before,
.nav-admin-button::before,
.btn-primary::before,
.btn-secondary::before,
.btn-excel::before,
.btn-inline-soft::before,
.btn-report::before,
.btn-add-inline::before,
.btn-remove-inline::before,
.btn-backup-icon::before,
.btn-revenue-manage::before,
.btn-revenue-records::before,
.btn-print-receipt::before,
.btn-action::before,
.logout-btn::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 -130%;
    width: 42%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.34) 50%, transparent 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    opacity: 0;
}

.nav-item:hover,
.nav-admin-button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-excel:hover,
.btn-inline-soft:hover,
.btn-report:hover,
.btn-add-inline:hover,
.btn-remove-inline:hover,
.btn-backup-icon:hover,
.btn-revenue-manage:hover,
.btn-revenue-records:hover,
.btn-print-receipt:hover,
.btn-action:hover,
.logout-btn:hover {
    transform: translateY(-2px);
    filter: saturate(1.04);
}

.login-btn:hover::before,
.nav-item:hover::before,
.nav-admin-button:hover::before,
.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-excel:hover::before,
.btn-inline-soft:hover::before,
.btn-report:hover::before,
.btn-add-inline:hover::before,
.btn-remove-inline:hover::before,
.btn-backup-icon:hover::before,
.btn-revenue-manage:hover::before,
.btn-revenue-records:hover::before,
.btn-print-receipt:hover::before,
.btn-action:hover::before,
.logout-btn:hover::before {
    opacity: 1;
    animation: appButtonSweep 0.7s ease forwards;
}

.login-btn:active,
.nav-item:active,
.nav-admin-button:active,
.btn-primary:active,
.btn-secondary:active,
.btn-excel:active,
.btn-inline-soft:active,
.btn-report:active,
.btn-add-inline:active,
.btn-remove-inline:active,
.btn-backup-icon:active,
.btn-revenue-manage:active,
.btn-revenue-records:active,
.btn-print-receipt:active,
.btn-action:active,
.logout-btn:active {
    transform: translateY(0) scale(0.98);
}

@keyframes appButtonSweep {
    from {
        left: -130%;
    }
    to {
        left: 145%;
    }
}

@media (max-width: 1400px) {
    .driver-cards-grid,
    .vehicle-cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1280px) {
    .driver-cards-grid,
    .vehicle-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .sidebar {
        --sidebar-icon-size: 31px;
        --sidebar-icon-radius: 10px;
        --sidebar-icon-font-size: 0.88rem;
        --sidebar-item-padding-y: 11px;
        --sidebar-item-padding-x: 11px;
        --sidebar-item-gap: 8px;
    }

    .annual-workspace {
        grid-template-columns: minmax(290px, 330px) minmax(520px, 1fr);
    }

    .annual-main-column {
        min-width: 520px;
    }

    .annual-info-strip,
    .annual-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .driver-cards-grid,
    .vehicle-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        width: 80px;
    }

    .logo-text,
    .nav-item span,
    .nav-admin-button span,
    .nav-group-title {
        display: none;
    }

    .main-content {
        margin-right: 80px;
    }

    .app-container.sidebar-hidden .main-content {
        margin-right: 0;
    }

    .logo {
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    .nav-item {
        justify-content: center;
        padding: 16px;
    }

    .nav-admin-button {
        justify-content: center;
        padding: 14px 10px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        --sidebar-icon-size: 28px;
        --sidebar-icon-radius: 9px;
        --sidebar-icon-font-size: 0.78rem;
        --sidebar-item-padding-y: 10px;
        --sidebar-item-padding-x: 12px;
        --sidebar-item-gap: 10px;
        width: min(76vw, 280px);
        max-width: calc(100vw - 64px);
        transform: translateX(100%);
        z-index: 130;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .app-container[data-mobile-sidebar="open"] .sidebar {
        transform: translateX(0) !important;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    }

    .sidebar-nav {
        padding: 14px 10px 10px;
    }

    .nav-group {
        padding: 8px;
        border-radius: 16px;
    }

    .nav-item,
    .nav-admin-button {
        font-size: 0.84rem;
        border-radius: 12px;
    }

    .app-container[data-mobile-sidebar="open"]::before {
        opacity: 1;
        pointer-events: auto;
        z-index: 120;
    }

    .main-content,
    .app-container.sidebar-hidden .main-content {
        margin-right: 0;
    }

    .workspace-tabs-shell {
        padding: 10px 16px 0;
    }

    .workspace-tab-label {
        max-width: 120px;
    }

    .top-header {
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        position: sticky;
        z-index: 125;
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .header-left h1 {
        margin: 0;
        flex: 1;
        font-size: 1.15rem;
        line-height: 1.35;
    }

    .header-right {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        align-items: center;
    }

    .sidebar-toggle-btn {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        flex-shrink: 0;
    }

    .sidebar-toggle-btn::before {
        border-radius: 13px;
    }

    .sidebar-toggle-core {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .user-info {
        width: 100%;
        justify-content: center;
        padding: 8px 10px;
        min-width: 0;
        border-radius: 14px;
    }

    .user-info i {
        font-size: 1.5rem;
    }

    .current-user-meta {
        min-width: 0;
    }

    .current-user-meta span {
        font-size: 0.92rem;
    }

    .current-user-meta small {
        font-size: 0.7rem;
    }

    .current-user-meta span,
    .current-user-meta small {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hold-btn,
    .logout-btn,
    .header-language-switcher {
        width: auto;
        justify-content: center;
    }

    .hold-btn,
    .logout-btn {
        padding: 8px 12px;
        min-height: 38px;
        font-size: 0.8rem;
        border-radius: 12px;
        gap: 6px;
    }

    .header-language-switcher {
        padding: 4px;
        min-width: 108px;
        border-radius: 999px;
    }

    .header-language-switcher button {
        min-width: 44px;
        height: 30px;
        padding: 0 8px;
        font-size: 0.76rem;
    }

    .logout-btn {
        max-width: 152px;
    }

    .logout-btn-text {
        white-space: nowrap;
    }

    .hold-btn i,
    .logout-btn i {
        font-size: 0.82rem;
    }

    #vehicle-annual-modal .modal-content {
        width: calc(100vw - 14px);
        min-height: calc(100vh - 14px);
        max-height: calc(100vh - 14px);
        margin: 4px auto 8px;
        border-radius: 18px;
    }

    #vehicle-annual-modal .modal-header,
    #vehicle-annual-modal .modal-body,
    #vehicle-annual-modal .modal-footer {
        padding-right: 16px;
        padding-left: 16px;
    }

    .vehicles-filter-bar,
    .drivers-filter-bar,
    .driver-form-layout,
    .driver-form-grid {
        grid-template-columns: 1fr;
    }

    .revenue-summary-header,
    .revenue-summary-footer,
    .revenue-metrics-grid {
        grid-template-columns: 1fr;
    }

    .revenue-summary-header,
    .revenue-summary-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .annual-summary-grid {
        grid-template-columns: 1fr;
    }

    .annual-modal-headline {
        flex-direction: column;
        align-items: flex-start;
    }

    .annual-pill-row {
        justify-content: flex-start;
    }

    .annual-years-panel {
        position: static;
    }

    .annual-info-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .annual-form-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .branding-toggle-row {
        grid-template-columns: 1fr;
    }

    .phone-entry {
        flex-direction: column;
        align-items: stretch;
    }

    .vehicles-showcase-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .vehicle-cards-grid,
    .driver-cards-grid,
    .vehicle-highlight-row,
    .vehicle-meta-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-card-header,
    .vehicle-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    #vehicle-modal .modal-content {
        margin: 4px auto 8px;
    }

    #driver-modal .modal-content {
        margin: 4px auto 8px;
    }

    .vehicle-modal-headline {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 18px 0;
    }

    .vehicle-form-summary {
        justify-content: flex-start;
    }

    .vehicle-form-layout {
        grid-template-columns: 1fr;
    }

    .vehicle-form-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-form-section {
        padding: 16px;
        border-radius: 14px;
    }

    .modal {
        padding: 2px 0 8px;
    }

    .modal-content {
        width: 94%;
        margin: 4px auto 8px;
        max-height: calc(100vh - 10px);
    }

    .modal-body {
        padding: 18px;
    }

    .users-admin-layout,
    .users-permissions-grid,
    .users-admin-form-grid {
        grid-template-columns: 1fr;
    }

    .login-shell {
        grid-template-columns: 1fr;
        max-width: 620px;
    }

    .login-showcase {
        padding: 28px 24px;
    }

    .login-feature-list,
    .login-metrics {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 36px 24px;
        max-width: none;
    }

    .content-area {
        padding: 20px;
    }

    .vehicles-fixed-panel {
        gap: 12px;
    }

    .vehicles-fixed-panel .section-top {
        padding: 14px 16px;
    }

    .vehicles-cards-region {
        padding-top: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .section-top {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .logout-btn {
        margin-right: 0;
    }
}

@media (max-width: 980px) {
    .top-header {
        padding: 16px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-left,
    .header-right {
        width: 100%;
    }

    .header-right {
        justify-content: flex-start;
    }

    .main-content,
    .content-area,
    .workspace-tabs-shell,
    .workspace-tabs-list,
    .section,
    .users-admin-layout,
    .annual-workspace,
    .annual-main-column,
    .vehicle-form-layout,
    .vehicles-filter-bar,
    .drivers-filter-bar,
    .section-actions,
    .user-info,
    .workspace-tab {
        min-width: 0;
    }

    .content-area {
        padding: 18px;
    }

    .annual-workspace,
    .users-admin-layout,
    .vehicle-form-layout {
        grid-template-columns: 1fr;
    }

    .annual-main-column {
        min-width: 0;
    }

    .annual-info-strip,
    .annual-summary-grid,
    .stats-grid,
    .dashboard-grid,
    .vehicle-meta-grid,
    .revenue-metrics-grid,
    .vehicle-form-grid,
    .driver-form-grid,
    .users-admin-form-grid,
    .users-permissions-grid,
    .expense-form-grid,
    .revenue-form-grid,
    .transfer-form-grid,
    .violation-form-grid,
    .violation-type-form-grid {
        grid-template-columns: 1fr;
    }

    .section-top,
    .section-actions,
    .vehicles-filter-bar,
    .drivers-filter-bar,
    .vehicle-card-header,
    .vehicle-card-footer,
    .revenue-summary-header,
    .revenue-summary-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .login-container {
        padding: 14px;
    }

    .login-box {
        padding: 28px 18px;
        border-radius: 20px;
    }

    .top-header {
        padding: 12px;
    }

    .header-left h1 {
        font-size: 1rem;
    }

    .header-right {
        gap: 8px;
    }

    .user-info,
    .hold-btn,
    .logout-btn,
    .header-language-switcher {
        width: 100%;
        justify-content: center;
    }

    .content-area {
        padding: 14px 12px 18px;
    }

    .workspace-tabs-shell {
        padding: 8px 12px 0;
    }

    .workspace-tab {
        max-width: 100%;
    }

    .workspace-tab-label {
        max-width: 92px;
    }

    .modal {
        padding: 0 0 6px;
    }

    .modal-content {
        width: calc(100vw - 8px);
        max-height: calc(100vh - 8px);
        border-radius: 16px;
    }

    .modal-body {
        padding: 14px;
    }

    .annual-info-strip,
    .annual-summary-grid,
    .stats-grid,
    .dashboard-grid,
    .vehicle-cards-grid,
    .driver-cards-grid,
    .vehicle-highlight-row,
    .vehicle-meta-grid {
        grid-template-columns: 1fr;
    }

    .section-top,
    .section-actions,
    .vehicles-filter-bar,
    .drivers-filter-bar,
    .revenue-summary-header,
    .revenue-summary-footer,
    .vehicle-card-header,
    .vehicle-card-footer,
    .annual-modal-headline,
    .vehicles-showcase-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-bars-chart {
        min-width: 620px;
        height: 280px;
    }
}

/* =========================================================
   LOGIN V2  —  TARGILO NEON LOGIN
   ========================================================= */
@supports (background: paint(something)) {}
@property --loginAngle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

#loginPage {
    --loginCyan: #22D3EE;
    --loginCyan2: #67E8F9;
    --loginBlue: #3B82F6;
    --loginViolet: #7C3AED;
    --loginFuchsia: #A855F7;
    --loginBg0: #060A16;
    --loginBg1: #0C1226;
    --loginBg2: #190E33;
    --loginText: #EAEFFB;
    --loginMuted: #8E9BBE;
    --loginGlass: rgba(255, 255, 255, .055);
    --loginStroke: rgba(255, 255, 255, .10);
    --loginDanger: #FB7185;
    --loginFontAR: 'Almarai', system-ui, sans-serif;
    --loginFontEN: 'Space Grotesk', ui-sans-serif, sans-serif;
}

#loginPage {
    min-height: 100vh;
    place-items: center;
    background:
        radial-gradient(120% 90% at 50% -10%, var(--loginBg1) 0%, var(--loginBg0) 55%),
        var(--loginBg0);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    font-family: var(--loginFontAR);
    color: var(--loginText);
}
body.lang-en #loginPage {
    font-family: var(--loginFontEN);
}

/* الخلفية الحيّة */
#loginPage .login-sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
#loginPage .login-grid {
    position: absolute;
    inset: -2px;
    opacity: .35;
    background-image:
        linear-gradient(rgba(148, 190, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 190, 255, .055) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(75% 65% at 50% 40%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(75% 65% at 50% 40%, #000 20%, transparent 78%);
    animation: loginPan 40s linear infinite;
}
@keyframes loginPan {
    to { background-position: 64px 64px, 64px 64px; }
}

#loginPage .login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
    will-change: transform;
}
#loginPage .login-blob.lb1 {
    width: 52vw; height: 52vw;
    background: radial-gradient(circle, #0E7490 0%, transparent 68%);
    top: -14vw; right: -8vw;
    animation: loginDrift1 24s ease-in-out infinite;
}
#loginPage .login-blob.lb2 {
    width: 46vw; height: 46vw;
    background: radial-gradient(circle, var(--loginViolet) 0%, transparent 68%);
    bottom: -16vw; left: -10vw;
    animation: loginDrift2 29s ease-in-out infinite;
}
#loginPage .login-blob.lb3 {
    width: 36vw; height: 36vw;
    background: radial-gradient(circle, var(--loginBlue) 0%, transparent 70%);
    top: 38%; left: 44%;
    opacity: .32;
    animation: loginDrift3 34s ease-in-out infinite;
}
@keyframes loginDrift1 { 0%,100%{ transform:translate(0,0) scale(1) } 50%{ transform:translate(-6vw,7vh) scale(1.14) } }
@keyframes loginDrift2 { 0%,100%{ transform:translate(0,0) scale(1) } 50%{ transform:translate(7vw,-6vh) scale(1.18) } }
@keyframes loginDrift3 { 0%,100%{ transform:translate(-50%,-50%) scale(1) } 50%{ transform:translate(-38%,-64%) scale(1.22) } }

/* شبكة خطوط السير */
#loginPage .login-net {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .75;
}
#loginPage .login-lane {
    fill: none;
    stroke: url(#loginLaneGrad);
    stroke-width: 1.4;
    stroke-dasharray: 9 13;
    animation: loginFlow 3.2s linear infinite;
}
#loginPage .login-lane.login-lane-slow {
    animation-duration: 5s;
}
@keyframes loginFlow {
    to { stroke-dashoffset: -44; }
}
#loginPage .login-hub {
    fill: var(--loginCyan);
    opacity: .55;
}
#loginPage .login-ring {
    fill: none;
    stroke: var(--loginCyan);
    stroke-width: 1.2;
    transform-box: fill-box;
    transform-origin: center;
    animation: loginPing 3.4s ease-out infinite;
}
@keyframes loginPing {
    0% { transform: scale(.4); opacity: .8; }
    80%,100% { transform: scale(3.4); opacity: 0; }
}

/* مبدّل اللغة */
#loginPage .login-lang {
    position: fixed;
    top: 22px;
    right: 26px;
    left: auto;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: var(--loginGlass);
    border: 1px solid var(--loginStroke);
    border-radius: 999px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: loginFade 900ms ease 900ms both;
}
body.lang-en #loginPage .login-lang {
    left: 26px;
    right: auto;
}
#loginPage .login-lang button {
    font-family: var(--loginFontEN);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .06em;
    padding: 7px 15px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: transparent;
    color: var(--loginMuted);
    transition: .25s ease;
}
#loginPage .login-lang button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .05);
}
#loginPage .login-lang button.active,
#loginPage .login-lang button[aria-pressed="true"] {
    color: #fff;
    background: linear-gradient(120deg, var(--loginCyan), var(--loginViolet));
    box-shadow: 0 4px 16px -4px rgba(124, 58, 237, .8);
}
#loginPage .login-lang button:focus-visible {
    outline: 2px solid var(--loginCyan);
    outline-offset: 2px;
}

/* الماركup العام */
#loginPage .login-shell {
    width: 100%;
    max-width: 620px;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
}

#loginPage .login-card {
    position: relative;
    z-index: 2;
    width: min(620px, 100%);
    padding: 58px 52px 44px;
    border-radius: 34px;
    background: linear-gradient(165deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .028));
    border: 1px solid var(--loginStroke);
    backdrop-filter: blur(26px) saturate(140%);
    -webkit-backdrop-filter: blur(26px) saturate(140%);
    box-shadow:
        0 40px 90px -30px rgba(0, 0, 0, .85),
        0 0 0 1px rgba(255, 255, 255, .04) inset,
        0 1px 0 rgba(255, 255, 255, .16) inset;
    animation: loginEnter 1s cubic-bezier(.18, .9, .28, 1) both;
}
#loginPage .login-card::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 35px;
    padding: 1.5px;
    background: conic-gradient(from var(--loginAngle),
        transparent 0deg, var(--loginCyan) 55deg, var(--loginViolet) 130deg, transparent 210deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: loginSpinAngle 6s linear infinite;
    pointer-events: none;
    opacity: .9;
}
@keyframes loginSpinAngle {
    to { --loginAngle: 360deg; }
}
@keyframes loginEnter {
    from { opacity: 0; transform: translateY(26px) scale(.96); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
}

/* الهوية واللوجو */
#loginPage .login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 0;
    margin: 0 0 12px;
    border: 0;
    animation: loginRise 700ms cubic-bezier(.2, .9, .3, 1) 220ms both;
}
#loginPage .login-logo {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    flex: none;
    position: relative;
    background: linear-gradient(150deg, #22D3EE 0%, #3B82F6 40%, #7C3AED 76%, #A855F7 100%);
    display: grid;
    place-items: center;
    box-shadow:
        0 16px 38px -10px rgba(59, 130, 246, .9),
        0 0 0 1px rgba(255, 255, 255, .22) inset,
        0 -12px 26px -14px rgba(0, 0, 0, .65) inset;
    animation: loginHoverY 6.5s ease-in-out infinite;
}
#loginPage .login-logo::before {
    content: '';
    position: absolute;
    inset: -3.5px;
    border-radius: 27px;
    padding: 2px;
    background: conic-gradient(from var(--loginAngle), transparent 0deg, #67E8F9 65deg, transparent 150deg, #E9D5FF 250deg, transparent 335deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: loginSpinAngle 5s linear infinite;
    pointer-events: none;
}
#loginPage .login-glaze {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;
    pointer-events: none;
}
#loginPage .login-glaze::after {
    content: '';
    position: absolute;
    top: 0; left: -130%;
    width: 58%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent);
    animation: loginSheen 4.6s ease-in-out infinite;
}
@keyframes loginSheen {
    0%, 68% { left: -130%; }
    100%     { left: 190%; }
}
@keyframes loginHoverY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* حرف T المقطّع */
#loginPage .login-tmark {
    width: 40px;
    height: 40px;
    position: relative;
    filter: drop-shadow(0 2px 5px rgba(2, 6, 23, .3));
}
#loginPage .login-tmark polygon {
    fill: #fff;
    stroke: #fff;
    stroke-width: 1.1;
    stroke-linejoin: round;
    transform-box: fill-box;
    transform-origin: center;
    animation: loginCharge 3.6s ease-in-out infinite;
}
@keyframes loginCharge {
    0%, 100% { opacity: .72; transform: scale(1); }
    13%      { opacity: 1;   transform: scale(1.05); }
    32%      { opacity: .72; transform: scale(1); }
}

/* اسم الماركة TARGILO */
#loginPage .login-name {
    display: inline-flex;
    align-items: center;
    direction: ltr;
    line-height: 1;
    font-family: var(--loginFontEN);
    font-weight: 700;
    font-size: 40px;
    letter-spacing: .13em;
    background-image: linear-gradient(100deg, #67E8F9 0%, #FFFFFF 26%, #E0E7FF 46%, #FFFFFF 66%, #C084FC 100%);
    background-size: 270% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: loginShift 7s ease-in-out infinite;
    filter: drop-shadow(0 2px 16px rgba(103, 232, 249, .28));
}
#loginPage .login-name i {
    font-style: normal;
    display: inline-block;
    animation: loginRise 620ms cubic-bezier(.2, .9, .3, 1) both;
}
#loginPage .login-wheel {
    width: .74em;
    height: .74em;
    display: inline-block;
    position: relative;
    top: .05em;
    animation: loginRise 620ms cubic-bezier(.2, .9, .3, 1) 600ms both;
}
#loginPage .login-wheel svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}
#loginPage .login-wheel .login-wheel-track {
    fill: none;
    stroke: rgba(255, 255, 255, .5);
    stroke-width: 3.5;
}
#loginPage .login-wheel .login-wheel-run {
    fill: none;
    stroke: #67E8F9;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 15 42;
    transform-box: fill-box;
    transform-origin: center;
    animation: loginRoll 2.8s linear infinite;
    filter: drop-shadow(0 0 5px rgba(103, 232, 249, .95));
}
@keyframes loginRoll {
    to { transform: rotate(360deg); }
}
@keyframes loginShift {
    0%, 100% { background-position: 0% 0; }
    50%      { background-position: 100% 0; }
}

#loginPage .login-eyebrow {
    text-align: center;
    font-size: 11px;
    letter-spacing: .22em;
    color: var(--loginMuted);
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 400;
    animation: loginFade 800ms ease 380ms both;
}
#loginPage .login-hr {
    height: 1px;
    margin: 32px 0 34px;
    background: linear-gradient(90deg, transparent, var(--loginStroke) 20%, var(--loginStroke) 80%, transparent);
    animation: loginFade 800ms ease 440ms both;
}

#loginPage .login-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--loginText);
    margin: 0 0 18px;
    padding: 0;
    animation: loginRise 700ms cubic-bezier(.2, .9, .3, 1) 480ms both;
}
#loginPage .login-subtitle {
    text-align: center;
    color: var(--loginMuted);
    font-size: 13.5px;
    font-weight: 300;
    margin: 0 0 30px;
    padding: 0;
    line-height: 1.7;
    max-width: none;
    animation: loginRise 700ms cubic-bezier(.2, .9, .3, 1) 550ms both;
}

/* الحقول */
#loginPage .login-field {
    margin-bottom: 28px;
}
#loginPage .login-field.login-f1 { animation: loginRise 650ms cubic-bezier(.2, .9, .3, 1) 630ms both; }
#loginPage .login-field.login-f2 { animation: loginRise 650ms cubic-bezier(.2, .9, .3, 1) 700ms both; }

#loginPage .login-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--loginText);
}
#loginPage .login-field label svg {
    width: 17px;
    height: 17px;
    color: var(--loginCyan);
    flex: none;
}
#loginPage .login-shell-field {
    position: relative;
    border-radius: 18px;
}
#loginPage .login-shell-field::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 19px;
    opacity: 0;
    background: linear-gradient(120deg, var(--loginCyan), var(--loginViolet));
    transition: opacity .3s ease;
    pointer-events: none;
}
#loginPage .login-shell-field:focus-within::before {
    opacity: 1;
}
#loginPage .login-shell-field:focus-within {
    box-shadow: 0 0 30px -6px rgba(34, 211, 238, .45);
}
#loginPage .login-field input {
    position: relative;
    z-index: 1;
    width: 100%;
    font-family: inherit;
    font-size: 16.5px;
    color: var(--loginText);
    background: rgba(8, 12, 26, .55);
    border: 1px solid var(--loginStroke);
    border-radius: 18px;
    padding: 20px 22px;
    outline: none;
    transition: background .25s ease;
    box-shadow: none;
    transform: none;
    opacity: 1;
}
html[dir="rtl"] #loginPage .login-field input {
    padding-left: 58px;
}
html[dir="ltr"] #loginPage .login-field input {
    padding-right: 58px;
}
#loginPage .login-field input::placeholder {
    color: rgba(142, 155, 190, .55);
}
#loginPage .login-field input:hover {
    background: rgba(8, 12, 26, .72);
}

/* زر إظهار كلمة المرور */
#loginPage .login-peek {
    position: absolute;
    z-index: 2;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--loginMuted);
    border-radius: 12px;
    transition: .2s ease;
    padding: 0;
    box-shadow: none;
    font-size: 1rem;
    left: auto;
    right: auto;
}
html[dir="rtl"] #loginPage .login-peek { left: 8px; right: auto; }
html[dir="ltr"] #loginPage .login-peek { right: 8px; left: auto; }
#loginPage .login-peek:hover {
    color: var(--loginCyan);
    background: rgba(255, 255, 255, .04);
}

/* خيارات "تذكرني" */
#loginPage .login-opts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 2px 0 26px;
    font-size: 12.5px;
    animation: loginRise 650ms ease 770ms both;
}
#loginPage .login-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--loginMuted);
    cursor: pointer;
    user-select: none;
    padding: 0;
}
#loginPage .login-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
#loginPage .login-check .login-box {
    width: 17px;
    height: 17px;
    flex: none;
    border-radius: 5px;
    border: 1.4px solid rgba(255, 255, 255, .24);
    background: rgba(8, 12, 26, .5);
    display: grid;
    place-items: center;
    transition: .2s ease;
    padding: 0;
    position: static;
    overflow: visible;
    animation: none;
    color: inherit;
    box-shadow: none;
    inset: auto;
}
#loginPage .login-check .login-box svg {
    width: 10px;
    height: 10px;
    opacity: 0;
    transform: scale(.5);
    transition: .2s ease;
}
#loginPage .login-check input:checked + .login-box {
    background: linear-gradient(130deg, var(--loginCyan), var(--loginViolet));
    border-color: transparent;
    box-shadow: 0 4px 14px -4px rgba(124, 58, 237, .9);
}
#loginPage .login-check input:checked + .login-box svg {
    opacity: 1;
    transform: none;
}
#loginPage .login-check:hover {
    color: var(--loginText);
}

/* زر الدخول */
#loginPage .login-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 17px;
    color: #fff;
    padding: 21px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(100deg, var(--loginCyan) 0%, var(--loginBlue) 35%, var(--loginViolet) 70%, var(--loginFuchsia) 100%);
    background-size: 260% 100%;
    box-shadow: 0 14px 34px -12px rgba(124, 58, 237, .9);
    animation: loginRise 650ms cubic-bezier(.2, .9, .3, 1) 840ms both, loginShift 6s ease-in-out 1.5s infinite;
    transition: transform .12s ease, box-shadow .25s ease;
}
#loginPage .login-submit:hover {
    box-shadow: 0 18px 44px -12px rgba(34, 211, 238, .85);
}
#loginPage .login-submit:active {
    transform: translateY(2px);
}
#loginPage .login-submit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
#loginPage .login-submit > * {
    position: relative;
    z-index: 1;
}
#loginPage .login-submit::after {
    content: '';
    position: absolute;
    top: 0; left: -140%;
    width: 55%; height: 100%;
    z-index: 0;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    animation: loginSheen 5s ease-in-out infinite 1s;
}
#loginPage .login-submit svg {
    width: 17px;
    height: 17px;
}
html[dir="rtl"] #loginPage .login-submit svg {
    transform: scaleX(-1);
}

/* تذييل البطاقة */
#loginPage .login-foot {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--loginStroke);
    font-size: 12px;
    color: var(--loginMuted);
    font-weight: 300;
    line-height: 1.7;
    animation: loginFade 900ms ease 950ms both;
}

/* انيميشنات المساعدة */
@keyframes loginRise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
@keyframes loginFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    #loginPage *,
    #loginPage *::before,
    #loginPage *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: .001ms !important;
    }
}

/* موبايل */
@media (max-width: 520px) {
    #loginPage {
        padding: 24px 14px;
    }
    #loginPage .login-card {
        width: min(100%, 460px);
        padding: 36px 24px 28px;
        border-radius: 24px;
    }
    #loginPage .login-name {
        font-size: 28px;
        letter-spacing: .11em;
    }
    #loginPage .login-logo {
        width: 60px;
        height: 60px;
        border-radius: 18px;
    }
    #loginPage .login-glaze {
        border-radius: 18px;
    }
    #loginPage .login-tmark {
        width: 34px;
        height: 34px;
    }
    #loginPage .login-brand {
        gap: 13px;
    }
    #loginPage .login-title {
        font-size: 24px;
    }
    #loginPage .login-lang {
        top: 16px;
        right: 16px;
    }
    body.lang-en #loginPage .login-lang {
        left: 16px;
        right: auto;
    }
}

.vehicle-qr-modal-content {
    max-width: 620px;
    width: min(620px, calc(100vw - 28px));
}

.vehicle-qr-modal-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 22px 6px;
}

.vehicle-qr-info {
    padding: 16px 18px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 40%),
        linear-gradient(135deg, #eff6ff 0%, #ffffff 55%, #fff7ed 100%);
    border: 1px solid #dbeafe;
    border-radius: 20px;
}

.vehicle-qr-plate {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.vehicle-qr-meta {
    color: #334155;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.8;
}

.vehicle-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px 14px 14px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
}

#vehicle-qr-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

#vehicle-qr-image img,
#vehicle-qr-image canvas {
    display: block;
    width: 256px;
    height: 256px;
}

.vehicle-qr-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #334155;
    font-weight: 800;
    font-size: 0.85rem;
}

.vehicle-qr-hint i {
    color: #0ea5e9;
}

.vehicle-qr-url-box {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
}

.vehicle-qr-url-label {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 8px;
}

.vehicle-qr-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.vehicle-qr-url-row input {
    flex: 1 1 280px;
    padding: 10px 12px;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-family: 'Space Grotesk', Tahoma, monospace;
    direction: ltr;
    text-align: left;
}

.vehicle-qr-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 4px 0 14px;
}

.vehicle-qr-feature {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 13px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.vehicle-qr-feature > i {
    font-size: 18px;
    margin-top: 2px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #f0fdfa);
    color: #0ea5e9;
    flex-shrink: 0;
}

.vehicle-qr-feature:nth-child(2) > i {
    background: linear-gradient(135deg, #fef3c7, #fff7ed);
    color: #d97706;
}

.vehicle-qr-feature:nth-child(3) > i {
    background: linear-gradient(135deg, #dcfce7, #eff6ff);
    color: #16a34a;
}

.vehicle-qr-feature strong {
    display: block;
    font-size: 0.85rem;
    color: #0f172a;
    margin-bottom: 3px;
    line-height: 1.4;
}

.vehicle-qr-feature span {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.6;
    font-weight: 700;
}

@media (max-width: 620px) {
    .vehicle-qr-features {
        grid-template-columns: 1fr;
    }
    #vehicle-qr-image img,
    #vehicle-qr-image canvas {
        width: 220px;
        height: 220px;
    }
    .vehicle-qr-plate {
        font-size: 1.25rem;
    }
}

@media print {
    .vehicle-qr-modal {
        display: block !important;
        position: static !important;
    }
}
