body.platform-body {
    margin: 0;
    background: #edf2f8;
    color: #111827;
    min-height: 100vh;
    color-scheme: light;
}

.guest-main {
    min-height: 100vh;
}

.platform-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 252px 1fr;
}

.platform-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #f9fafb;
    padding: 22px 18px 18px;
    display: flex;
    flex-direction: column;
    box-shadow: inset -1px 0 0 rgba(148, 163, 184, .08);
}

.platform-brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.platform-brand-link {
    color: inherit;
    text-decoration: none;
}

.platform-brand-link:hover {
    color: inherit;
    text-decoration: none;
}

.platform-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}

.platform-brand {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.platform-subbrand {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.platform-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.platform-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.platform-nav a.active,
.platform-nav a:hover {
    background: #1e293b;
    color: #fff;
}

.platform-sidebar-footer {
    border-top: 1px solid rgba(148, 163, 184, .18);
    padding-top: 14px;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-user-role {
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
}

.platform-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, .08), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
}

.platform-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid #dde5ef;
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.platform-topbar-main {
    flex: 1 1 auto;
    min-width: 0;
}

.platform-topbar-eyebrow {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
}

.platform-topbar-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}

.platform-history-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    min-width: max-content;
    width: max-content;
}

.platform-history-tabs-shell {
    position: relative;
    max-width: min(100%, 980px);
}

.platform-history-tabs-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, .12) transparent;
}

.platform-history-tabs-wrap::-webkit-scrollbar {
    height: 4px;
}

.platform-history-tabs-wrap::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .12);
    border-radius: 999px;
    transition: background-color .18s ease;
}

.platform-history-tabs-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.platform-history-tabs-wrap:hover {
    scrollbar-color: rgba(148, 163, 184, .3) transparent;
}

.platform-history-tabs-wrap:hover::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .3);
}

.platform-history-tabs-shell::before,
.platform-history-tabs-shell::after {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 2px;
    width: 36px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
    z-index: 1;
}

.platform-history-tabs-shell::before {
    left: 0;
    background: linear-gradient(90deg, rgba(248, 250, 252, .96) 0%, rgba(248, 250, 252, 0) 100%);
}

.platform-history-tabs-shell::after {
    right: 0;
    background: linear-gradient(270deg, rgba(248, 250, 252, .96) 0%, rgba(248, 250, 252, 0) 100%);
}

.platform-history-tabs-shell.show-left-fade::before,
.platform-history-tabs-shell.show-right-fade::after {
    opacity: 1;
}

.platform-history-scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-35%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: #475569;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    padding: 0;
}

.platform-history-scroll-button:hover {
    background: #fff;
    color: #0f172a;
}

.platform-history-scroll-button.is-left {
    left: 4px;
}

.platform-history-scroll-button.is-right {
    right: 4px;
}

.platform-history-scroll-button span {
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

.platform-history-tab {
    flex: 0 0 auto;
    min-height: 36px;
    white-space: nowrap;
}

.platform-history-tab-link {
    text-decoration: none;
    color: #334155 !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.platform-history-tab-link:visited,
.platform-history-tab-link:hover,
.platform-history-tab-link:focus,
.platform-history-tab-link:active {
    color: #334155 !important;
    text-decoration: none;
}

.platform-history-tab.active {
    background: #e2e8f0;
    border-color: #94a3b8;
    box-shadow: inset 0 0 0 1px rgba(51, 65, 85, .14);
}

.platform-history-tab.active .platform-history-tab-link,
.platform-history-tab.active .platform-history-tab-link:visited,
.platform-history-tab.active .platform-history-tab-link:hover,
.platform-history-tab.active .platform-history-tab-link:focus,
.platform-history-tab.active .platform-history-tab-link:active {
    color: #1e293b !important;
}

.platform-history-tab-close {
    margin-left: 4px;
}

.platform-history-tab-close img {
    width: 13px;
    height: 13px;
    display: block;
}

.platform-topbar-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.platform-topbar-status-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.platform-trace {
    font-size: 12px;
    color: #475569;
    padding: 6px 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.global-remote-alert-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fff7f7;
    color: #991b1b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.global-remote-alert-trigger strong {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
}

.global-remote-alert-popover {
    position: fixed;
    top: 76px;
    right: 28px;
    z-index: 1400;
    width: min(420px, calc(100vw - 32px));
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
    padding: 16px;
}

.global-remote-alert-popover[hidden] {
    display: none !important;
}

.global-remote-alert-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.global-remote-alert-kicker {
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 4px;
}

.global-remote-alert-head h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
}

.global-remote-alert-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.global-remote-alert-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.global-remote-alert-item {
    padding: 10px 12px;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    background: #fffafa;
}

.global-remote-alert-item div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.global-remote-alert-item strong {
    color: #0f172a;
    font-size: 14px;
}

.global-remote-alert-item span {
    flex: 0 0 auto;
    font-size: 12px;
    color: #b45309;
    font-weight: 700;
}

.global-remote-alert-item p,
.global-remote-alert-more {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 12px;
}

.global-remote-alert-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.platform-content {
    padding: 28px;
}

.content-card {
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
    border: 1px solid #e6ebf2;
}

.content-card-elevated {
    border-radius: 14px;
    box-shadow:
        0 18px 44px rgba(15, 23, 42, .08),
        0 2px 8px rgba(15, 23, 42, .03);
}

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

.section-note {
    margin-bottom: 16px;
    font-size: 13px;
    color: #64748b;
}

.permission-fixed-region {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #d8e1ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
}

.role-permission-tip {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #dbe5f0;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    line-height: 1.6;
}

.role-permission-tip.is-admin {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.permission-panel {
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
    padding: 18px;
}

.permission-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.permission-panel-head h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.permission-panel-head p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

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

.permission-menu-section {
    margin-bottom: 16px;
}

.permission-menu-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
    padding: 4px 0 0;
}

.permission-menu-list .form-check {
    margin-bottom: 0;
}

.permission-section {
    min-width: 0;
}

.permission-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.permission-section-note {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.permission-region-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.permission-region-card {
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fff;
    padding: 14px;
    transition: opacity .18s ease, border-color .18s ease, background-color .18s ease;
}

.permission-region-card.is-disabled {
    opacity: .56;
    background: #f8fafc;
}

.permission-region-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.permission-region-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0ecff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.permission-region-meta {
    font-size: 12px;
    color: #64748b;
}

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

.permission-check-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    color: #0f172a;
}

.permission-check-item span {
    word-break: break-word;
}

.account-stats {
    margin-bottom: 24px;
}

.dashboard-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.stats-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.stats-header-stack {
    align-items: flex-start;
    flex-wrap: wrap;
}

.stats-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.stats-subtitle {
    font-size: 12px;
    color: #64748b;
}

.stats-market-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.period-filter-form {
    margin-left: auto;
    max-width: 100%;
}

.period-filter-fields {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
}

.period-filter-fields .form-control {
    flex: 0 0 145px;
    min-width: 145px;
}

.period-filter-fields .btn {
    flex: 0 0 auto;
}

.period-filter-separator {
    flex: 0 0 auto;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.period-market-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.period-market-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.period-market-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    min-width: 0;
    white-space: nowrap;
}

.period-market-head h3 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.period-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.period-metric-card {
    border: 1px solid #e5edf6;
    border-radius: 10px;
    background: #fff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.period-metric-card span {
    font-size: 12px;
    color: #64748b;
}

.period-metric-card strong {
    font-size: 22px;
    line-height: 1;
    color: #0f172a;
}

.stats-market-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.stats-market-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    min-width: 0;
    white-space: nowrap;
}

.stats-market-head h3 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.stats-market-total {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

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

.stats-chip {
    border: 1px solid #e5edf6;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 78px;
}

.stats-chip span {
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.stats-chip strong {
    font-size: 22px;
    line-height: 1;
    color: #0f172a;
}

.stats-project-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8eef5;
}

.stats-project-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}

.stats-project-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-project-item {
    min-height: 40px;
    border: 1px solid #e5edf6;
    border-radius: 8px;
    background: #fff;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stats-project-item span {
    font-size: 13px;
    color: #475569;
}

.stats-project-item strong {
    font-size: 15px;
    color: #0f172a;
}

.stats-project-empty {
    font-size: 12px;
    color: #94a3b8;
}

.toolbar-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.toolbar-form-wide {
    flex: 1;
}

.toolbar-form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

.toolbar-form-row-search {
    width: 100%;
}

.toolbar-form-row-filters {
    width: 100%;
}

.toolbar-form .form-control,
.toolbar-form .form-select {
    min-width: 128px;
}

.toolbar-search-control {
    min-width: 0 !important;
    flex: 1 1 0;
}

.toolbar-filter-control {
    min-width: 128px !important;
    flex: 0 1 150px;
}

.toolbar-page-size-control {
    flex-basis: 120px;
    min-width: 120px !important;
}

.toolbar-filter-button {
    flex: 0 0 auto;
}

.account-filter-form .toolbar-form-row-search {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) auto;
    align-items: center;
}

.account-filter-form .toolbar-form-row-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(118px, 1fr)) auto auto;
    align-items: center;
}

.account-filter-form .toolbar-search-control,
.account-filter-form .toolbar-filter-control {
    width: 100%;
    min-width: 0 !important;
    flex: initial;
}

.account-filter-form .account-keyword-search-control,
.account-filter-form .account-domain-search-control,
.account-filter-form .account-alias-search-control {
    max-width: none;
}

.account-filter-form .toolbar-search-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.remote-machine-filter-form .toolbar-form-row-search {
    display: grid;
    grid-template-columns: minmax(220px, 1.15fr) minmax(140px, 0.9fr) minmax(120px, 0.8fr) minmax(140px, 0.9fr) auto;
    align-items: center;
}

.remote-machine-filter-form .toolbar-search-control,
.remote-machine-filter-form .toolbar-filter-control {
    width: 100%;
    min-width: 0 !important;
    flex: initial;
}

.remote-machine-filter-form .remote-machine-keyword-search-control {
    max-width: none;
}

.phone-filter-form {
    gap: 12px;
}

.phone-filter-grid {
    display: grid;
    align-items: center;
    gap: 10px;
}

.phone-filter-form .phone-filter-grid-primary {
    grid-template-columns: minmax(180px, 220px) repeat(3, minmax(136px, 1fr));
}

.phone-filter-form .phone-filter-grid-secondary {
    grid-template-columns: repeat(3, minmax(136px, 1fr)) auto;
}

.phone-filter-form .toolbar-search-control,
.phone-filter-form .toolbar-filter-control {
    width: 100%;
    min-width: 0 !important;
    flex: initial;
}

.phone-filter-form .phone-keyword-search-control {
    max-width: 220px;
    text-align: center;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.phone-filter-form .phone-keyword-search-control::placeholder {
    letter-spacing: 0;
    color: #94a3b8;
}

.phone-filter-form .toolbar-filter-control,
.phone-filter-form .toolbar-filter-button {
    min-height: 38px;
}

.phone-filter-form .toolbar-filter-button {
    padding-left: 16px;
    padding-right: 16px;
    white-space: nowrap;
}

.phone-filter-form .phone-filter-submit-wrap {
    display: flex;
    justify-content: flex-start;
}

.toolbar-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    padding-top: 2px;
}

.bulk-action-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.bulk-action-title {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.bulk-action-select {
    width: 160px;
    min-width: 160px;
}

.toolbar-filter-tag-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
}

.toolbar-filter-tag-title {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.toolbar-filter-empty {
    color: #94a3b8;
    font-size: 13px;
    line-height: 30px;
}

.filter-chip-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px 6px;
    align-items: center;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 8px 4px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.2;
}

.filter-chip-close {
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
}

.filter-chip-close:hover {
    background: transparent;
    opacity: .78;
}

.filter-chip-close img {
    width: 12px;
    height: 12px;
    display: block;
    object-fit: contain;
}

.toolbar-form-user-flat {
    gap: 0;
}

.toolbar-form-row-user-flat {
    display: grid;
    grid-template-columns: minmax(260px, 2.2fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.pagination-bar {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pagination {
    margin: 0;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-custom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.pagination > li > a,
.pagination > li > span {
    min-width: 38px;
    min-height: 38px;
    border-radius: 8px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #d7dee8;
    color: #334155;
}

.pagination > .active > a,
.pagination > .active > span {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.pagination > li > a:hover,
.pagination > li > span:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.pagination-summary {
    margin: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pager-total-count {
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.pager-size-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.pager-size-select {
    width: 128px;
    min-width: 128px;
}

.toolbar-search-control-user {
    width: 100%;
}

.toolbar-form .form-control,
.toolbar-form .form-select,
.form-card .form-control,
.form-card .form-select {
    min-height: 42px;
    border-radius: 8px;
    border-color: #d7dee8;
    box-shadow: none;
}

.toolbar-form .form-control:focus,
.toolbar-form .form-select:focus,
.form-card .form-control:focus,
.form-card .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.date-text-input {
    font-variant-numeric: tabular-nums;
    padding-right: 44px;
}

.date-picker-field {
    position: relative;
}

.device-select-row {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 310px;
}

.device-select-row .form-select {
    min-width: 0;
    flex: 0 1 268px;
    max-width: calc(100% - 34px);
}

.device-refresh-button {
    flex: 0 0 30px;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.device-refresh-button img {
    width: 16px;
    height: 16px;
    display: block;
}

.device-refresh-button.is-loading img {
    animation: device-refresh-spin .75s linear infinite;
}

@keyframes device-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}

.inline-select-form {
    position: relative;
    display: inline-block;
    width: 132px;
    max-width: 132px;
}

.inline-select-form.is-saving select {
    opacity: 0.72;
}

.inline-select-form .form-select {
    width: 132px;
    min-width: 0;
    max-width: 132px;
    padding-right: 28px;
}

.inline-select-system,
.inline-select-system .form-select {
    width: 118px;
    max-width: 118px;
}

.inline-select-owner,
.inline-select-owner .form-select {
    width: 150px;
    max-width: 150px;
}

.inline-save-status {
    position: absolute;
    left: 0;
    top: calc(100% + 2px);
    color: #64748b;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

.new-package-apple-cell {
    min-width: 190px;
    white-space: nowrap;
    line-height: 1.55;
}

.new-package-login-link {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.new-package-date-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 88px;
}

.new-package-date-value {
    white-space: nowrap;
}

.new-package-date-flag-row {
    line-height: 1;
}

.new-package-date-flag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.new-package-date-flag.is-online {
    background: #dcfce7;
    color: #166534;
}

.new-package-date-flag.is-offline {
    background: #fee2e2;
    color: #b91c1c;
}

.remote-machine-code-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.remote-machine-code-tag.is-active {
    background: #dcfce7;
    color: #166534;
}

.remote-machine-code-tag.is-reclaimed {
    background: #fee2e2;
    color: #b91c1c;
}

.new-package-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.new-package-table {
    min-width: 1280px;
}

.new-package-actions-cell {
    white-space: nowrap;
    min-width: 82px;
}

.new-package-actions-cell a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin: 0 3px;
}

.new-package-close-button {
    width: 28px;
    height: 28px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: #fff7f7;
}

.new-package-close-button:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.new-package-close-button img {
    width: 14px;
    height: 14px;
    display: block;
}

.date-picker-trigger {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.date-picker-trigger:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.date-picker-trigger svg {
    width: 16px;
    height: 16px;
    display: block;
}

.date-picker-popover {
    position: fixed;
    z-index: 2200;
    width: 308px;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 48px rgba(15, 23, 42, .16);
    padding: 14px;
    backdrop-filter: blur(12px);
}

.date-picker-popover[hidden] {
    display: none !important;
}

.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.date-picker-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.date-picker-nav {
    width: 32px;
    height: 32px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.date-picker-nav:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.date-picker-weekdays,
.date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.date-picker-weekdays {
    margin-bottom: 8px;
}

.date-picker-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
}

.date-picker-day {
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.date-picker-day:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.date-picker-day-muted {
    color: #cbd5e1;
}

.date-picker-day-active {
    background: #2563eb;
    color: #fff;
}

.date-picker-time {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.date-picker-time input {
    min-height: 38px;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    padding: 0 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.date-picker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.date-picker-format-hint {
    font-size: 11px;
    color: #94a3b8;
}

.date-picker-actions {
    display: flex;
    gap: 8px;
}

.date-picker-btn {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #dbe5f0;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.date-picker-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.date-picker-btn-primary {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.date-picker-btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
    color: #ffffff;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

.toolbar-search-actions {
    flex: 0 0 auto;
    align-items: center;
    white-space: nowrap;
}

.toolbar-search-actions .btn {
    white-space: nowrap;
}

.form-card .row {
    margin-bottom: 6px;
}

.form-card textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.form-section + .form-section {
    margin-top: 26px;
}

.import-result {
    margin-top: 24px;
}

.import-result-box {
    margin: 8px 0 16px;
    padding: 12px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    white-space: pre-wrap;
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf1f5;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-section-title-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-section-title-action {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
}

.form-section-title-action .btn {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 4px 12px;
}

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

.dashboard-panel {
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
    border: 1px solid #e6ebf2;
}

.dashboard-kicker {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    margin-bottom: 10px;
}

.dashboard-panel h2 {
    font-size: 22px;
    margin: 0 0 8px;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-alert-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.dashboard-trace-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    word-break: break-all;
}

.alert-panel {
    border-width: 1px;
}

.alert-panel-warning {
    border-color: #facc15;
    background: linear-gradient(180deg, #fffdf2 0%, #ffffff 100%);
}

.alert-panel-danger {
    border-color: #fca5a5;
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
}

.alert-panel-info {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #f6fbff 0%, #ffffff 100%);
}

.alert-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.alert-panel-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.alert-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-table-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
    min-height: 372px;
}

.alert-table.is-scrollable,
.payment-failed-grid.is-scrollable {
    max-height: 372px;
    overflow-y: auto;
    padding-right: 6px;
}

.alert-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid #edf1f5;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.alert-row:hover {
    border-color: #f6c48e;
    box-shadow: 0 10px 20px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}

.alert-row-pending-payment {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 8px;
    align-items: start;
}

.alert-row-pending-payment .alert-primary {
    min-width: 0;
    margin-bottom: 0;
}

.alert-row-pending-payment .alert-meta {
    min-width: 0;
}

.alert-row-pending-payment .alert-secondary {
    grid-column: 1 / -1;
}

.alert-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.alert-link {
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
}

.alert-link:hover {
    color: #1d4ed8;
}

.alert-market-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
}

.alert-secondary,
.payment-card-meta {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.alert-meta {
    min-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #64748b;
}

.alert-meta strong {
    color: #334155;
    font-size: 12px;
}

.alert-inline-form {
    margin: 4px 0 0;
}

.alert-inline-form .btn {
    min-height: 28px;
    padding: 3px 10px;
    font-size: 12px;
}

.payment-failed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.payment-failed-grid-two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    min-height: 372px;
}

.remote-machine-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.payment-card {
    border: 1px solid #f1d0d0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .96);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.payment-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
    border-color: #f8b4b4;
}

.remote-machine-card {
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: rgba(255, 255, 255, .96);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.remote-machine-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
    border-color: #93c5fd;
}

.remote-machine-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.remote-machine-code {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.remote-machine-account {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.payment-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

.payment-card-title {
    font-size: 16px;
}

.payment-card-company {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.retry-status {
    min-height: 42px;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.retry-status-waiting {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.retry-status-ready {
    background: #ecfdf5;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .28), transparent 24%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, .18), transparent 22%),
        linear-gradient(135deg, #0f172a 0%, #111827 55%, #1e293b 100%);
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, .96);
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 28px 56px rgba(15, 23, 42, .24);
    border: 1px solid rgba(255, 255, 255, .35);
}

.login-branding {
    margin-bottom: 24px;
}

.login-kicker {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #2563eb;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-branding h1 {
    font-size: 28px;
    margin: 0 0 8px;
}

.login-branding p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

.login-captcha-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #334155;
}

.account-table {
    font-size: 14px;
    min-width: 1320px;
}

.table-scroll {
    overflow-x: auto;
    padding-bottom: 6px;
}

.data-table {
    margin-bottom: 0;
}

.data-table a,
.grid-view a {
    color: #0f172a;
    text-decoration: none;
}

.data-table a:hover,
.grid-view a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.data-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom-width: 1px;
    padding-top: 13px;
    padding-bottom: 13px;
    text-align: center;
}

.data-table thead th a {
    color: #475569;
    text-decoration: none;
    font-weight: 700;
}

.data-table thead th a:hover {
    color: #0f172a;
}

.data-table tbody td {
    vertical-align: middle;
    border-color: #edf1f5;
    padding-top: 14px;
    padding-bottom: 14px;
}

.data-table tbody tr:hover {
    background: #fbfdff;
}

.account-table .sticky-action-column {
    position: sticky;
    right: 0;
    z-index: 5;
    min-width: 260px;
    background: #ffffff;
    box-shadow: -10px 0 16px rgba(15, 23, 42, .06);
}

.account-table thead .sticky-action-column {
    z-index: 7;
    background: #f8fafc;
}

.account-table tbody tr:hover .sticky-action-column {
    background: #fbfdff;
}

body.account-modal-open .account-table .sticky-action-column,
.account-table.account-table-modal-open .sticky-action-column {
    visibility: hidden;
    pointer-events: none;
}

.cell-primary {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
}

.cell-secondary {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.vm-normal-text,
.copy-text.vm-normal-text {
    color: #15803d;
}

.vm-deleted-text,
.copy-text.vm-deleted-text {
    color: #b91c1c;
}

.outsourced-cell {
    line-height: 1.55;
}

.outsourced-inline-label {
    display: inline;
    margin-right: 2px;
    white-space: nowrap;
}

.outsourced-inline-value {
    display: inline;
    word-break: break-word;
}

.outsourced-actions-cell {
    min-width: 92px;
}

.outsourced-action-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.outsourced-action-form {
    display: block;
    width: 100%;
    margin: 0;
}

.outsourced-action-stack .table-action-link {
    width: 100%;
    margin-right: 0;
}

.outsourced-mail-alert-row > td {
    background: #f8fbff;
}

.outsourced-mail-alert-cell {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-left: 4px solid #dc2626;
    border-radius: 6px;
}

.outsourced-mail-alert-cell .cell-kicker,
.outsourced-mail-alert-cell .cell-primary {
    font-weight: 800;
}

.outsourced-mail-alert-cell-danger {
    background: #fff1f2;
    border-left-color: #dc2626;
    color: #991b1b;
}

.outsourced-mail-alert-cell-danger .cell-kicker,
.outsourced-mail-alert-cell-danger .cell-primary {
    color: #991b1b;
}

.outsourced-mail-alert-cell-success {
    background: #ecfdf5;
    border-left-color: #16a34a;
    color: #166534;
}

.outsourced-mail-alert-cell-success .cell-kicker,
.outsourced-mail-alert-cell-success .cell-primary {
    color: #166534;
}

.outsourced-mail-alert-cell-warning {
    background: #fffbeb;
    border-left-color: #d97706;
    color: #92400e;
}

.outsourced-mail-alert-cell-warning .cell-kicker,
.outsourced-mail-alert-cell-warning .cell-primary {
    color: #92400e;
}

.outsourced-mail-handle-button {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.remote-countdown-normal {
    color: #0f172a;
}

.remote-countdown-warning {
    color: #a16207;
}

.remote-countdown-danger {
    color: #b91c1c;
}

.cell-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}

.cell-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-top: 8px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.copy-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}

.cell-row-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.account-alias-line {
    align-items: baseline;
}

.account-alias-text,
.copy-text.account-alias-text {
    color: #2563eb;
}

.account-domain-line {
    margin-top: 8px;
    align-items: baseline;
}

.copy-text {
    display: inline-flex;
    max-width: none !important;
    min-width: max-content;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap;
    vertical-align: bottom;
    cursor: copy;
    flex: 0 0 auto;
}

.phone-line .status-badge {
    margin-right: 0;
    margin-bottom: 0;
    flex-shrink: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.status-inline-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    white-space: nowrap;
}

.status-cell-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.status-inline-row .status-badge {
    margin-right: 0;
    margin-bottom: 0;
    flex-shrink: 0;
}

.assignment-status-usage {
    font-size: 12px;
    line-height: 1.35;
    color: #64748b;
    white-space: nowrap;
}

.status-inline-row-single {
    justify-content: center;
}

.status-badge-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-badge-neutral {
    background: #f8fafc;
    color: #475569;
}

.status-badge-success {
    background: #ecfdf5;
    color: #15803d;
}

.status-badge-purple {
    background: #f5f3ff;
    color: #6d28d9;
}

.status-badge-warning {
    background: #fef9c3;
    color: #a16207;
}

.status-badge-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.time-text {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    margin-right: 6px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #dbe5f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.table-action-link:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.table-actions-nowrap {
    white-space: nowrap;
}

.table-action-button {
    appearance: none;
    font-family: inherit;
}

.status-badge-button {
    border: 0;
    cursor: pointer;
}

.status-badge-button:hover {
    filter: brightness(.97);
}

.table-action-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    gap: 6px;
    min-width: 260px;
}

.table-action-cell {
    min-width: 0;
}

.table-action-group .table-action-link {
    margin-right: 0;
    width: 100%;
    min-height: 30px;
    white-space: nowrap;
}

.table-action-placeholder {
    display: block;
    min-height: 30px;
}

.quick-edit-modal[hidden] {
    display: none !important;
}

.quick-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: none;
}

.quick-edit-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.quick-edit-dialog {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #dbe5f0;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .22);
    padding: 22px;
    z-index: 2;
    pointer-events: auto;
}

.quick-edit-dialog textarea[data-assign-preview] {
    max-height: 42vh;
    overflow-y: auto;
    resize: vertical;
}

.outsource-info-dialog {
    width: min(920px, calc(100vw - 32px));
}

.outsource-info-modal-layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 16px;
}

.outsource-info-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.outsource-info-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.outsource-info-tab.is-active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.outsource-info-tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #ef4444;
    font-size: 16px;
    line-height: 1;
}

.outsource-info-add-language {
    flex: 0 0 auto;
    white-space: nowrap;
}

.outsource-info-panel {
    display: none;
}

.outsource-info-panel.is-active {
    display: block;
}

.outsource-info-modal-form textarea.form-control {
    resize: vertical;
}

.quick-edit-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.quick-edit-close:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.quick-edit-kicker {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #2563eb;
    margin-bottom: 8px;
}

.quick-edit-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.quick-edit-note {
    margin: 8px 0 18px;
    font-size: 13px;
    color: #64748b;
}

.quick-edit-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quick-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quick-edit-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-edit-item-full {
    grid-column: 1 / -1;
}

.pending-outsource-preview-text {
    padding: 14px 16px;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
}

.quick-edit-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.account-swap-card,
.account-swap-selected {
    padding: 12px 14px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    line-height: 1.6;
}

.account-swap-card-title {
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.account-swap-card-line {
    word-break: break-word;
}

.account-swap-combobox {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.account-swap-combobox:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.account-swap-combobox .form-control {
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    padding-right: 42px;
    background: transparent;
    font-size: 13px;
}

.account-swap-combobox .form-control:focus {
    border: 0;
    box-shadow: none;
    outline: 0;
}

.account-swap-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    cursor: pointer;
}

.account-swap-toggle::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
}

.account-swap-toggle:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.account-swap-menu[hidden] {
    display: none;
}

.account-swap-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}

.account-swap-menu-option {
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    text-align: left;
    cursor: pointer;
}

.account-swap-menu-option:hover,
.account-swap-menu-option.is-selected {
    background: #eff6ff;
}

.account-swap-option-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.account-swap-option-title {
    min-width: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-swap-option-badge {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 11px;
    font-weight: 700;
}

.account-swap-option-desc,
.account-swap-option-meta {
    display: block;
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.account-swap-option-meta {
    color: #1d4ed8;
    font-weight: 600;
}

.account-swap-option-desc {
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-swap-empty {
    padding: 12px;
    border-radius: 7px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
}

.account-swap-empty.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.account-swap-result-dialog {
    width: min(1040px, calc(100vw - 32px));
}

.account-swap-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-swap-result-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #f8fafc;
}

.account-swap-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.account-swap-result-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.account-swap-result-title {
    margin-top: 2px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    word-break: break-word;
}

.account-swap-copy-company {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

.account-swap-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: #475569;
    font-size: 12px;
}

.account-swap-result-meta span {
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    overflow-wrap: anywhere;
}

.account-swap-company-info {
    min-height: 220px;
    resize: vertical;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.quick-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.copy-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: rgba(15, 23, 42, .94);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
    z-index: 2000;
    max-width: min(70vw, 360px);
    word-break: break-all;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

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

.detail-grid div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e6ebf2;
}

.detail-grid .detail-item-wide {
    grid-column: 1 / -1;
}

.detail-grid strong {
    font-size: 13px;
    color: #6b7280;
}

.detail-grid span {
    white-space: pre-wrap;
    word-break: break-word;
}

.trace-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trace-row {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.trace-time {
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.trace-row pre {
    margin: 0;
    padding: 14px;
    background: #111827;
    color: #f9fafb;
    white-space: pre-wrap;
    word-break: break-word;
}

.grid-view th {
    white-space: nowrap;
}

.error-summary {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.btn {
    border-radius: 8px;
    min-height: 40px;
    font-weight: 500;
}

body.modal-open {
    overflow: hidden;
}

.btn-dark {
    background: #0f172a;
    border-color: #0f172a;
}

.btn-outline-secondary {
    color: #334155;
    border-color: #cbd5e1;
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

.stack-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.metric-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.metric-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.metric-footnote {
    font-size: 13px;
    color: #94a3b8;
}

@media (max-width: 1280px) {
    .period-market-grid,
    .stats-market-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .platform-shell {
        grid-template-columns: 1fr;
    }

    .platform-sidebar {
        padding-bottom: 14px;
    }

    .dashboard-grid,
    .detail-grid,
    .period-market-grid,
    .stats-market-grid,
    .stats-chip-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-alert-grid {
        grid-template-columns: 1fr;
    }

    .alert-table-two-column,
    .payment-failed-grid-two-column {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .alert-row,
    .alert-panel-head,
    .payment-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-row-pending-payment {
        grid-template-columns: 1fr;
    }

    .alert-row-pending-payment .alert-secondary {
        grid-column: auto;
    }

    .alert-meta {
        min-width: 0;
    }

    .platform-content,
    .platform-topbar {
        padding-left: 18px;
        padding-right: 18px;
    }

    .global-remote-alert-popover {
        top: 88px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    .toolbar-form-row {
        flex-wrap: wrap;
    }

    .account-filter-form .toolbar-form-row-search,
    .account-filter-form .toolbar-form-row-filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .phone-filter-form .phone-filter-grid-primary,
    .phone-filter-form .phone-filter-grid-secondary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .remote-machine-filter-form .toolbar-form-row-search {
        display: grid;
        grid-template-columns: 1fr;
    }

    .account-filter-form .account-keyword-search-control,
    .account-filter-form .account-domain-search-control,
    .account-filter-form .account-alias-search-control {
        max-width: none;
    }

    .toolbar-search-control,
    .toolbar-filter-control,
    .toolbar-filter-button {
        flex: 1 1 180px;
    }

    .phone-filter-form .phone-keyword-search-control {
        max-width: none;
        text-align: left;
        letter-spacing: 0;
    }

    .toolbar-form-row-user-flat {
        grid-template-columns: 1fr;
    }

    .quick-edit-grid {
        grid-template-columns: 1fr;
    }

    .quick-edit-modal {
        padding: 16px;
    }

    .quick-edit-dialog {
        max-height: calc(100vh - 32px);
    }

    .account-swap-result-grid {
        grid-template-columns: 1fr;
    }
}
