:root {
    --app-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --app-bg: #f4f7fb;
    --app-bg-secondary: #eef2f8;
    --app-surface: rgba(255, 255, 255, 0.92);
    --app-surface-solid: #ffffff;
    --app-surface-muted: #f8faff;
    --app-text: #0f172a;
    --app-text-soft: #546075;
    --app-text-faint: #8390a6;
    --app-border: rgba(15, 23, 42, 0.08);
    --app-border-strong: rgba(15, 23, 42, 0.14);
    --app-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --app-shadow-md: 0 16px 40px rgba(15, 23, 42, 0.12);
    --app-shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.16);

    --accent: #6d4aff;
    --accent-2: #3b82f6;
    --accent-3: #22c55e;
    --accent-rgb: 109, 74, 255;

    --sidebar-bg: linear-gradient(180deg, #0a1020 0%, #111d36 100%);
    --sidebar-surface: rgba(255, 255, 255, 0.06);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: #eef2ff;
    --sidebar-muted: #a8b4ca;
    --sidebar-faint: #7a879d;
    --sidebar-link-hover: rgba(255, 255, 255, 0.07);
    --sidebar-link-active: linear-gradient(135deg, rgba(109, 74, 255, 0.95), rgba(59, 130, 246, 0.92));
    --sidebar-link-active-shadow: 0 16px 30px rgba(67, 56, 202, 0.28);

    --success-bg: rgba(22, 163, 74, 0.12);
    --danger-bg: rgba(239, 68, 68, 0.12);
    --warning-bg: rgba(245, 158, 11, 0.14);

    --chat-in-bg: rgba(148, 163, 184, 0.12);
    --chat-in-border: rgba(100, 116, 139, 0.18);
    --chat-out-bg: rgba(99, 102, 241, 0.12);
    --chat-out-border: rgba(99, 102, 241, 0.24);

    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--app-text);
    --bs-border-color: var(--app-border);
    --bs-primary: var(--accent);
    --bs-primary-rgb: var(--accent-rgb);
    --bs-link-color: var(--accent);
    --bs-link-hover-color: #4f46e5;
    --bs-secondary-color: var(--app-text-soft);
}

html[data-theme="dark"] {
    --app-bg: #07111f;
    --app-bg-secondary: #0b1628;
    --app-surface: rgba(15, 23, 42, 0.88);
    --app-surface-solid: #0f172a;
    --app-surface-muted: #121d32;
    --app-text: #e7edf9;
    --app-text-soft: #9eabc1;
    --app-text-faint: #73819a;
    --app-border: rgba(148, 163, 184, 0.14);
    --app-border-strong: rgba(148, 163, 184, 0.24);
    --app-shadow-sm: 0 10px 26px rgba(2, 6, 23, 0.42);
    --app-shadow-md: 0 18px 48px rgba(2, 6, 23, 0.52);
    --app-shadow-lg: 0 32px 84px rgba(2, 6, 23, 0.62);

    --sidebar-bg: linear-gradient(180deg, #030712 0%, #0b1324 100%);
    --sidebar-surface: rgba(255, 255, 255, 0.04);
    --sidebar-border: rgba(148, 163, 184, 0.12);
    --sidebar-text: #f8fbff;
    --sidebar-muted: #b7c4db;
    --sidebar-faint: #7f8ba2;
    --sidebar-link-hover: rgba(255, 255, 255, 0.06);
    --sidebar-link-active: linear-gradient(135deg, rgba(124, 92, 255, 0.96), rgba(37, 99, 235, 0.94));

    --success-bg: rgba(34, 197, 94, 0.18);
    --danger-bg: rgba(239, 68, 68, 0.18);
    --warning-bg: rgba(245, 158, 11, 0.18);

    --chat-in-bg: rgba(148, 163, 184, 0.11);
    --chat-in-border: rgba(148, 163, 184, 0.18);
    --chat-out-bg: rgba(99, 102, 241, 0.18);
    --chat-out-border: rgba(99, 102, 241, 0.28);

    --bs-link-hover-color: #93c5fd;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(109, 74, 255, 0.12), transparent 28%),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.10), transparent 30%),
        var(--app-bg);
    color: var(--app-text);
    font-family: var(--app-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 220px;
    flex: 0 0 220px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 18px 10px;
    box-shadow: inset -1px 0 0 var(--sidebar-border);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1030;
}

.sidebar-shell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.sidebar-header {
    padding: 2px 2px 4px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.brand-logo-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: linear-gradient(145deg, #7c5cff 0%, #4cc9f0 100%);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.32);
    isolation: isolate;
}

.brand-logo-mark::before,
.brand-logo-mark::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 16px;
    pointer-events: none;
}

.brand-logo-mark::before {
    background: linear-gradient(145deg, rgba(255,255,255,0.32), rgba(255,255,255,0.03));
    z-index: -1;
}

.brand-logo-mark::after {
    inset: auto;
    width: 26px;
    height: 26px;
    right: -6px;
    top: -6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e 0%, #2dd4bf 100%);
    box-shadow: 0 8px 20px rgba(45, 212, 191, 0.22);
}

.brand-logo-mark-core {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #041120;
}

.brand-logo-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 5px;
}

.brand-logo-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-logo-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.brand-logo-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #c7d2fe;
}

.brand-logo-caption {
    font-size: 0.83rem;
    color: var(--sidebar-muted);
}

.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 16px;
    color: var(--sidebar-muted);
    text-decoration: none;
    font-size: 0.91rem;
    font-weight: 600;
    background: transparent;
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.sidebar-link:hover {
    background: var(--sidebar-link-hover);
    color: var(--sidebar-text);
    transform: translateX(2px);
}

.sidebar-link.active {
    background: var(--sidebar-link-active);
    color: #ffffff;
    box-shadow: var(--sidebar-link-active-shadow);
}

.sidebar-link.disabled {
    opacity: 0.66;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-link-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    flex: 0 0 auto;
}

.sidebar-link.active .sidebar-link-icon {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255,255,255,0.18);
}

.sidebar-link-label {
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-link-tail.badge {
    margin-left: auto;
    background: rgba(255,255,255,0.16) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.14);
}

.sidebar-section-title {
    margin: 14px 6px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--sidebar-faint);
}

.sidebar-footer {
    margin-top: auto;
}

.sidebar-utilities {
    display: grid;
    gap: 10px;
}

.shell-control {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    border: 1px solid var(--sidebar-border);
    background: var(--sidebar-surface);
    color: var(--sidebar-text);
    padding: 10px 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    backdrop-filter: blur(16px);
}

.shell-control--button {
    appearance: none;
    cursor: pointer;
    text-align: left;
}

.shell-control:hover,
.shell-control:focus-visible {
    color: #ffffff;
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.09);
}

.shell-control.dropdown-toggle::after {
    margin-left: auto;
    color: var(--sidebar-faint);
}

.shell-control-icon,
.shell-control-flag {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
}

.shell-control-flag {
    font-size: 1.15rem;
}

.shell-control-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.shell-control-copy small {
    font-size: 0.74rem;
    color: var(--sidebar-faint);
}

.shell-control-copy strong {
    color: #ffffff;
    font-size: 0.92rem;
}

.shell-lang-menu {
    min-width: 100%;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.lang-option-flag {
    width: 1.4rem;
    text-align: center;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.05));
    font-size: 1.15rem;
}

.sidebar-user-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-user-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role,
.sidebar-note {
    font-size: 0.82rem;
    color: var(--sidebar-muted);
}

.btn-brand-secondary {
    border-radius: 16px;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.10);
    font-weight: 700;
}

.btn-brand-secondary:hover,
.btn-brand-secondary:focus-visible {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border-color: rgba(255,255,255,0.18);
}

.app-main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: auto;
}

.app-main-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 10%, rgba(76, 201, 240, 0.08), transparent 22%),
        radial-gradient(circle at 90% 20%, rgba(109, 74, 255, 0.09), transparent 24%),
        radial-gradient(circle at 80% 90%, rgba(34, 197, 94, 0.06), transparent 18%);
}

.app-content-wrap {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: clamp(1.45rem, 1.2rem + 0.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.2rem;
}

.text-muted,
.small.text-muted {
    color: var(--app-text-soft) !important;
}

.card-panel,
.card,
.modal-content,
.dropdown-menu,
.offcanvas,
.list-group-item,
.accordion-item {
    background: var(--app-surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-sm);
    color: var(--app-text);
}

.card-panel {
    border-radius: 24px;
    overflow: hidden;
}

.card-panel-header,
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--app-border);
    background: rgba(255,255,255,0.04);
}

.card-panel-body,
.card-body {
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 28px 26px;
    border-radius: 30px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow-lg);
    backdrop-filter: blur(18px);
}

.auth-stage {
    min-height: calc(100vh - 2rem);
}

.login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.16);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-title {
    margin: 0 0 20px;
    font-size: clamp(1.55rem, 1.28rem + 0.8vw, 1.95rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-align: center;
}

.login-subtitle {
    margin: 0;
    font-size: 1rem;
    color: var(--app-text-soft);
}

.login-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 6px;
}

.login-feature-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: var(--app-surface-muted);
    border: 1px solid var(--app-border);
    color: var(--app-text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--app-text-soft);
    margin-bottom: 0.45rem;
}

.form-control,
.form-select,
.form-control:focus,
.form-select:focus {
    color: var(--app-text);
    background-color: var(--app-surface-solid);
}

.form-control,
.form-select {
    border-radius: 16px;
    border: 1px solid var(--app-border);
    padding: 0.84rem 0.95rem;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.form-control::placeholder {
    color: var(--app-text-faint);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--app-border-strong);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 0 0 0.24rem rgba(var(--accent-rgb), 0.12);
}

.form-check-input {
    background-color: var(--app-surface-solid);
    border-color: var(--app-border-strong);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn {
    border-radius: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.btn-primary {
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    box-shadow: 0 14px 28px rgba(var(--accent-rgb), 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    filter: brightness(1.04);
    box-shadow: 0 18px 34px rgba(var(--accent-rgb), 0.26);
}

.btn-outline-light,
.btn-outline-secondary,
.btn-outline-primary {
    border-color: var(--app-border-strong);
}

.btn-outline-light:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:hover {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--app-text);
    border-color: rgba(var(--accent-rgb), 0.22);
}

.alert {
    border-radius: 18px;
    border: 1px solid transparent;
    box-shadow: var(--app-shadow-sm);
}

.alert-success {
    background: var(--success-bg);
    color: var(--app-text);
    border-color: rgba(34, 197, 94, 0.18);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--app-text);
    border-color: rgba(239, 68, 68, 0.18);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--app-text);
    border-color: rgba(245, 158, 11, 0.18);
}

.alert-info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--app-text);
    border-color: rgba(59, 130, 246, 0.18);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--app-text);
    --bs-table-border-color: var(--app-border);
    --bs-table-hover-bg: rgba(var(--accent-rgb), 0.05);
    --bs-table-hover-color: var(--app-text);
    --bs-table-striped-bg: rgba(148, 163, 184, 0.06);
    --bs-table-striped-color: var(--app-text);
    color: var(--app-text);
}

.table > :not(caption) > * > * {
    background-color: transparent;
    box-shadow: none;
}

.table thead th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--app-text-faint);
    border-bottom-width: 1px;
    white-space: nowrap;
}

.table tbody tr {
    border-color: var(--app-border);
}

.badge {
    border-radius: 999px;
    padding: 0.45em 0.7em;
}

.text-bg-secondary {
    background-color: rgba(148, 163, 184, 0.16) !important;
    color: var(--app-text) !important;
}

.dropdown-menu,
.modal-content {
    border-radius: 22px;
}

.dropdown-item {
    border-radius: 12px;
    font-weight: 600;
    color: var(--app-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--app-text);
}

.nav-tabs,
.nav-pills {
    border-color: var(--app-border);
}

.nav-tabs .nav-link,
.nav-pills .nav-link {
    border-radius: 14px;
    color: var(--app-text-soft);
    font-weight: 700;
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), 0.12);
}

.list-group-item {
    border-left: none;
    border-right: none;
}

.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--app-surface-solid);
    border: 1px solid var(--app-border);
    border-radius: 18px;
    margin-top: 6px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: var(--app-shadow-md);
}

.city-dropdown-item {
    padding: 9px 12px;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--app-text);
}

.city-dropdown-item:hover {
    background: rgba(var(--accent-rgb), 0.06);
}

#msgAccounts,
#msgConversations,
.msg-scroll,
.chat-history,
.broadcast-accounts-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-track {
    background: transparent;
}

.msg-dialogs-header,
.msg-dialogs-top,
.msg-dialogs-tabs-row,
.msg-dialogs-filters,
.card-panel,
.card-panel-header {
    min-width: 0;
}

.msg-tabs-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.msg-tabs {
    flex: 0 0 auto;
    white-space: nowrap;
}

.msg-tabs .btn {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table.table-mobile-cards thead {
    display: table-header-group;
}

@media (max-width: 992px) {
    .app-layout {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        flex-basis: auto;
        height: auto;
        position: relative;
        padding: 14px 12px;
    }

    .sidebar-shell {
        gap: 14px;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .sidebar-link {
        margin-bottom: 0;
        min-width: max-content;
        white-space: nowrap;
    }

    .sidebar-link-label {
        flex: 0 0 auto;
    }

    .sidebar-footer {
        display: grid;
        gap: 10px;
    }

    .app-main {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.35rem;
    }

    .card-panel,
    .card,
    .login-card {
        border-radius: 22px;
    }

    .card-panel-header,
    .card-header,
    .card-panel-body,
    .card-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .table.table-mobile-cards thead {
        display: none;
    }

    .table.table-mobile-cards,
    .table.table-mobile-cards tbody,
    .table.table-mobile-cards tr,
    .table.table-mobile-cards td {
        display: block;
        width: 100%;
    }

    .table.table-mobile-cards {
        border: none;
    }

    .table-mobile-cards tr {
        margin-bottom: 12px;
        border: 1px solid var(--app-border);
        border-radius: 18px;
        padding: 10px 12px;
        background: var(--app-surface-solid);
        box-shadow: var(--app-shadow-sm);
    }

    .table-mobile-cards td {
        border: none !important;
        padding: 5px 0;
        font-size: 0.9rem;
    }

    .table-mobile-cards td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--app-text-faint);
        margin-bottom: 2px;
    }

    .table-mobile-cards td.text-end {
        text-align: left !important;
    }
}

@media (max-width: 576px) {
    .app-sidebar {
        padding: 12px 10px;
    }

    .brand-logo-mark {
        width: 54px;
        height: 54px;
        border-radius: 18px;
    }

    .brand-logo-title {
        font-size: 1rem;
    }

    .brand-logo-caption {
        display: none;
    }

    .shell-control,
    .sidebar-user-card,
    .btn-brand-secondary {
        border-radius: 16px;
    }

    .login-card {
        padding: 24px 20px;
    }
}


.brand-logo {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.brand-logo-image {
    display: block;
    width: 100%;
    max-width: 188px;
    height: auto;
    filter: drop-shadow(0 14px 30px rgba(14, 165, 233, 0.18));
}

.brand-subline {
    display: none;
}

.sidebar-nav {
    padding-right: 2px;
}

.sidebar-link {
    min-height: 42px;
}

.sidebar-link-icon i {
    font-size: 0.98rem;
}

.shell-theme-toggle {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    border-radius: 14px;
    border: 1px solid var(--sidebar-border);
    background: var(--sidebar-surface);
    color: var(--sidebar-text);
    padding: 8px 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.shell-theme-toggle:hover,
.shell-theme-toggle:focus-visible {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.16);
    color: #fff;
    transform: translateY(-1px);
}

.shell-theme-toggle-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
    flex: 0 0 auto;
}

.shell-theme-toggle-label {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
}

.shell-lang-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.lang-pill {
    appearance: none;
    border: 1px solid var(--sidebar-border);
    background: var(--sidebar-surface);
    color: var(--sidebar-text);
    border-radius: 14px;
    min-height: 38px;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.lang-pill:hover,
.lang-pill:focus-visible {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

.lang-pill.is-active {
    background: var(--sidebar-link-active);
    border-color: rgba(255,255,255,0.16);
    color: #fff;
    box-shadow: var(--sidebar-link-active-shadow);
}

.sidebar-user-card {
    margin-top: 10px;
    padding: 11px;
    border-radius: 16px;
}

.sidebar-user-name {
    font-size: 0.86rem;
}

.sidebar-user-role,
.sidebar-note {
    font-size: 0.74rem;
}

.app-content-wrap {
    max-width: 1680px;
}

.login-logo-shell {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 20px;
    padding: 14px 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, #07101e 0%, #08152a 100%);
    box-shadow: 0 18px 36px rgba(8, 15, 35, 0.22);
}

.login-logo {
    display: block;
    width: 198px;
    max-width: 100%;
    margin: 0;
}

.login-kicker,
.login-subtitle,
.login-feature-pills {
    display: none !important;
}

@media (max-width: 1200px) {
    .app-sidebar {
        width: 206px;
        flex: 0 0 206px;
    }

    .brand-logo-image {
        max-width: 172px;
    }

    .sidebar-link-label {
        font-size: 0.86rem;
    }
}

@media (max-width: 992px) {
    .app-layout {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        flex: 0 0 auto;
        height: auto;
        position: relative;
        padding: 14px 12px;
    }

    .brand-logo-image {
        max-width: 200px;
    }

    .sidebar-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .sidebar-link {
        min-width: max-content;
        margin-bottom: 0;
        white-space: nowrap;
    }

    .sidebar-section-title {
        display: none;
    }

    .sidebar-footer {
        margin-top: 12px;
    }
}

@media (max-width: 576px) {
    .app-sidebar {
        padding: 12px 10px;
    }

    .brand-logo-image {
        max-width: 168px;
    }

    .shell-theme-toggle-label {
        font-size: 0.82rem;
    }

    .lang-pill {
        min-height: 38px;
    }
}


.login-card--minimal .btn.btn-lg {
    min-height: 48px;
    border-radius: 16px;
}

.login-title--minimal {
    letter-spacing: -0.03em;
}

@media (max-width: 992px) {
    .login-logo {
        width: 188px;
    }
}

@media (max-width: 640px) {
    .login-logo {
        width: 172px;
    }
}
