:root {
    --primary: #c5a580;
    --primary-strong: #e3c49b;
    --bg-body: #050505;
    --bg-image: url('/static/assets/bg/bg_final.webp?v=20260425');
    --bg-panel: rgba(3, 3, 3, 0.74);
    --bg-modal: #030303;
    --bg-modal-card: #030303;
    --bg-soft: transparent;
    --bg-field: #030303;
    --inner-border: var(--border);
    --inner-border-strong: var(--border-strong);
    --border: rgba(255, 255, 255, 0.34);
    --border-strong: rgba(255, 255, 255, 0.78);
    --text-main: #f2eee8;
    --text-muted: #fff;
    --danger: #f08d8d;
    --success: #9bd6aa;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
    --content-width: 1260px;
    --user-menu-bg: rgba(10, 10, 10, 0.7);
    --user-menu-border: rgba(255, 255, 255, 0.1);
    --user-menu-button-border: rgba(255, 255, 255, 0.3);
    --user-menu-button-hover: #fff;
}

[data-theme="light"] {
    --primary: #94724d;
    --primary-strong: #7a5c3e;
    --bg-body: #f0f2f5;
    --bg-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/static/assets/bg/bg_final.webp?v=20260425');
    --bg-panel: rgba(255, 255, 255, 0.9);
    --bg-modal: #ffffff;
    --bg-modal-card: rgba(255, 255, 255, 0.95);
    --bg-soft: transparent;
    --bg-field: rgba(255, 255, 255, 0.95);
    --inner-border: var(--border);
    --inner-border-strong: var(--border-strong);
    --border: rgba(0, 0, 0, 0.18);
    --border-strong: rgba(0, 0, 0, 0.55);
    --text-main: #1a1d1e;
    --text-muted: #555a60;
    --danger: #a64040;
    --success: #2e7d46;
    --shadow: 0 10px 60px rgba(0, 0, 0, 0.18);
    --user-menu-bg: rgba(255, 255, 255, 0.9);
    --user-menu-border: rgba(0, 0, 0, 0.05);
    --user-menu-button-border: rgba(0, 0, 0, 0.7);
    --user-menu-button-hover: #000;
}

* {
    box-sizing: border-box;
}

*:focus,
*:focus-visible {
    outline: none;
}

::selection {
    background: var(--primary);
    color: #050505;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    background-color: var(--bg-body);
    background-image: var(--bg-image);
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

button {
    font: inherit;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.topbar {
    position: relative;
    z-index: 10;
    width: min(var(--content-width), calc(100% - 32px));
    min-height: 232px;
    margin: 0 auto;
    padding: 28px 0 16px;
}

.top-brand {
    position: absolute;
    left: 50%;
    top: 42px;
    transform: translateX(-50%);
    color: #fff;
    font-size: clamp(58px, 8.5vw, 118px);
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
    padding-left: 0;
    white-space: nowrap;
}

.user-menu {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    border: 1px solid transparent;
    border-right: 2px solid var(--user-menu-border);
    border-left: 2px solid var(--user-menu-border);
    border-radius: 40px;
    background: var(--user-menu-bg);
    padding: 8px;
    backdrop-filter: blur(12px);
    box-shadow: none;
}

.icon-btn {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--user-menu-button-border);
    border-radius: 50%;
    color: var(--text-main);
    background: transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
    color: var(--user-menu-button-hover);
    border-color: var(--primary);
}

.theme-icon,
.logout-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
}

.theme-icon svg,
.logout-icon svg {
    width: 20px;
    height: 20px;
}

.shell {
    width: min(var(--content-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 86px;
}

.login-shell {
    width: min(560px, calc(100% - 32px));
}

.hero {
    margin-bottom: 34px;
}

.hero h1 {
    margin: 0;
    color: var(--text-main);
    font-size: clamp(56px, 10vw, 132px);
    font-weight: 950;
    line-height: 0.9;
    letter-spacing: 0;
}

.login-hero h1 {
    text-align: center;
}

.workspace {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.panel {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
    padding: 28px;
}

.account-card,
.countries-card {
    min-height: 430px;
}

.account-card,
.login-card {
    position: relative;
}

.login-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 34px 40px;
    text-align: center;
}

.login-card .panel-head {
    justify-content: center;
    margin-bottom: 24px;
    text-align: center;
}

.login-card .panel-head h2 {
    font-size: 34px;
    font-weight: 950;
}

.login-card .hint:empty {
    display: none;
}

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

.overline {
    margin: 0;
    color: var(--text-main);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: none;
}

h2,
p {
    margin-top: 0;
}

.panel-head h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: 0;
}

.status-pill,
.ghost-btn,
.ghost-link,
.money-btn,
.plan-btn,
.copy-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-main);
    background: var(--bg-soft);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ghost-btn,
.ghost-link {
    padding: 11px 17px;
}

.ghost-btn:hover,
.ghost-link:hover,
.money-btn:hover,
.plan-btn:hover,
.copy-btn:hover,
.country-btn:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.status-pill {
    padding: 9px 13px;
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.status-pill.active {
    color: #07100a;
    border-color: rgba(155, 214, 170, 0.35);
    background: var(--success);
}

.status-pill.inactive {
    color: var(--danger);
}

.telegram-inline-btn {
    display: inline-flex;
    width: auto;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    margin: 4px auto 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #94724d;
    padding: 0 42px;
    font-size: 18px;
    font-weight: 900;
}

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

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

.profile-grid div,
.country-config,
.actions-block {
    border: 2px solid var(--inner-border);
    border-radius: 18px;
    background: var(--bg-field);
}

.profile-grid div {
    min-height: 72px;
    padding: 16px;
}

.profile-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.profile-grid strong {
    font-size: 15px;
    overflow-wrap: anywhere;
}

.actions-block {
    padding: 18px;
}

.account-action-block {
    padding: 0;
    overflow: hidden;
}

.account-action-trigger {
    min-height: 84px;
}

.billing-tile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 84px;
}

.account-tile-zone {
    min-width: 0;
    min-height: 84px;
    border: 0;
    color: var(--text-main);
    background: transparent;
    padding: 18px;
}

.tariff-trigger,
.instructions-trigger,
.balance-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.billing-tile .tariff-trigger {
    justify-content: flex-start;
    text-align: left;
}

.tariff-trigger strong,
.instructions-trigger strong {
    font-size: 20px;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.tariff-trigger.empty strong {
    text-transform: none;
}

.tariff-trigger:hover strong,
.tariff-trigger:focus-visible strong {
    color: var(--primary-strong);
}

.balance-trigger {
    gap: 8px;
    white-space: nowrap;
}

.billing-tile .balance-trigger {
    justify-content: flex-end;
    text-align: right;
}

.balance-trigger span {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 950;
    line-height: 1;
    transition: color 0.2s ease;
}

.balance-trigger .top-up-plus {
    display: inline-flex;
    width: auto;
    height: auto;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-1px);
}

.balance-trigger:hover span,
.balance-trigger:hover .top-up-plus {
    color: var(--primary-strong);
}

.accordion-block {
    padding: 0;
    overflow: hidden;
}

.accordion-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    align-items: center;
    width: 100%;
    min-height: 66px;
    border: 0;
    color: var(--text-main);
    background: transparent;
    padding: 18px;
    text-align: left;
}

.accordion-head span {
    color: var(--text-main);
    font-size: 13px;
}

.accordion-head strong {
    font-size: 18px;
    overflow-wrap: anywhere;
}

.accordion-head small {
    grid-column: 1 / -1;
    color: var(--text-main);
    font-size: 13px;
}

.accordion-content {
    display: none;
    padding: 0 18px 18px;
}

.accordion-block.open {
    border-color: var(--inner-border-strong);
}

.accordion-block.open .accordion-content {
    display: block;
}

.pill-row,
.tariff-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.account-modal-backdrop:has(.tariff-confirm-modal:not(.hidden))::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.account-modal-backdrop:has(.tariff-confirm-modal:not(.hidden)) .payment-modal,
.account-modal-backdrop:has(.tariff-confirm-modal:not(.hidden)) .tariff-modal,
.account-modal-backdrop:has(.tariff-confirm-modal:not(.hidden)) .instructions-modal {
    pointer-events: none;
}

.account-modal {
    position: relative;
    z-index: 0;
    width: min(640px, 100%);
    max-height: calc(100vh - 56px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--bg-modal);
    box-shadow: none;
    padding: 34px;
}

.payment-modal,
.tariff-modal {
    width: min(600px, 100%);
}

.instructions-modal {
    width: min(680px, 100%);
}

.tariff-confirm-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: min(440px, 100%);
    transform: translate(-50%, -50%);
    padding: 30px;
    text-align: center;
}

.tariff-confirm-modal .modal-head {
    margin-bottom: 14px;
}

.confirm-copy {
    margin: 0;
    color: var(--text-main);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
}

.confirm-note {
    margin: 12px 0 0;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.5;
}

.confirm-actions {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.confirm-actions .ghost-btn {
    min-height: 48px;
    font-weight: 750;
}

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

.modal-head-center {
    justify-content: center;
    text-align: center;
}

.instruction-head {
    display: grid;
    gap: 8px;
}

.modal-head h2 {
    margin: 2px 0 0;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
}

.modal-head strong {
    color: var(--text-main);
    font-size: 22px;
    white-space: nowrap;
}

.instruction-country {
    margin: 0;
    color: var(--primary-strong);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.35;
    text-align: center;
}

.instruction-country strong {
    color: inherit;
}

.modal-kicker,
.amount-field span,
.tariff-state span,
.tariff-option small,
.scheduled-plan span {
    color: var(--text-main);
}

.modal-kicker {
    display: block;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 700;
}

.modal-money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.topup-panel {
    margin-bottom: 14px;
}

.amount-field {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.amount-field input {
    width: 100%;
    min-height: 48px;
    border: 2px solid var(--inner-border);
    border-radius: 20px;
    color: var(--text-main);
    background: var(--bg-field);
    padding: 0 16px;
    font: inherit;
    font-size: 17px;
    font-weight: 650;
    appearance: textfield;
    -moz-appearance: textfield;
}

.amount-field input::placeholder {
    color: rgba(242, 238, 232, 0.68);
    opacity: 1;
}

.amount-field input::-webkit-outer-spin-button,
.amount-field input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.amount-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(197, 165, 128, 0.18);
}

[data-theme="light"] .amount-field input {
    border-color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .amount-field input::placeholder {
    color: rgba(19, 15, 10, 0.58);
}

.amount-field span {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 700;
}

.modal-primary {
    width: 100%;
    min-height: 48px;
    font-weight: 750;
}

.modal-message {
    min-height: 20px;
    margin: 14px 0 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-main);
    background: var(--bg-field);
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
}

.modal-message:empty {
    display: none;
}

.modal-message.error {
    border-color: rgba(240, 141, 141, 0.55);
    color: var(--danger);
}

.modal-message.success {
    border-color: rgba(155, 214, 170, 0.55);
    color: var(--success);
}

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

.instruction-card {
    display: grid;
    min-height: 98px;
    align-content: center;
    gap: 8px;
    border: 2px solid var(--inner-border);
    border-radius: 16px;
    color: var(--text-main);
    background: var(--bg-modal-card);
    padding: 16px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.instruction-card:hover,
.instruction-card:focus-visible {
    border-color: var(--primary-strong);
    color: var(--primary-strong);
    transform: translateY(-2px);
}

.instruction-card strong {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.instruction-card span {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
}

.instruction-alert {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    border: 2px solid var(--inner-border);
    border-radius: 16px;
    color: var(--text-main);
    background: var(--bg-modal-card);
    padding: 14px 16px;
}

.instruction-alert strong {
    color: var(--primary-strong);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
}

.instruction-alert span {
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
}

.instruction-steps {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.instruction-steps div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.instruction-steps span {
    color: var(--primary-strong);
    font-size: 16px;
    font-weight: 800;
}

.instruction-steps p {
    margin: 0;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.55;
}

.instruction-steps b {
    color: var(--text-main);
    font-weight: 750;
}

.instruction-endpoint {
    display: grid;
    width: 100%;
    gap: 8px;
    margin-bottom: 12px;
    border: 2px solid var(--inner-border);
    border-radius: 18px;
    color: var(--text-main);
    background: var(--bg-field);
    padding: 14px 16px;
    text-align: left;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.instruction-endpoint:hover,
.instruction-endpoint:focus-visible {
    border-color: var(--primary-strong);
}

.instruction-endpoint span {
    color: var(--primary-strong);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.instruction-endpoint code {
    overflow-wrap: anywhere;
    color: var(--text-main);
    font: inherit;
    font-size: 15px;
    font-weight: 650;
}

.instruction-endpoint[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
}

.instruction-back {
    width: 100%;
    min-height: 44px;
    margin-top: 4px;
    font-weight: 750;
}

.tariff-state,
.scheduled-plan {
    border: 2px solid var(--inner-border);
    border-radius: 16px;
    background: var(--bg-modal-card);
    padding: 16px;
    margin-bottom: 14px;
}

[data-theme="light"] .tariff-state,
[data-theme="light"] .scheduled-plan {
    border-color: var(--border);
}

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

.tariff-state span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 650;
}

.tariff-state strong {
    display: block;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.scheduled-plan {
    display: grid;
    gap: 12px;
}

.scheduled-plan .ghost-btn {
    width: 100%;
    min-height: 44px;
    font-weight: 750;
}

.scheduled-plan strong {
    display: block;
    font-size: 17px;
    font-weight: 650;
    line-height: 1.45;
}

.modal-tariff-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.tariff-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 118px;
    border: 2px solid var(--inner-border);
    border-radius: 16px;
    background: var(--bg-modal-card);
    padding: 16px;
    text-align: left;
}

[data-theme="light"] .tariff-option {
    border-color: var(--border);
}

.tariff-option strong,
.tariff-option b {
    display: block;
}

.tariff-name {
    display: block;
    color: var(--text-main);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-align: center;
    text-transform: uppercase;
}

.tariff-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.tariff-features {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.tariff-features span {
    display: block;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
}

.tariff-price-box {
    display: grid;
    justify-items: end;
    gap: 6px;
    flex-shrink: 0;
}

.tariff-option b {
    color: var(--text-main);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.tariff-option b small {
    display: inline;
    margin-left: 3px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 650;
}

.tariff-option.current {
    border-color: var(--inner-border-strong);
}

.tariff-option:hover {
    border-color: var(--primary-strong);
}

.tariff-option.scheduled {
    border-color: var(--primary);
}

.tariff-action {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 750;
    transition: color 0.2s ease;
}

.tariff-option:hover .tariff-name,
.tariff-option:hover .tariff-action,
.tariff-option.scheduled .tariff-action {
    color: var(--primary-strong);
}

.money-btn,
.plan-btn,
.copy-btn {
    min-height: 40px;
    padding: 9px 14px;
    font-weight: 750;
}

.plan-btn.tariff-option {
    min-height: 118px;
    padding: 16px;
}

.topup-panel .money-btn {
    min-height: 44px;
    border-radius: 14px;
}

.topup-panel .money-btn:hover {
    color: var(--primary-strong);
    border-color: var(--primary-strong);
}

.money-btn[disabled],
.plan-btn[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.hint {
    margin: 18px 0 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.hint.error {
    color: var(--danger);
}

.country-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.country-list .hint {
    grid-column: 1 / -1;
}

.country-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    border: 2px solid var(--inner-border);
    border-radius: 18px;
    color: var(--text-main);
    background: var(--bg-field);
    padding: 0 9px;
    font-size: 15px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.country-btn span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-btn.active {
    border-color: var(--inner-border-strong);
    background: var(--bg-field);
}

.country-code {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.country-config {
    min-height: 248px;
    margin-top: 0;
    padding: 24px;
}

.config-empty {
    display: grid;
    min-height: 150px;
    place-items: center;
    margin: 0;
    color: var(--text-muted);
    text-align: center;
}

.config-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.config-title h3 {
    margin: 0;
    font-size: 20px;
}

.config-line {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    border: 2px solid var(--inner-border);
    border-radius: 18px;
    padding: 15px 16px;
    background: transparent;
    cursor: pointer;
    transition: background 0.04s, border-color 0.04s, transform 0.04s;
}

@media (hover: hover) and (pointer: fine) {
    .config-line:hover {
        border-color: var(--primary) !important;
    }
}

.config-line:active,
.config-line.copied {
    transform: scale(0.98);
    border-color: #c5a580 !important;
    background: rgba(197, 165, 128, 0.3) !important;
}

.config-line strong {
    color: var(--primary);
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.config-line code {
    overflow-wrap: anywhere;
    color: var(--text-main);
    padding: 0;
    border: 0;
    background: transparent;
}

.masked-config {
    color: transparent;
    opacity: 0;
    user-select: none;
    transition: color 0.12s ease, opacity 0.12s ease;
}

.config-line:hover .masked-config,
.config-line:focus-within .masked-config {
    color: var(--text-main);
    opacity: 1;
    user-select: text;
}

.config-line.copied .masked-config {
    color: var(--text-main);
    opacity: 1;
}

@media (hover: none) {
    .config-line:active .masked-config {
        color: var(--text-main);
        opacity: 1;
    }
}

.copy-btn {
    display: none;
}

.copy-tooltip {
    position: fixed;
    z-index: 1000000;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #000;
    background: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    animation: fadeOutTooltip 1.2s forwards;
}

[data-theme="light"] .copy-tooltip {
    color: #fff;
    background: rgba(0, 0, 0, 0.95);
}

@keyframes fadeOutTooltip {
    0% {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -8px);
    }
}

@media (max-width: 920px) {
    .workspace,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .tariff-state,
    .modal-tariff-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .topbar,
    .shell {
        width: min(100% - 22px, var(--content-width));
    }

    .topbar {
        min-height: 92px;
    }

    .top-brand {
        top: 20px;
        font-size: clamp(24px, 9vw, 38px);
        letter-spacing: 0;
        padding-left: 0;
    }

    .user-menu {
        position: absolute;
        top: 14px;
        right: 14px;
        min-height: 48px;
        gap: 10px;
        padding: 6px;
    }

    .login-card .user-menu {
        min-height: 44px;
        padding: 5px;
    }

    .user-menu .icon-btn {
        width: 36px;
        height: 36px;
    }

    .shell.login-shell {
        min-height: calc(100svh - 92px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding-top: 0;
        padding-bottom: 82px;
    }

    .account-card .user-menu {
        top: 20px;
        right: 20px;
    }

    .account-card .panel-head {
        min-height: 48px;
        margin-bottom: 34px;
        padding-right: 116px;
    }

    .login-card .panel-head {
        padding: 0 58px;
    }

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

    .billing-tile {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .account-modal-backdrop {
        padding: 12px;
    }

    .account-modal {
        max-height: calc(100vh - 24px);
        padding: 18px;
        border-radius: 22px;
    }

    .instruction-device-grid {
        grid-template-columns: 1fr;
    }

    .modal-head {
        align-items: flex-start;
    }

    .shell {
        padding-top: 18px;
    }

    .hero h1 {
        font-size: clamp(46px, 17vw, 72px);
    }

    .panel {
        padding: 18px;
        border-radius: 22px;
    }

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

    .config-line {
        grid-template-columns: 1fr;
    }

    .copy-btn {
        width: 100%;
    }
}
