:root {
    --brand: #d80a67;
    --brand-700: #b00655;
    --brand-dark: #9b064a;
    --brand-50: #fff4f9;
    --text: #202635;
    --muted: #667085;
    --border: #e4e7ec;
    --surface: #ffffff;
    --page: #f5f7fb;
    --sidebar: #111827;
    --sidebar-2: #1f2937;
    --sidebar-text: #d0d5dd;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-md: 0 12px 28px rgba(16, 24, 40, .08);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, var(--page) 100%);
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.login-page {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    background:
        linear-gradient(135deg, rgba(3, 10, 22, .64), rgba(12, 18, 34, .42) 46%, rgba(30, 7, 24, .66)),
        url("../img/login-bg.png") center / cover no-repeat,
        linear-gradient(135deg, #061222 0%, #0b1728 48%, #1a0716 100%);
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .78;
    background:
        radial-gradient(circle at 50% 50%, transparent 0 23%, rgba(2, 6, 23, .10) 42%, rgba(2, 6, 23, .70) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, .16), rgba(2, 6, 23, .54));
    pointer-events: none;
}

.login-page::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(var(--brand-rgb), .18), transparent 250px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: auto, 92px 92px;
    pointer-events: none;
}

@keyframes loginBackgroundDrift {
    0% {
        background-position: center, 52% 50%, center;
    }
    100% {
        background-position: center, 62% 48%, center;
    }
}

@keyframes loginSignalSweep {
    0% {
        transform: translate3d(-18px, -12px, 0);
        opacity: .42;
    }
    50% {
        opacity: .72;
    }
    100% {
        transform: translate3d(18px, 12px, 0);
        opacity: .42;
    }
}

@keyframes loginOrbitTurn {
    from {
        transform: rotate(0deg) scale(1.04);
    }
    to {
        transform: rotate(360deg) scale(1.04);
    }
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, .64);
    border-radius: 8px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 32px 90px rgba(2, 6, 23, .38), 0 0 0 1px rgba(var(--brand-rgb), .05);
    backdrop-filter: blur(12px);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: -28px;
    z-index: -1;
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 0%, rgba(var(--brand-rgb), .22), transparent 42%),
        radial-gradient(circle at 50% 100%, rgba(56, 189, 248, .16), transparent 44%);
    filter: blur(12px);
    opacity: .75;
}

@media (prefers-reduced-motion: reduce) {
    .login-page,
    .login-page::before,
    .login-page::after {
        animation: none;
    }
}

.login-brand {
    margin-bottom: 24px;
    text-align: center;
}

.login-brand img {
    width: 104px;
    height: 104px;
    object-fit: contain;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.login-brand h1 {
    margin: 18px 0 6px;
    font-size: 26px;
    line-height: 1.1;
}

.login-brand p {
    margin: 0;
    color: var(--brand-700);
    font-weight: 700;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #ffd4e5;
    border-radius: 8px;
    background: var(--brand-50);
    color: var(--brand-700);
    font-weight: 700;
    text-align: center;
}

.field {
    margin-bottom: 14px;
}

.login-card .login-field {
    display: grid !important;
    gap: 7px;
    visibility: visible;
    opacity: 1 !important;
    position: relative;
    z-index: 2;
}

.login-card .login-field label {
    display: block !important;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    visibility: visible !important;
}

.login-card .login-field .input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.login-card .primary-button {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .10);
}

.select-input {
    cursor: pointer;
    color: var(--text);
}

.primary-button {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    background: var(--brand);
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(var(--brand-rgb), .22);
}

.primary-button:hover {
    background: var(--brand-700);
}

@media (max-width: 720px) {
    .login-page {
        place-items: start center;
        padding: 22px 14px;
        background:
            linear-gradient(180deg, rgba(2, 6, 23, .72), rgba(6, 13, 28, .56) 42%, rgba(28, 5, 22, .76)),
            url("../img/login-bg.png") 56% 50% / auto 118% no-repeat,
            linear-gradient(145deg, #061222 0%, #0d1b2f 48%, #210817 100%);
        animation: loginBackgroundDrift 18s ease-in-out infinite alternate;
    }

    .login-page::before {
        opacity: .9;
        background:
            linear-gradient(115deg, transparent 0 18%, rgba(56, 189, 248, .14) 18.4% 18.9%, transparent 19.3% 43%, rgba(var(--brand-rgb), .18) 43.3% 43.8%, transparent 44.2% 100%),
            repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 54px),
            repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 54px),
            linear-gradient(180deg, rgba(2, 6, 23, .12), rgba(2, 6, 23, .62));
        animation: loginSignalSweep 8s ease-in-out infinite alternate;
    }

    .login-page::after {
        inset: -30%;
        background:
            conic-gradient(from 18deg at 50% 45%, transparent 0 8%, rgba(var(--brand-rgb), .32) 8.4% 9.2%, transparent 9.6% 24%, rgba(56, 189, 248, .22) 24.4% 25.2%, transparent 25.6% 47%, rgba(255, 255, 255, .15) 47.4% 48%, transparent 48.4% 100%),
            radial-gradient(ellipse at 50% 45%, transparent 0 32%, rgba(255, 255, 255, .14) 32.4% 32.9%, transparent 33.4% 100%);
        background-size: auto;
        opacity: .74;
        animation: loginOrbitTurn 22s linear infinite;
    }

    .login-card {
        width: min(390px, 100%);
        margin-top: min(7vh, 44px);
        padding: 24px;
        border-color: rgba(255, 255, 255, .76);
        background: rgba(255, 255, 255, .965);
    }

    .login-brand img {
        width: 86px;
        height: 86px;
        padding: 13px;
    }

    .login-brand h1 {
        margin-top: 14px;
        font-size: 23px;
    }
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
}

.sidebar-toggle {
    display: none;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 18px 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 160px),
        linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
    color: var(--sidebar-text);
}

.brand {
    display: grid;
    place-items: center;
    min-height: 74px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    border-radius: 8px;
}

.brand img {
    max-width: 156px;
    max-height: 44px;
    object-fit: contain;
}

.brand-title {
    display: block;
    max-width: 100%;
    margin-top: 6px;
    padding: 0 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}

.profile-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .045);
}

.sidebar-profile {
    position: relative;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    overflow: visible;
}

.sidebar-profile .user-menu,
.sidebar-profile .language-menu {
    position: static;
}

.sidebar-user-menu {
    flex: 1;
    min-width: 0;
}

.sidebar-user-menu .user-menu-avatar {
    display: none;
}

.sidebar-user-menu summary {
    width: 100%;
    color: #fff;
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
}

.sidebar-user-menu .user-menu-name {
    flex: 1;
    min-width: 0;
    color: #fff;
    font-size: 14px;
    overflow: visible;
    white-space: nowrap;
}

.sidebar-language-menu summary {
    width: 40px;
    height: 40px;
    color: #fff;
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
}

.sidebar-language-menu .language-menu-list,
.sidebar-user-menu .user-menu-list {
    inset-inline-start: 0;
    inset-inline-end: auto;
}

.sidebar-language-menu .language-menu-list {
    transform: translateX(18px);
}

[dir="ltr"] .sidebar-language-menu .language-menu-list {
    transform: translateX(-18px);
}

.sidebar-profile .user-menu-list,
.sidebar-profile .language-menu-list {
    z-index: 80;
    inset-inline-start: 12px !important;
    inset-inline-end: 12px !important;
    top: calc(100% + 8px);
    width: auto;
    min-width: 0;
    transform: none !important;
    border-color: rgba(255, 255, 255, .12);
    background: var(--sidebar);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .34);
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
    font-weight: 900;
}

.profile-box small,
.profile-box strong {
    display: block;
}

.profile-box small {
    color: #98a2b3;
    font-size: 12px;
}

.profile-box strong {
    margin-top: 2px;
    color: #fff;
    font-size: 14px;
}

.side-nav {
    display: grid;
    gap: 4px;
}

.nav-link,
.nav-group summary,
.nav-children a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    cursor: pointer;
}

.nav-group summary {
    position: relative;
}

.nav-arrow {
    margin-inline-start: auto;
    transition: transform .16s ease;
}

.nav-group[open] .nav-arrow {
    transform: rotate(180deg);
}

.nav-link:hover,
.nav-group summary:hover,
.nav-group[open] summary,
.nav-children a:hover {
    color: #fff;
    background: rgba(var(--brand-rgb), .16);
}

.nav-link > i,
.nav-group summary > i:not(.nav-arrow),
.nav-children a i {
    width: 20px;
    color: #98a2b3;
    text-align: center;
}

.nav-link:hover > i,
.nav-group summary:hover > i,
.nav-group[open] summary > i,
.nav-children a:hover i {
    color: #fff;
}

.nav-group {
    border: 0;
}

.nav-group summary {
    list-style: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-children {
    display: grid;
    gap: 2px;
    margin: 3px 0 6px;
    padding-inline-start: 24px;
}

.nav-children a {
    min-height: 34px;
    padding-block: 8px;
    color: #aab3c2;
    font-size: 13px;
}

.main {
    min-width: 0;
    padding: 22px;
}

.topbar {
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

[dir="rtl"] .topbar {
    justify-content: flex-end;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-menu {
    position: relative;
}

.language-menu summary {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    cursor: pointer;
    list-style: none;
    font-size: 18px;
}

.language-menu summary::-webkit-details-marker {
    display: none;
}

.language-menu summary:hover,
.language-menu[open] summary {
    color: #fff;
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
}

.language-menu-list {
    position: absolute;
    z-index: 20;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    min-width: 165px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(16, 24, 40, .14);
}

.sidebar-profile .user-menu-list,
.sidebar-profile .language-menu-list {
    z-index: 80;
    inset-inline-start: 12px !important;
    inset-inline-end: 12px !important;
    top: calc(100% + 8px);
    width: auto;
    min-width: 0;
    transform: none !important;
    border-color: rgba(255, 255, 255, .12);
    background: var(--sidebar);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .34);
}

.language-menu[open] .language-menu-list {
    transform: translateX(-18px);
}

[dir="rtl"] .language-menu[open] .language-menu-list {
    transform: translateX(18px);
}

.sidebar-language-menu[open] .language-menu-list {
    transform: none !important;
}

[dir="rtl"] .sidebar-language-menu[open] .language-menu-list {
    transform: none !important;
}

.language-menu-list a {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 800;
}

.language-menu-list a:hover,
.language-menu-list a.active {
    color: var(--brand);
    background: #fff1f6;
}

.sidebar-language-menu .language-menu-list a:hover,
.sidebar-language-menu .language-menu-list a.active {
    color: #fff;
    background: rgba(216, 37, 109, .28);
}

.language-menu-list .lang-label-ar + span {
    display: none;
}

.user-menu {
    position: relative;
}

.user-menu summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    list-style: none;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    font-weight: 900;
}

.user-menu-name {
    color: #101828;
    font-weight: 800;
}

.user-menu-name small {
    color: var(--muted);
    font-weight: 700;
}

.sidebar-user-menu.user-menu summary {
    color: #fff;
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
}

.sidebar-user-menu.user-menu summary:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .22);
    background: rgba(216, 37, 109, .35);
}

.sidebar-user-menu.user-menu .user-menu-name {
    color: #fff;
}

.user-menu-list {
    position: absolute;
    z-index: 20;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(16, 24, 40, .14);
}

.user-menu-list a,
.user-menu-list button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: inherit;
    font-weight: 700;
}

.user-menu-list a:hover,
.user-menu-list button:hover {
    background: #f8fafc;
}

.sidebar-user-menu .user-menu-list {
    border-color: rgba(255, 255, 255, .12);
    background: var(--sidebar);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
}

.sidebar-user-menu .user-menu-list a,
.sidebar-user-menu .user-menu-list button {
    color: rgba(255, 255, 255, .86);
}

.sidebar-user-menu .user-menu-list a:hover,
.sidebar-user-menu .user-menu-list button:hover {
    color: #fff;
    background: rgba(216, 37, 109, .28);
}

.sidebar-language-menu .language-menu-list a {
    color: rgba(255, 255, 255, .86);
}

.sidebar-language-menu .language-menu-list a:hover,
.sidebar-language-menu .language-menu-list a.active {
    color: #fff;
    background: rgba(216, 37, 109, .28);
}

.side-nav .nav-link.active,
.side-nav .nav-children a.active {
    color: #fff;
    border-color: rgba(216, 37, 109, .95);
    background: linear-gradient(135deg, rgba(216, 37, 109, .95), rgba(159, 18, 57, .92));
    box-shadow: 0 12px 30px rgba(216, 37, 109, .28);
}

.side-nav .nav-link.active i,
.side-nav .nav-children a.active i {
    color: #fff;
}

.side-nav .nav-group.is-active > summary {
    color: #fff;
    border-color: rgba(216, 37, 109, .48);
    background: rgba(216, 37, 109, .22);
}

.input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-row .select {
    flex: 1 1 auto;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.detail-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e8eef6;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .05);
}

.detail-item span,
.metric-strip span {
    display: block;
    color: #64748b;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 6px;
}

.detail-item strong,
.metric-strip strong {
    display: block;
    min-width: 0;
    color: #0f172a;
    font-size: clamp(14px, 1.1vw, 18px);
    overflow-wrap: anywhere;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.metric-strip > div {
    padding: 16px;
    border: 1px solid rgba(216, 37, 109, .18);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #fff7fb);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
}

.muted-text {
    color: #64748b;
    line-height: 1.8;
}

.approval-preview-box {
    overflow: hidden;
    border: 1px solid #e8eef6;
    border-radius: 14px;
    background: #f8fafc;
}

.optical-section-card {
    padding: 22px;
}

.optical-section-card .section-head {
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eef2f7;
}

.optical-section-card .approval-preview-box,
.optical-section-card .map-canvas,
.optical-section-card .otdr-box,
.optical-section-card .muted-text {
    margin-top: 12px;
}

.join-modal-panel {
    width: min(520px, 96vw);
}

.approval-preview-box img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: auto;
}

.approval-preview-box iframe {
    width: 100%;
    min-height: 70vh;
    border: 0;
    background: #fff;
}

.map-wrap {
    position: relative;
}

.map-canvas {
    width: 100%;
    height: min(68vh, 680px);
    min-height: 460px;
    border: 1px solid #e8eef6;
    border-radius: 16px;
    overflow: hidden;
    background: #eef2f7;
}

.map-canvas.small-map {
    height: 520px;
    min-height: 420px;
}

.route-map-wrap {
    height: 520px;
    min-height: 420px;
}

.route-map-wrap .map-canvas.small-map {
    height: 100%;
}

.map-zoom-controls {
    position: absolute;
    z-index: 5;
    top: 14px;
    inset-inline-start: 14px;
    display: grid;
    gap: 8px;
}

.map-zoom-controls button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    color: #0f172a;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
    font-size: 22px;
    font-weight: 800;
}

.map-toolbar,
.otdr-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid #e8eef6;
    border-radius: 16px;
    background: #fff;
}

.compact-field {
    max-width: 180px;
}

.check-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    color: #334155;
    font-weight: 700;
}

.join-info {
    min-width: 220px;
    color: #0f172a;
}

.join-info p {
    margin: 6px 0 0;
    color: #475569;
}

.gm-join-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.gm-join-actions button {
    border: 0;
    border-radius: 8px;
    padding: 7px 10px;
    color: #fff;
    background: #d8256d;
}

.btn-lite.is-active {
    color: #fff;
    border-color: #9f1239;
    background: #9f1239;
}

.dashboard-modern {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(320px, .85fr);
    gap: 18px;
}

.dash-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(var(--brand-rgb), .055), transparent 34%),
        #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.users-panel,
.ops-panel {
    grid-column: span 1;
}

.finance-panel,
.system-panel {
    grid-column: span 1;
}

.highlights-panel {
    grid-column: 1 / -1;
}

.panel-head {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid #eef2f7;
}

.panel-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.dashboard-filter-form {
    margin: 0;
}

.dashboard-filter-form .toolbar-switch {
    min-height: 36px;
    padding-inline: 0;
}

.panel-kicker {
    display: none;
    margin-bottom: 6px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

.panel-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.1;
}

.dash-panel-link,
.panel-total-link {
    color: inherit;
    text-decoration: none;
}

.dash-panel-link:hover,
.panel-total-link:hover {
    color: var(--brand);
}

.panel-total {
    min-width: 120px;
    color: #0f172a;
    font-size: 42px;
    line-height: 1;
    font-weight: 950;
    direction: ltr;
    text-align: end;
    transform-origin: center right;
}

[dir="rtl"] .panel-total {
    transform-origin: center left;
}

.panel-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--brand);
    background: #fff1f6;
    font-size: 20px;
}

.usage-chart {
    display: grid;
    gap: 12px;
    padding: 18px 22px 22px;
}

.chart-row {
    display: grid;
    grid-template-columns: minmax(130px, .9fr) minmax(140px, 1.3fr) 48px minmax(74px, .45fr);
    align-items: center;
    gap: 14px;
    min-height: 36px;
    color: var(--text);
}

.chart-label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #475467;
    font-size: 13px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.chart-label i {
    width: 20px;
    color: var(--tile-color);
    text-align: center;
}

.chart-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f5f9;
}

.chart-fill {
    display: block;
    width: var(--chart-width, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--tile-color), color-mix(in srgb, var(--tile-color) 58%, white));
    transition: width .25s ease;
}

.chart-percent {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-align: end;
    direction: ltr;
}

.chart-row .metric-value {
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    color: #0f172a;
    font-size: 19px;
    font-weight: 950;
    white-space: nowrap;
    overflow: visible;
    direction: ltr;
    transform-origin: center right;
}

[dir="rtl"] .chart-row .metric-value {
    transform-origin: center left;
}

.finance-table {
    display: grid;
    padding: 8px 0;
}

.finance-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 1.05fr);
    align-items: center;
    gap: 14px;
    padding: 11px 22px;
    color: var(--text);
    border-bottom: 1px solid #f1f5f9;
}

.finance-row:last-child {
    border-bottom: 0;
}

.finance-row span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475467;
    font-size: 13px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.finance-row span i {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--tile-color);
    background: color-mix(in srgb, var(--tile-color) 9%, white);
}

.finance-row strong {
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
    white-space: nowrap;
    overflow: visible;
    direction: ltr;
    transform-origin: center right;
}

[dir="rtl"] .finance-row strong {
    transform-origin: center left;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #eef2f7;
}

.highlight-card {
    min-height: 148px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    padding: 18px;
    color: var(--text);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--tile-color) 7%, transparent), transparent 56%),
        #fff;
}

.highlight-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: var(--tile-color);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--tile-color) 24%, transparent);
}

.highlight-label {
    grid-column: 1 / -1;
    align-self: end;
    color: #64748b;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.highlight-card strong {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: 100%;
    color: #0f172a;
    font-size: 34px;
    line-height: 1;
    font-weight: 950;
    white-space: nowrap;
    overflow: visible;
    direction: ltr;
    transform-origin: center right;
}

[dir="rtl"] .highlight-card strong {
    transform-origin: center left;
}

.devices-panel {
    align-self: start;
}

.devices-stack {
    display: grid;
    padding: 10px 0;
}

.device-row {
    min-height: 62px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) minmax(72px, .55fr);
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text);
    border-bottom: 1px solid #f1f5f9;
}

.device-row:last-child {
    border-bottom: 0;
}

.device-row-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--tile-color);
    background: color-mix(in srgb, var(--tile-color) 10%, white);
}

.device-row-label {
    min-width: 0;
    color: #475467;
    font-size: 13px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.device-row strong {
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    color: #0f172a;
    font-size: 25px;
    font-weight: 950;
    white-space: nowrap;
    overflow: visible;
    direction: ltr;
    transform-origin: center right;
}

[dir="rtl"] .device-row strong {
    transform-origin: center left;
}

.ops-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #eef2f7;
}

.ops-item {
    min-height: 118px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    padding: 16px;
    color: var(--text);
    background: #fff;
    overflow: hidden;
}

.ops-item i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--tile-color);
    background: color-mix(in srgb, var(--tile-color) 9%, white);
    font-size: 16px;
}

.ops-item span {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ops-item strong {
    min-width: 0;
    max-width: 100%;
    color: #0f172a;
    font-size: 28px;
    line-height: 1;
    font-weight: 950;
    white-space: nowrap;
    overflow: visible;
    direction: ltr;
    transform-origin: center right;
}

[dir="rtl"] .ops-item strong {
    transform-origin: center left;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
}

.server-stat {
    min-height: 72px;
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 12px 14px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #fff;
}

.server-stat span {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    overflow-wrap: anywhere;
}

.server-stat span i {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: var(--tile-color);
    background: color-mix(in srgb, var(--tile-color) 12%, white);
}

.server-stat strong {
    max-width: 100%;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
    white-space: nowrap;
    direction: ltr;
    transform-origin: center right;
}

[dir="rtl"] .server-stat strong {
    transform-origin: center left;
}

.system-gauge {
    min-height: 132px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
    padding: 14px;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    background: #fbfdff;
    overflow: hidden;
}

.gauge-ring {
    --gauge-percent: 0%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--tile-color);
    background:
        radial-gradient(circle at center, #fff 58%, transparent 60%),
        conic-gradient(var(--tile-color) var(--gauge-percent), #e2e8f0 0);
    font-size: 18px;
    transition: background .35s ease;
}

.system-gauge span:not(.gauge-ring) {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    text-align: center;
    overflow-wrap: anywhere;
}

.system-gauge strong {
    min-width: 0;
    max-width: 100%;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
    white-space: nowrap;
    overflow: visible;
    direction: ltr;
    transform-origin: center right;
}

[dir="rtl"] .system-gauge strong {
    transform-origin: center left;
}

.page-surface {
    display: grid;
    gap: 18px;
}

.page-titlebar {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .07);
}

.page-titlebar h1 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    letter-spacing: 0;
}

.page-titlebar p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 750;
}

.toolbar-card,
.data-card,
.form-card {
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .06);
}

.toolbar-card {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(180px, .8fr) auto;
    align-items: end;
    gap: 14px;
    padding: 18px;
}

.toolbar-card > .btn-lite,
.toolbar-card > .button-row > .btn-lite {
    min-height: 42px;
    height: 42px;
    align-self: end;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toolbar-card > button[type="submit"].btn-lite,
.toolbar-card .filter-apply-btn {
    min-height: 58px !important;
    height: 58px !important;
    width: auto;
    min-width: 170px;
    max-width: none;
    padding: 0 22px;
    align-self: start;
    margin-top: 23px;
    white-space: nowrap;
    line-height: 1;
}

.toolbar-card .filter-apply-btn i {
    flex: 0 0 auto;
}

.toolbar-card .button-row {
    align-items: end;
}

.toolbar-card .toolbar-action,
.toolbar-card .field + .btn-lite,
.toolbar-card > button.btn-lite,
.toolbar-card > a.btn-lite {
    align-self: end;
}

.toolbar-action {
    align-self: end;
}

.toolbar-action > .btn-lite {
    width: 100%;
    min-height: 58px;
    height: 58px;
    margin: 0;
}

.account-user-toolbar .button-row {
    align-items: end;
}

.account-user-toolbar .button-row .field {
    min-width: 90px;
}

.account-user-toolbar .button-row > .btn-lite {
    min-height: 58px;
    height: 58px;
}

.site-measure-form {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    align-items: end;
}

.site-measure-form .button-row {
    align-self: start;
    padding-top: 26px;
    justify-content: flex-start;
}

.site-measure-form .button-row .btn-lite {
    align-self: center;
    min-width: 80px;
}

.site-measure-form .btn-lite {
    min-height: 42px;
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.input,
.select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    color: #0f172a;
    background: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    outline: none;
}

.input:focus,
.select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(216, 39, 111, .11);
}

.manager-filter {
    position: relative;
}

.manager-menu {
    position: absolute;
    z-index: 20;
    inset-inline: 0;
    top: calc(100% + 8px);
    max-height: 280px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .13);
    display: none;
}

.manager-filter.is-open .manager-menu {
    display: grid;
    gap: 5px;
}

.manager-option {
    display: block;
    padding: 9px 10px;
    border-radius: 10px;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.manager-option small {
    color: #64748b;
}

.manager-option:hover,
.manager-option.active {
    background: #fff1f6;
    color: var(--brand);
}

.button-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.actions-menu {
    position: relative;
}

.actions-menu summary {
    list-style: none;
}

.actions-menu summary::-webkit-details-marker {
    display: none;
}

.actions-menu-list {
    position: absolute;
    z-index: 25;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}

.actions-menu-list a,
.actions-menu-list button {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    color: #0f172a;
    background: transparent;
    font: inherit;
    font-weight: 900;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
}

.actions-menu-list a:hover,
.actions-menu-list button:hover {
    color: var(--brand);
    background: #fff1f6;
}

.actions-menu-list .danger {
    color: #b42318;
}

.btn-lite {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #0f172a;
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.btn-lite:hover {
    color: var(--brand);
    border-color: #f8bfd3;
    background: #fff7fa;
}

.btn-primary-lite {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.btn-primary-lite:hover {
    color: #fff;
    border-color: var(--brand-dark);
    background: var(--brand-dark);
}

.primary-button:hover,
.btn-primary-lite:hover,
.actions-menu[open] > .btn-primary-lite,
.actions-menu > .btn-primary-lite:hover {
    color: #fff;
    border-color: var(--brand-dark);
    background: var(--brand-dark);
}

.page-titlebar .btn-primary-lite:hover {
    color: #fff;
}

.modern-table input[type="checkbox"],
[data-check-all] {
    width: 18px;
    height: 18px;
    appearance: none;
    display: inline-grid;
    place-items: center;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.modern-table input[type="checkbox"]:checked,
[data-check-all]:checked {
    border-color: var(--brand);
    background: var(--brand);
}

.modern-table input[type="checkbox"]:checked::after,
[data-check-all]:checked::after {
    content: "";
    width: 8px;
    height: 5px;
    margin-top: -2px;
    border: solid #fff;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
}

.option-search {
    min-height: 34px;
    margin-bottom: -2px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    background: #fbfdff;
    font-size: 12px;
}

.option-search + .select {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    min-height: 42px;
    padding-inline: 14px 34px;
    color: #0f172a;
    line-height: 42px;
    font-weight: 800;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding: 5px 8px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    border: 0;
    border-radius: 999px;
    background: #fce7f1;
    color: var(--brand-dark);
    font-weight: 800;
}

.select2-dropdown {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
}

.field-inline {
    align-items: flex-start;
}

.switch-check {
    width: 56px;
    height: 32px;
    position: relative;
    display: inline-block;
}

.switch-check input {
    position: absolute;
    opacity: 0;
}

.switch-check span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: .18s ease;
}

.switch-check span::after {
    content: "";
    position: absolute;
    top: 4px;
    inset-inline-start: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, .22);
    transition: .18s ease;
}

.switch-check input:checked + span {
    background: var(--brand);
}

.switch-check input:checked + span::after {
    transform: translateX(24px);
}

[dir="rtl"] .switch-check input:checked + span::after {
    transform: translateX(-24px);
}

.btn-danger-lite {
    color: #b42318;
    border-color: #fecaca;
    background: #fff5f5;
}

.btn-warning-lite {
    color: #a16207;
    border-color: #fde68a;
    background: #fffbeb;
}

.table-wrap {
    overflow: auto;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table th,
.modern-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    text-align: start;
    vertical-align: middle;
    white-space: nowrap;
}

.modern-table th {
    color: #64748b;
    background: #fbfdff;
    font-size: 12px;
    font-weight: 950;
}

table th.is-sortable {
    position: relative;
    padding-inline-end: 30px;
    cursor: pointer;
    user-select: none;
    transition: color .16s ease, background-color .16s ease;
}

table th.is-sortable::after {
    content: "\2195";
    position: absolute;
    inset-inline-end: 10px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
}

table th.is-sortable:hover,
table th.is-sortable:focus-visible {
    color: var(--brand-dark);
    background: #f8fafc;
    outline: none;
}

table th.is-sortable[aria-sort="ascending"]::after {
    content: "\2191";
    color: var(--brand);
}

table th.is-sortable[aria-sort="descending"]::after {
    content: "\2193";
    color: var(--brand);
}

.modern-table td {
    color: #0f172a;
    font-size: 13px;
    font-weight: 750;
}

.accounts-table-wrap {
    overflow-x: clip;
}

.accounts-table {
    table-layout: fixed;
}

.accounts-table th,
.accounts-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.accounts-table td:nth-child(4),
.accounts-table td:nth-child(5),
.accounts-table td:nth-child(6),
.accounts-table td:last-child {
    white-space: nowrap;
}

.device-name {
    display: grid;
    gap: 4px;
}

.device-name strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.device-name a {
    color: inherit;
    text-decoration: none;
}

.device-name a:hover strong {
    color: var(--brand);
}

.device-name small {
    color: #64748b;
    font-weight: 750;
}

.link-status {
    min-width: 118px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.link-status i {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
}

.link-status.up {
    color: #047857;
    background: #ecfdf3;
}

.link-status.up i {
    background: #bbf7d0;
}

.link-status.partial {
    color: #9a6700;
    background: #fffbeb;
}

.link-status.partial i {
    background: #fde68a;
}

.link-status.down {
    color: #b42318;
    background: #fff1f3;
}

.link-status.down i {
    background: #fecdd3;
}

.link-status.unknown {
    color: #475569;
    background: #f1f5f9;
}

.link-status.unknown i {
    background: #e2e8f0;
}

.endpoint-pair {
    display: grid;
    gap: 5px;
}

.endpoint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
}

.endpoint i {
    color: var(--brand);
}

.action-cluster {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon-action {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    background: #fff;
    text-decoration: none;
    cursor: pointer;
}

.icon-action:hover {
    color: var(--brand);
    border-color: #f8bfd3;
    background: #fff7fa;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.pager-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pager-links a,
.pager-links span {
    min-width: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #334155;
    background: #fff;
    text-decoration: none;
    font-weight: 900;
}

.pager-links .active {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.link-modal {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .48);
}

.link-modal.is-open {
    display: grid;
}

.modal-panel {
    width: min(880px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}

#detailsModal .modal-panel {
    width: min(1120px, 96vw);
}

#detailsModal .modal-body {
    overflow-x: hidden;
}

#detailsModal .table-wrap {
    max-width: 100%;
}

#detailsModal img {
    max-width: 100%;
    height: auto;
}

.modal-head,
.modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #eef2f7;
}

.modal-foot {
    justify-content: flex-end;
    border-top: 1px solid #eef2f7;
    border-bottom: 0;
}

.modal-head h2 {
    margin: 0;
    font-size: 20px;
}

.modal-body {
    padding: 18px 20px 22px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.metric-box {
    min-height: 86px;
    display: grid;
    gap: 6px;
    align-content: center;
    padding: 14px;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    background: #fbfdff;
}

.metric-box span {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.metric-box strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.ap-live-traffic {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fbfdff;
}

.link-live-traffic {
    --link-traffic-tx: #0891b2;
    --link-traffic-rx: #f59e0b;
    --link-traffic-grid: #e2e8f0;
}

.link-live-traffic .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-live-traffic .metric-box {
    min-height: 72px;
}

.link-live-traffic .ap-traffic-tx {
    border-color: color-mix(in srgb, var(--link-traffic-tx) 28%, white);
    background: color-mix(in srgb, var(--link-traffic-tx) 8%, white);
}

.link-live-traffic .ap-traffic-tx strong {
    color: var(--link-traffic-tx);
}

.link-live-traffic .ap-traffic-rx {
    border-color: color-mix(in srgb, var(--link-traffic-rx) 28%, white);
    background: color-mix(in srgb, var(--link-traffic-rx) 8%, white);
}

.link-live-traffic .ap-traffic-rx strong {
    color: var(--link-traffic-rx);
}

.link-live-traffic .ap-traffic-dot.tx {
    background: var(--link-traffic-tx);
}

.link-live-traffic .ap-traffic-dot.rx {
    background: var(--link-traffic-rx);
}

.link-live-traffic .ap-traffic-dot.max {
    background: #64748b;
}

.link-live-traffic .ap-live-traffic-chart {
    height: 160px;
}

.ap-live-traffic-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ap-live-traffic-head strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
}

.ap-live-traffic-head span {
    color: #64748b;
    font-size: 12px;
}

.ap-live-traffic-chart {
    display: block;
    width: 100%;
    height: 132px;
    border-radius: 10px;
    background: #fff;
}

.ap-live-traffic-chart-wrap {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    margin-top: 12px;
}

.ap-live-traffic-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0;
    color: #64748b;
    font-size: 10px;
    line-height: 1;
    text-align: end;
    direction: ltr;
}

.ap-live-traffic-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
    color: #64748b;
    font-size: 11px;
}

.ap-live-traffic-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ap-traffic-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
}

.ap-traffic-dot.tx {
    background: #0891b2;
}

.ap-traffic-dot.rx {
    background: #f59e0b;
}

.ap-traffic-tx {
    border-color: rgba(8, 145, 178, .26);
    background: #ecfeff;
}

.ap-traffic-tx strong {
    color: #0e7490;
}

.ap-traffic-rx {
    border-color: rgba(245, 158, 11, .28);
    background: #fffbeb;
}

.ap-traffic-rx strong {
    color: #b45309;
}

.frequency-choice {
    align-content: start;
}

.frequency-choice small {
    color: #64748b;
    line-height: 1.45;
}

.frequency-choice .btn-lite {
    width: 100%;
    margin-top: 4px;
}

.app-notice {
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #f1d9a7;
    border-radius: 10px;
    background: #fffaf0;
    color: #7c5a16;
    line-height: 1.55;
}

.inline-actions {
    margin-top: 14px;
    padding: 0;
    border-top: 0;
    justify-content: flex-start;
}

.mobile-notify-stats {
    margin-top: 0;
}

.mini-stat {
    min-width: 0;
    min-height: 104px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .06);
}

.mini-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 23px;
}

.mini-icon.pink {
    color: var(--brand);
    background: #fde7f1;
}

.mini-icon.green {
    color: #16a34a;
    background: #dcfce7;
}

.mini-icon.amber {
    color: #b45309;
    background: #fef3c7;
}

.mini-stat strong {
    min-width: 0;
    color: #0f172a;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
    line-height: 1;
    overflow-wrap: anywhere;
}

.mini-stat small {
    color: #64748b;
    font-size: 13px;
    font-weight: 850;
}

.mobile-notify-form {
    margin-top: 0;
    padding-bottom: 18px;
}

.mobile-notify-form .form-grid {
    padding: 18px 20px 0;
}

.mobile-notify-grid {
    align-items: end;
}

.mobile-notify-toggle {
    align-self: end;
}

.mobile-notify-toggle .manager-archive-toggle {
    min-height: 58px;
}

.mobile-notify-message {
    grid-column: 1 / -1;
}

.mobile-notify-message textarea {
    min-height: 150px;
    resize: vertical;
}

.mobile-notify-history {
    margin-top: 0;
    overflow: hidden;
}

.mobile-notify-table-wrap {
    max-width: 100%;
    overflow-x: clip;
}

.mobile-notify-table {
    table-layout: fixed;
}

.mobile-notify-table th:nth-child(1),
.mobile-notify-table td:nth-child(1) {
    width: 72px;
}

.mobile-notify-table th:nth-child(2),
.mobile-notify-table td:nth-child(2) {
    width: 18%;
}

.mobile-notify-table th:nth-child(4),
.mobile-notify-table td:nth-child(4) {
    width: 132px;
}

.mobile-notify-table th:nth-child(5),
.mobile-notify-table td:nth-child(5) {
    width: 96px;
}

.mobile-notify-table th:nth-child(6),
.mobile-notify-table td:nth-child(6) {
    width: 164px;
}

.mobile-notify-table th,
.mobile-notify-table td {
    overflow-wrap: break-word;
    word-break: normal;
    vertical-align: top;
}

.mobile-notify-username,
.mobile-notify-date {
    white-space: normal;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: normal;
}

.notification-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.notification-copy strong,
.notification-copy span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.notification-copy span {
    color: #475569;
    line-height: 1.55;
}

.mobile-notify-page {
    display: grid;
    gap: 18px;
}

@media (max-width: 1100px) {
    .mobile-notify-table-wrap {
        overflow: visible;
    }

    .mobile-notify-table,
    .mobile-notify-table tbody,
    .mobile-notify-table tr,
    .mobile-notify-table td {
        display: block;
        width: 100% !important;
    }

    .mobile-notify-table thead {
        display: none;
    }

    .mobile-notify-table tr {
        margin: 0 0 12px;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
    }

    .mobile-notify-table td {
        display: grid;
        grid-template-columns: minmax(108px, .34fr) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 10px 0;
        border-bottom: 1px solid #eef2f7;
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    .mobile-notify-table td:last-child {
        border-bottom: 0;
    }

    .mobile-notify-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 11px;
        font-weight: 950;
        line-height: 1.3;
        text-transform: uppercase;
    }

    .mobile-notify-username {
        display: block;
        min-width: 0;
        max-width: 100%;
        direction: ltr;
        unicode-bidi: plaintext;
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .notification-copy strong,
    .notification-copy span {
        overflow-wrap: break-word;
        word-break: normal;
    }
}

.empty-cell {
    padding: 28px !important;
    text-align: center;
    color: #64748b !important;
}

.endpoint-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.endpoint-card {
    padding: 14px;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    background: #fff;
}

.endpoint-card h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 16px;
}

.check-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.check-panel {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.check-column {
    display: grid;
    align-content: start;
    gap: 16px;
}

.check-column-head {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: #0f172a;
    background: linear-gradient(135deg, #fff, #f8fafc);
    box-shadow: var(--shadow-sm);
    font-size: 18px;
    font-weight: 950;
}

.check-column-head i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--brand);
    background: #fce7f1;
}

.check-panel-wide {
    grid-column: 1 / -1;
}

.check-panel-head {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(135deg, #fff, #fff5f9);
}

.check-panel-head i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--brand);
    background: #fce7f1;
}

.check-panel-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 19px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #eef2f7;
}

.check-metric {
    min-height: 74px;
    padding: 13px 15px;
    background: #fff;
}

.check-metric span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.check-metric strong {
    display: block;
    color: #0f172a;
    font-size: 16px;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.check-metric.is-bad {
    border-inline-start: 4px solid #dc2626;
    background: #fff1f2;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .18);
}

.check-metric.is-bad span,
.check-metric.is-bad strong {
    color: #dc2626 !important;
}

.check-metric.is-bad strong {
    font-weight: 1000;
}

.check-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    color: #9a3412;
    background: #fff7ed;
    font-weight: 800;
}

.xml-preview {
    max-height: 70vh;
    overflow: auto;
    margin: 0;
    padding: 18px;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
}

.app-toast-stack {
    position: fixed;
    z-index: 110;
    top: 18px;
    inset-inline-end: 18px;
    display: grid;
    gap: 10px;
}

.app-toast {
    min-width: min(360px, calc(100vw - 36px));
    padding: 13px 15px;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    color: #14532d;
    background: #f0fdf4;
    box-shadow: 0 16px 45px rgba(15, 23, 42, .15);
    font-weight: 850;
}

.app-toast.error {
    color: #7f1d1d;
    border-color: #fecaca;
    background: #fff1f2;
}

.form-card {
    padding: 20px;
}

.form-section {
    display: grid;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid #eef2f7;
}

.form-section:first-child {
    padding-top: 0;
}

.form-section:last-child {
    border-bottom: 0;
}

.form-section h2 {
    margin: 0;
    font-size: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.span-2 {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 18px;
}

.dashboard-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .08);
}

.board-line {
    position: relative;
    min-height: 78px;
    display: grid;
    grid-template-columns: 5px 34px minmax(112px, 1fr) minmax(0, 1.05fr) 18px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text);
    border-inline-end: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--tile-color) 4%, transparent), transparent 42%),
        #fff;
    transition: background .16s ease, transform .16s ease;
}

a.board-line:hover {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--tile-color) 10%, transparent), transparent 55%),
        #fbfdff;
}

.board-accent {
    width: 5px;
    height: 42px;
    border-radius: 99px;
    background: var(--tile-color);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--tile-color) 10%, transparent);
}

.board-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--tile-color) 20%, #e2e8f0);
    border-radius: 50%;
    color: var(--tile-color);
    background: #fff;
    font-size: 15px;
}

.board-label {
    min-width: 0;
    color: #475467;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
}

.board-line .metric-value {
    min-width: 0;
    justify-self: end;
    max-width: 100%;
    color: #0f172a;
    font-size: 25px;
    line-height: 1;
    font-weight: 950;
    white-space: nowrap;
    direction: ltr;
    text-align: end;
    transform-origin: center right;
    font-variant-numeric: tabular-nums;
}

[dir="rtl"] .board-line .metric-value {
    transform-origin: center left;
}

.board-arrow {
    display: grid;
    place-items: center;
    color: #cbd5e1;
    font-size: 18px;
}

[dir="rtl"] .board-arrow i {
    transform: scaleX(-1);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 18px;
}

.metric-card {
    position: relative;
    min-height: 154px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 18px;
    padding: 18px 18px 16px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 18px;
    background: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .94)),
        radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--tile-color) 18%, transparent), transparent 34%);
    box-shadow: 0 20px 55px rgba(15, 23, 42, .08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

a.metric-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--tile-color) 34%, var(--border));
    box-shadow: 0 26px 65px rgba(15, 23, 42, .14);
}

.metric-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 18px;
    inset-inline-end: 18px;
    bottom: 14px;
    height: 5px;
    border-radius: 99px;
    background: var(--tile-color);
    opacity: .82;
}

.metric-card::after {
    content: "";
    position: absolute;
    inset-inline-end: 18px;
    top: 18px;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--tile-color) 9%, white);
    border: 1px solid color-mix(in srgb, var(--tile-color) 22%, white);
}

.metric-icon {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    align-self: start;
    border-radius: 16px;
    color: var(--tile-color);
    background: transparent;
    font-size: 22px;
    grid-column: 2;
    grid-row: 1;
}

.metric-body {
    position: relative;
    z-index: 1;
    min-width: 0;
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-inline-end: 68px;
    padding-bottom: 16px;
}

.metric-body small {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-height: 0;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    color: color-mix(in srgb, var(--tile-color) 68%, #334155);
    background: color-mix(in srgb, var(--tile-color) 8%, white);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.metric-body strong {
    display: block;
    margin-top: 22px;
    color: #0f172a;
    max-width: 100%;
    font-size: clamp(25px, 2.2vw, 36px);
    line-height: 1.05;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    direction: ltr;
    text-align: inherit;
    font-variant-numeric: tabular-nums;
}

.metric-value.is-wrapped {
    white-space: normal;
    word-break: break-word;
    line-height: 1.12;
}

@supports not (background: color-mix(in srgb, red 10%, white)) {
    .metric-card {
        background: #fff;
    }

    a.metric-card:hover {
        border-color: var(--border);
    }

    .metric-card::after,
    .metric-icon {
        background: #f8fafc;
    }

    .metric-body small {
        color: #334155;
        background: #f8fafc;
    }
}

@media (max-width: 1250px) {
    .dashboard-modern {
        grid-template-columns: 1fr;
    }

    .highlight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ops-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar-toggle {
        position: fixed;
        z-index: 50;
        top: 14px;
        inset-inline-start: 14px;
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border: 1px solid var(--border);
        border-radius: 12px;
        color: var(--brand);
        background: #fff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
        cursor: pointer;
    }

    .sidebar {
        position: fixed;
        z-index: 45;
        inset-block: 0;
        inset-inline-start: 0;
        width: min(300px, 86vw);
        height: 100vh;
        transform: translateX(-105%);
        transition: transform .18s ease;
    }

    [dir="rtl"] .sidebar {
        transform: translateX(105%);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open::after {
        content: "";
        position: fixed;
        z-index: 40;
        inset: 0;
        background: rgba(15, 23, 42, .42);
    }

    .main {
        padding: 72px 14px 14px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    [dir="rtl"] .topbar {
        align-items: flex-end;
    }

    .top-actions {
        flex-wrap: wrap;
    }

    .dashboard-modern {
        gap: 14px;
    }

    .panel-head {
        min-height: 74px;
        padding: 16px;
    }

    .panel-head h2 {
        font-size: 18px;
    }

    .panel-total {
        min-width: 88px;
        font-size: 32px;
    }

    .chart-row {
        grid-template-columns: 1fr 48px minmax(74px, .5fr);
        gap: 8px 12px;
    }

    .chart-track {
        grid-column: 1 / -1;
        order: 3;
    }

    .finance-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .finance-row strong {
        justify-self: start;
    }

    .highlight-grid {
        grid-template-columns: 1fr;
    }

    .highlight-card {
        min-height: 118px;
    }

    .device-row {
        grid-template-columns: 34px minmax(0, 1fr) minmax(66px, .55fr);
        padding: 10px 14px;
    }

    .ops-grid,
    .system-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-board {
        grid-template-columns: 1fr;
    }

    .page-titlebar,
    .toolbar-card,
    .pager {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .button-row,
    .form-actions {
        justify-content: stretch;
    }

    .button-row > *,
    .form-actions > * {
        flex: 1 1 auto;
    }

    .form-grid,
    .metric-grid,
    .endpoint-detail-grid,
    .check-layout,
    .check-grid {
        grid-template-columns: 1fr;
    }

    .link-modal {
        align-items: stretch;
        place-items: stretch;
        padding: 8px;
    }

    .modal-panel,
    #detailsModal .modal-panel {
        width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 16px;
    }

    .modal-head,
    .modal-foot,
    .modal-body {
        padding: 12px;
    }

    .tabs-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .tab-button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    #detailsModal .modern-table.compact-table,
    #detailsModal .modern-table.compact-table tbody,
    #detailsModal .modern-table.compact-table tr,
    #detailsModal .modern-table.compact-table td {
        display: block;
        width: 100%;
    }

    #detailsModal .modern-table.compact-table thead {
        display: none;
    }

    #detailsModal .modern-table.compact-table tr {
        margin-bottom: 10px;
        border: 1px solid #e8eef6;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
    }

    #detailsModal .modern-table.compact-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid #eef2f7;
    }

    #detailsModal .modern-table.compact-table td:last-child {
        border-bottom: 0;
    }

    #detailsModal .modern-table.compact-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-weight: 900;
    }

    .board-line {
        grid-template-columns: 5px 32px minmax(0, 1fr) minmax(88px, 1fr) 14px;
        min-height: 72px;
        padding: 12px;
        gap: 10px;
    }

    .board-line .metric-value {
        font-size: 22px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .actions-menu,
    .actions-menu summary {
        width: 100%;
    }

    .actions-menu-list {
        position: static;
        margin-top: 8px;
    }

    .links-table thead {
        display: none;
    }

    .links-table,
    .links-table tbody,
    .links-table tr,
    .links-table td {
        display: block;
        width: 100%;
    }

    .links-table tr {
        padding: 14px;
        margin-bottom: 12px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    }

    .links-table td {
        padding: 8px 0;
        border-bottom: 1px solid #eef2f7;
    }

    .links-table td:last-child {
        border-bottom: 0;
    }

    .links-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #64748b;
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .links-table td:first-child::before {
        display: none;
    }
}

@media (max-width: 900px) {
    .process-table {
        min-width: 0;
    }

    .process-command-cell {
        max-width: none;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.tabs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.clients-view-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.clients-view-toolbar .btn-lite {
    min-height: 36px;
}

button.is-loading {
    cursor: wait !important;
    opacity: .72;
    pointer-events: none;
}

button.is-loading .fa-spinner {
    margin-inline-end: 6px;
}

.icon-action.is-loading {
    min-width: 34px;
}

.frequency-test-panel {
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfdff;
}

.frequency-test-panel .metric-grid {
    margin-top: 12px;
}

.client-metric-delta {
    display: block !important;
    margin: 3px 0 0;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 950;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.client-metric-current {
    display: block !important;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.client-metric-delta.positive {
    color: #15803d;
}

.client-metric-delta.negative {
    color: #b42318;
}

.client-metric-delta.neutral {
    color: #64748b;
}

.tab-button {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #475569;
    background: #fff;
    font-weight: 900;
    cursor: pointer;
}

.tab-button.active,
.tab-button:hover,
.tab-button:focus {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.metric-box.good {
    border-color: rgba(34, 197, 94, .24);
    background: #f0fdf4;
}

.metric-box.good strong {
    color: #15803d;
}

.metric-box.warning {
    border-color: rgba(245, 158, 11, .28);
    background: #fffbeb;
}

.metric-box.warning strong {
    color: #b45309;
}

.metric-box.danger {
    border-color: rgba(220, 38, 38, .28);
    background: #fff1f2;
}

.metric-box.danger strong {
    color: #b42318;
}

.danger-text,
.bad-port {
    color: #dc2626 !important;
    font-weight: 950;
}

.good-port {
    color: #15803d;
    font-weight: 850;
}

.toggle-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.toggle-line input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.toggle-line .toggle-switch-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.toggle-line .toggle-switch-input:checked + .toggle-switch-ui {
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(223, 11, 101, .22);
}

.toggle-line .toggle-switch-input:checked + .toggle-switch-ui::after {
    transform: translateX(20px);
}

[dir="rtl"] .toggle-line .toggle-switch-input:checked + .toggle-switch-ui::after {
    transform: translateX(-20px);
}

.account-item-toolbar {
    grid-template-columns: minmax(220px, 1.1fr) minmax(160px, .65fr) minmax(120px, .45fr) auto;
}

.managers-toolbar {
    grid-template-columns: minmax(240px, 1.15fr) minmax(210px, .9fr) minmax(210px, .72fr) minmax(120px, .42fr) auto;
    align-items: end;
}

.managers-toolbar .manager-archive-toggle,
.managers-toolbar > .btn-lite {
    min-height: 60px;
}

.manager-toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 14px;
}

.manager-contact-card {
    margin-top: 18px;
}

.phone-token-source {
    display: none;
}

.phone-token-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 110px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    cursor: text;
}

.phone-token-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(var(--brand-rgb), .09);
    color: var(--brand-dark);
    font-weight: 900;
    line-height: 1;
}

.phone-token-chip button {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(var(--brand-rgb), .14);
    color: var(--brand-dark);
    cursor: pointer;
}

.phone-token-input {
    flex: 1 1 150px;
    min-width: 120px;
    border: 0;
    outline: none;
    color: var(--text);
    font: inherit;
    font-weight: 800;
}

.accounts-toolbar,
.account-company-toolbar {
    grid-template-columns: minmax(220px, 1.15fr) minmax(190px, .8fr) minmax(120px, .42fr) minmax(210px, .65fr) auto;
    align-items: end;
}

.accounts-toolbar .input,
.accounts-toolbar .select,
.account-company-toolbar .input,
.account-company-toolbar .select {
    min-height: 48px;
}

.accounts-toolbar .select2-container--default .select2-selection--single,
.account-company-toolbar .select2-container--default .select2-selection--single {
    min-height: 48px;
}

.accounts-toolbar .select2-container--default .select2-selection--single .select2-selection__rendered,
.account-company-toolbar .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px;
}

.accounts-toolbar > .btn-lite,
.account-company-toolbar > .btn-lite {
    min-height: 48px;
    height: 48px;
    align-self: end;
}

.accounts-toolbar .toolbar-switch,
.account-company-toolbar .toolbar-switch,
.accounts-toolbar > .btn-lite,
.account-company-toolbar > .btn-lite {
    margin-bottom: 18px;
}

.manager-archive-toggle,
.toolbar-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 48px;
    align-self: end;
    margin: 0;
    padding-inline: 14px 16px;
}

.manager-archive-toggle strong,
.toolbar-switch strong {
    white-space: nowrap;
}

.tasks-toolbar .manager-archive-toggle {
    width: 100%;
    min-width: 220px;
}

.tickets-toolbar {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    min-width: 0;
}

.tickets-toolbar .ticket-toggle-field {
    align-self: end;
}

.tickets-toolbar .manager-archive-toggle {
    width: 100%;
    min-height: 60px;
    height: 60px;
}

.tickets-toolbar .toolbar-action {
    min-width: 0;
    width: 100%;
}

.tickets-toolbar .toolbar-action > .btn-lite {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    justify-self: stretch !important;
    padding-inline: 14px;
}

.ticket-answers-toolbar {
    grid-template-columns: minmax(260px, 1.1fr) minmax(180px, .7fr) minmax(100px, .45fr) minmax(140px, .45fr);
}

.ticket-form-card .form-grid,
.ticket-answer-form .form-grid {
    align-items: start;
}

.ticket-description-field textarea,
.ticket-answer-form textarea,
.ticket-comment-form textarea {
    min-height: 190px;
    resize: vertical;
}

.ticket-answer-template-field {
    grid-column: 1 / -1;
}

.ticket-answer-description {
    grid-column: span 1;
}

.ticket-answer-enabled-field {
    align-self: start;
}

.ticket-answer-enabled {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: start;
    gap: 10px;
    width: fit-content;
    min-height: 44px;
    margin: 0 0 2px;
    padding: 0;
    color: var(--text);
    font-weight: 900;
}

.ticket-answer-enabled .toggle-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ticket-answer-enabled .toggle-switch-input:checked + .toggle-switch-ui {
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(223, 11, 101, .22);
}

.ticket-answer-enabled .toggle-switch-input:checked + .toggle-switch-ui::after {
    transform: translateX(20px);
}

[dir="rtl"] .ticket-answer-enabled .toggle-switch-input:checked + .toggle-switch-ui::after {
    transform: translateX(-20px);
}

.store-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(110px, .35fr) minmax(140px, .35fr);
}

.store-model-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(180px, .55fr) minmax(110px, .35fr) minmax(140px, .35fr);
}

.store-table small {
    color: #64748b;
    font-weight: 800;
}

.store-form-card .form-grid {
    align-items: start;
}

.store-toggle-field {
    align-self: end;
}

.store-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--text);
    font-weight: 900;
}

.store-toggle .toggle-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.store-toggle .toggle-switch-input:checked + .toggle-switch-ui {
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(223, 11, 101, .22);
}

.store-toggle .toggle-switch-input:checked + .toggle-switch-ui::after {
    transform: translateX(20px);
}

[dir="rtl"] .store-toggle .toggle-switch-input:checked + .toggle-switch-ui::after {
    transform: translateX(-20px);
}

.manager-archive-toggle .toggle-switch-input,
.toolbar-switch .toggle-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch-ui {
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 44px;
    border-radius: 999px;
    background: #d8e1ee;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .38);
    transition: background .18s ease, box-shadow .18s ease;
}

.toggle-switch-ui::after {
    content: "";
    position: absolute;
    top: 4px;
    inset-inline-start: 4px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .22);
    transition: transform .18s ease;
}

.manager-archive-toggle .toggle-switch-input:checked + .toggle-switch-ui,
.toolbar-switch .toggle-switch-input:checked + .toggle-switch-ui {
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(223, 11, 101, .22);
}

.manager-archive-toggle .toggle-switch-input:checked + .toggle-switch-ui::after,
.toolbar-switch .toggle-switch-input:checked + .toggle-switch-ui::after {
    transform: translateX(20px);
}

[dir="rtl"] .manager-archive-toggle .toggle-switch-input:checked + .toggle-switch-ui::after,
[dir="rtl"] .toolbar-switch .toggle-switch-input:checked + .toggle-switch-ui::after {
    transform: translateX(-20px);
}

.account-item-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strong-link {
    color: var(--text);
    font-weight: 950;
    text-decoration: none;
}

.strong-link:hover {
    color: var(--brand);
}

.manager-row-disabled td {
    background: rgba(220, 38, 38, .045);
    color: #991b1b;
}

.manager-row-disabled .strong-link,
.manager-row-disabled .manager-name-main {
    color: #dc2626;
}

.manager-row-disabled .good-port,
.manager-row-disabled .danger-text {
    color: #dc2626 !important;
}

.manager-row-disabled .strong-link:hover {
    color: #991b1b;
}

.employee-inline-badge {
    display: inline-grid;
    width: 28px;
    height: 28px;
    margin-inline-start: 8px;
    place-items: center;
    vertical-align: middle;
    border-radius: 999px;
    color: #7c3aed;
    background: rgba(124, 58, 237, .12);
    border: 1px solid rgba(124, 58, 237, .18);
}

.employee-inline-badge i {
    font-size: 13px;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.segmented-control label {
    display: block;
    cursor: pointer;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--muted);
    font-weight: 900;
    transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.segmented-control input:checked + span {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    box-shadow: 0 14px 26px rgba(var(--brand-rgb), .20);
}

.segmented-control input:focus + span {
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .11);
}

.profit-summary-grid {
    display: grid;
    grid-template-columns: 1.15fr repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

.profit-toolbar {
    grid-template-columns: minmax(120px, .55fr) minmax(150px, .65fr) minmax(220px, 1.2fr) minmax(120px, .55fr) auto;
    align-items: end;
}

.profit-toolbar .toolbar-action > .btn-lite {
    min-height: 56px;
}

.profit-hero-card,
.profit-metric-card {
    min-width: 0;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .06);
}

.profit-hero-card {
    grid-row: span 2;
    display: grid;
    align-content: space-between;
    min-height: 194px;
    padding: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 255, 255, .18), transparent 36%),
        linear-gradient(135deg, #111827, #1f2937);
}

.profit-hero-card.is-positive {
    background:
        radial-gradient(circle at 100% 0, rgba(255, 255, 255, .18), transparent 36%),
        linear-gradient(135deg, #064e3b, #0f766e);
}

.profit-hero-card.is-negative {
    background:
        radial-gradient(circle at 100% 0, rgba(255, 255, 255, .18), transparent 36%),
        linear-gradient(135deg, #881337, #be123c);
}

.profit-card-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 21px;
}

.profit-hero-card small,
.profit-metric-card span {
    color: inherit;
    opacity: .78;
    font-size: 12px;
    font-weight: 900;
}

.profit-hero-card strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.profit-metric-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 90px;
    padding: 16px;
}

.profit-metric-card i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    grid-row: span 2;
    border-radius: 14px;
    color: var(--brand);
    background: var(--brand-50);
}

.profit-metric-card.is-good i {
    color: #15803d;
    background: #ecfdf3;
}

.profit-metric-card.is-warning i {
    color: #b45309;
    background: #fffbeb;
}

.profit-metric-card.is-danger i {
    color: #dc2626;
    background: #fff1f2;
}

.profit-metric-card strong {
    min-width: 0;
    color: #0f172a;
    font-size: clamp(17px, 1.8vw, 23px);
    font-weight: 950;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.section-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.section-headline h2 {
    margin: 0;
    font-size: 18px;
}

.section-headline span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.profit-table td:not(:first-child),
.profit-table th:not(:first-child) {
    text-align: end;
}

.profit-table-wrap {
    overflow-x: hidden;
    overflow-x: clip;
}

.profit-table {
    table-layout: fixed;
}

.profit-table th,
.profit-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.profit-positive {
    color: #15803d !important;
    font-weight: 950;
}

.profit-negative {
    color: #dc2626 !important;
    font-weight: 950;
}

.ui-pnotify-closer {
    width: 24px !important;
    height: 24px !important;
    display: grid !important;
    place-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-radius: 999px !important;
    color: #fff !important;
    background: rgba(15, 23, 42, .62) !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
}

.ui-pnotify-closer span {
    display: none !important;
}

.ui-pnotify-closer::before {
    content: "×";
}

.compact-table th,
.compact-table td {
    white-space: nowrap;
}

/* App themed PNotify close button. Keep this after vendor/legacy closer rules. */
.ui-pnotify-closer {
    position: relative !important;
    width: 28px !important;
    height: 28px !important;
    display: grid !important;
    place-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 2px 2px 0 8px !important;
    border: 1px solid rgba(var(--brand-rgb), .16) !important;
    border-radius: 999px !important;
    color: var(--brand) !important;
    background: rgba(255, 255, 255, .92) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .10) !important;
    cursor: pointer !important;
    font-size: 0 !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

.ui-pnotify-closer:hover,
.ui-pnotify-closer:focus {
    border-color: var(--brand) !important;
    background: var(--brand) !important;
    box-shadow: 0 12px 24px rgba(var(--brand-rgb), .24) !important;
    transform: translateY(-1px) !important;
}

.ui-pnotify-closer span {
    display: none !important;
}

.ui-pnotify-closer::before,
.ui-pnotify-closer::after {
    content: "" !important;
    position: absolute !important;
    width: 11px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: currentColor !important;
    transition: background .16s ease !important;
}

.ui-pnotify-closer::before {
    transform: rotate(45deg) !important;
}

.ui-pnotify-closer::after {
    transform: rotate(-45deg) !important;
}

.ui-pnotify-closer:hover::before,
.ui-pnotify-closer:hover::after,
.ui-pnotify-closer:focus::before,
.ui-pnotify-closer:focus::after {
    background: #fff !important;
}

/* Final button color guard: pink primary controls must never turn white on white. */
a.btn-primary-lite:hover,
a.btn-primary-lite:focus,
button.btn-primary-lite:hover,
button.btn-primary-lite:focus,
.btn-primary-lite:hover,
.btn-primary-lite:focus,
.btn-primary-lite:active,
.actions-menu > summary.btn-primary-lite:hover,
.actions-menu > summary.btn-primary-lite:focus,
.actions-menu[open] > summary.btn-primary-lite,
.form-actions .btn-primary-lite:hover,
.form-actions .btn-primary-lite:focus,
.toolbar-card .btn-primary-lite:hover,
.toolbar-card .btn-primary-lite:focus,
.page-titlebar .btn-primary-lite:hover,
.page-titlebar .btn-primary-lite:focus,
.primary-button:hover,
.primary-button:focus,
input[type="submit"].btn-primary-lite:hover,
input[type="submit"].btn-primary-lite:focus {
    color: #fff !important;
    border-color: var(--brand-dark) !important;
    background: var(--brand-dark) !important;
    box-shadow: 0 14px 30px rgba(var(--brand-rgb), .24) !important;
}

a.btn-primary-lite:hover i,
a.btn-primary-lite:focus i,
button.btn-primary-lite:hover i,
button.btn-primary-lite:focus i,
.btn-primary-lite:hover i,
.btn-primary-lite:focus i,
.actions-menu > summary.btn-primary-lite:hover i,
.actions-menu > summary.btn-primary-lite:focus i,
.actions-menu[open] > summary.btn-primary-lite i {
    color: #fff !important;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 100%;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.status-pill.is-up {
    color: #117b48;
    background: rgba(36, 183, 116, 0.13);
}

.status-pill.is-down {
    color: #b91c4f;
    background: rgba(225, 29, 96, 0.12);
}

.status-pill.is-warn {
    color: #9a3412;
    background: #ffedd5;
}

.status-pill.is-muted {
    color: #475569;
    background: #f1f5f9;
}

.status-pill i {
    font-size: 14px;
}

.ticket-number-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    color: var(--text);
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.ticket-number-link:hover {
    color: var(--brand);
}

.ticket-unreplied-badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    box-shadow: 0 8px 16px rgba(220, 38, 38, .22);
}

.ticket-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.ticket-status.is-pending {
    background: #fff7ed;
    color: #c2410c;
}

.ticket-status.is-progress {
    background: #ecfeff;
    color: #0e7490;
}

.ticket-status.is-solved {
    background: #ecfdf5;
    color: #15803d;
}

.ticket-status.is-cancelled,
.ticket-status.is-muted {
    background: #fef2f2;
    color: #b91c1c;
}

.tickets-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: clip !important;
}

@supports not (overflow: clip) {
    .tickets-table-wrap {
        overflow-x: hidden !important;
    }
}

.tickets-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
}

.tickets-table,
.tickets-table * {
    box-sizing: border-box;
}

.tickets-table th,
.tickets-table td {
    min-width: 0 !important;
    max-width: none;
    padding: 10px 8px;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tickets-table th:first-child,
.tickets-table td:first-child {
    width: 44px;
    max-width: 44px;
}

.tickets-table th:nth-child(2),
.tickets-table td:nth-child(2) {
    width: 78px;
    max-width: 78px;
}

.ticket-id-cell,
.ticket-id-value {
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

.ticket-id-value {
    display: inline-block;
    flex: 0 0 auto;
}

.ticket-cell-stack {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.ticket-cell-main,
.ticket-cell-sub {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ticket-cell-sub {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.ticket-answer-number {
    font-size: 11px;
    font-weight: 750;
}

.tickets-table .ticket-status {
    max-width: 100%;
    padding-inline: 8px;
    white-space: normal;
}

.ticket-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 16px;
}

.ticket-meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.ticket-meta-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.ticket-meta-list div:last-child {
    border-bottom: 0;
}

.ticket-meta-list dt {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.ticket-meta-list dd {
    margin: 0;
    font-weight: 900;
    text-align: end;
}

.ticket-timeline {
    display: grid;
    gap: 12px;
}

.ticket-update-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #e5edf7;
    border-radius: 16px;
    background: #fff;
}

.ticket-update-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ticket-update-head small {
    color: #64748b;
    font-weight: 800;
}

.site-map-panel {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #f7fafc;
}

.site-map-view {
    width: 100%;
    min-height: 72vh;
    border-radius: 18px;
    overflow: hidden;
    background: #f7fafc;
}

.site-map-zoom {
    display: grid;
    gap: 8px;
    margin: 10px;
}

.site-map-zoom button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--brand);
    box-shadow: 0 12px 26px rgba(var(--brand-rgb), .24);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.site-map-zoom button:hover,
.site-map-zoom button:focus {
    background: var(--brand-dark);
}

.site-map-filter {
    display: flex;
    gap: 10px;
    margin: 12px;
    padding: 8px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 14px 35px rgba(15, 23, 42, .12);
}

.site-map-filter label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.site-map-filter input {
    accent-color: var(--brand);
}

.form-hint {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.dashboard-grid.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.card-heading {
    padding: 18px 22px 0;
}

.card-heading h2 {
    margin: 0;
    font-size: 20px;
}

.text-danger {
    color: #dc2626 !important;
}

@media (max-width: 900px) {
    .dashboard-grid.two-col {
        grid-template-columns: 1fr;
    }

    .site-measure-form .button-row {
        padding-top: 0;
    }
}

.dashboard-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.account-user-summary {
    display: flex;
    align-items: stretch;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.account-user-summary .metric-tile {
    flex: 1 1 0;
    min-width: 220px;
}

.metric-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, #fff, #f8fbff);
    box-shadow: 0 14px 45px rgba(15, 23, 42, .07);
}

.metric-tile strong {
    display: block;
    color: var(--ink);
    font-size: clamp(18px, 2vw, 28px);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.metric-tile small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-weight: 800;
}

.call-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.call-kpis .metric-tile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    direction: ltr;
    overflow: hidden;
    min-height: 104px;
    padding: 16px 14px;
}

.call-kpis .metric-tile > div {
    min-width: 0;
    text-align: left;
}

.call-kpis .metric-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex: 0 0 44px;
    border-radius: 15px;
    font-size: 18px;
}

.call-kpis .call-kpi-number {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: clamp(13px, 1.18vw, 20px);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    overflow-wrap: normal;
    word-break: normal;
    text-overflow: clip;
}

.call-kpis .metric-tile small {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.15;
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
}

@media (max-width: 1320px) {
    .call-kpis .call-kpi-number {
        font-size: clamp(12px, 1.08vw, 18px);
    }
}

@media (max-width: 1100px) {
    .call-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .call-kpis .call-kpi-number {
        font-size: clamp(13px, 1.9vw, 20px);
    }
}

@media (max-width: 680px) {
    .call-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.metric-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--brand);
    background: rgba(223, 11, 101, .1);
    font-size: 22px;
}

.metric-icon.good {
    color: #16a34a;
    background: rgba(22, 163, 74, .12);
}

.metric-icon.danger {
    color: #dc2626;
    background: rgba(220, 38, 38, .12);
}

.metric-icon.employee {
    color: #7c3aed;
    background: rgba(124, 58, 237, .12);
}

.check-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}

.check-card input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
}

.check-card span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.account-user-select-wrap {
    position: relative;
}

.account-user-select-wrap .select2-container {
    width: 100% !important;
}

.select-loading {
    position: absolute;
    inset-inline-end: 13px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid rgba(var(--brand-rgb), .18);
    border-top-color: var(--brand);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
    animation: selectLoadingSpin .72s linear infinite;
    z-index: 2;
}

.select-loading.is-visible {
    opacity: 1;
}

.profile-price-card {
    padding: 20px;
    padding-bottom: 0;
    overflow: hidden;
}

.profile-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.profile-price-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 170px);
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 16px;
    border: 1px solid rgba(203, 213, 225, .82);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(var(--brand-rgb), .08), transparent 38%),
        linear-gradient(135deg, #fff, #fbfdff);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .045);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-price-item:hover,
.profile-price-item:focus-within {
    border-color: rgba(var(--brand-rgb), .38);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.profile-price-name {
    min-width: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.profile-price-control {
    position: relative;
}

.profile-price-control::before {
    content: "\f0d6";
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand);
    font: normal normal normal 14px/1 FontAwesome;
    opacity: .72;
    pointer-events: none;
    z-index: 1;
}

.profile-price-control .input {
    width: 100%;
    min-height: 48px;
    padding-inline-start: 34px;
    border-radius: 14px;
    background: #fff;
    font-size: 16px;
    font-weight: 900;
}

.profile-price-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 20px -20px 0;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(255,255,255,.98), #fff7fb);
    box-shadow: 0 -14px 30px rgba(15, 23, 42, .06);
}

.profile-price-footer div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-price-footer strong {
    font-size: 22px;
    color: var(--brand);
}

.profile-price-footer span {
    color: var(--muted);
    font-weight: 800;
}

.manager-price-stack {
    display: grid;
    gap: 18px;
}

.manager-price-filter {
    grid-template-columns: minmax(260px, 1fr) minmax(120px, .32fr) auto;
    margin-bottom: 18px;
}

.manager-price-table-card {
    overflow: hidden;
}

.manager-price-table th,
.manager-price-table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.manager-price-table th {
    min-width: 120px;
    white-space: nowrap;
}

.manager-price-table th:first-child,
.manager-price-table td:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 2;
    min-width: 210px;
    background: #fff;
    box-shadow: 10px 0 18px rgba(15, 23, 42, .04);
}

.manager-price-table th:first-child {
    z-index: 3;
}

.manager-price-table th small,
.manager-price-table td small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.compact-price-input {
    min-width: 96px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
}

.manager-price-card {
    padding-top: 18px;
}

.manager-price-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.manager-price-head strong,
.manager-price-head small {
    display: block;
    min-width: 0;
}

.manager-price-head strong {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.manager-price-head small,
.profile-price-name small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.profile-price-name small {
    display: block;
}

.manager-price-savebar {
    z-index: 8;
    margin: 18px 0 0;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.role-builder {
    padding: 24px;
}

.role-builder-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
    margin-top: 18px;
}

.role-perm-box {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, .82);
    border-radius: 18px;
    background: rgba(248, 251, 255, .58);
}

.role-perm-box h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 16px;
}

.perm-box {
    min-height: 430px;
    max-height: 54vh;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}

.perm-group {
    margin: 8px 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.perm-item {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(203, 213, 225, .85);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    text-align: start;
    font-weight: 800;
    cursor: pointer;
}

.perm-item.is-selected {
    border-color: rgba(var(--brand-rgb), .44);
    background: rgba(var(--brand-rgb), .08);
    color: var(--brand-dark);
}

.role-move-buttons {
    display: grid;
    align-content: center;
    gap: 10px;
}

.mini-progress {
    width: min(140px, 100%);
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .18);
}

.mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #22c55e);
}

.cards-table small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 800;
}

.users-toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(260px, .9fr) minmax(180px, .55fr) minmax(110px, .35fr) auto;
    align-items: end;
}

.users-toolbar > .btn-lite {
    min-height: 42px;
    height: 42px;
    align-self: end;
    margin: 0;
}

.users-table-wrap,
.online-users-table-wrap {
    overflow-x: clip;
    max-width: 100%;
}

.users-table,
.online-users-table {
    table-layout: fixed;
}

.users-table th,
.users-table td,
.online-users-table th,
.online-users-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.online-users-table th:nth-child(1),
.online-users-table td:nth-child(1) {
    width: 16%;
    word-break: normal;
}

.online-users-table th:nth-child(2),
.online-users-table td:nth-child(2) {
    width: 14%;
}

.online-users-table th:nth-child(3),
.online-users-table td:nth-child(3) {
    width: 10%;
}

.online-users-table th:nth-child(4),
.online-users-table td:nth-child(4) {
    width: 12%;
}

.online-users-table th:nth-child(5),
.online-users-table td:nth-child(5),
.online-users-table th:nth-child(6),
.online-users-table td:nth-child(6) {
    width: 8%;
}

.online-users-table th:nth-child(7),
.online-users-table td:nth-child(7) {
    width: 9%;
}

.online-users-table th:nth-child(8),
.online-users-table td:nth-child(8) {
    width: 15%;
}

.users-owner-filter {
    gap: 8px;
}

.online-users-toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(300px, .95fr) minmax(140px, .4fr) auto;
}

.owner-dropdown-shell {
    display: block;
}

.owner-dropdown-shell > .select {
    width: 100%;
}

.owner-include-sub-value {
    display: none;
}

.owner-dropdown-toggle {
    display: flex;
    margin: 8px;
    border-radius: 14px;
    background: #fff7fa;
    border-color: rgba(223, 11, 101, .18);
}

.users-sub-toggle {
    min-height: auto;
    padding: 8px 10px;
    border-radius: 14px;
    font-size: 12px;
    box-shadow: none;
}

.user-status-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.user-status-link > span:first-child {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, .06);
}

.user-status-link.is-online > span:first-child {
    background: #1b9dec;
}

.user-status-link.is-active > span:first-child {
    background: #22c55e;
}

.user-extend-layout {
    display: grid;
    gap: 18px;
}

.user-extend-summary {
    display: grid;
    grid-template-columns: auto minmax(180px, .55fr) minmax(0, 1.5fr);
    align-items: center;
    gap: 18px;
    padding: 22px;
}

.user-extend-avatar {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(223, 11, 101, .14), rgba(15, 23, 42, .07));
    color: var(--brand);
    font-size: 26px;
}

.user-extend-heading {
    display: grid;
    gap: 4px;
}

.user-extend-heading span,
.user-extend-stats span,
.user-extension-details span,
.user-extend-card .form-hint {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.user-extend-heading strong {
    color: var(--text);
    font-size: 26px;
    overflow-wrap: anywhere;
}

.user-extend-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.user-extend-stats > div,
.user-extension-details > div {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 14px;
    background: #f8fafc;
}

.user-extend-stats strong,
.user-extension-details strong {
    display: block;
    margin-top: 7px;
    color: var(--text);
    font-size: 18px;
    overflow-wrap: anywhere;
}

.user-extend-card .form-section {
    padding-bottom: 10px;
}

.user-extend-card .form-hint {
    margin: -8px 0 0;
}

.activation-card-options {
    display: grid;
    gap: 10px;
}

.user-extension-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.user-extension-details[hidden] {
    display: none;
}

.user-extension-details i {
    display: grid;
    width: 38px;
    height: 38px;
    margin-bottom: 10px;
    place-items: center;
    border-radius: 12px;
    background: rgba(223, 11, 101, .12);
    color: var(--brand);
}

.user-status-link.is-expired > span:first-child {
    background: #f97316;
}

.user-status-link.is-partial > span:first-child {
    background: linear-gradient(90deg, #06b6d4 50%, #f97316 50%);
}

.modern-table tr.expired-online-user td {
    color: #7c2d12;
    background: #fff7ed;
    font-weight: 800;
}

.modern-table tr.expired-online-user .user-status-link {
    color: #9a3412;
}

.modern-table tr.expired-online-user:hover td {
    background: #ffedd5;
}

.stacked-cell {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.stacked-cell strong,
.stacked-cell small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.stacked-cell small {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
}

.online-router-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    color: #0f766e;
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
}

.online-router-link:hover {
    color: #0d9488;
    text-decoration: underline;
}

.online-user-cell {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    cursor: pointer;
    color: inherit;
}

.plain-row-button {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    text-align: inherit;
}

.plain-row-button:hover strong {
    color: var(--brand);
}

.online-user-cell > span:first-child {
    flex: 0 0 auto;
    margin-top: 2px;
}

.online-user-cell .stacked-cell {
    gap: 2px;
    min-width: 0;
}

.online-user-cell .stacked-cell strong {
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.online-user-cell .stacked-cell small {
    font-size: 11px;
    line-height: 1.25;
    color: #64748b;
}

.snmp-pending {
    color: #94a3b8 !important;
}

.online-modal-panel {
    width: min(880px, 96vw);
}

.online-stars {
    display: flex;
    gap: 6px;
    padding: 0 20px 12px;
    color: #cbd5e1;
}

.online-credential-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: end;
    gap: 12px;
    margin: 0 20px 16px;
    padding: 14px;
    border: 1px solid rgba(251, 146, 60, .35);
    border-radius: 16px;
    background: #fff7ed;
}

.online-credential-card .btn-lite {
    min-height: 52px;
    height: 52px;
    align-self: end;
}

.online-error {
    margin: 0 20px 16px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 38, 38, .22);
    border-radius: 14px;
    background: #fff1f2;
    color: #b91c1c;
    font-weight: 800;
}

.traffic-toolbar {
    grid-template-columns: minmax(260px, 1.4fr) minmax(110px, .35fr) minmax(130px, .42fr) minmax(140px, .45fr) auto;
    margin-top: 18px;
}

.traffic-manager-field {
    min-width: 0;
}

.traffic-toolbar .filter-apply-btn {
    align-self: end;
}

.traffic-toggle-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding-top: 2px;
}

.traffic-toggle-card {
    width: auto;
    min-width: 230px;
    min-height: 48px;
    margin: 0;
    padding-inline: 14px 16px;
    border-color: #dbe7f3;
    background: #f8fafc;
    box-shadow: none;
}

.traffic-toggle-card strong {
    white-space: normal;
    line-height: 1.25;
}

.traffic-dropdown-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

.traffic-dropdown-toggles .users-sub-toggle {
    min-height: 42px;
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.traffic-progress-card {
    margin-top: 18px;
    padding: 18px;
}

.traffic-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.traffic-progress-head strong {
    color: #0f172a;
    font-size: 16px;
    font-weight: 950;
}

.traffic-progress-head p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

#jobProgressText {
    min-width: 62px;
    text-align: center;
    color: var(--brand);
    font-size: 22px;
    font-weight: 950;
}

.traffic-progress-bar {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.traffic-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #0ea5e9);
    transition: width .25s ease;
}

.traffic-summary,
.traffic-agent-summary {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.traffic-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.traffic-agent-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.traffic-summary-pill,
.traffic-score-card,
.traffic-reason {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 45px rgba(15, 23, 42, .055);
}

.traffic-summary-pill span,
.traffic-score-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.traffic-summary-pill strong,
.traffic-score-card strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: clamp(18px, 1.8vw, 26px);
    font-weight: 950;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.traffic-reason {
    grid-column: 1 / -1;
    color: #475569;
    font-weight: 850;
    line-height: 1.65;
}

.traffic-results-card {
    margin-top: 18px;
    overflow: hidden;
}

.traffic-group-search {
    width: min(420px, 100%);
}

.traffic-groups-grid {
    display: grid;
    gap: 14px;
}

.traffic-group-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.traffic-group-card-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
}

.traffic-group-index {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 14px;
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 12%, white);
    font-weight: 950;
}

.traffic-group-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.traffic-mini-metric {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.traffic-mini-metric span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.traffic-mini-metric strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 950;
    white-space: nowrap;
}

.traffic-users-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.traffic-user-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 170px;
    max-width: min(260px, 100%);
    padding: 8px 11px;
    border: 1px solid #dbe7f3;
    border-radius: 14px;
    color: #0f172a;
    background: #f8fafc;
    line-height: 1.25;
}

.traffic-user-chip strong {
    font-size: 13px;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.traffic-user-chip small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.traffic-group-reason {
    margin: 14px 0 0;
    padding: 11px 12px;
    border-radius: 14px;
    color: #334155;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.traffic-error {
    margin-top: 18px;
}

.traffic-error pre {
    max-height: 320px;
    overflow: auto;
    margin: 10px 0 0;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
}

.speed-page {
    display: grid;
    gap: 18px;
}

.speed-status-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid #f8bfd3;
    border-radius: 14px;
    color: var(--brand);
    background: #fff7fb;
    font-weight: 950;
    white-space: nowrap;
}

.speed-main {
    display: grid;
    grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr);
    gap: 18px;
}

.speed-primary-card,
.speed-details-card {
    min-width: 0;
    padding: 22px;
}

.speed-current {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fbfdff;
}

.speed-current > span,
.speed-metric span {
    color: #64748b;
    font-weight: 900;
}

.speed-current > strong {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #0f172a;
    font-size: clamp(48px, 8vw, 78px);
    font-weight: 950;
    line-height: .95;
}

.speed-current small {
    color: #64748b;
    font-size: 18px;
    font-weight: 950;
}

.speed-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.speed-action-row .btn-lite {
    min-height: 50px;
}

.speed-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.speed-metric {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fbfdff;
}

.speed-metric span {
    display: block;
    margin-bottom: 8px;
}

.speed-metric strong {
    display: block;
    color: #0f172a;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 950;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.speed-progress-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.speed-progress-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 62px;
    gap: 12px;
    align-items: center;
    color: #64748b;
    font-weight: 900;
}

.speed-progress-row strong {
    color: #0f172a;
}

.speed-progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef6;
}

.speed-progress-track span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
    transition: width .25s ease;
}

.speed-main-track {
    height: 14px;
}

.speed-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.speed-info-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.speed-info-card small {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-weight: 900;
}

.speed-info-card strong {
    color: #0f172a;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.speed-error {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(220, 38, 38, .22);
    border-radius: 14px;
    color: #b91c1c;
    background: #fff1f2;
    font-weight: 900;
}

.speed-error.is-visible {
    display: block;
}

.online-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.online-info-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}

.online-modal-grid .online-info-card:only-child {
    grid-column: 1 / -1;
}

.online-info-card h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 16px;
}

.online-info-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.online-info-card dl > div {
    display: grid;
    grid-template-columns: minmax(110px, .7fr) minmax(0, 1fr);
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    background: #f8fafc;
}

.online-info-card dt {
    color: #64748b;
    font-size: 12px;
    font-weight: 950;
}

.online-info-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.calendar-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.calendar-month-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.calendar-board-shell {
    position: relative;
    min-height: 520px;
    padding: 18px;
}

.calendar-board-shell.is-loading {
    display: grid;
    place-items: center;
}

.calendar-status {
    margin-bottom: 14px;
    color: #475569;
    font-weight: 850;
}

.calendar-board-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(248, 250, 252, .92), rgba(255, 255, 255, .98));
    z-index: 2;
}

.calendar-board-overlay[hidden] {
    display: none !important;
}

.calendar-error-state {
    color: #dc2626;
    font-weight: 900;
    padding: 24px;
    text-align: center;
}

.calendar-loader-card {
    min-height: 150px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}

.calendar-loader {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 7px solid rgba(224, 8, 105, .14);
    border-top-color: var(--brand);
    box-shadow: 0 18px 38px rgba(224, 8, 105, .15);
    animation: calendar-spin .8s linear infinite;
}

@keyframes calendar-spin {
    to {
        transform: rotate(360deg);
    }
}

.calendar-weekday {
    padding: 10px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 950;
    text-align: center;
}

.calendar-day-card {
    color: inherit;
    text-decoration: none;
    min-height: 132px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}

.calendar-day-card.is-empty {
    opacity: .35;
    background: transparent;
    box-shadow: none;
}

.calendar-day-card.has-users {
    border-color: rgba(223, 11, 101, .2);
}

.calendar-day-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--ink);
}

.calendar-day-card header span {
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--brand);
    background: rgba(224, 8, 105, .1);
    font-weight: 950;
}

.calendar-user-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    margin-top: 8px;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    font-weight: 850;
}

.calendar-user-pill small {
    color: #64748b;
    font-weight: 800;
}

.profiles-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(240px, .9fr) minmax(140px, .35fr) auto;
    align-items: end;
}

.profiles-toolbar > .btn-lite {
    min-height: 42px;
}

.profiles-toolbar .toolbar-action {
    min-width: 180px;
}

.row-title-link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 950;
}

.row-title-link:hover {
    color: var(--brand);
}

.tasks-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(140px, 200px) minmax(220px, auto) minmax(160px, auto);
    align-items: end;
}

.tasks-toolbar .manager-archive-toggle,
.tasks-toolbar .toolbar-action {
    align-self: end;
    min-height: 60px;
}

.tasks-toolbar .manager-archive-toggle {
    display: inline-flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.tasks-toolbar .toolbar-action > .btn-lite {
    min-height: 60px;
}

.ftth-toolbar {
    grid-template-columns: minmax(260px, 1fr) minmax(140px, 200px) auto;
}

.ftth-table-wrap {
    overflow-x: clip;
}

.ftth-table {
    table-layout: fixed;
}

.ftth-table th,
.ftth-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ftth-check-cell {
    width: 48px;
}

.ftth-form-card,
.ftth-device-form {
    display: grid;
    gap: 0;
}

.ftth-location-actions {
    justify-content: flex-start;
    align-items: center;
    padding-top: 0;
}

.task-form-card {
    margin-top: 18px;
}

.task-report-card {
    padding: 18px;
}

.task-level,
.soft-badge,
.notify-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.task-level-danger { background: #fde2e7; color: #c21449; }
.task-level-warn { background: #fff3d6; color: #9a5b00; }
.task-level-info { background: #dff5ff; color: #067091; }
.task-level-muted { background: #edf2f7; color: #435169; }

.soft-badge {
    background: #eef4ff;
    color: #24446f;
}

.notify-badge {
    min-width: 30px;
    background: var(--accent);
    color: #fff;
}

.task-name-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.task-unrated-badge {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(239, 68, 68, .22);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.preserve-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.chip-list,
.file-list,
.task-card-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.task-selected-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.task-image-preview {
    display: grid;
    gap: 7px;
    width: 150px;
    max-width: 100%;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.task-image-preview img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    object-fit: cover;
    background: #eef4fb;
}

.task-image-preview span {
    min-width: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-image-preview.is-local {
    border-style: dashed;
    box-shadow: none;
}

.task-mini-card {
    display: grid;
    gap: 8px;
    min-width: 220px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.month-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.calendar-weekday {
    padding: 10px 12px;
    color: #64748b;
    font-weight: 950;
    text-align: center;
}

.calendar-day {
    min-height: 150px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid #e5edf7;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #f8fbff);
    box-shadow: 0 12px 35px rgba(15, 23, 42, .05);
    min-width: 0;
}

.calendar-day.is-empty {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.calendar-day.is-today {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(216, 39, 111, .09), 0 12px 35px rgba(15, 23, 42, .06);
}

.calendar-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-day-head strong {
    color: var(--ink);
    font-size: 18px;
}

.calendar-day-head span {
    min-width: 24px;
    min-height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #64748b;
    background: #eef4ff;
    font-size: 12px;
    font-weight: 950;
}

.calendar-task-list {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

.calendar-task {
    display: grid;
    gap: 2px;
    padding: 7px 9px;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 900;
    line-height: 1.15;
    box-shadow: inset 4px 0 0 rgba(255,255,255,.55);
}

.calendar-task span,
.calendar-task small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-task small {
    opacity: .78;
    font-size: 11px;
}

.calendar-task.task-level-danger { background: #fde2e7; color: #a30f3c; }
.calendar-task.task-level-warn { background: #fff3d6; color: #8a5100; }
.calendar-task.task-level-info { background: #dff5ff; color: #075f7b; }
.calendar-task.task-level-muted { background: #edf2f7; color: #435169; }

.task-mini-card:hover {
    transform: translateY(-1px);
}

.ticket-timeline {
    display: grid;
    gap: 12px;
}

.small-input {
    max-width: 120px;
}

.alert-card {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff3d6;
    color: #8b5600;
    font-weight: 800;
}

.alert-card.is-error {
    border: 1px solid rgba(220, 38, 38, .18);
    background: #fff1f2;
    color: #b91c1c;
}

.task-description-input {
    min-height: 190px;
    resize: vertical;
}

.task-team-table {
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.task-team-table .modern-table {
    min-width: 0;
}

.task-team-table .modern-table th,
.task-team-table .modern-table td {
    padding: 12px 14px;
}

.task-comment-card {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
}

.task-comment-form {
    display: grid;
    gap: 12px;
}

.task-comment-form textarea {
    min-height: 112px;
    resize: vertical;
}

.task-comment-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-comment-tools .input {
    flex: 1;
}

.map-box {
    min-height: 360px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #eef4fb;
}

.nested-surface {
    box-shadow: none;
    padding: 18px;
}

.choice-grid,
.device-qty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.choice-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    font-weight: 800;
}

.align-end {
    align-self: end;
}

@media (max-width: 900px) {
    .role-builder-grid {
        grid-template-columns: 1fr;
    }

    .role-move-buttons {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .tasks-toolbar,
    .ftth-toolbar,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .month-calendar {
        grid-template-columns: 1fr;
    }

    .calendar-weekday,
    .calendar-day.is-empty {
        display: none;
    }

    .calendar-day {
        min-height: 110px;
    }

    .task-comment-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .task-selected-preview,
    .file-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        width: 100%;
    }

    .task-image-preview {
        width: 100%;
    }
}

@keyframes selectLoadingSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .dashboard-mini-grid {
        grid-template-columns: 1fr;
    }

    .account-user-summary {
        grid-template-columns: none;
    }

    .profile-price-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-price-item {
        grid-template-columns: 1fr;
    }

    .profile-price-control .input {
        min-height: 52px;
    }

    .profit-summary-grid {
        grid-template-columns: 1fr;
    }

    .profit-toolbar {
        grid-template-columns: 1fr;
    }

    .user-extend-summary {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .user-extend-stats {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-item-toolbar,
    .accounts-toolbar,
    .account-company-toolbar,
    .account-item-summary,
    .mobile-notify-grid {
        grid-template-columns: 1fr;
    }

    .segmented-control {
        grid-template-columns: 1fr;
    }

    .profit-hero-card {
        grid-row: auto;
        min-height: 170px;
    }

    .section-headline {
        align-items: flex-start;
        flex-direction: column;
    }

    .profit-table td:not(:first-child),
    .profit-table th:not(:first-child) {
        text-align: inherit;
    }
}

@media (max-width: 820px) {
    .page-surface {
        gap: 14px;
    }

    .page-titlebar {
        padding: 18px;
        border-radius: 18px;
    }

    .page-titlebar h1 {
        font-size: 26px;
        overflow-wrap: anywhere;
    }

    .actions-menu {
        width: 100%;
    }

    .actions-menu > summary,
    .actions-menu-list,
    .toolbar-card > .btn-lite,
    .toolbar-card > .button-row,
    .toolbar-card > .button-row > .btn-lite {
        width: 100%;
    }

    .account-item-summary,
    .metric-grid,
    .dashboard-mini-grid,
    .profit-summary-grid,
    .manager-toggle-grid,
    .manager-price-filter,
    .profiles-toolbar,
    .users-toolbar,
    .tickets-toolbar,
    .ticket-answers-toolbar,
    .store-toolbar,
    .store-model-toolbar,
    .ticket-overview-grid {
        grid-template-columns: 1fr;
    }

    .ticket-answer-description {
        grid-column: 1 / -1;
    }

    .user-extension-details,
    .user-extend-stats {
        grid-template-columns: 1fr;
    }

    .calendar-month-board {
        grid-template-columns: 1fr;
    }

    .calendar-weekday,
    .calendar-day-card.is-empty {
        display: none;
    }

    .online-modal-grid,
    .online-credential-card {
        grid-template-columns: 1fr;
    }

    .online-info-card dl > div {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        overflow: visible;
    }

    .modern-table,
    .modern-table tbody,
    .modern-table tr,
    .modern-table td {
        display: block;
        width: 100%;
    }

    .modern-table thead {
        display: none;
    }

    .modern-table tr {
        margin: 0 0 12px;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
    }

    .modern-table td {
        display: grid;
        grid-template-columns: minmax(96px, .42fr) minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #eef2f7;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .modern-table td:last-child {
        border-bottom: 0;
    }

    .modern-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 11px;
        font-weight: 950;
        text-transform: uppercase;
    }

    .modern-table td[data-label=""] {
        display: block;
    }

    .modern-table td[data-label=""]::before,
    .modern-table td:not([data-label])::before {
        display: none;
    }

    .modern-table td:not([data-label]) {
        display: block;
    }

    .online-users-table {
        table-layout: auto;
    }

    .online-users-table th,
    .online-users-table td,
    .online-users-table th:nth-child(n),
    .online-users-table td:nth-child(n) {
        width: 100%;
        min-width: 0;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .online-user-cell {
        width: 100%;
    }

    .online-user-cell .stacked-cell strong {
        word-break: normal;
        overflow-wrap: anywhere;
    }

.manager-price-table th:first-child,
    .manager-price-table td:first-child {
        position: static;
        min-width: 0;
        box-shadow: none;
    }

    .manager-price-table td:first-child {
        display: block;
        padding-bottom: 12px;
    }

    .manager-price-table td:first-child::before {
        display: block;
        margin-bottom: 5px;
    }

    .compact-price-input {
        width: 100%;
        min-width: 0;
    }

    .pager-links {
        justify-content: center;
    }

    .link-modal .modal-panel {
        width: min(96vw, 560px) !important;
        max-height: 90vh;
        overflow: auto;
    }
}

/* Unified filter submit button alignment across NEW pages. */
.toolbar-card > button[type="submit"].btn-lite,
.toolbar-card > input[type="submit"].btn-lite,
.toolbar-card .toolbar-action > button[type="submit"].btn-lite,
.toolbar-card .toolbar-action > input[type="submit"].btn-lite,
.toolbar-card .button-row > button[type="submit"].btn-lite,
.toolbar-card .button-row > input[type="submit"].btn-lite,
.toolbar-card .filter-apply-btn {
    min-height: 58px !important;
    height: 58px !important;
    min-width: 170px;
    width: auto;
    padding: 0 22px;
    margin-top: 23px !important;
    margin-bottom: 0 !important;
    align-self: start !important;
    justify-self: end;
    line-height: 1;
    white-space: nowrap;
}

.actions-menu-list form {
    margin: 0;
}

.backup-page-modern {
    display: grid;
    gap: 18px;
}

.backup-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.backup-latest-name {
    font-size: clamp(16px, 1.6vw, 24px) !important;
    overflow-wrap: anywhere;
}

.backup-table-card {
    padding: 0;
    overflow: hidden;
}

.backup-modern-table {
    table-layout: fixed;
}

.backup-modern-table th:first-child,
.backup-modern-table td:first-child {
    width: 54px;
}

.backup-file-cell {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: 10px;
}

.backup-file-badge {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    border-radius: 14px;
    color: var(--brand);
    background: #fff1f6;
}

.backup-file-name,
.selected-backup-name {
    min-width: 0;
    color: #0f172a;
    font-weight: 950;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.backup-modal-panel {
    width: min(560px, 96vw);
}

.danger-note {
    margin: 0 0 12px;
    color: #b42318;
    font-weight: 850;
}

.muted-note {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.mini-icon.blue {
    color: #2563eb;
    background: #dbeafe;
}

.backup-settings-form-card {
    padding: 24px;
}

.backup-settings-toggle-line {
    min-height: 58px;
    border-radius: 14px;
    border-color: #d8e2f0;
    font-weight: 950;
}

.setting-page {
    display: grid;
    gap: 18px;
}

.setting-form-card {
    padding: 24px;
}

.setting-form-card .form-section h2 {
    color: var(--text);
    font-weight: 950;
}

.setting-general-textarea {
    min-height: 132px;
    padding-top: 12px;
    resize: vertical;
}

.setting-general-map {
    margin-top: 12px;
}

.setting-general-map-wrap {
    position: relative;
}

.setting-general-map-tools {
    position: absolute;
    z-index: 2;
    top: 24px;
    inset-inline-end: 14px;
    display: grid;
    gap: 8px;
}

.setting-general-map-tools .icon-action {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(15, 23, 42, .12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
}

.server-power-table .device-name i {
    color: var(--brand);
    margin-inline-end: 6px;
}

.tool-remote-page {
    display: grid;
    gap: 18px;
}

.tool-remote-toolbar {
    grid-template-columns: minmax(360px, 1fr) 220px minmax(150px, 190px) minmax(170px, auto);
    align-items: end;
}

.tool-remote-toolbar > .field:first-of-type {
    grid-column: 1;
}

.tool-remote-toggle {
    grid-column: 2;
    min-width: 0;
}

#remotePortField {
    grid-column: 3;
}

.tool-remote-actions {
    grid-column: 4;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 170px;
}

.tool-remote-actions .btn-lite {
    flex: 0 0 170px;
    min-height: 58px;
    height: 58px;
    white-space: nowrap;
}

.toggle-card {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #d8e2f0;
    border-radius: 16px;
    background: #fff;
    font-weight: 950;
}

.toggle-card input[type="checkbox"] {
    inline-size: 50px;
    block-size: 30px;
    appearance: none;
    position: relative;
    flex: 0 0 50px;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background .18s ease;
}

.toggle-card input[type="checkbox"]::after {
    content: "";
    position: absolute;
    inset-block-start: 3px;
    inset-inline-start: 3px;
    inline-size: 24px;
    block-size: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .22);
    transition: inset-inline-start .18s ease, inset-inline-end .18s ease;
}

.toggle-card input[type="checkbox"]:checked {
    background: var(--brand);
}

.toggle-card input[type="checkbox"]:checked::after {
    inset-inline-start: 23px;
}

[dir="rtl"] .toggle-card input[type="checkbox"]:checked::after {
    inset-inline-start: 3px;
    inset-inline-end: 23px;
}

.tool-remote-url-row {
    display: grid;
    grid-template-columns: minmax(0, 130px) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    background: #fbfdff;
}

.tool-remote-url-row span {
    color: #64748b;
    font-size: 12px;
    font-weight: 950;
}

.tool-remote-url-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.remote-fallback-toast {
    position: fixed;
    z-index: 9999;
    inset-block-start: 22px;
    inset-inline-end: 22px;
    max-width: min(430px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    color: #064e3b;
    background: #ecfdf5;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .18);
    font-weight: 900;
}

.remote-fallback-toast.error {
    color: #991b1b;
    border-color: #fecaca;
    background: #fff1f2;
}

.departments-page {
    display: grid;
    gap: 18px;
}

.departments-toolbar {
    grid-template-columns: minmax(240px, 1fr) minmax(120px, .32fr) auto;
}

.department-name-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.department-name-cell i {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 12px;
    color: var(--brand);
    background: #fff1f6;
}

.department-form {
    max-width: 860px;
}

.command-output {
    max-height: 280px;
    overflow: auto;
    margin: 0;
    padding: 15px;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    color: #0f172a;
    background: #f8fafc;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.process-monitor-page {
    display: grid;
    gap: 18px;
}

.process-last-updated {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.process-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.process-summary-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.process-summary-card span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.process-summary-card span i {
    color: var(--brand);
}

.process-summary-card strong {
    color: #172554;
    font-size: 26px;
    line-height: 1.1;
}

.process-summary-card small {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.process-card {
    min-width: 0;
}

.process-table {
    min-width: 960px;
}

.process-table td small {
    display: block;
    max-width: 280px;
    margin-top: 4px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.process-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.process-actions .btn-lite {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.process-protected {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

.process-command-cell {
    max-width: 360px;
    overflow: hidden;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.call-number-stack {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.call-number-main {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 900;
}

.call-number-sub {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    direction: ltr;
    text-overflow: ellipsis;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.call-bar-label {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.call-bar-label span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.call-bar-label small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
    direction: ltr;
    text-overflow: ellipsis;
    unicode-bidi: isolate;
    white-space: nowrap;
}

@media (max-width: 820px) {
    .process-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .process-last-updated {
        display: none;
    }

    .traffic-toolbar,
    .traffic-summary,
    .traffic-agent-summary {
        grid-template-columns: 1fr;
    }

    .traffic-progress-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .traffic-toggle-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .traffic-toggle-card {
        width: 100%;
        min-width: 0;
    }

    .traffic-results-table {
        table-layout: auto;
    }

    .speed-main,
    .speed-grid,
    .speed-info {
        grid-template-columns: 1fr;
    }

    .speed-current > strong {
        font-size: clamp(42px, 15vw, 64px);
    }

    .speed-progress-row {
        grid-template-columns: 1fr;
    }

    .toolbar-card > button[type="submit"].btn-lite,
    .toolbar-card > input[type="submit"].btn-lite,
    .toolbar-card .toolbar-action > button[type="submit"].btn-lite,
    .toolbar-card .toolbar-action > input[type="submit"].btn-lite,
    .toolbar-card .button-row > button[type="submit"].btn-lite,
    .toolbar-card .button-row > input[type="submit"].btn-lite,
    .toolbar-card .filter-apply-btn {
        width: 100%;
        min-width: 0;
        margin-top: 0 !important;
        justify-self: stretch;
    }

    .backup-metrics {
        grid-template-columns: 1fr;
    }

    .backup-modern-table {
        table-layout: auto;
    }

    .departments-toolbar,
    .department-form .form-grid,
    .tool-remote-toolbar,
    .tool-remote-url-row {
        grid-template-columns: 1fr;
    }

    .tool-remote-toolbar > .field:first-of-type,
    .tool-remote-toggle,
    #remotePortField,
    .tool-remote-actions {
        grid-column: auto;
    }

    .span-2 {
        grid-column: auto;
    }

    .tool-remote-url-row .btn-lite {
        width: 100%;
        justify-content: center;
    }

    .tool-remote-actions {
        justify-content: stretch;
        flex-wrap: wrap;
        min-width: 0;
    }

    .tool-remote-actions .btn-lite {
        flex: 1 1 160px;
    }
}

@media (max-width: 768px) {
    .tickets-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: clip !important;
    }

    .tickets-table,
    .tickets-table tbody,
    .tickets-table tr,
    .tickets-table td {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .tickets-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        overflow: hidden;
    }

    .tickets-table td {
        display: grid;
        grid-template-columns: minmax(82px, .36fr) minmax(0, 1fr);
        column-gap: 10px;
        overflow: hidden;
    }

    .tickets-table .ticket-id-cell {
        white-space: nowrap !important;
    }

    .tickets-table .ticket-number-link {
        justify-self: start;
        max-width: 100%;
    }
}
