:root {
    --sidebar-width: 210px;
    --sidebar-collapsed-width: 78px;
    --bg: #f8fafc;
    --surface: #ffffff;
    --bg-soft: #f1f5f9;
    --bg-soft-2: #eeedfe;
    --line: #cbd5e1;
    --line-strong: rgba(15, 23, 42, 0.24);
    --text: #1c1917;
    --muted: #78716c;
    --brand: #3d35c8;
    --brand-soft: #eeedfe;
    --brand-dark: #3129a8;
    --brand-deep: #231c83;
    --danger: #bf1736;
    --success: #198754;
    --warning: #b7791f;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    color: var(--text);
    font-family: "TT Firs Neue", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background:
        linear-gradient(90deg, var(--surface) 0, var(--surface) var(--sidebar-width), transparent var(--sidebar-width)),
        var(--bg);
}

body.body-auth {
    background: var(--bg);
}

body.sidebar-collapsed {
    --sidebar-width: var(--sidebar-collapsed-width);
}

a {
    transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.app-layout--with-sidebar {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    transition: grid-template-columns 180ms ease;
}

.app-layout--auth {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(215, 225, 251, 0.55) 0%, rgba(232, 234, 240, 0.36) 40%, var(--bg) 100%);
}

.app-layout--auth::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(50, 7, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 7, 255, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 66% 56% at 50% 44%, #000 18%, transparent 72%);
    mask-image: radial-gradient(ellipse 66% 56% at 50% 44%, #000 18%, transparent 72%);
    z-index: 0;
}

.app-layout--auth::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(620px, 70vw);
    height: min(620px, 70vw);
    transform: translate(-50%, -50%);
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(50, 7, 255, 0.08) 0%, rgba(151, 172, 230, 0.03) 42%, transparent 72%);
    z-index: 0;
}

.app-sidebar {
    min-width: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 0;
}

.app-sidebar-frame {
    height: 100%;
    min-width: 0;
    padding: 14px 14px 12px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 22px;
    overflow: hidden;
    transition: padding 180ms ease, border-radius 180ms ease;
}

.app-sidebar-frame--minimal {
    justify-content: space-between;
}

.app-sidebar-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.app-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.app-sidebar-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--brand-dark);
    background: var(--bg);
}

.app-sidebar-toggle:hover {
    color: #fff;
    border-color: var(--brand-dark);
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.app-sidebar-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 180ms ease;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
}

.app-brand:hover {
    color: var(--brand);
}

.app-brand__mark {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    box-shadow: none;
    font-weight: 800;
    font-size: 0.8rem;
}

.app-brand__text {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.08;
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.app-nav__group {
    flex: 0 0 auto;
    padding: 4px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.app-nav__summary {
    min-height: 26px;
    display: flex;
    align-items: center;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-nav__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(5, 5, 5, 0.86);
    text-decoration: none;
    line-height: 1.35;
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.app-nav__link::before {
    content: attr(data-short);
    display: none;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: var(--brand-dark);
    background: rgba(50, 7, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
}

.app-nav__link:hover {
    border-color: rgba(50, 7, 255, 0.42);
    background: rgba(50, 7, 255, 0.08);
    color: var(--brand-dark);
    transform: translateX(2px);
}

.app-nav__link.is-active {
    border-color: rgba(50, 7, 255, 0.7);
    background: var(--brand);
    color: #fff;
    box-shadow: 0 10px 20px rgba(50, 7, 255, 0.16);
}

.app-nav__link.is-active .app-nav__label {
    font-weight: 600;
}

.app-nav__link.is-active.app-nav__link--strong {
    background: var(--brand);
    color: #fff;
}

.app-nav__link.is-active::before {
    color: var(--brand-dark);
    background: rgba(255, 255, 255, 0.94);
}

.app-nav__link--child {
    margin-top: 6px;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    margin-bottom: 18px;
}

.app-user-panel {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    padding: 7px 8px 7px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.app-user-panel__info {
    min-width: 0;
    display: grid;
    gap: 3px;
    text-align: right;
}

.app-user-panel__name {
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.app-user-panel__name:hover,
.app-user-panel__name.is-active {
    color: var(--brand);
}

.app-user-panel__role {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-user-panel__logout {
    flex: 0 0 auto;
    margin: 0;
}

.logout-icon-button {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand-dark);
    background: rgba(255, 255, 255, 0.72);
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1;
}

.logout-icon-button:hover {
    color: #fff;
    border-color: var(--brand-dark);
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    transform: translateY(-1px);
}

.logout-icon-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

body.sidebar-collapsed .app-sidebar {
    padding: 0;
}

body.sidebar-collapsed .app-sidebar-frame {
    align-items: center;
    padding: 14px 10px 12px;
    border-radius: 0;
}

body.sidebar-collapsed .app-sidebar-main,
body.sidebar-collapsed .app-nav,
body.sidebar-collapsed .app-nav__group {
    width: 100%;
}

body.sidebar-collapsed .app-sidebar-header {
    flex-direction: column;
}

body.sidebar-collapsed .app-brand {
    justify-content: center;
}

body.sidebar-collapsed .app-brand__text,
body.sidebar-collapsed .app-nav__summary,
body.sidebar-collapsed .app-nav__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.sidebar-collapsed .app-brand__mark {
    width: 42px;
    height: 42px;
}

body.sidebar-collapsed .app-sidebar-toggle svg {
    transform: rotate(180deg);
}

body.sidebar-collapsed .app-nav__group {
    padding: 6px;
}

body.sidebar-collapsed .app-nav__link {
    justify-content: center;
    min-width: 0;
    padding: 8px;
}

body.sidebar-collapsed .app-nav__link::before {
    display: inline-grid;
}

.app-content {
    min-width: 0;
    padding: 26px 34px 40px;
}

.app-layout--auth .app-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 0;
}

.app-container {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
}

.app-layout--with-sidebar .app-container {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.app-layout--auth .app-container {
    max-width: none;
    min-height: 100vh;
}

.login-bg,
.login-bg__grid,
.login-bg__dots,
.login-bg__glow,
.login-bg__pulses {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.login-bg {
    z-index: 0;
    overflow: hidden;
}

.login-bg__grid {
    background-image:
        linear-gradient(rgba(50, 7, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 7, 255, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 68% 58% at 50% 44%, #000 16%, transparent 72%);
    mask-image: radial-gradient(ellipse 68% 58% at 50% 44%, #000 16%, transparent 72%);
    animation: login-grid-float 12s ease-in-out infinite;
}

.login-bg__dots {
    opacity: 0.55;
    background-image: radial-gradient(circle, rgba(50, 7, 255, 0.12) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 58%);
    mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 58%);
    animation: login-dots-pulse 4.5s ease-in-out infinite;
}

.login-bg__glow {
    top: 50%;
    left: 50%;
    width: min(760px, 74vw);
    height: min(760px, 74vw);
    inset: auto;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at center, rgba(50, 7, 255, 0.16) 0%, rgba(151, 172, 230, 0.07) 42%, transparent 72%);
    filter: blur(2px);
    animation: login-glow-breathe 5.6s ease-in-out infinite;
}

.login-bg__emblem {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    pointer-events: none;
    color: rgba(50, 7, 255, 0.028);
    font-size: clamp(12rem, 28vw, 31rem);
    font-weight: 900;
    line-height: 1;
    z-index: 0;
    animation: login-emblem-drift 9s ease-in-out infinite;
}

.login-bg__pulses {
    display: grid;
    place-items: center;
}

.login-bg__pulse {
    position: absolute;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(50, 7, 255, 0.1);
    border-radius: 48px;
    opacity: 0;
    transform: rotate(45deg) scale(0.44);
}

.login-bg__pulse:nth-child(1) {
    animation: login-pulse-sweep 4.8s ease-out infinite;
}

.login-bg__pulse:nth-child(2) {
    animation: login-pulse-sweep 4.8s ease-out 1.6s infinite;
}

.login-bg__pulse:nth-child(3) {
    animation: login-pulse-sweep 4.8s ease-out 3.2s infinite;
}

.login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(468px, 92vw);
    margin-inline: auto;
    padding: 40px 36px 34px;
    border: 1px solid rgba(151, 172, 230, 0.48);
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 28px 68px rgba(14, 0, 102, 0.09),
        0 0 0 1px rgba(215, 225, 251, 0.55) inset;
    transform: translateZ(0);
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.login-card.is-validating {
    border-color: rgba(50, 7, 255, 0.36);
    box-shadow:
        0 30px 78px rgba(14, 0, 102, 0.14),
        0 0 0 1px rgba(50, 7, 255, 0.12) inset,
        0 0 58px rgba(50, 7, 255, 0.11);
    animation: login-card-breathe 1.45s ease-in-out infinite;
}

.login-card.is-loading {
    transform: translateY(-2px) scale(0.995);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-brand__mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    box-shadow: 0 12px 22px rgba(50, 7, 255, 0.2);
    font-weight: 800;
}

.login-brand__text {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.login-title {
    margin: 0 0 22px;
    font-size: 1.28rem;
    line-height: 1.18;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form.is-submitting .login-form__group,
.login-form.is-submitting .alert {
    pointer-events: none;
    opacity: 0.58;
}

.login-form__group {
    display: grid;
    gap: 6px;
}

.login-form__label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-card .form-select,
.login-card .form-control,
.login-card .scroll-select-toggle {
    min-height: 48px;
    border-radius: 16px;
    padding-inline: 15px;
}

.login-card .password-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.login-card .password-input-group .btn {
    min-width: 104px;
    border-radius: 14px !important;
}

.login-card .password-input-group .form-control {
    border-radius: 16px !important;
    width: 100% !important;
    min-width: 0;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    border-radius: 14px;
}

.login-submit__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
}

.login-form.is-submitting .login-submit__spinner {
    display: inline-block;
    animation: login-spinner 720ms linear infinite;
}

.login-progress {
    display: grid;
    gap: 8px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 180ms ease, max-height 180ms ease;
}

.login-form.is-submitting .login-progress {
    opacity: 1;
    max-height: 24px;
}

.login-progress__track {
    height: 8px;
    border-radius: 999px;
    background: rgba(215, 225, 251, 0.78);
    overflow: hidden;
}

.login-progress__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-soft) 100%);
    box-shadow: 0 0 22px rgba(50, 7, 255, 0.22);
    transition: width 460ms ease;
}

.login-statuses {
    display: grid;
    gap: 7px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 180ms ease, max-height 180ms ease;
}

.login-form.is-submitting .login-statuses {
    opacity: 1;
    max-height: 132px;
}

.login-status {
    position: relative;
    padding-left: 22px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
    opacity: 0.42;
    transform: translateY(4px);
    transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.login-status::before {
    content: "";
    position: absolute;
    top: 0.45em;
    left: 0;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(50, 7, 255, 0.22);
    border-radius: 50%;
    background: #fff;
}

.login-status.is-visible {
    color: var(--text);
    opacity: 1;
    transform: translateY(0);
}

.login-status.is-visible::before {
    border-color: var(--brand);
    box-shadow: 0 0 0 5px rgba(50, 7, 255, 0.08);
}

.login-status.is-done::before {
    background: var(--brand);
    border-color: var(--brand);
}

@keyframes login-grid-float {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(-12px, 10px, 0);
    }
}

@keyframes login-dots-pulse {
    0%,
    100% {
        opacity: 0.36;
        transform: scale(1);
    }
    50% {
        opacity: 0.72;
        transform: scale(1.025);
    }
}

@keyframes login-glow-breathe {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(0.98);
        opacity: 0.85;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08);
        opacity: 1;
    }
}

@keyframes login-emblem-drift {
    0%,
    100% {
        transform: translate(-50%, -48%) rotate(0deg);
    }
    50% {
        transform: translate(-49%, -50%) rotate(-1.5deg);
    }
}

@keyframes login-pulse-sweep {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.44);
    }
    14% {
        opacity: 0.26;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) scale(2.55);
    }
}

@keyframes login-card-breathe {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.006);
    }
}

@keyframes login-spinner {
    to {
        transform: rotate(360deg);
    }
}

.page-shell {
    min-height: 100vh;
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: 30px;
}

.home-hero .btn {
    flex: 0 0 auto;
}

.home-guest-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 28px;
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-guest-hero__content {
    max-width: 780px;
}

.home-guest-hero__content h1 {
    max-width: 760px;
    margin: 8px 0 12px;
    font-size: 2.35rem;
    line-height: 1.08;
    font-weight: 800;
}

.home-guest-hero__content p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.6;
}

.home-guest-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.home-hub-shell {
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
    align-items: stretch;
}

.home-hub-hero {
    min-height: 216px;
}

.home-hub-hero__title {
    max-width: 13ch;
    margin: 10px 0 14px;
    font-size: clamp(2.1rem, 3vw, 3.15rem);
    line-height: 0.98;
    font-weight: 800;
}

.home-hub-hero__text {
    max-width: 58ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.98rem;
    line-height: 1.5;
}

.home-hub-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.home-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.home-hub-side {
    display: flex;
}

.home-quick-search {
    width: 100%;
    min-height: 216px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 247, 255, 0.96) 100%);
}

.home-quick-search__title {
    margin: 10px 0 12px;
    font-size: 1.46rem;
    font-weight: 800;
    line-height: 1.08;
}

.home-quick-search__text {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.home-dashboard {
    display: grid;
    gap: 20px;
}

.home-workspace {
    display: grid;
    gap: 16px;
}

.home-recent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.home-recent-card {
    min-width: 0;
    padding: 16px;
}

.home-recent-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.home-recent-card__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.home-recent-card__title {
    margin: 6px 0 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.home-form-list {
    display: grid;
    gap: 8px;
}

.home-form-row {
    display: grid;
    grid-template-columns: minmax(92px, 0.8fr) minmax(120px, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.78rem;
}

.home-form-row:last-child {
    border-bottom: 0;
}

.home-form-row__date {
    color: var(--muted);
    white-space: nowrap;
}

.home-form-row__city {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    white-space: nowrap;
}

.home-form-row__status {
    max-width: 160px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-size: 0.68rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-dashboard-section {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.home-dashboard-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.home-dashboard-section__title {
    margin: 0 0 6px;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.25;
}

.home-dashboard-section__text {
    margin: 0;
    max-width: 64ch;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.mobile-spoiler__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    color: var(--brand-dark);
    background: transparent;
}

.mobile-spoiler__toggle-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 160ms ease;
}

.mobile-spoiler__title-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mobile-spoiler__body {
    min-width: 0;
}

.home-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.home-dashboard-grid--primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hub-tile {
    position: relative;
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    box-shadow: none;
    overflow: hidden;
}

.hub-tile::before {
    content: none;
}

.hub-tile:hover {
    color: var(--text);
    transform: none;
    border-color: rgba(61, 53, 200, 0.24);
    background: var(--brand-soft);
    box-shadow: none;
}

.hub-tile--feature {
    background: var(--bg);
}

.hub-tile--placeholder {
    opacity: 0.72;
}

.hub-tile__tag {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    width: fit-content;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(50, 7, 255, 0.08);
    color: var(--brand-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hub-tile__title {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    padding-right: 16px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
}

.hub-tile__text {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 38ch;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.hub-tile__badge {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.home-workspace .hub-tile__title {
    margin-top: 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(140px, 0.22fr) minmax(0, 1fr);
    gap: 12px 22px;
}

.profile-grid dt {
    color: var(--muted);
    font-weight: 700;
}

.profile-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.home-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.home-menu-section {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-height: 100%;
    padding: 24px;
}

.home-menu-section__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.home-menu-section__index {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(50, 7, 255, 0.18);
}

.home-menu-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.home-menu-card {
    position: relative;
    display: grid;
    gap: 6px;
    min-height: 104px;
    padding: 18px;
    border: 1px solid rgba(151, 172, 230, 0.45);
    border-radius: 22px;
    color: var(--text);
    text-decoration: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 247, 255, 0.94) 100%);
    box-shadow: 0 16px 34px rgba(14, 0, 102, 0.05);
    overflow: hidden;
}

.home-menu-card::after {
    content: "→";
    position: absolute;
    right: 18px;
    top: 16px;
    color: rgba(50, 7, 255, 0.42);
    font-size: 1.2rem;
    font-weight: 800;
    transition: transform 140ms ease, color 140ms ease;
}

.home-menu-card:hover {
    color: var(--text);
    border-color: rgba(50, 7, 255, 0.38);
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(14, 0, 102, 0.08);
}

.home-menu-card:hover::after {
    color: var(--brand);
    transform: translateX(3px);
}

.home-menu-card__label {
    padding-right: 28px;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.2;
}

.home-menu-card__hint {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.home-menu-card--disabled {
    cursor: default;
    opacity: 0.64;
}

.home-menu-card--disabled::after {
    content: "";
}

.home-menu-card--disabled:hover {
    border-color: rgba(151, 172, 230, 0.45);
    transform: none;
    box-shadow: 0 16px 34px rgba(14, 0, 102, 0.05);
}


.page-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid rgba(151, 172, 230, 0.5);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(232, 234, 240, 0.9) 0%, rgba(255, 255, 255, 0.98) 48%, rgba(215, 225, 251, 0.86) 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: -42% auto auto -12%;
    width: 48%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(50, 7, 255, 0.13) 0%, transparent 68%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    min-height: 178px;
    padding: 30px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 58%, var(--brand-deep) 100%);
    box-shadow: 0 22px 45px rgba(50, 7, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -86px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    box-shadow: inset 0 0 0 46px rgba(255, 255, 255, 0.05);
}

.hero-copy .eyebrow,
.eyebrow {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow--muted {
    color: var(--muted);
}

.hero-copy h1 {
    position: relative;
    z-index: 1;
    margin: 14px 0 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.65rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.hero-copy p {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.hero-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(151, 172, 230, 0.55);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
}

.hero-aside--action-only {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.hero-aside__label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-aside__meta {
    display: grid;
    gap: 8px;
}

.hero-aside__meta-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(207, 216, 238, 0.75);
}

.hero-aside__meta-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.section-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.section-toolbar__actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-card-grid,
.metric-grid,
.vpn-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.dashboard-card,
.metric-card,
.vpn-detail-item,
.measurement-card {
    position: relative;
    border: 1px solid rgba(151, 172, 230, 0.45);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 247, 255, 0.92) 100%);
    box-shadow: 0 18px 45px rgba(14, 0, 102, 0.06);
}

.metric-card,
.vpn-detail-item,
.measurement-card {
    padding: 18px;
}

.metric-card__label,
.vpn-detail-item__label {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.metric-card__value,
.vpn-detail-item__value {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.vpn-table-card {
    padding: 0;
    overflow-x: auto;
}

.vpn-table-card .table {
    min-width: 900px;
}

.vpn-table-card .table > :not(caption) > * > * {
    padding: 1rem 1rem;
}

.table-sort-link::after {
    content: " ↕";
    color: rgba(93, 103, 133, 0.55);
    font-weight: 500;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:focus-visible {
    outline: 2px solid rgba(50, 7, 255, 0.55);
    outline-offset: -2px;
}

.clickable-row:hover > * {
    background-color: rgba(50, 7, 255, 0.04);
}

.summary-table-card,
.summary-table-shell {
    overflow-x: auto;
}

.measurement-card {
    height: 100%;
}

.measurement-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.measurement-card__number {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(50, 7, 255, 0.18);
}

.measurement-card__title {
    margin: 0;
}

.progress {
    height: 12px;
    border-radius: 999px;
    background: rgba(215, 225, 251, 0.74);
    overflow: hidden;
}

.progress-bar {
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.form-shell,
.vpn-workspace {
    width: min(100%, 920px);
    margin-inline: auto;
}

.vpn-workspace--wide {
    width: min(100%, 1280px);
}

.form-panel,
.vpn-step-card {
    padding: clamp(20px, 3vw, 34px);
}

.form-section {
    padding: 18px 0 4px;
    border-top: 1px solid rgba(207, 216, 238, 0.72);
}

.form-section:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.form-section__title {
    margin: 0 0 14px;
    color: var(--brand-deep);
    font-size: 0.92rem;
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
}

.form-grid .form-field--full,
.form-grid .form-section__title,
.form-grid .alert {
    grid-column: 1 / -1;
}

.form-context-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
    gap: 18px;
    align-items: start;
}

.form-context-panel,
.step-context-panel,
.decision-panel,
.danger-zone-panel {
    border: 1px solid rgba(151, 172, 230, 0.5);
    border-radius: 18px;
    background: rgba(245, 247, 255, 0.72);
}

.form-context-panel,
.step-context-panel {
    padding: 16px;
}

.context-panel__title {
    margin: 0 0 8px;
    font-size: 0.92rem;
    font-weight: 800;
}

.context-panel__text {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.step-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.34fr);
    gap: 18px;
    align-items: start;
}

.step-context-panel {
    position: sticky;
    top: 18px;
}

.step-context-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.88rem;
}

.step-context-list strong {
    display: block;
    color: var(--text);
}

.step-context-panel__danger {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(207, 216, 238, 0.82);
}

.vpn-step-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.vpn-step-title {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    letter-spacing: -0.04em;
}

.vpn-step-counter {
    flex: 0 0 auto;
    align-self: flex-start;
    min-width: 86px;
    padding: 10px 14px;
    border: 1px solid rgba(151, 172, 230, 0.55);
    border-radius: 16px;
    background: rgba(245, 247, 255, 0.95);
    color: var(--brand-deep);
    font-weight: 800;
    text-align: center;
}

.status-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-choice-group .btn {
    min-width: 142px;
    border-color: rgba(151, 172, 230, 0.86);
    background: #fff;
    color: var(--text);
}

.status-choice-group .btn-check:checked + .btn,
.status-choice-group .btn.active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(50, 7, 255, 0.16);
}

.status-choice-group .btn-check:disabled + .btn {
    opacity: 0.52;
    background: rgba(232, 234, 240, 0.76);
}

.status-choice-group .btn-check:checked:disabled + .btn {
    opacity: 0.9;
    border-color: rgba(65, 57, 201, 0.62);
    background: rgba(65, 57, 201, 0.18);
    color: var(--brand-dark);
    box-shadow: inset 0 0 0 1px rgba(65, 57, 201, 0.24);
}

.form-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(207, 216, 238, 0.82);
}

.form-actions-bar__left,
.form-actions-bar__main,
.form-actions-bar__danger {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.form-actions-bar__main {
    margin-left: auto;
}

.form-actions-bar__danger {
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid rgba(207, 216, 238, 0.82);
}

.decision-panel {
    margin-bottom: 16px;
    padding: 18px;
    background: rgba(242, 251, 246, 0.92);
    border-color: rgba(76, 160, 104, 0.36);
}

.danger-zone-panel {
    padding: 18px;
    background: rgba(255, 245, 245, 0.92);
    border-color: rgba(191, 23, 54, 0.24);
}

.decision-panel__title,
.danger-zone-panel__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
}

.decision-panel__text,
.danger-zone-panel__text {
    margin: 0 0 14px;
    color: var(--muted);
}

.nav-tabs {
    gap: 8px;
    border-bottom: 0;
}

.nav-tabs .nav-link {
    border: 1px solid rgba(151, 172, 230, 0.72);
    border-radius: 16px 16px 0 0;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.nav-tabs .nav-link.active {
    border-color: rgba(151, 172, 230, 0.45);
    color: var(--brand-deep);
    background: #fff;
}

.row > [class*="col-"] > .content-card {
    border-radius: 28px;
}

h1,
h2,
h3,
.h1,
.h2,
.h3,
.h4,
.h5 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0;
}

.text-muted {
    color: var(--muted) !important;
}

.table-responsive {
    border-radius: var(--radius);
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 0.85rem 0.75rem;
    border-bottom-color: rgba(207, 216, 238, 0.9);
}

.table th {
    white-space: nowrap;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
}

.table th .table-sort-link {
    color: #000;
    font-weight: 700;
    text-decoration: none;
}

.table th .table-sort-link:hover,
.table th .table-sort-link:focus {
    color: #000;
    text-decoration: none;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: rgba(215, 225, 251, 0.28);
}

.export-results-table-wrap {
    border-radius: 0;
}

.export-results-table {
    width: 100%;
    min-width: 1040px;
    table-layout: fixed;
}

.export-results-table__select {
    width: 48px;
}

.export-results-table__date {
    width: 130px;
}

.export-results-table__organization {
    width: 260px;
}

.export-results-table__city {
    width: 260px;
}

.export-results-table__operator {
    width: 260px;
}

.export-results-table__os {
    width: 140px;
}

.export-results-table__status {
    width: 220px;
}

.export-results-table th,
.export-results-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.export-results-table th:first-child,
.export-results-table td:first-child {
    text-align: center;
}

.btn {
    border-radius: var(--radius-sm);
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-sm {
    min-height: 34px;
    border-radius: 11px;
    padding-inline: 0.8rem;
    font-size: 0.86rem;
}

.btn-primary,
.btn-success {
    color: #fff !important;
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    box-shadow: 0 12px 24px rgba(50, 7, 255, 0.14);
}

.btn-primary:visited,
.btn-success:visited {
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
    color: #fff !important;
    border-color: transparent;
    background: linear-gradient(135deg, #4328ff 0%, var(--brand-dark) 100%);
    box-shadow: 0 16px 28px rgba(50, 7, 255, 0.18);
}

.btn-primary:active,
.btn-success:active,
.btn-primary.active,
.btn-success.active {
    color: #fff !important;
}

.btn-soft-text {
    font-weight: 500;
    letter-spacing: -0.01em;
}

.table-action-btn {
    min-width: 70px;
}

.filter-card {
    padding: 1.15rem 1.25rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    align-items: end;
}

.filter-field {
    grid-column: span 2;
    min-width: 0;
}

.filter-field--wide {
    grid-column: span 3;
}

.filter-field--xwide {
    grid-column: span 6;
}

.filter-field--full {
    grid-column: 1 / -1;
}

.filter-field--date,
.filter-field--compact {
    grid-column: span 2;
}

.filter-card .form-label {
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.filter-card .form-control,
.filter-card .form-select {
    width: 100%;
    min-height: 38px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.export-filter-grid {
    grid-template-columns: minmax(142px, 0.9fr) repeat(6, minmax(142px, 1fr)) minmax(230px, auto);
}

.export-filter-grid .filter-field,
.export-filter-grid .filter-field--date,
.export-filter-grid .filter-field--compact,
.export-filter-grid .filter-field--wide {
    grid-column: auto;
}

.export-filter-field {
    position: relative;
}

.export-multi-dropdown {
    position: relative;
}

.export-multi-dropdown__button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 38px;
    padding: 0.42rem 2rem 0.42rem 0.75rem;
    border: 1px solid #b8c7f7;
    border-radius: 12px;
    color: var(--text);
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.2;
    list-style: none;
}

.export-multi-dropdown__button::-webkit-details-marker {
    display: none;
}

.export-multi-dropdown__button::after {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 0.48rem;
    height: 0.48rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    content: "";
    transform: translateY(-65%) rotate(45deg);
}

.export-multi-dropdown[open] .export-multi-dropdown__button {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(65, 57, 201, 0.15);
}

.export-multi-dropdown[open] .export-multi-dropdown__button::after {
    transform: translateY(-30%) rotate(225deg);
}

.export-multi-dropdown__value {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.export-multi-dropdown__panel {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 260px;
    margin-top: 6px;
    padding: 0.35rem;
    border: 1px solid rgba(151, 172, 230, 0.9);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    overflow-y: auto;
}

.export-multi-dropdown__option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    min-height: 34px;
    margin: 0;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.25;
}

.export-multi-dropdown__option:hover {
    background: rgba(65, 57, 201, 0.08);
}

.export-multi-dropdown__option .form-check-input {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.mobile-filter-launcher,
.mobile-filter-panel__header {
    display: none;
}

.export-filter-hint {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.25;
}

.filter-actions {
    grid-column: span 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    min-width: max-content;
}

.filter-actions--wide {
    grid-column: span 6;
}

.filter-actions--full {
    grid-column: 1 / -1;
}

.filter-actions .btn {
    min-height: 38px;
}

.export-filter-grid .filter-actions {
    grid-column: auto;
    min-width: 0;
}

.export-filter-grid .filter-actions .btn {
    flex: 1 1 0;
    white-space: nowrap;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success {
    color: var(--text);
    border-color: rgba(151, 172, 230, 0.8);
    background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-success:hover {
    color: var(--brand);
    border-color: rgba(50, 7, 255, 0.4);
    background: rgba(245, 247, 255, 0.95);
}

.btn-danger,
.btn-outline-danger:hover {
    border-color: transparent;
    background: var(--danger);
}

.btn-outline-danger {
    color: var(--danger);
    border-color: rgba(191, 23, 54, 0.36);
    background: #fff;
}

.badge {
    border-radius: 9px;
    padding: 0.42em 0.62em;
}

.bg-secondary {
    background-color: #677083 !important;
}

.bg-success {
    background-color: var(--success) !important;
}

.bg-warning {
    background-color: #ffb612 !important;
}

.form-control,
.form-select,
textarea,
input,
select {
    border-radius: var(--radius-sm);
    border-color: rgba(151, 172, 230, 0.75);
}

.form-control,
.form-select,
textarea,
input,
select,
option {
    color-scheme: light;
}

.form-select,
select {
    min-height: 42px;
    color: var(--text);
    background-color: #fff;
    line-height: 1.35;
}

.form-select:not([multiple]):not([size]),
select:not([multiple]):not([size]) {
    padding-right: 2.65rem;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-select-sm:not([multiple]):not([size]) {
    min-height: 38px;
    padding-right: 2.35rem;
    background-position:
        calc(100% - 16px) 50%,
        calc(100% - 11px) 50%;
}

.form-select[multiple],
.form-select[size],
select[multiple],
select[size] {
    min-height: auto;
    padding-right: 0.75rem;
    background-image: none;
}

.form-select option,
select option {
    background: #fff;
    color: var(--text);
}

.form-select option:checked,
select option:checked {
    background: var(--brand);
    color: #fff;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus,
select:focus {
    border-color: rgba(61, 53, 200, 0.72);
    box-shadow: 0 0 0 0.16rem rgba(61, 53, 200, 0.13);
}

.form-label {
    margin-bottom: 0.25rem;
    color: var(--text);
    font-weight: 600;
}

.alert {
    border-radius: 18px;
    border-width: 1px;
}

.alert-danger {
    color: var(--danger);
    background: rgba(191, 23, 54, 0.08);
    border-color: rgba(191, 23, 54, 0.2);
}

.alert-warning {
    color: #674600;
    background: rgba(255, 182, 18, 0.16);
    border-color: rgba(255, 182, 18, 0.34);
}

.alert-success {
    color: #0f5132;
    background: rgba(25, 135, 84, 0.12);
    border-color: rgba(25, 135, 84, 0.25);
}

.alert-info {
    color: var(--brand-deep);
    background: rgba(215, 225, 251, 0.6);
    border-color: rgba(151, 172, 230, 0.45);
}

.empty-state {
    padding: 1rem;
    border: 1px dashed rgba(151, 172, 230, 0.8);
    border-radius: 16px;
    background: rgba(245, 247, 255, 0.78);
}

.city-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.city-tab {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 2px 12px;
    border: 1px solid #6c757d;
    border-radius: 999px;
    color: #212529;
    background: #fff;
    line-height: 1.2;
}

.city-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.875rem;
    line-height: 1.2;
    white-space: nowrap;
}

.city-badge-moscow {
    color: #28536b;
    background: #d8ecf3;
    border-color: #b9dbe7;
}

.city-badge-spb {
    color: #5a3f73;
    background: #eadff4;
    border-color: #d8c3ea;
}

.city-badge-samara {
    color: #496333;
    background: #e2efd4;
    border-color: #cbe1b4;
}

.city-badge-novosibirsk {
    color: #7a4b22;
    background: #f5e1c8;
    border-color: #ebc99e;
}

.city-badge-default {
    color: #495057;
    background: #edf0f2;
    border-color: #d8dee3;
}

.status-nowrap {
    white-space: nowrap;
}

.summary-time {
    min-width: 120px;
    white-space: nowrap;
}

.summary-comment {
    text-align: center;
    vertical-align: middle;
}

.summary-table-card {
    overflow: visible;
}

.summary-table {
    min-width: 1120px;
}

.control-detail-table {
    table-layout: fixed;
    min-width: 920px;
}

.control-detail-table__plan {
    width: 56%;
}

.control-detail-table__status {
    width: 140px;
}

.control-detail-table__tester {
    width: 280px;
}

.control-detail-table__action {
    width: 110px;
}

.control-detail-table__plan-cell {
    padding-left: 0.75rem !important;
}

.control-detail-table__status-cell {
    text-align: center;
    white-space: nowrap;
}

.control-detail-table__tester-cell {
    color: var(--muted) !important;
    white-space: nowrap;
}

.control-detail-table__action-cell {
    white-space: nowrap;
}

.sticky-table-head {
    position: sticky;
    top: 0;
    z-index: 5;
}

.sticky-table-head th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    box-shadow: 0 1px 0 #dee2e6;
}

.password-input-group .form-control:focus {
    position: relative;
    z-index: 1;
}

.password-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.password-input-group .form-control {
    border-radius: 0.375rem !important;
    width: 100%;
    min-width: 0;
}

.password-input-group .btn {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 0.375rem !important;
    min-width: 104px;
}

.contact-clear-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.contact-clear-input {
    padding-right: 2.5rem;
}

.contact-clear-btn {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    z-index: 3;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6c757d;
    font-size: 1.25rem;
    line-height: 1;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-clear-btn:hover,
.contact-clear-btn:focus {
    color: #212529;
    background: #eef2f7;
}

.scroll-select {
    position: relative;
}

.scroll-select-toggle {
    min-height: 42px;
}

.scroll-select-menu {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 1050;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
    border: 1px solid rgba(151, 172, 230, 0.8);
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: 0 18px 45px rgba(32, 40, 69, 0.16);
}

.scroll-select.is-open .scroll-select-menu {
    display: block;
}

.scroll-select-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: #212529;
    text-align: left;
}

.scroll-select-item:hover,
.scroll-select-item:focus,
.scroll-select-item.is-selected {
    background: var(--brand);
    color: #fff;
}

.messenger-time-field {
    max-width: 170px;
}

.messenger-time-input {
    width: 170px !important;
    max-width: 100%;
}

@media (max-width: 576px) {
    .messenger-time-field {
        max-width: none;
    }

    .messenger-time-input {
        width: 100% !important;
    }

    .home-hub-hero__title {
        max-width: none;
        font-size: 1.9rem;
    }

    .home-hub-hero,
    .home-quick-search,
    .home-dashboard-section {
        padding: 20px;
    }

    .home-dashboard-section__header {
        flex-direction: column;
    }
}

@media (max-width: 1024px) {
    body.mobile-filter-open {
        overflow: hidden;
    }

    body {
        background:
            linear-gradient(180deg, rgba(232, 234, 240, 0.72) 0, rgba(232, 234, 240, 0.72) 360px, transparent 360px),
            var(--bg);
    }

    .app-layout,
    .app-layout--with-sidebar {
        grid-template-columns: 1fr;
        align-content: start;
    }

    .app-sidebar {
        align-self: start;
        position: static;
        height: auto;
        padding: 18px 18px 0;
    }

    .app-content {
        align-self: start;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .app-topbar {
        order: 2;
        margin-top: 18px;
        margin-bottom: 0;
    }

    .app-container {
        order: 1;
    }

    .app-sidebar-frame {
        height: auto;
        padding: 22px 18px;
        gap: 16px;
    }

    .app-sidebar-frame--minimal {
        justify-content: flex-start;
    }

    .app-sidebar-toggle {
        display: none;
    }

    body.sidebar-collapsed .app-sidebar-frame {
        align-items: stretch;
        padding: 22px 18px;
        border-radius: var(--radius);
    }

    body.sidebar-collapsed .app-sidebar-header {
        flex-direction: row;
    }

    body.sidebar-collapsed .app-brand {
        justify-content: flex-start;
    }

    body.sidebar-collapsed .app-brand__mark {
        width: 24px;
        height: 24px;
    }

    body.sidebar-collapsed .app-brand__text,
    body.sidebar-collapsed .app-nav__summary,
    body.sidebar-collapsed .app-nav__label {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    body.sidebar-collapsed .app-nav__group {
        padding: 4px 0 0;
    }

    body.sidebar-collapsed .app-nav__link {
        justify-content: flex-start;
        min-width: max-content;
        padding: 8px 9px;
        white-space: nowrap;
    }

    body.sidebar-collapsed .app-nav__link::before {
        display: none;
    }

    body.sidebar-collapsed .app-sidebar-toggle svg {
        transform: none;
    }

    .home-hub-shell {
        grid-template-columns: 1fr;
    }

    .home-dashboard-grid,
    .home-dashboard-grid--primary {
        grid-template-columns: 1fr;
    }

    .home-recent-grid {
        grid-template-columns: 1fr;
    }

    .home-form-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .home-form-row__status {
        max-width: none;
        width: max-content;
    }

    .app-nav {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 6px;
    }

    .app-nav__group {
        min-width: 220px;
    }

    .app-nav__link {
        min-width: max-content;
        white-space: nowrap;
    }

    .app-content {
        padding: 18px;
    }

    .mobile-spoiler__toggle {
        display: inline-flex;
    }

    .mobile-spoiler.is-collapsed .mobile-spoiler__body {
        display: none;
    }

    .mobile-spoiler.is-collapsed .home-recent-card__header,
    .mobile-spoiler.is-collapsed .home-dashboard-section__header {
        margin-bottom: 0;
    }

    .mobile-spoiler.is-collapsed .mobile-spoiler__toggle-icon {
        transform: rotate(-90deg);
    }

    .filter-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .filter-field,
    .filter-field--wide,
    .filter-field--date,
    .filter-field--compact {
        grid-column: span 3;
    }

    .filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .export-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .export-filter-grid .filter-field,
    .export-filter-grid .filter-field--date,
    .export-filter-grid .filter-actions {
        grid-column: auto;
    }

    .mobile-filter-launcher {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 12px;
    }

    .filter-card {
        position: fixed;
        inset: 0;
        z-index: 2000;
        display: none;
        width: 100%;
        margin: 0 !important;
        padding: 18px;
        border: 0;
        border-radius: 0;
        background: rgba(15, 23, 42, 0.52);
        overflow-y: auto;
    }

    .filter-card.is-mobile-open {
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .mobile-filter-panel {
        width: min(100%, 420px);
        max-height: calc(100vh - 36px);
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: var(--surface);
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
        overflow-y: auto;
    }

    .mobile-filter-panel__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
    }

    .mobile-filter-panel__title {
        font-size: 1rem;
        font-weight: 800;
    }

    .mobile-filter-panel__close {
        display: inline-grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border: 1px solid var(--line);
        border-radius: 12px;
        color: var(--brand-dark);
        background: var(--bg);
        font-size: 1.45rem;
        line-height: 1;
    }
}

@media (max-width: 820px) {
    .page-header {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 28px;
    }

    .home-section-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-guest-hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .home-guest-hero__content h1 {
        font-size: 1.9rem;
    }

    .home-guest-hero__actions {
        justify-content: flex-start;
    }

    .hero-copy {
        min-height: 156px;
        padding: 24px;
        border-radius: 22px;
    }

    .hero-aside {
        padding: 20px;
        border-radius: 22px;
    }

    .vpn-step-header,
    .form-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .form-context-layout,
    .step-form-layout,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .step-context-panel {
        position: static;
    }

    .form-actions-bar__left,
    .form-actions-bar__main,
    .form-actions-bar__danger {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .form-actions-bar__main {
        margin-left: 0;
    }

    .form-actions-bar__danger {
        margin-left: 0;
        padding: 14px 0 0;
        border-left: 0;
        border-top: 1px solid rgba(207, 216, 238, 0.82);
    }

    .vpn-step-counter {
        align-self: stretch;
    }
}

@media (max-width: 680px) {
    :root {
        --radius: 20px;
    }

    .app-content {
        padding: 14px;
    }

    .app-sidebar {
        padding: 14px 14px 0;
    }

    .app-sidebar-frame,
    .content-card {
        border-radius: 22px;
    }

    .app-topbar {
        margin-bottom: 14px;
    }

    .app-user-panel {
        width: 100%;
    }

    .app-user-panel__info {
        margin-right: auto;
        text-align: left;
    }

    .btn {
        width: 100%;
    }

    .filter-card {
        padding: 1rem;
    }

    .filter-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-field,
    .filter-field--wide,
    .filter-field--date,
    .filter-field--compact,
    .filter-actions {
        grid-column: 1 / -1;
    }

    .filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .export-filter-grid {
        grid-template-columns: 1fr;
    }

    .export-filter-grid .filter-field,
    .export-filter-grid .filter-field--date,
    .export-filter-grid .filter-actions {
        grid-column: 1 / -1;
    }

    .section-toolbar,
    .section-toolbar__actions,
    .action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-copy {
        min-height: 118px;
        padding: 18px;
    }

    .hero-copy h1 {
        font-size: clamp(1.55rem, 9vw, 2.15rem);
        line-height: 1;
        letter-spacing: -0.045em;
    }

    .hero-copy p {
        margin-top: 10px;
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .hero-copy .eyebrow,
    .eyebrow {
        font-size: 0.68rem;
    }

    .hero-aside {
        padding: 18px;
    }

    .hero-aside .btn,
    .action-row .btn,
    .form-actions-bar .btn {
        width: 100%;
    }

    .vpn-table-card .table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }

    .vpn-table-card .table > :not(caption) > * > * {
        padding: 0.78rem 0.55rem;
        font-size: calc(0.86rem - 2px);
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .vpn-table-card .table th,
    .vpn-table-card .table td {
        text-align: center;
        vertical-align: middle;
        white-space: normal;
    }

    .vpn-table-card .table th:first-child,
    .vpn-table-card .table td:first-child {
        text-align: center;
    }

    .vpn-table-card .table th {
        font-size: calc(0.86rem - 3px);
        line-height: 1.15;
        vertical-align: top;
    }

    .vpn-table-card .table th .table-sort-link {
        display: inline-block;
        line-height: inherit;
    }

    .vpn-table-card .table th:nth-child(n+4),
    .vpn-table-card .table td:nth-child(n+4) {
        display: none;
    }

    .vpn-form-list-card .table th:nth-child(3),
    .vpn-form-list-card .table td:nth-child(3) {
        display: none;
    }

    .vpn-form-list-card .table th:nth-child(5),
    .vpn-form-list-card .table td:nth-child(5) {
        display: table-cell;
    }

    .home-recent-card__header {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .profile-grid dd {
        margin-bottom: 8px;
    }

    .home-hero,
    .home-menu-section {
        padding: 20px;
    }

    .home-menu-section__head {
        flex-direction: column;
    }

    .dashboard-card-grid,
    .metric-grid,
    .vpn-detail-grid {
        grid-template-columns: 1fr;
    }

    .status-choice-group {
        display: grid;
        grid-template-columns: 1fr;
    }

    .status-choice-group .btn {
        width: 100%;
    }

    .login-card {
        padding: 30px 24px 26px;
        border-radius: 28px;
    }

    .login-shell {
        padding: 18px;
    }

    .login-card .password-input-group {
        grid-template-columns: 1fr;
    }

    .login-card .password-input-group .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }

    .login-bg__grid,
    .login-bg__dots,
    .login-bg__glow,
    .login-bg__emblem,
    .login-bg__pulse,
    .login-card.is-validating,
    .login-form.is-submitting .login-submit__spinner {
        animation: none !important;
    }

    .login-progress__fill,
    .login-status,
    .login-card {
        transition-duration: 1ms !important;
    }
}
