:root {
    --color-ink: #102033;
    --color-muted: #66758a;
    --color-line: #d9e3ee;
    --color-surface: #ffffff;
    --color-page: #eef4f8;
    --color-primary: #075da8;
    --color-primary-dark: #043c70;
    --color-teal: #00a9b7;
    --color-accent: #f2a521;
    --color-page-active: var(--color-primary);
    --color-danger: #c93434;
    --shadow-soft: 0 20px 60px rgba(16, 32, 51, 0.12);
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--color-ink);
    background: var(--color-page);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(7, 93, 168, 0.96), rgba(0, 169, 183, 0.88)),
        linear-gradient(45deg, #0b253f, #eef4f8);
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(320px, 480px) minmax(360px, 1fr);
    min-height: 100vh;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 56px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-teal));
    font-weight: 700;
}

.brand-mark img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.sidebar-brand strong {
    display: block;
    font-size: 17px;
}

.sidebar-brand small {
    display: block;
    margin-top: 3px;
    color: var(--color-muted);
}

.login-heading span,
.page-head p,
.panel-kicker,
.metric-card span {
    color: var(--color-teal);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.login-heading h1,
.page-head h1 {
    margin: 8px 0 0;
    font-size: 34px;
    line-height: 1.12;
}

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

.field,
.filter-bar label,
.report-filter-form label,
.template-drawer-form label {
    display: grid;
    gap: 7px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.field input,
.filter-bar input,
.filter-bar select,
.report-filter-form input,
.report-filter-form select,
.template-drawer-form input,
.template-drawer-form select,
.template-drawer-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--color-ink);
    background: #ffffff;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.report-filter-form input:focus,
.report-filter-form select:focus,
.template-drawer-form input:focus,
.template-drawer-form select:focus,
.template-drawer-form textarea:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(0, 169, 183, 0.16);
}

.template-drawer-form textarea {
    min-height: 180px;
    padding: 12px 14px;
    line-height: 1.45;
    resize: vertical;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-ink);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: var(--color-teal);
    cursor: pointer;
}

.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 700;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-teal));
    box-shadow: 0 14px 30px rgba(7, 93, 168, 0.24);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.login-submit-button {
    gap: 9px;
}

.login-submit-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.46);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: login-submit-spin 720ms linear infinite;
}

.login-submit-spinner[hidden] {
    display: none;
}

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

.secondary-button {
    color: #ffffff;
    background: var(--color-primary);
}

.danger-button {
    color: #ffffff;
    background: var(--color-danger);
}

.form-alert {
    border: 1px solid rgba(201, 52, 52, 0.24);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--color-danger);
    background: rgba(201, 52, 52, 0.08);
    font-weight: 700;
}

.gupshup-key-page {
    display: grid;
    gap: 14px;
    width: min(100%, 720px);
}

.gupshup-key-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gupshup-key-header-icon,
.gupshup-key-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.gupshup-key-header-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-teal));
    box-shadow: 0 14px 34px rgba(7, 93, 168, 0.22);
}

.gupshup-key-header-icon svg,
.gupshup-key-info-icon svg,
.gupshup-secret-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gupshup-key-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.12;
}

.gupshup-key-header p {
    margin: 5px 0 0;
    color: var(--color-muted);
    line-height: 1.45;
}

.gupshup-key-info {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid rgba(0, 169, 183, 0.18);
    border-radius: 8px;
    padding: 16px;
    color: #5b6878;
    background: linear-gradient(135deg, rgba(0, 169, 183, 0.11), rgba(7, 93, 168, 0.05));
}

.gupshup-key-info-icon {
    width: 30px;
    height: 30px;
    margin-top: 2px;
    border-radius: 9px;
    color: #ffffff;
    background: var(--color-teal);
}

.gupshup-key-info-icon svg {
    width: 18px;
    height: 18px;
}

.gupshup-key-info p {
    margin: 0 0 8px;
    line-height: 1.48;
}

.gupshup-key-info p:last-child {
    margin-bottom: 0;
}

.gupshup-key-info code {
    display: inline-block;
    margin: 0 0 8px;
    border: 1px solid rgba(0, 169, 183, 0.32);
    border-radius: 6px;
    padding: 5px 8px;
    color: #006b74;
    background: rgba(255, 255, 255, 0.66);
    font-size: 13px;
    font-weight: 700;
}

.gupshup-key-alert {
    margin: 0;
}

.gupshup-key-card {
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 20px 24px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(16, 32, 51, 0.08);
}

.gupshup-key-card h2 {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.3;
}

.gupshup-key-status-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--color-line);
    padding-bottom: 13px;
}

.gupshup-key-mask {
    word-break: break-word;
    letter-spacing: 0.04em;
}

.gupshup-key-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 7px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.gupshup-key-status-chip.is-active {
    color: #ffffff;
    background: var(--color-teal);
}

.gupshup-key-status-chip.is-expiring {
    color: #815000;
    background: rgba(242, 165, 33, 0.2);
}

.gupshup-key-status-chip.is-expired {
    color: #ffffff;
    background: var(--color-danger);
}

.gupshup-key-status-chip.is-unknown {
    color: var(--color-muted);
    background: #eef2f6;
}

.gupshup-key-meta {
    display: grid;
    gap: 9px;
    margin: 13px 0 0;
}

.gupshup-key-meta div {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(0, 1.4fr);
    gap: 12px;
}

.gupshup-key-meta dt {
    color: var(--color-muted);
}

.gupshup-key-meta dd {
    margin: 0;
    text-align: right;
}

.gupshup-key-empty {
    display: grid;
    gap: 6px;
    color: var(--color-muted);
}

.gupshup-key-empty strong {
    color: var(--color-ink);
    font-size: 16px;
}

.gupshup-key-form {
    display: grid;
    gap: 14px;
}

.gupshup-key-field {
    display: grid;
    gap: 6px;
    color: #4f5e70;
    font-weight: 700;
}

.gupshup-key-field input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    padding: 0 13px;
    color: var(--color-ink);
    background: #ffffff;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.gupshup-key-field input:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(0, 169, 183, 0.14);
    outline: none;
}

.gupshup-key-field input[readonly],
.gupshup-key-field input:disabled {
    color: #687789;
    background: #f7f9fb;
}

.gupshup-secret-control {
    position: relative;
    display: block;
}

.gupshup-secret-control input {
    padding-right: 48px;
}

.gupshup-secret-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    color: #536276;
    background: transparent;
    cursor: pointer;
}

.gupshup-secret-toggle:hover,
.gupshup-secret-toggle:focus-visible {
    color: var(--color-primary);
    background: rgba(7, 93, 168, 0.08);
    outline: none;
}

.gupshup-secret-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.gupshup-secret-toggle svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.8;
}

.gupshup-secret-toggle .gupshup-eye-off-icon,
.gupshup-secret-toggle.is-visible .gupshup-eye-icon {
    display: none;
}

.gupshup-secret-toggle.is-visible .gupshup-eye-off-icon {
    display: block;
}

.gupshup-field-error {
    color: var(--color-danger);
    font-size: 13px;
    font-weight: 700;
}

.gupshup-key-submit {
    justify-self: start;
    gap: 9px;
    min-width: 128px;
}

.gupshup-key-submit.is-loading {
    cursor: wait;
}

.gupshup-key-submit:disabled:not(.is-loading) {
    cursor: not-allowed;
}

.login-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
}

.login-logo-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(620px, 100%);
    min-height: 220px;
    border-radius: 8px;
    padding: 44px 48px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(4, 60, 112, 0.24);
}

.login-logo {
    display: block;
    width: min(440px, 100%);
    height: auto;
}

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    color: #dcecff;
    background: linear-gradient(180deg, var(--color-primary-dark), #08253e);
}

.sidebar-brand {
    padding: 4px 6px 24px;
}

.sidebar-brand .brand-mark {
    background: linear-gradient(135deg, var(--color-accent), var(--color-teal));
}

.sidebar-brand small {
    color: #9ab4cb;
}

.sidebar-nav {
    margin-top: 18px;
}

.nav-group-title {
    padding: 0 12px 10px;
    color: #8fcfd8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-group + .nav-group {
    margin-top: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border-radius: 8px;
    padding: 0 12px;
    color: #cfe1f2;
    transition: background 160ms ease, color 160ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.7;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.82;
}

.nav-link:hover .nav-icon,
.nav-link.is-active .nav-icon {
    opacity: 1;
}

.workarea {
    min-width: 0;
}

.topbar-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    color: var(--color-primary-dark);
    background: #ffffff;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.admin-menu-toggle:hover,
.admin-menu-toggle:focus-visible {
    color: var(--color-teal);
    border-color: rgba(0, 169, 183, 0.48);
    background: #e8f4fb;
    box-shadow: 0 0 0 3px rgba(0, 169, 183, 0.12);
    outline: none;
}

.admin-menu-toggle svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 740;
    background: rgba(16, 32, 51, 0.46);
}

.admin-menu-backdrop[hidden] {
    display: none !important;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 12px 32px;
    border-bottom: 1px solid var(--color-line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.topbar-title span,
.account-copy small {
    display: block;
    color: var(--color-muted);
    font-size: 12px;
}

.topbar-title strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.account-menu {
    position: relative;
}

.account-button {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(420px, 52vw);
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 7px 10px 7px 7px;
    color: var(--color-ink);
    background: #ffffff;
    cursor: pointer;
}

.company-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    overflow: hidden;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-teal));
    font-weight: 700;
}

.company-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-copy {
    min-width: 0;
    text-align: left;
}

.account-copy strong,
.account-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy strong {
    display: block;
    max-width: 300px;
}

.account-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-right: 2px solid var(--color-muted);
    border-bottom: 2px solid var(--color-muted);
    transform: rotate(45deg) translateY(-2px);
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    min-width: 180px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 6px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.account-dropdown.is-open {
    display: block;
}

.account-dropdown a {
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 6px;
    padding: 11px 12px;
    color: var(--color-ink);
    font-weight: 700;
}

.menu-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-dropdown a:hover {
    background: #eef4f8;
}

.content {
    padding: 32px;
}

.page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-head-filters {
    justify-content: flex-start;
}

.page-filter-area {
    display: grid;
    gap: 8px;
    justify-items: start;
    width: 100%;
}

.page-count,
.panel-count {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.report-alert {
    margin-bottom: 18px;
}

.filter-bar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.summary-filter-form {
    display: grid;
    justify-items: start;
    gap: 8px;
    width: 100%;
}

.report-filter-form {
    display: grid;
    justify-items: start;
    width: 100%;
    gap: 8px;
}

.filter-action-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
}

.filter-primary-row {
    display: flex;
    align-items: end;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-bar [hidden],
.report-filter-form [hidden] {
    display: none !important;
}

.period-select-field {
    min-width: 170px;
}

.custom-period-field {
    min-width: 142px;
}

.filters-toggle {
    border: 0;
    padding: 2px 0;
    color: var(--color-primary);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.filters-toggle:hover {
    color: var(--color-teal);
}

.excel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border: 1px solid #b8d8ec;
    border-radius: 8px;
    padding: 0 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-teal));
    box-shadow: 0 10px 20px rgba(7, 93, 168, 0.18);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.excel-button:hover {
    box-shadow: 0 12px 24px rgba(7, 93, 168, 0.24);
}

.excel-button-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.advanced-filters {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 220ms ease, opacity 180ms ease, transform 180ms ease;
}

.advanced-filters.is-open {
    max-height: 260px;
    opacity: 1;
    transform: translateY(0);
}

.advanced-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
}

.summary-filter-grid {
    grid-template-columns: minmax(180px, 280px);
}

.filters-clear {
    display: inline-flex;
    margin-top: 9px;
    border: 0;
    padding: 0;
    color: var(--color-primary);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.filters-clear:hover {
    color: var(--color-teal);
}

.admin-company-field {
    min-width: 360px;
}

.company-picker-control {
    position: relative;
    display: flex;
    align-items: center;
}

.company-picker-control input[readonly] {
    cursor: default;
    padding-right: 42px;
}

.company-clear-button,
.company-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    color: var(--color-muted);
    background: transparent;
    cursor: pointer;
}

.company-clear-button:hover,
.company-modal-close:hover {
    color: var(--color-primary);
    background: #e8f4fb;
}

.company-clear-button {
    position: absolute;
    right: 5px;
    width: 34px;
    height: 34px;
}

.company-clear-button svg,
.company-modal-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.company-modal-close span {
    display: none;
}

.company-modal-close .modal-close-icon-back {
    display: none;
}

.company-modal-close.is-mobile-back .modal-close-icon-x {
    display: none;
}

.company-modal-close.is-mobile-back .modal-close-icon-back {
    display: block;
}

.admin-template-panel .panel-head {
    padding: 16px 20px;
}

.admin-template-toolbar {
    justify-content: space-between;
}

.admin-template-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-right: auto;
}

.admin-template-actions .secondary-button {
    min-height: 36px;
    padding: 0 13px;
    font-size: 13px;
}

.company-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(16, 32, 51, 0.46);
}

.company-modal-backdrop[hidden] {
    display: none !important;
}

.company-modal-dialog {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 14px;
    width: min(920px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.company-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.company-modal-head h2 {
    margin: 0;
    font-size: 20px;
}

.company-modal-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
}

.company-search-field {
    display: grid;
    gap: 7px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.company-search-field input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--color-ink);
    background: #ffffff;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.company-search-field input:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(0, 169, 183, 0.16);
}

.company-search-hint {
    min-height: 18px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.company-search-tabulator {
    min-height: 360px;
}

.company-search-tabulator .tabulator-row {
    cursor: pointer;
}

.company-search-tabulator .tabulator-row:hover {
    background: #e8f4fb;
}

.phone-search-head {
    margin-bottom: 12px;
}

.phone-search-form {
    width: 100%;
}

.phone-search-form .filter-action-row {
    display: grid;
    align-items: stretch;
    gap: 14px;
}

.phone-search-primary-row,
.phone-search-submit-row {
    align-items: end;
    flex-wrap: wrap;
}

.phone-search-primary-row {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(280px, 1fr) auto;
    gap: 12px;
    width: 100%;
}

.phone-search-submit-row {
    display: grid;
    grid-template-columns: minmax(260px, 360px) auto;
    gap: 12px;
    width: 100%;
    justify-content: start;
}

.admin-subscribers-date-row {
    grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) auto;
}

.admin-subscribers-filter-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.admin-subscribers-filter-title {
    color: var(--color-ink);
    font-size: 14px;
    font-weight: 800;
}

.admin-subscribers-filter-grid {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(180px, 220px) minmax(220px, 280px);
    gap: 12px;
    align-items: end;
}

.phone-search-company-field,
.phone-search-sources-field,
.phone-search-phone-field {
    min-width: 0;
}

.phone-search-sources-field input[readonly] {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--color-ink);
    background: #ffffff;
    cursor: default;
}

.phone-search-phone-field input,
.phone-search-phone-field select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--color-ink);
    background: #ffffff;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.phone-search-phone-field select {
    appearance: auto;
}

.phone-search-phone-field input:focus,
.phone-search-phone-field select:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(0, 169, 183, 0.16);
}

.phone-search-phone-field input.is-invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(201, 52, 52, 0.12);
}

.phone-search-phone-field input::placeholder {
    color: #9aa8b6;
    opacity: 1;
}

[data-phone-company-open],
[data-balance-company-open],
[data-details-company-open] {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

[data-phone-company-open].is-loading::before,
[data-balance-company-open].is-loading::before,
[data-details-company-open].is-loading::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 2px solid rgba(255, 255, 255, 0.52);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: loading-spin 700ms linear infinite;
}

[data-phone-company-open].is-loading,
[data-phone-company-open]:disabled,
[data-balance-company-open].is-loading,
[data-balance-company-open]:disabled,
[data-details-company-open].is-loading,
[data-details-company-open]:disabled {
    cursor: wait;
    opacity: 0.82;
}

.details-system-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px dashed #bfd4e8;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.details-system-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
    background: rgba(0, 169, 183, 0.12);
    color: var(--color-primary);
}

.details-system-alert-icon svg {
    width: 20px;
    height: 20px;
}

.details-system-alert-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.details-options-grid {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(240px, 0.48fr);
    gap: 16px;
    align-items: start;
}

.details-card {
    display: grid;
    align-content: start;
    gap: 14px;
    margin: 0;
    padding: 16px 14px 14px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #ffffff;
}

.details-card legend {
    padding: 0 4px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.details-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.details-period-mode-row .details-radio {
    min-width: 132px;
}

.details-format-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
}

.details-radio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    min-height: 44px;
    padding: 0 14px;
}

.details-format-row .details-radio {
    width: 100%;
}

.details-radio input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.details-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.details-date-grid[hidden] {
    display: none;
}

.details-date-grid label {
    min-width: 0;
}

.details-date-grid input.is-invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(201, 52, 52, 0.12);
}

.details-submit-row {
    justify-content: start;
}

.details-submit-row .secondary-button {
    width: auto;
    min-width: 190px;
}

.details-status {
    border-color: #b9dfea;
    color: var(--color-primary-dark);
    background: #eef9fb;
}

.details-status.is-success {
    border-color: #a7d8df;
    color: #045c68;
    background: #e7f8fa;
}

.details-status.is-empty {
    border-color: #e3cf91;
    color: #805f08;
    background: #fff8df;
}

.phone-search-toolbar {
    justify-content: flex-end;
}

.phone-search-tabulator {
    min-height: 420px;
}

.phone-search-tabulator .tabulator-row {
    cursor: pointer;
}

.copy-row-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #cfe0ec;
    border-radius: 8px;
    color: var(--color-primary);
    background: #ffffff;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.copy-row-button:hover,
.copy-row-button:focus-visible {
    border-color: rgba(0, 169, 183, 0.5);
    color: var(--color-primary-dark);
    background: #e8f4fb;
    outline: none;
}

.copy-row-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.copy-row-label {
    display: none;
}

.phone-company-modal-dialog {
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.phone-modal-slider {
    display: flex;
    width: 200%;
    min-height: 0;
    overflow: hidden;
    transition: transform 240ms ease;
}

.phone-modal-slider.is-integrations {
    transform: translateX(-50%);
}

.phone-modal-slider.is-integrations .phone-company-pane,
.phone-modal-slider:not(.is-integrations) .phone-integrations-pane {
    visibility: hidden;
    pointer-events: none;
}

.phone-modal-pane {
    display: grid;
    align-content: start;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 12px;
    width: 50%;
    min-width: 0;
}

.phone-integrations-pane {
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
}

.phone-integrations-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.phone-integrations-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    padding: 0 12px 0 8px;
    color: var(--color-primary-dark);
    background: #eef4f8;
    font-weight: 800;
    cursor: pointer;
}

.phone-integrations-back:hover,
.phone-integrations-back:focus-visible {
    color: var(--color-primary);
    background: #e8f4fb;
    outline: none;
}

.phone-integrations-back svg {
    width: 21px;
    height: 21px;
}

.phone-select-all {
    margin: 0;
}

.phone-select-all-row {
    display: flex;
    justify-content: flex-start;
}

.phone-selected-company {
    min-height: 24px;
    color: var(--color-ink);
    font-weight: 800;
}

.phone-integrations-hint.is-error,
.company-search-hint.is-error {
    color: var(--color-danger);
}

.phone-integrations-list {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 10px;
    background: #f8fbfd;
}

.phone-integration-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 50px;
    border: 1px solid #d8e6f0;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--color-ink);
    background: #ffffff;
    cursor: pointer;
}

.phone-integration-item:hover {
    border-color: rgba(0, 169, 183, 0.5);
    background: #f2fbfd;
}

.phone-integration-item input {
    width: 18px;
    height: 18px;
}

.phone-integration-item span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.phone-integration-item strong,
.phone-integration-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-integration-item small {
    color: var(--color-muted);
    font-weight: 800;
}

.phone-integrations-actions {
    display: flex;
    justify-content: flex-end;
}

.phone-company-pager {
    padding: 0;
}

body.modal-open {
    overflow: hidden;
}

.template-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 820;
    opacity: 0;
    background: rgba(16, 32, 51, 0.34);
    transition: opacity 220ms ease;
}

.template-drawer-backdrop.is-open {
    opacity: 1;
}

.template-drawer-backdrop[hidden] {
    display: none !important;
}

.template-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 830;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(50vw, 760px);
    min-width: 520px;
    border-left: 1px solid var(--color-line);
    background: #ffffff;
    box-shadow: -22px 0 50px rgba(16, 32, 51, 0.16);
    transform: translateX(100%);
    transition: transform 240ms ease;
}

.template-drawer.is-open {
    transform: translateX(0);
}

.template-drawer[hidden] {
    display: none !important;
}

.template-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-line);
}

.template-drawer-head h2 {
    margin: 0;
    font-size: 20px;
}

.template-drawer-form {
    display: grid;
    align-content: start;
    gap: 18px;
    overflow-y: auto;
    padding: 22px 24px 28px;
}

.template-company-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.template-form-alert[hidden] {
    display: none !important;
}

.bulk-header-option {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: start;
    color: var(--color-ink);
}

.template-drawer-form .bulk-header-option {
    display: flex;
}

.bulk-preview {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.bulk-preview[hidden] {
    display: none !important;
}

.bulk-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.bulk-preview-head strong {
    color: var(--color-ink);
    font-size: 16px;
}

.bulk-preview-head span,
.bulk-preview-note {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.bulk-preview-table-wrap {
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #ffffff;
}

.excel-preview-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.excel-preview-table th,
.excel-preview-table td {
    min-width: 150px;
    max-width: 260px;
    border-right: 1px solid #edf2f7;
    border-bottom: 1px solid var(--color-line);
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
}

.excel-preview-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f6f9fc;
}

.excel-preview-table th select {
    min-height: 34px;
    margin-bottom: 7px;
    padding: 0 9px;
    font-size: 12px;
}

.excel-preview-column-title {
    display: block;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.excel-preview-table td {
    color: var(--color-ink);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1600;
    max-width: min(420px, calc(100vw - 48px));
    border: 1px solid #cfe2ef;
    border-radius: 8px;
    padding: 13px 16px;
    color: var(--color-ink);
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(16, 32, 51, 0.18);
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast.is-error {
    border-color: rgba(201, 52, 52, 0.24);
    color: var(--color-danger);
    background: #fff7f7;
}

.toast[hidden] {
    display: none !important;
}

.toast-stack {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 1600;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 48px));
    pointer-events: none;
}

.app-toast {
    border: 1px solid #b8d8ec;
    border-radius: 8px;
    padding: 13px 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-teal));
    box-shadow: 0 16px 40px rgba(7, 93, 168, 0.22);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    opacity: 1;
    transform: translateX(0);
    animation: toast-slide-in 220ms ease-out;
    transition: opacity 180ms ease, transform 180ms ease;
}

.app-toast-error {
    border-color: rgba(201, 52, 52, 0.22);
    color: #ffffff;
    background: var(--color-danger);
    box-shadow: 0 16px 40px rgba(201, 52, 52, 0.22);
}

.app-toast.is-hiding {
    opacity: 0;
    transform: translateX(28px);
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(32px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.excluded-word-form {
    display: grid;
    gap: 10px;
}

.excluded-word-form .filter-primary-row {
    align-items: end;
    flex-wrap: nowrap;
}

.excluded-word-form .secondary-button {
    height: 42px;
    min-height: 42px;
}

.excluded-word-field,
.excluded-search-field {
    display: grid;
    gap: 7px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.excluded-word-field {
    min-width: min(420px, 100%);
}

.excluded-search-field {
    width: min(420px, 100%);
}

.excluded-search-control {
    position: relative;
    display: flex;
    align-items: center;
}

.excluded-word-field input,
.excluded-search-field input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 0 13px;
    color: var(--color-ink);
    background: #ffffff;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.excluded-search-field input {
    padding-right: 42px;
}

.excluded-word-field input::placeholder,
.excluded-search-field input::placeholder {
    color: #9eacba;
    opacity: 0.62;
}

.excluded-word-field input:focus,
.excluded-search-field input:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(0, 169, 183, 0.16);
}

.excluded-word-field input.is-invalid {
    border-color: rgba(201, 52, 52, 0.62);
    background: #fff7f7;
    box-shadow: 0 0 0 3px rgba(201, 52, 52, 0.12);
}

.excluded-search-clear {
    position: absolute;
    right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    color: var(--color-muted);
    background: transparent;
    cursor: pointer;
}

.excluded-search-clear:hover {
    color: var(--color-primary);
    background: #e8f4fb;
}

.excluded-search-clear[hidden] {
    display: none !important;
}

.excluded-search-clear svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.excluded-words-panel .panel-head {
    align-items: end;
}

.excluded-panel-actions {
    display: grid;
    justify-items: end;
    align-content: space-between;
    gap: 12px;
    min-height: 68px;
    margin-left: auto;
}

.excluded-refresh-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    color: var(--color-primary-dark);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(16, 32, 51, 0.08);
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.excluded-refresh-button:hover,
.excluded-refresh-button:focus-visible {
    color: var(--color-teal);
    border-color: rgba(0, 169, 183, 0.48);
    box-shadow: 0 12px 28px rgba(7, 93, 168, 0.14);
    transform: translateY(-1px);
    outline: none;
}

.excluded-refresh-button:disabled {
    opacity: 0.58;
    cursor: wait;
    transform: none;
}

.excluded-refresh-button svg {
    width: 20px;
    height: 20px;
}

.excluded-refresh-button::before,
.excluded-refresh-button::after {
    position: absolute;
    right: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
}

.excluded-refresh-button::before {
    content: "";
    bottom: calc(100% + 5px);
    border: 6px solid transparent;
    border-top-color: var(--color-ink);
    transform: translateY(4px);
}

.excluded-refresh-button::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 16px);
    min-width: max-content;
    border-radius: 7px;
    padding: 7px 9px;
    color: #ffffff;
    background: var(--color-ink);
    box-shadow: 0 12px 28px rgba(16, 32, 51, 0.22);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(4px);
}

.excluded-refresh-button:hover::before,
.excluded-refresh-button:hover::after,
.excluded-refresh-button:focus-visible::before,
.excluded-refresh-button:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.excluded-words-tabulator {
    min-height: 520px;
}

.balance-blocking-head {
    margin-bottom: 12px;
}

.balance-company-row {
    align-items: end;
    display: grid;
    grid-template-columns: minmax(280px, 420px) auto;
    gap: 12px;
    justify-content: start;
}

.balance-company-field {
    min-width: 0;
}

.balance-empty-state {
    display: grid;
    gap: 6px;
    border: 1px dashed var(--color-line);
    border-radius: 8px;
    padding: 22px;
    color: var(--color-muted);
    background: rgba(255, 255, 255, 0.7);
}

.balance-empty-state strong {
    color: var(--color-ink);
    font-size: 18px;
}

.balance-workspace {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.balance-workspace[hidden],
.balance-empty-state[hidden] {
    display: none !important;
}

.balance-card .panel-head {
    padding-bottom: 12px;
}

.balance-card {
    max-width: 100%;
    min-width: 0;
}

.balance-block-form,
.balance-cabinet-form {
    display: grid;
    gap: 14px;
    padding: 16px 22px 22px;
}

.balance-edit-form {
    display: grid;
    gap: 14px;
    padding: 0 22px 22px;
}

.balance-check-all {
    font-weight: 800;
}

.balance-check-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 10px;
}

.balance-number-field {
    display: grid;
    gap: 7px;
    width: min(360px, 100%);
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.balance-number-field input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 0 13px;
    color: var(--color-ink);
    background: #ffffff;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.balance-number-field input:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(0, 169, 183, 0.16);
}

.balance-number-field input.is-invalid {
    border-color: rgba(201, 52, 52, 0.62);
    background: #fff7f7;
    box-shadow: 0 0 0 3px rgba(201, 52, 52, 0.12);
}

.balance-number-field input[readonly] {
    color: var(--color-muted);
    background: #f6f9fc;
}

.balance-cabinet-form {
    grid-template-columns: minmax(260px, 360px) max-content;
    align-items: end;
    justify-content: start;
}

.balance-block-form > .secondary-button,
.balance-cabinet-form > .secondary-button {
    width: auto;
    min-width: 148px;
    justify-self: start;
    padding-right: 22px;
    padding-left: 22px;
}

.balance-integrations-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--color-line);
    padding: 14px 22px;
}

.balance-integrations-tabulator {
    max-width: 100%;
    min-width: 0;
    min-height: 360px;
    border-right: 0;
    border-left: 0;
    overflow: hidden;
}

.balance-integrations-tabulator .tabulator-tableholder {
    max-width: 100%;
    overflow-x: auto;
}

.balance-modal-loading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 14px 22px 0;
    border: 1px solid #cfe0ec;
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--color-primary-dark);
    background: #f6fbfd;
    box-shadow: 0 10px 24px rgba(16, 32, 51, 0.08);
}

.balance-modal-loading[hidden] {
    display: none !important;
}

.balance-modal-loading strong {
    font-size: 14px;
    line-height: 1.25;
}

.balance-modal-loading .loading-spinner {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-width: 3px;
}

.balance-set-button {
    min-height: 32px;
    border: 1px solid rgba(7, 93, 168, 0.22);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--color-primary-dark);
    background: #eef7fb;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.balance-set-button:hover,
.balance-set-button:focus-visible {
    border-color: rgba(0, 169, 183, 0.48);
    color: var(--color-primary);
    outline: none;
}

.balance-set-button:disabled {
    color: var(--color-muted);
    cursor: not-allowed;
    opacity: 0.65;
}

.balance-status-muted {
    color: var(--color-muted);
}

.balance-status-error {
    color: var(--color-danger);
    font-weight: 700;
}

.balance-edit-summary {
    display: grid;
    gap: 5px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 12px;
    background: #f8fbfd;
}

.balance-edit-summary strong {
    color: var(--color-ink);
}

.balance-edit-summary span {
    color: var(--color-muted);
    font-size: 13px;
}

.balance-radio-group {
    display: grid;
    gap: 10px;
}

.radio-field {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 9px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    cursor: pointer;
}

.radio-field input {
    margin-top: 2px;
}

.radio-field span {
    color: var(--color-ink);
    font-weight: 800;
}

.radio-field small {
    grid-column: 2;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.4;
}

.details-card .details-radio {
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
    width: auto;
    min-height: 44px;
    padding: 0 14px;
}

.details-card .details-radio input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.details-card .details-radio span {
    line-height: 1;
}

.details-card .details-radio:has(input:checked) {
    border-color: #9fcde6;
    background: #f4fbff;
    box-shadow: inset 0 0 0 1px rgba(7, 93, 168, 0.08);
}

.confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(16, 32, 51, 0.46);
}

.confirm-modal-backdrop[hidden] {
    display: none !important;
}

.confirm-modal-dialog {
    display: grid;
    gap: 16px;
    width: min(520px, 100%);
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.confirm-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.confirm-modal-head h2 {
    margin: 0;
    font-size: 20px;
}

.confirm-modal-dialog p {
    margin: 0;
    color: var(--color-ink);
    font-weight: 700;
}

.confirm-template-text {
    max-height: 160px;
    overflow: auto;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 12px;
    color: var(--color-muted);
    background: #f6f9fc;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.confirm-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.confirm-modal-actions .secondary-button,
.confirm-modal-actions .danger-button {
    min-height: 40px;
    padding: 0 14px;
}

.confirm-cancel-button {
    color: var(--color-primary-dark);
    border: 1px solid var(--color-line);
    background: #ffffff;
}

.template-delete-button {
    min-height: 32px;
    border: 1px solid rgba(201, 52, 52, 0.24);
    border-radius: 8px;
    padding: 0 10px;
    color: var(--color-danger);
    background: #fff7f7;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.template-delete-button:hover {
    color: #ffffff;
    background: var(--color-danger);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card,
.data-panel {
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 10px 30px rgba(16, 32, 51, 0.06);
}

.metric-card {
    padding: 18px;
}

.metric-card strong {
    display: block;
    margin-top: 10px;
    font-size: 32px;
}

.metric-card small {
    display: block;
    margin-top: 6px;
    color: var(--color-muted);
}

.data-panel {
    overflow: visible;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--color-line);
}

.panel-head-count-only {
    justify-content: flex-end;
}

.panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    width: 100%;
}

.column-menu {
    position: relative;
}

.column-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 0 11px;
    color: var(--color-primary-dark);
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.column-menu-button:hover,
.column-menu-button[aria-expanded="true"] {
    border-color: #b8d8ec;
    color: var(--color-primary);
    background: #e8f4fb;
}

.column-menu-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.column-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    gap: 2px;
    width: 230px;
    max-height: 0;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(16, 32, 51, 0.14);
    pointer-events: none;
    transition: max-height 220ms ease, opacity 160ms ease, transform 180ms ease, visibility 0ms linear 220ms;
}

.column-menu-dropdown.is-open {
    max-height: 330px;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: max-height 240ms ease, opacity 180ms ease, transform 180ms ease, visibility 0ms;
}

.column-menu-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    border-radius: 7px;
    padding: 7px 8px;
    color: var(--color-ink);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.column-menu-option:hover {
    background: #eef4f8;
}

.column-menu-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--color-primary);
}

.column-menu-option input:disabled {
    cursor: not-allowed;
}

.panel-head h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.empty-state,
.table-empty {
    color: var(--color-muted);
    text-align: center;
}

.empty-state {
    padding: 58px 22px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    scrollbar-color: #b8c7d7 transparent;
}

.subscriber-tabulator {
    min-height: 520px;
}

.subscriber-tabulator-error {
    padding: 42px 18px;
    color: var(--color-danger);
    text-align: center;
    font-weight: 700;
}

.subscriber-tabulator.tabulator {
    border: 0;
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

.subscriber-tabulator .tabulator-header {
    border-bottom: 1px solid var(--color-line);
    color: var(--color-muted);
    background: #f6f9fc;
    overflow: visible;
    z-index: 5;
}

.subscriber-tabulator .tabulator-header .tabulator-col {
    border-right: 1px solid var(--color-line);
    background: #f6f9fc;
    overflow: visible;
    z-index: 5;
}

.subscriber-tabulator .tabulator-header .tabulator-header-contents,
.subscriber-tabulator .tabulator-header .tabulator-headers,
.subscriber-tabulator .tabulator-header .tabulator-col-content,
.subscriber-tabulator .tabulator-header .tabulator-col-title-holder {
    overflow: visible;
}

.subscriber-tabulator .tabulator-header .tabulator-col-title {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    overflow: visible;
    position: relative;
}

.subscriber-tabulator .tabulator-header .tabulator-col-title[data-header-tooltip] {
    cursor: help;
}

.header-tooltip-floating {
    position: fixed;
    z-index: 3000;
    width: max-content;
    max-width: 300px;
    border: 1px solid #cfe2ef;
    border-radius: 8px;
    padding: 9px 11px;
    color: var(--color-ink);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(8, 41, 71, 0.16);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.header-tooltip-floating.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cell-tooltip-floating {
    position: fixed;
    z-index: 3200;
    max-width: min(520px, calc(100vw - 24px));
    border: 1px solid rgba(16, 32, 51, 0.16);
    border-radius: 8px;
    padding: 10px 12px;
    color: #ffffff;
    background: rgba(16, 32, 51, 0.94);
    box-shadow: 0 18px 38px rgba(8, 41, 71, 0.24);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: pre-line;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.cell-tooltip-floating.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.subscriber-tabulator .tabulator-row {
    border-bottom: 1px solid var(--color-line);
}

.subscriber-tabulator .tabulator-row .tabulator-cell {
    border-right: 1px solid #edf2f7;
    padding: 12px 10px;
    overflow: hidden;
    white-space: normal;
    vertical-align: top;
}

.subscriber-tabulator .tabulator-responsive-collapse {
    border-top: 1px solid #e8eef5;
    padding: 0;
    background: #fbfdff;
}

.subscriber-tabulator .tabulator-responsive-collapse-toggle {
    color: var(--color-primary);
}

.mobile-collapse-list {
    display: grid;
    gap: 8px;
    padding: 10px 12px 12px;
}

.mobile-collapse-item {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.mobile-collapse-item span {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
}

.mobile-collapse-item strong {
    color: var(--color-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.subscriber-tabulator .tabulator-row:hover {
    background: #fbfdff;
}

.subscriber-tabulator .tabulator-footer {
    display: none;
}

.subscriber-tabulator .tabulator-footer .tabulator-page {
    min-width: 38px;
    min-height: 38px;
    border: 0 !important;
    border-radius: 8px !important;
    padding: 0 12px;
    color: var(--color-ink) !important;
    background: #f0f2f5 !important;
    font-weight: 700;
}

.subscriber-tabulator .tabulator-footer .tabulator-page:hover {
    color: var(--color-primary) !important;
    background: #e8f4fb !important;
}

.subscriber-tabulator .tabulator-footer .tabulator-page.active {
    color: #ffffff !important;
    background: var(--color-primary) !important;
    box-shadow: 0 10px 20px rgba(7, 93, 168, 0.24);
}

.subscriber-tabulator .tabulator-footer .tabulator-page:disabled {
    color: #9aa9ba !important;
    background: #f6f7f9 !important;
    cursor: not-allowed;
}

.subscriber-tabulator .tabulator-placeholder span {
    color: var(--color-muted);
    font-weight: 700;
}

.subscriber-tabulator.is-loading .tabulator-placeholder {
    display: none !important;
}

.subscriber-tabulator .tabulator-loader,
.subscriber-tabulator .tabulator-loader-msg {
    display: none !important;
}

.subscriber-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--color-line);
    padding: 14px 18px;
    background: #ffffff;
}

.subscriber-pager-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    padding: 0 12px;
    color: var(--color-ink);
    background: #edf2f7;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.subscriber-pager-button:hover {
    color: var(--color-primary);
    background: #e8f4fb;
}

.subscriber-pager-button.is-current,
.subscriber-pager-button.is-current:disabled {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-teal));
    box-shadow: 0 10px 20px rgba(7, 93, 168, 0.24);
    cursor: default;
}

.subscriber-pager-button:disabled:not(.is-current) {
    color: #a4b0bf;
    background: #f6f8fa;
    cursor: not-allowed;
}

.subscriber-pager-arrow {
    width: 38px;
    padding: 0;
}

.subscriber-pager-icon {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.subscriber-pager-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 38px;
    color: var(--color-muted);
    font-weight: 700;
}

.report-table {
    width: 100%;
    min-width: 1060px;
    border-collapse: collapse;
    table-layout: fixed;
}

.report-table .col-time {
    width: 88px;
}

.report-table .col-phone {
    width: 118px;
}

.report-table .col-status {
    width: 128px;
}

.report-table .col-sender {
    width: 88px;
}

.report-table .col-message {
    width: auto;
}

.report-table .col-sms {
    width: 52px;
}

.report-table .col-operator {
    width: 84px;
}

.report-table .col-client {
    width: 78px;
}

.report-table .col-error {
    width: 96px;
}

.report-table .col-category {
    width: 152px;
}

.report-table th,
.report-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--color-line);
    line-height: 1.35;
    text-align: left;
    vertical-align: top;
}

.report-table th {
    color: var(--color-muted);
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
    background: #f6f9fc;
}

.report-table td {
    overflow-wrap: anywhere;
}

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

.table-empty {
    padding: 42px 18px;
}

.nowrap {
    white-space: nowrap;
}

.message-cell {
    white-space: normal;
}

.message-text {
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: pre-line;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.phone-message-wrap {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.message-expand-toggle {
    display: none;
    justify-self: start;
    border: 0;
    padding: 0;
    color: var(--color-primary);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.message-expand-toggle:hover,
.message-expand-toggle:focus-visible {
    color: var(--color-teal);
    outline: none;
}

.phone-error-text {
    display: block;
    overflow: visible;
    max-height: none;
    -webkit-line-clamp: unset;
    white-space: pre-line;
}

.time-cell {
    white-space: nowrap;
}

.time-cell span,
.time-cell strong {
    display: block;
    font-weight: 400;
}

.time-cell span {
    color: var(--color-muted);
    font-size: 13px;
}

.time-cell strong {
    margin-top: 2px;
    color: var(--color-ink);
    font-size: 13px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    max-width: 100%;
    border-radius: 8px;
    padding: 5px 9px;
    color: var(--color-primary-dark);
    background: #e8f4fb;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.status-pill {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
}

.status-pill.is-danger {
    color: #9f2525;
    background: #fde8e8;
}

.status-text {
    display: block;
    color: var(--color-primary-dark);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.status-text.is-danger {
    color: #b42318;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 14px 18px;
    background: #ffffff;
}

.pager-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pager-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: var(--color-ink);
    background: #f0f2f5;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.pager-button:hover {
    background: #e8f4fb;
    color: var(--color-primary);
}

.pager-button.is-current {
    color: #ffffff;
    background: var(--color-page-active);
    box-shadow: 0 10px 20px rgba(7, 93, 168, 0.24);
}

.pager-button.is-current:hover {
    color: #ffffff;
    background: var(--color-page-active);
}

.pager-button.is-disabled {
    color: #9aa9ba;
    background: #f6f7f9;
    cursor: not-allowed;
}

.pager-button.is-disabled:hover {
    color: #9aa9ba;
    background: #f6f7f9;
}

.pager-icon-button {
    width: 38px;
}

.pager-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pager-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-height: 40px;
    color: var(--color-muted);
    font-weight: 700;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 32, 51, 0.42);
}

.loading-overlay[hidden] {
    display: none !important;
}

.loading-dialog {
    display: grid;
    justify-items: center;
    gap: 18px;
    min-width: 260px;
    border-radius: 8px;
    padding: 28px 34px;
    color: var(--color-ink);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.loading-dialog strong {
    font-size: 17px;
}

.loading-dialog .loading-detail {
    max-width: 280px;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #d9e3ee;
    border-top-color: var(--color-teal);
    border-radius: 50%;
    animation: loading-spin 800ms linear infinite;
}

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

@media (max-width: 980px) {
    .login-layout,
    .app-shell {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .admin-body .app-shell {
        display: block;
    }

    .admin-body .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 760;
        width: min(82vw, 300px);
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        transform: translateX(-102%);
        box-shadow: 18px 0 44px rgba(16, 32, 51, 0.24);
        transition: transform 220ms ease;
    }

    .admin-body .sidebar.is-open {
        transform: translateX(0);
    }

    .admin-body.admin-menu-open {
        overflow: hidden;
    }

    .admin-body .admin-menu-toggle {
        display: inline-flex;
    }

    .admin-body .topbar {
        z-index: 720;
        gap: 14px;
        padding: 10px 18px;
    }

    .admin-body .topbar-main {
        flex: 1 1 auto;
    }

    .admin-body .topbar-title {
        min-width: 0;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .advanced-filter-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 760px) {
    .table-wrap {
        overflow-x: visible;
        padding: 10px;
    }

    .report-table {
        min-width: 0;
        table-layout: auto;
    }

    .report-table,
    .report-table thead,
    .report-table tbody,
    .report-table th,
    .report-table td,
    .report-table tr {
        display: block;
    }

    .report-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .report-table tbody {
        display: grid;
        gap: 10px;
    }

    .report-table tr {
        overflow: hidden;
        border: 1px solid var(--color-line);
        border-radius: 8px;
        background: #ffffff;
    }

    .report-table td {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid #edf2f7;
    }

    .report-table td::before {
        content: attr(data-label);
        color: var(--color-muted);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .report-table td:last-child {
        border-bottom: 0;
    }

    .report-table .table-empty {
        display: block;
        border: 0;
    }

    .report-table .table-empty::before {
        display: none;
    }

    .message-text {
        -webkit-line-clamp: 6;
    }

    .table-pagination {
        justify-content: center;
    }

    .pager-list {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .login-panel,
    .content {
        padding: 24px;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px;
    }

    .account-button {
        width: 100%;
        max-width: none;
    }

    .account-menu,
    .account-dropdown {
        width: 100%;
    }

    .admin-body .content {
        padding: 16px 12px 22px;
    }

    .admin-body .topbar {
        align-items: center;
        flex-direction: row;
        gap: 10px;
        min-height: 64px;
        padding: 9px 12px;
    }

    .admin-body .topbar-title strong {
        margin-top: 0;
        font-size: 16px;
        line-height: 1.2;
    }

    .admin-body .account-menu {
        width: auto;
        flex: 0 0 auto;
    }

    .admin-body .account-button {
        width: 46px;
        max-width: 46px;
        min-height: 46px;
        padding: 2px;
    }

    .admin-body .account-copy,
    .admin-body .account-chevron {
        display: none;
    }

    .admin-body .company-avatar {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .admin-body .account-dropdown {
        right: 0;
        left: auto;
        width: min(240px, calc(100vw - 24px));
    }

    .gupshup-key-page {
        gap: 12px;
    }

    .gupshup-key-header {
        align-items: flex-start;
    }

    .gupshup-key-header-icon {
        width: 42px;
        height: 42px;
    }

    .gupshup-key-header h1 {
        font-size: 24px;
    }

    .gupshup-key-info,
    .gupshup-key-card {
        padding: 16px;
    }

    .gupshup-key-info {
        grid-template-columns: 1fr;
    }

    .gupshup-key-status-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .gupshup-key-meta div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .gupshup-key-meta dd {
        text-align: left;
    }

    .gupshup-key-submit {
        width: 100%;
    }

    .admin-body .admin-template-filters,
    .admin-body .excluded-words-head,
    .admin-body .phone-search-head,
    .admin-body .details-head {
        margin-bottom: 12px;
    }

    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .page-filter-area {
        justify-items: stretch;
    }

    .filter-bar,
    .filter-bar label,
    .filter-action-row,
    .report-filter-form,
    .report-filter-form label,
    .admin-company-field,
    .filter-primary-row,
    .excel-button,
    .secondary-button {
        width: 100%;
    }

    .filter-action-row,
    .filter-primary-row {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-body .admin-company-field,
    .admin-body .period-select-field,
    .admin-body .custom-period-field,
    .admin-body .excluded-word-field {
        min-width: 0;
    }

    .advanced-filters.is-open {
        max-height: 520px;
    }

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

    .admin-template-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-template-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        margin-right: 0;
    }

    .admin-template-actions .secondary-button,
    .admin-body .secondary-button,
    .admin-body .excel-button,
    .admin-body .primary-button,
    .admin-body .danger-button {
        min-height: 44px;
    }

    .admin-body .panel-toolbar {
        gap: 10px;
    }

    .admin-body .column-menu,
    .admin-body .column-menu-button {
        width: 100%;
    }

    .admin-body .column-menu-dropdown {
        right: 0;
        left: 0;
        width: 100%;
    }

    .admin-body .panel-head {
        padding: 14px 12px;
    }

    .admin-body .excluded-words-panel .panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-body .phone-search-form .filter-action-row,
    .admin-body .phone-search-primary-row,
    .admin-body .phone-search-submit-row,
    .admin-body .admin-subscribers-filter-grid,
    .admin-body .details-primary-row,
    .admin-body .details-submit-row,
    .admin-body .balance-company-row,
    .admin-body .balance-cabinet-form {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .admin-body .details-options-grid,
    .admin-body .details-date-grid {
        grid-template-columns: 1fr;
    }

    .admin-body .details-radio-row,
    .admin-body .details-format-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-body .details-card {
        padding: 12px;
    }

    .admin-body .details-system-alert {
        align-items: flex-start;
        padding: 12px;
        font-size: 14px;
    }

    .admin-body .details-system-alert-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .admin-body .details-radio {
        width: 100%;
    }

    .admin-body .details-submit-row .secondary-button {
        width: 100%;
    }

    .admin-body .balance-workspace {
        gap: 12px;
    }

    .admin-body .balance-check-grid {
        grid-template-columns: 1fr;
    }

    .admin-body .balance-block-form,
    .admin-body .balance-cabinet-form,
    .admin-body .balance-edit-form {
        padding: 0 12px 14px;
    }

    .admin-body .balance-block-form > .secondary-button,
    .admin-body .balance-cabinet-form > .secondary-button {
        width: 100%;
        justify-self: stretch;
    }

    .admin-body .balance-integrations-head {
        align-items: stretch;
        flex-direction: column;
        padding: 12px;
    }

    .admin-body .balance-main-card {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .admin-body .balance-main-card > .panel-head,
    .admin-body .balance-cabinet-form,
    .admin-body .balance-integrations-head {
        border: 1px solid var(--color-line);
        border-radius: 8px;
        background: #ffffff;
    }

    .admin-body .balance-integrations-tabulator.tabulator {
        width: 100%;
        min-height: 0;
        border: 0;
        overflow: visible;
        background: transparent;
    }

    .admin-body .balance-integrations-tabulator .tabulator-header {
        display: none;
    }

    .admin-body .balance-integrations-tabulator .tabulator-tableholder {
        overflow: visible !important;
        height: auto !important;
        background: transparent;
    }

    .admin-body .balance-integrations-tabulator .tabulator-table {
        display: grid !important;
        gap: 14px;
        width: 100% !important;
        min-width: 0 !important;
        transform: none !important;
        align-content: start;
        background: transparent;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row {
        display: grid !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
        height: auto !important;
        min-height: 0 !important;
        align-content: start;
        overflow: hidden;
        border: 1px solid var(--color-line);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 14px 30px rgba(16, 32, 51, 0.08);
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell {
        display: none !important;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-col-resize-handle {
        display: none !important;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[data-phone-card-visible="1"] {
        display: grid !important;
        grid-template-columns: minmax(82px, 30%) minmax(0, 1fr);
        align-items: center;
        gap: 7px;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        border-right: 0;
        border-bottom: 1px solid #edf2f7;
        padding: 6px 9px;
        overflow: visible;
        line-height: 1.25;
        text-align: left !important;
        white-space: normal;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[data-phone-card-visible="1"]::before {
        content: attr(data-mobile-label);
        color: var(--color-muted);
        font-size: 10px;
        font-weight: 800;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[data-phone-card-visible="1"]:last-of-type {
        border-bottom: 0;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[tabulator-field="login"] {
        background: #fbfdff;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[tabulator-field="login"][data-phone-card-visible="1"] {
        color: var(--color-ink);
        font-weight: 800;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[tabulator-field="current_balance"][data-phone-card-visible="1"],
    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[tabulator-field="daily_balance"][data-phone-card-visible="1"] {
        font-variant-numeric: tabular-nums;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[tabulator-field="actions"] {
        grid-template-columns: 1fr !important;
        padding: 12px;
        background: #fbfdff;
    }

    .admin-body .balance-integrations-tabulator .tabulator-row .tabulator-cell[tabulator-field="actions"]::before {
        display: none;
    }

    .admin-body .balance-set-button {
        display: inline-flex;
        align-items: center;
        width: 100%;
        min-height: 38px;
        justify-content: center;
    }

    .balance-company-modal .company-modal-dialog,
    .balance-edit-modal .company-modal-dialog {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        overflow-y: auto;
    }

    .balance-company-modal .company-modal-head,
    .balance-edit-modal .company-modal-head {
        position: sticky;
        top: 0;
        z-index: 3;
    }

    .balance-company-modal .company-modal-close,
    .balance-edit-modal .company-modal-close {
        min-width: 46px;
        min-height: 44px;
    }

    .balance-company-modal .company-search-field {
        margin-top: 12px;
    }

    .balance-company-modal .balance-modal-loading {
        margin: 12px 14px 0;
    }

    .balance-company-modal .company-search-field input {
        min-height: 46px;
    }

    .balance-company-modal .company-search-tabulator.tabulator {
        height: calc(100vh - 188px) !important;
        height: calc(100dvh - 188px) !important;
        min-height: 240px;
    }

    .balance-edit-dialog {
        align-content: start;
        background: #f4f8fb;
    }

    .balance-edit-dialog .balance-edit-form {
        gap: 14px;
        padding: 14px;
    }

    .balance-edit-dialog .balance-edit-summary,
    .balance-edit-dialog .radio-field,
    .balance-edit-dialog .balance-number-field input {
        border-radius: 8px;
    }

    .balance-edit-dialog .radio-field {
        min-height: 54px;
        padding: 13px 12px;
    }

    .balance-edit-dialog .radio-field input:disabled ~ span,
    .balance-edit-dialog .radio-field input:disabled ~ small {
        color: var(--color-muted);
        opacity: 0.7;
    }

    .balance-edit-dialog .secondary-button {
        width: 100%;
        min-height: 46px;
    }

    .admin-body .phone-search-panel .panel-head {
        align-items: stretch;
    }

    .admin-body .phone-search-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-body .phone-search-panel {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .admin-body .phone-search-panel .panel-head {
        border: 1px solid var(--color-line);
        border-radius: 8px;
        background: #ffffff;
    }

    .admin-body .phone-search-tabulator.tabulator {
        min-height: 0;
        border: 0;
        background: transparent;
    }

    .admin-body .phone-search-tabulator .tabulator-header {
        display: none;
    }

    .admin-body .phone-search-tabulator .tabulator-tableholder {
        overflow: visible !important;
        height: auto !important;
        background: transparent;
    }

    .admin-body .phone-search-tabulator .tabulator-table {
        display: grid !important;
        gap: 10px;
        width: 100% !important;
        min-width: 0 !important;
        transform: none !important;
        align-content: start;
        background: transparent;
    }

    .admin-body .phone-search-tabulator .tabulator-row {
        display: grid !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
        height: auto !important;
        min-height: 0 !important;
        align-content: start;
        overflow: hidden;
        border: 1px solid var(--color-line);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 14px 30px rgba(16, 32, 51, 0.08);
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-row-header {
        display: none !important;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-col-resize-handle {
        display: none !important;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell {
        display: none !important;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[data-phone-card-visible="1"] {
        display: grid !important;
        grid-template-columns: minmax(96px, 32%) minmax(0, 1fr);
        align-items: center;
        align-self: start;
        gap: 8px;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        height: min-content !important;
        block-size: min-content !important;
        max-height: 48px !important;
        min-height: 0 !important;
        border-right: 0;
        border-bottom: 1px solid #edf2f7;
        padding: 6px 10px;
        overflow: hidden;
        line-height: 1.25;
        text-align: left !important;
        white-space: normal;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[data-phone-card-visible="1"]::before {
        content: attr(data-mobile-label);
        color: var(--color-muted);
        font-size: 10px;
        font-weight: 800;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[tabulator-field="msg"][data-phone-card-visible="1"],
    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[tabulator-field="err"][data-phone-card-visible="1"] {
        align-items: start;
        height: auto !important;
        block-size: auto !important;
        max-height: none !important;
        overflow: visible;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[tabulator-field="copy"] {
        grid-template-columns: 1fr !important;
        justify-items: center;
        max-height: 58px !important;
        padding: 9px 10px;
        background: #fbfdff;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[tabulator-field="copy"]::before {
        display: none;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[tabulator-field="copy"] .copy-row-button {
        width: auto;
        min-width: 148px;
        height: 38px;
        padding: 0 18px;
        font-size: 13px;
        font-weight: 800;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[tabulator-field="copy"] .copy-row-button svg {
        display: none;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell[tabulator-field="copy"] .copy-row-label {
        display: inline;
    }

    .admin-body .phone-search-tabulator .tabulator-row .tabulator-cell:last-of-type {
        border-bottom: 0;
    }

    .admin-body .phone-search-tabulator .message-text {
        -webkit-line-clamp: 4;
    }

    .admin-body .phone-search-tabulator .message-text.is-expanded,
    .admin-body .phone-search-tabulator .phone-error-text {
        -webkit-line-clamp: unset;
    }

    .admin-body .phone-search-tabulator .phone-message-wrap.is-expandable .message-expand-toggle {
        display: inline-flex;
    }

    .admin-body .phone-search-tabulator .tabulator-responsive-collapse {
        border-top: 1px solid var(--color-line);
        background: #f8fbfd;
    }

    .admin-body .phone-search-tabulator .mobile-collapse-list {
        padding: 10px;
    }

    .admin-body .phone-search-tabulator .mobile-collapse-item {
        border: 1px solid #e2edf5;
        border-radius: 8px;
        padding: 7px 9px;
        background: #ffffff;
    }

    .admin-body .excluded-search-field {
        width: 100%;
    }

    .admin-body .excluded-panel-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 0;
        width: 100%;
    }

    .admin-body .subscriber-pager {
        justify-content: center;
        padding: 12px;
    }

    .admin-body .subscriber-pager-button {
        min-width: 38px;
        min-height: 38px;
    }

    .admin-body .template-delete-button {
        width: 100%;
        min-height: 44px;
        padding: 0 4px;
        font-size: 12px;
    }

    .company-modal-backdrop {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }

    .company-modal-dialog {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
    }

    .company-modal-head,
    .template-drawer-head,
    .confirm-modal-head {
        position: sticky;
        top: 0;
        z-index: 2;
        justify-content: flex-start;
        min-height: 58px;
        padding: 10px 14px;
        background: #ffffff;
        border-bottom: 1px solid var(--color-line);
    }

    .company-modal-head h2,
    .template-drawer-head h2,
    .confirm-modal-head h2 {
        font-size: 18px;
    }

    .company-modal-close {
        order: -1;
        width: auto;
        min-width: 44px;
        height: 44px;
        flex-basis: auto;
        gap: 6px;
        padding: 0 10px 0 8px;
        color: var(--color-primary-dark);
        background: #eef4f8;
        font-size: 13px;
        font-weight: 800;
    }

    .company-modal-close:hover,
    .company-modal-close:focus-visible {
        color: var(--color-primary);
        background: #e8f4fb;
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 169, 183, 0.14);
    }

    .company-modal-close svg {
        width: 21px;
        height: 21px;
    }

    .company-modal-close span {
        display: inline;
    }

    .company-search-field,
    .company-search-hint {
        margin-right: 14px;
        margin-left: 14px;
    }

    .phone-modal-slider {
        height: 100%;
    }

    .phone-modal-pane {
        padding-bottom: 14px;
    }

    .phone-integrations-pane {
        padding: 0 14px 14px;
    }

    .phone-integrations-head {
        align-items: stretch;
        flex-direction: column;
    }

    .phone-integrations-back,
    .phone-integrations-actions .secondary-button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    .phone-select-all {
        min-height: 44px;
    }

    .company-search-tabulator.tabulator {
        height: calc(100vh - 174px) !important;
        height: calc(100dvh - 174px) !important;
        min-height: 260px;
    }

    .phone-company-modal .company-search-tabulator.tabulator {
        height: calc(100vh - 230px) !important;
        height: calc(100dvh - 230px) !important;
    }

    .phone-integrations-list {
        min-height: 0;
    }

    .template-drawer {
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        min-width: 0;
        border-left: 0;
        box-shadow: none;
    }

    .template-company-row {
        grid-template-columns: 1fr;
    }

    .template-drawer-form {
        gap: 16px;
        padding: 16px 14px 24px;
    }

    .bulk-preview-head {
        align-items: start;
        flex-direction: column;
        gap: 4px;
    }

    .bulk-preview-table-wrap {
        max-height: min(42vh, 340px);
        max-height: min(42dvh, 340px);
    }

    .confirm-modal-backdrop {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }

    .confirm-modal-dialog {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
        padding: 0 14px 18px;
        box-shadow: none;
        align-content: start;
    }

    .confirm-modal-dialog p,
    .confirm-template-text,
    .confirm-modal-actions {
        margin-right: 0;
        margin-left: 0;
    }

    .confirm-modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .mobile-collapse-item {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }
}
