:root {
    --d12-navy-900: #0b2545;
    --d12-navy-800: #13315c;
    --d12-slate-700: #1d3d7a;
    --d12-blue-600: #1d4ed8;
    --d12-teal-700: #0f766e;
    --d12-teal-500: #14b8a6;
    --d12-gold-500: #f2b134;
    --d12-gold-300: #fcd34d;
    --d12-ink: #0f172a;
    --d12-muted: #475569;
    --d12-card: #ffffff;
    --d12-weave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1'%3E%3Cpath d='M28 3 L53 28 L28 53 L3 28 Z'/%3E%3Cpath d='M28 14 L42 28 L28 42 L14 28 Z'/%3E%3Cpath d='M0 0 L7 7 M56 0 L49 7 M0 56 L7 49 M56 56 L49 49'/%3E%3C/g%3E%3Cpath d='M28 24 L32 28 L28 32 L24 28 Z' fill='%23f2b134' fill-opacity='.16'/%3E%3C/svg%3E");
    --d12-weave-sidebar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M20 2 L38 20 L20 38 L2 20 Z'/%3E%3Cpath d='M20 11 L29 20 L20 29 L11 20 Z'/%3E%3C/g%3E%3Cpath d='M20 17 L23 20 L20 23 L17 20 Z' fill='%23f2b134' fill-opacity='.22'/%3E%3C/svg%3E");
    --d12-topo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='420' viewBox='0 0 1600 420' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Cpath stroke-opacity='.10' d='M0 300 C180 250 340 280 520 300 S880 240 1060 270 S1420 300 1600 250'/%3E%3Cpath stroke-opacity='.08' d='M0 330 C200 290 360 316 540 332 S900 280 1080 304 S1440 330 1600 290'/%3E%3Cpath stroke-opacity='.07' d='M0 360 C220 330 380 350 560 362 S920 320 1100 340 S1460 360 1600 330'/%3E%3Cpath stroke-opacity='.06' d='M0 390 C240 370 400 384 580 392 S940 360 1120 376 S1480 392 1600 372'/%3E%3Cpath stroke-opacity='.06' d='M0 260 C160 214 320 240 500 262 S860 200 1040 230 S1400 262 1600 214'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.22'%3E%3Ccircle cx='300' cy='291' r='3'/%3E%3Ccircle cx='700' cy='268' r='3'/%3E%3Ccircle cx='1060' cy='270' r='3'/%3E%3Ccircle cx='1380' cy='283' r='3'/%3E%3C/g%3E%3Cpath d='M300 291 L700 268 L1060 270 L1380 283' fill='none' stroke='%23ffffff' stroke-opacity='.10' stroke-dasharray='4 6'/%3E%3C/svg%3E");
    --d12-strip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='6' viewBox='0 0 36 6'%3E%3Crect width='36' height='6' fill='%2313315c'/%3E%3Cpath d='M0 6 L6 0 L12 6 Z' fill='%23f2b134'/%3E%3Cpath d='M12 6 L18 0 L24 6 Z' fill='%2314b8a6'/%3E%3Cpath d='M24 6 L30 0 L36 6 Z' fill='%23ffffff' fill-opacity='.85'/%3E%3C/svg%3E");
    --d12-empty-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='44' viewBox='0 0 132 44'%3E%3Ccircle cx='88' cy='30' r='11' fill='%23f2b134' fill-opacity='.45'/%3E%3Cpath d='M0 34 L22 22 L38 30 L58 14 L78 30 L98 20 L132 30 V44 H0 Z' fill='%231d3d7a' fill-opacity='.14'/%3E%3Cpath d='M0 38 C26 31 48 34 70 38 C92 42 112 34 132 36 V44 H0 Z' fill='%230f766e' fill-opacity='.18'/%3E%3Cpath d='M40 10 C44 9 47 9 50 10 L53 8 C54.5 7.6 55.5 8.2 56 9 L54.4 9.6 C53 12 50.6 13.4 47.4 13.4 C44.6 13.4 42 12.2 40 10 Z M45 10 C45.6 6 48.4 3 52.6 2.4 C51 5 50.4 7.6 50 10 Z' fill='%231d3d7a' fill-opacity='.35'/%3E%3C/svg%3E");
    --d12-header-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='72' viewBox='0 0 220 72'%3E%3Ccircle cx='150' cy='50' r='18' fill='%23f2b134' fill-opacity='.16'/%3E%3Cpath d='M0 56 L36 38 L62 50 L96 24 L128 48 L160 34 L220 50 V72 H0 Z' fill='%231d3d7a' fill-opacity='.06'/%3E%3Cpath d='M0 62 C44 52 80 56 116 62 C152 68 186 56 220 58 V72 H0 Z' fill='%230f766e' fill-opacity='.07'/%3E%3Cg fill='none' stroke='%231d3d7a' stroke-opacity='.08'%3E%3Cpath d='M0 66 C50 58 100 62 150 66 S200 62 220 64'/%3E%3C/g%3E%3C/svg%3E");
}

body.dswd12-auth {
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    gap: 18px;
    overflow-x: hidden;
    background: #ffffff !important;
}

body.dswd12-auth .login-card,
body.dswd12-auth .auth-mini-card,
body.dswd12-consent .consent-wrapper > .card {
    position: relative;
    overflow: hidden;
    background: var(--d12-card) !important;
    border: 1px solid rgba(255, 255, 255, .55) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 24px 48px -24px rgba(15, 23, 42, .28), 0 6px 16px -10px rgba(15, 23, 42, .16) !important;
}

body.dswd12-auth .login-card::before,
body.dswd12-auth .auth-mini-card::before,
body.dswd12-consent .consent-wrapper > .card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: var(--d12-strip) repeat-x 0 0 / 36px 6px;
    z-index: 3;
    pointer-events: none;
}

body.dswd12-auth .right-panel { background: transparent !important; }

body.dswd12-consent { padding: 0 12px 24px; }

body.dswd12-consent .consent-wrapper { width: 100%; }

body.dswd12-auth .left-panel {
    background-color: var(--d12-navy-800) !important;
    background-image:
        var(--d12-weave),
        radial-gradient(420px 300px at 78% 74%, rgba(242, 177, 52, .30), rgba(242, 177, 52, 0) 70%),
        linear-gradient(168deg, #13315c 0%, #1d3d7a 46%, #0f5b63 100%) !important;
    background-size: 56px 56px, auto, auto !important;
    padding-bottom: 196px !important;
}

body.dswd12-auth .left-panel::before,
body.dswd12-auth .left-panel::after { display: none !important; }

body.dswd12-auth .left-panel .logo-box { position: relative; z-index: 2; }

body.dswd12-auth .left-panel h5 {
    background: rgba(242, 177, 52, .18) !important;
    border: 1px solid rgba(242, 177, 52, .55);
    color: #ffffff !important;
    text-transform: none !important;
    letter-spacing: .02em !important;
    font-size: 14px !important;
}

.dswd12-system {
    position: relative;
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #ffffff;
}

.dswd12-region {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fde68a;
}

.dswd12-region::before,
.dswd12-region::after {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: .7;
}

body.dswd12-auth .left-panel p { color: rgba(255, 255, 255, .92) !important; opacity: 1 !important; }

body.dswd12-auth .pv-policy-link { color: #ffffff !important; }

.dswd12-scene {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 196px;
    z-index: 1;
    pointer-events: none;
}

.dswd12-scene__rays { transform-origin: 340px 118px; animation: d12Rays 28s linear infinite; }

@keyframes d12Rays {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dswd12-footline {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 8px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.6;
    color: #475569;
}

.dswd12-footline strong { color: #13315c; font-weight: 600; }

.dswd12-footline__dot { color: var(--d12-gold-500); padding: 0 4px; }

body.dswd12-auth .btn-custom {
    background: linear-gradient(135deg, #1d4ed8 0%, #13315c 100%) !important;
    box-shadow: 0 12px 22px -10px rgba(19, 49, 92, .75) !important;
}

body.dswd12-auth .btn-custom:focus-visible,
body.dswd12-auth .switch-link:focus-visible,
body.dswd12-auth a:focus-visible,
body.dswd12-auth button:focus-visible {
    outline: 3px solid var(--d12-gold-500);
    outline-offset: 2px;
}

body.dswd12-auth .auth-step-icon {
    background: linear-gradient(135deg, var(--d12-teal-700), var(--d12-navy-800)) !important;
}

body.dswd12-auth .form-subtitle,
body.dswd12-auth .right-panel .form-check-label { color: var(--d12-muted) !important; }

[data-theme="dark"] body.dswd12-error { background: var(--page) !important; }

[data-theme="dark"] body.dswd12-error .dswd12-footline,
[data-theme="dark"] body.dswd12-error .dswd12-footline strong { color: var(--muted); }

body.dswd12-error .err__brand-mark {
    background: var(--d12-strip) repeat-x 0 100% / 36px 6px, var(--d12-gold-500) !important;
}

body.dswd12-error .err__card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .25);
}

body.dswd12-error .err__card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: var(--d12-strip) repeat-x 0 0 / 36px 6px;
}

body.dswd12-error .dswd12-footline { margin-top: 10px; }

@media (max-width: 991.98px) {
    body.dswd12-auth { gap: 12px; }
    body.dswd12-auth .left-panel {
        padding: 22px 20px 18px !important;
        background-size: 40px 40px, auto, auto !important;
    }
    body.dswd12-auth .left-panel img { grid-row: 1 / span 3 !important; }
    body.dswd12-auth .left-panel h5 { font-size: 12px !important; }
    body.dswd12-auth .left-panel .pv-policy-link {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 10px !important;
        white-space: nowrap;
    }
    .dswd12-scene,
    .dswd12-region { display: none; }
    .dswd12-system {
        grid-column: 2;
        margin: 4px 0 0;
        font-size: 12.5px;
        font-weight: 500;
        color: rgba(255, 255, 255, .92);
    }
    .dswd12-footline { font-size: 11.5px; padding: 0 4px 8px; }
}

@media (max-width: 360px) {
    body.dswd12-auth { padding: 8px !important; }
    body.dswd12-auth .right-panel { padding: 24px 16px 26px !important; }
    body.dswd12-auth .left-panel .logo-box { grid-template-columns: 44px 1fr !important; column-gap: 10px !important; }
    body.dswd12-auth .left-panel img { width: 44px !important; }
    body.dswd12-auth .left-panel h2 { font-size: 17px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .dswd12-scene__rays { animation: none; }
}

body[data-role] #sidebar.sb-modern .sidebar-header {
    position: relative;
    background-image: var(--d12-weave-sidebar), linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)) !important;
    background-size: 40px 40px, auto !important;
    background-repeat: repeat, no-repeat !important;
}

body[data-role] #sidebar.sb-modern .sidebar-header::after {
    content: "" !important;
    display: block !important;
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--d12-gold-500) 0 33%, var(--d12-teal-500) 33% 66%, rgba(255, 255, 255, .85) 66% 100%);
    opacity: .9;
}

body[data-role] .ds-page-header:not(.ds-page-header--sm) {
    position: relative;
    padding-bottom: .85rem;
    background: var(--d12-header-mark) no-repeat right bottom / 220px 72px;
}

body[data-role] .ds-page-header:not(.ds-page-header--sm)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 84px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--d12-gold-500) 0 33%, var(--d12-teal-500) 33% 66%, var(--d12-slate-700) 66% 100%);
}

body[data-role] .ds-page-header--center:not(.ds-page-header--sm)::after { left: 50%; transform: translateX(-50%); }

body[data-role] .ds-empty::before {
    content: "";
    width: 132px;
    height: 44px;
    margin-bottom: -18px;
    background: var(--d12-empty-art) no-repeat center / 132px 44px;
}

body[data-role] .ds-empty--compact::before { display: none; }

body[data-role] .pt-footer { position: relative; }

body[data-role] .pt-footer::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 24px;
    width: 72px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--d12-gold-500) 0 33%, var(--d12-teal-500) 33% 66%, var(--d12-slate-700) 66% 100%);
}

body[data-role] .pt-footer .dswd12-app-line { color: var(--text-muted, #475569); }

[data-theme="dark"] body[data-role] .ds-page-header:not(.ds-page-header--sm) { background-image: none; }

@media (max-width: 767.98px) {
    body[data-role] .ds-page-header:not(.ds-page-header--sm) { background-size: 150px 50px; }
}

@media print {
    body[data-role] .ds-page-header,
    body[data-role] .ds-empty::before { background: none !important; }
    body[data-role] .ds-page-header::after,
    body[data-role] .ds-empty::before { display: none !important; }
}
