/* ---------------- PROFILE ---------------- */

.profile-row span:first-child {
    font-weight: bold;
    color: var(--text-muted);
}

.subscription-status {
    margin-top: 20px;
    font-size: 18px;
}

.subscription-details {
    margin-top: 25px;
}

.subscription-card {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.subscription-card-title {
    margin: 0 0 14px;
}

.subscription-card-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.device-subscription-note,
.device-subscription-empty {
    margin: 0 0 30px;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
    color: var(--text-soft);
}

.device-subscription-empty {
    margin-bottom: 0;
}

.device-subscription-current {
    margin-bottom: 20px;
    text-align: left;
    color: var(--text-soft);
}

.device-subscription-details {
    margin-top: 0;
}

.device-profile-row {
    align-items: flex-start;
    gap: 16px;
}

.device-user-agent-value {
    max-width: 60%;
    text-align: right;
    word-break: break-word;
}

.device-empty-block {
    padding: 30px;
    text-align: center;
}

.subscription-select-btn {
    display: block;
    text-align: center;
}

.subscription-select-title {
    font-size: 16px;
    font-weight: 600;
}

.subscription-select-meta {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-muted);
}

.subscription-disable-btn {
    border: 1px solid var(--accent-danger-border);
    color: var(--on-primary);
    background: var(--button-danger);
}

.subscription-disable-btn:hover,
.subscription-disable-btn:focus-visible,
.subscription-disable-btn:active {
    color: var(--on-primary);
}

.subscription-disable-btn:hover {
    border-color: var(--accent-danger-border-hover);
    background: var(--button-danger-hover);
}

.subscription-disable-btn:active {
    border-color: var(--accent-danger-border-hover);
    background: var(--button-danger-hover);
}

.subscription-disable-form,
.subscription-edit-form {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--form-soft-bg);
}

.subscription-edit-meta,
.subscription-edit-note {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-soft);
}

.subscription-edit-note {
    margin-top: 10px;
}

.subscription-edit-note-spaced {
    margin-bottom: 10px;
}

.subscription-edit-note-spaced + .subscription-edit-buttons {
    margin-top: 10px;
}

.subscription-edit-buttons {
    margin-top: 20px;
}

.subscription-disable-form .subscription-edit-meta {
    margin-bottom: 10px;
}

.device-delete-form .subscription-edit-meta {
    text-align: center;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.profile-row a {
    color: var(--text);
    text-decoration: underline;
    word-break: break-all;
}

.connect-instruction {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-soft);
    text-align: center;
}

#issuePlanMeta {
    margin-top: 10px;
    margin-bottom: 25px;
}

/* ---------------- USER ACCOUNT ---------------- */

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.user-actions button {
    width: 300px;
}

.stacked-action-buttons {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.stacked-action-buttons button {
    width: 300px;
}

.device-subscription-actions {
    margin-top: 20px;
}

.btn-user {
    width: 300px;
}

.user-buttons {
    margin-top: 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.user-label {
    margin-top: 20px;
}

.user-error {
    color: var(--error);
    margin: 0;
    text-align: center;
    min-height: 20px;
    padding: 10px 0;
}

.user-error:empty {
    display: none;
}

.user-device-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.user-device-row span:first-child {
    font-weight: bold;
    color: var(--text-muted);
}

.user-device-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------------- USER FREE KEYS ---------------- */

.user-header-block {
    padding: 30px 30px;
    border-color: var(--hero-border);
    background: var(--hero-surface);
    box-shadow: var(--hero-shadow);
}

.user-header-block h2 {
    margin-bottom: 0;
}

.user-empty-block {
    text-align: center;
}

.user-key-card {
    text-align: left;
}

.user-info-box {
    background: var(--surface-soft);
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.4;
    font-family: monospace;
    text-align: left;
}

.user-key-box {
    background: var(--surface-soft);
    padding: 12px 14px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
    font-family: monospace;
    text-align: left;
}

.user-section-label {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.user-key-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.app-toast::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.45;
    transform: scaleX(1);
    transform-origin: left center;
}

.app-toast-container {
    position: fixed;
    top: 112px;
    right: 0;
    z-index: 1600;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    width: min(420px, calc(100vw - 28px));
    min-height: 76px;
    box-sizing: border-box;
    margin: 0;
    padding: 15px 20px;
    border: 1px solid var(--payment-neutral-border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    background: var(--payment-neutral-bg);
    color: var(--payment-neutral-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    overflow-wrap: anywhere;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(calc(100% + 2px));
    transition:
        transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.24s ease;
}

.app-toast-message {
    flex: 1 1 auto;
    min-width: 0;
}

.app-toast-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.78;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        opacity 0.18s ease,
        transform 0.18s ease;
}

.app-toast-close::before,
.app-toast-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

.app-toast-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.app-toast-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.app-toast-close:hover,
.app-toast-close:focus-visible {
    background: color-mix(in srgb, currentColor 12%, transparent);
    opacity: 0.94;
    transform: scale(1.04);
}

.app-toast-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

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

.app-toast.is-visible::after {
    animation: notification-progress var(--app-toast-duration, 3500ms) linear forwards;
}

.app-toast.is-dismissing::after {
    animation: none;
    transform: scaleX(var(--app-toast-progress-scale, 0));
}

.app-toast.app-toast-persistent::after {
    display: none;
}

.app-toast-success {
    border-color: var(--payment-success-border);
    background: var(--payment-success-bg);
    color: var(--payment-success-text);
}

.app-toast-warning {
    border-color: var(--warning-border-strong);
    background: var(--warning-soft);
    color: var(--warning-notice-text);
}

.app-toast-danger {
    border-color: var(--payment-danger-border);
    background: var(--payment-danger-bg);
    color: var(--payment-danger-text);
}

@keyframes notification-progress {
    to {
        transform: scaleX(0);
    }
}

.copy-key-helper {
    position: fixed;
    left: -9999px;
    top: 0;
}

.payment-return-page .block {
    max-width: none;
}

.payment-return-state-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 150px;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 700;
}

.payment-return-loader {
    width: 28px;
    height: 28px;
    border: 3px solid var(--payment-neutral-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: payment-return-spin 0.8s linear infinite;
}

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

.user-back-block {
    padding: 25px 30px;
    text-align: center;
}

.user-back-block button {
    margin: 0 auto;
}

/* ---------------- REDESIGNED FREE KEYS ---------------- */

.free-keys-dashboard-page .block {
    max-width: none;
}

.free-keys-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
    border-color: var(--hero-border);
    background: var(--hero-surface-soft);
    box-shadow: var(--hero-shadow);
}

.free-keys-hero h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.12;
}

.free-keys-hero p {
    max-width: 650px;
    margin: 12px 0 0;
    color: var(--text-soft);
}

.free-keys-hero-actions {
    flex: 0 0 auto;
}

.free-keys-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 0 20px 24px;
}

.free-keys-state-block,
.free-keys-empty-block {
    min-height: 112px;
}

.free-keys-state-block {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.free-keys-state-block p {
    margin: 0;
}

.free-keys-empty-block {
    text-align: left;
}

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

.free-keys-list > .free-key-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.free-key-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    box-shadow: var(--shadow-card);
    text-align: left;
}

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

.free-key-card-head h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.free-key-card-head .dashboard-status {
    flex-shrink: 0;
}

.free-key-copy-panel {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.free-key-copy-panel span {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}

.free-key-copy-panel code {
    max-height: 170px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
    font-family: Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    line-height: 1.5;
}

.free-key-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
}

.free-key-card-footer p {
    max-width: 420px;
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.45;
}

.free-key-card-footer .user-key-buttons {
    flex: 0 0 auto;
    margin-top: 0;
    justify-content: flex-end;
}

/* ---------------- USER SUBSCRIPTION PURCHASE ---------------- */

.subscription-purchase-block {
    text-align: left;
}

.subscription-purchase-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
    gap: 22px;
    align-items: start;
}

.subscription-plan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-plan-option {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--text);
    text-align: left;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.subscription-plan-option:hover,
.subscription-plan-option:focus-visible,
.subscription-plan-option.is-selected {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.subscription-plan-option.is-selected {
    box-shadow: inset 3px 0 0 var(--accent-strong);
}

.subscription-plan-option:active {
    border-color: var(--accent-border-strong);
    background: var(--accent-soft);
    transform: translateY(1px);
}

.subscription-plan-name,
.subscription-plan-description,
.subscription-plan-meta {
    display: block;
}

.subscription-plan-name {
    font-size: 17px;
    font-weight: 700;
}

.subscription-plan-badge {
    display: inline-flex;
    margin-left: 8px;
    padding: 3px 7px;
    border: 1px solid var(--success-border-strong);
    border-radius: 999px;
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.subscription-plan-description {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.45;
}

.subscription-plan-meta {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.subscription-purchase-form {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--form-soft-bg);
}

.subscription-selected-info h3 {
    margin: 0 0 8px;
}

.subscription-selected-info p {
    max-width: none;
    margin: 0;
    color: var(--text-soft);
    text-align: left;
}

.subscription-selected-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.subscription-selected-meta span {
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    background: var(--surface-soft);
    font-size: 13px;
}

.subscription-current-note {
    margin-top: 14px;
    margin-bottom: 18px;
    padding: 10px 12px;
    border: 1px solid var(--subscription-notice-border);
    border-radius: var(--radius);
    color: var(--subscription-notice-text);
    background: var(--subscription-notice-bg);
    font-size: 14px;
    line-height: 1.45;
}

.subscription-price-summary {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.subscription-limit-warning {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--warning-border-strong);
    border-radius: var(--radius);
    color: var(--warning-notice-text);
    background: var(--warning-soft);
    font-size: 14px;
    line-height: 1.45;
}

.subscription-price-row,
.subscription-price-total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
}

.subscription-price-row {
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
}

.subscription-price-row span,
.subscription-price-total span {
    min-width: 0;
}

.subscription-price-row strong,
.subscription-price-total strong {
    white-space: nowrap;
}

.subscription-price-total {
    background: var(--surface-soft);
    font-size: 18px;
    font-weight: 700;
}

.subscription-purchase-actions {
    margin-top: 20px;
}

.subscription-recipient-disclosure {
    margin: 24px 20px 0;
    padding: 16px 4px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
    text-align: left;
}

.subscription-recipient-disclosure strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text-soft);
    font-size: 13px;
}

/* ---------------- REDESIGNED ACCOUNT ---------------- */

.profile-body {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 20px 42px;
}

.dashboard-page .block {
    max-width: none;
}

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
    border-color: var(--hero-border);
    background: var(--hero-surface);
    box-shadow: var(--hero-shadow);
}

.dashboard-hero h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.dashboard-profile-copy {
    min-width: 0;
}

.dashboard-profile-email {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-hero p {
    max-width: 640px;
    margin: 12px 0 0;
    color: var(--text-soft);
}

.dashboard-hero-actions {
    flex: 0 0 auto;
}

.dashboard-eyebrow {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    margin-bottom: 10px;
    color: var(--trust);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 20px 24px;
}

.dashboard-summary-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-summary-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.dashboard-summary-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-summary-card strong {
    display: block;
    color: var(--text);
    font-size: 24px;
    line-height: 1.2;
}

.dashboard-summary-card small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.35;
}

.dashboard-access-card.is-active strong {
    color: var(--success);
}

.dashboard-access-card.is-inactive strong {
    color: var(--error);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin: 0 20px;
}

.dashboard-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-grid .block,
.dashboard-summary-grid + .dashboard-grid .block {
    margin: 0;
}

.dashboard-main,
.dashboard-action-panel {
    text-align: left;
}

.dashboard-section-head {
    margin-bottom: 18px;
}

.dashboard-section-head h2 {
    margin: 0;
    font-size: 26px;
}

.dashboard-subscription-list {
    display: grid;
    gap: 16px;
    margin-top: 0;
}

.dashboard-subscription-card {
    margin-top: 0;
    padding: 22px;
    background: var(--surface-strong);
    box-shadow: none;
}

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

.dashboard-status {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-status.is-active {
    color: var(--success);
    background: var(--trust-soft);
}

.dashboard-status.is-inactive {
    color: var(--error);
    background: var(--danger-surface);
}

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

.dashboard-detail-grid .profile-row {
    min-width: 0;
}

.dashboard-connect-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 14px;
    border: 1px solid var(--subscription-notice-border);
    border-radius: var(--radius);
    background: var(--subscription-notice-bg);
}

.dashboard-connect-box strong,
.dashboard-connect-box span {
    display: block;
}

.dashboard-connect-box strong {
    color: var(--subscription-notice-text);
}

.dashboard-connect-box span {
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 14px;
}

.dashboard-connect-box.is-muted {
    border-color: var(--border);
    background: var(--surface-soft);
}

.dashboard-empty {
    padding: 24px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-soft);
    text-align: center;
}

.dashboard-empty h3 {
    margin-bottom: 8px;
}

.dashboard-action-panel {
    position: sticky;
    top: 98px;
}

.dashboard-action-panel .stacked-action-buttons {
    align-items: stretch;
}

.dashboard-action-panel .stacked-action-buttons button {
    width: 100%;
}

/* ---------------- REDESIGNED CHECKOUT ---------------- */

.subscription-dashboard-page .block {
    max-width: none;
}

.subscription-dashboard-hero {
    border-color: var(--hero-border);
    background: var(--hero-surface);
    box-shadow: var(--hero-shadow);
}

.subscription-state-block {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    text-align: center;
}

.subscription-state-block > p {
    margin: 0;
}

.subscription-state-block .dashboard-empty {
    width: 100%;
}

.subscription-state-block .dashboard-empty p {
    max-width: none;
}

.subscription-purchase-block {
    padding: 30px;
    text-align: left;
}

.subscription-purchase-grid {
    grid-template-columns: minmax(280px, 0.86fr) minmax(340px, 1.14fr);
    gap: 18px;
}

.subscription-purchase-head {
    margin-bottom: 18px;
}

.subscription-plan-panel,
.subscription-purchase-form {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    box-shadow: var(--shadow-card);
}

.subscription-plan-list {
    padding: 16px;
    background: var(--transparent);
    border-right: none;
}

.subscription-plan-option {
    padding: 16px;
    background: var(--surface);
    box-shadow: none;
}

.subscription-plan-option:hover,
.subscription-plan-option:focus-visible {
    border-color: var(--accent-border-strong);
    background: var(--accent-hover-bg);
}

.subscription-plan-option.is-selected {
    border-color: var(--accent-border-strong);
    background: var(--accent-soft);
    box-shadow: inset 4px 0 0 var(--accent);
}

.subscription-plan-badge {
    border-color: var(--trust-border);
    color: var(--success);
    background: var(--trust-soft);
}

.subscription-purchase-form {
    min-height: 100%;
    padding: 24px;
}

.subscription-selected-meta span,
.subscription-price-total {
    background: var(--surface-soft);
}

.subscription-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.subscription-traffic-field {
    margin-top: 14px;
}

.subscription-current-note {
    border-color: var(--subscription-notice-border);
    color: var(--subscription-notice-text);
    background: var(--subscription-notice-bg);
}

.subscription-limit-warning {
    border-color: var(--warning-border);
    color: var(--warning);
    background: var(--warning-soft);
}

.subscription-payment-disabled {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--warning-border);
    border-radius: var(--radius);
    color: var(--warning);
    background: var(--warning-soft);
}

.subscription-payment-disabled strong,
.subscription-payment-disabled span {
    display: block;
}

.subscription-payment-disabled span {
    color: var(--text-soft);
    line-height: 1.45;
}

/* ---------------- SETTINGS DASHBOARD ---------------- */

.settings-dashboard-page .block {
    max-width: none;
}

.settings-dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
    border-color: var(--hero-border);
    background: var(--hero-surface);
    box-shadow: var(--hero-shadow);
}

.settings-dashboard-hero h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.12;
}

.settings-dashboard-hero p {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--text-soft);
}

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

.settings-dashboard-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.settings-dashboard-grid > .settings-dashboard-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.settings-dashboard-card {
    width: 100%;
    min-height: 132px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-dashboard-card:hover,
.settings-dashboard-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent-border);
    box-shadow: var(--shadow-card-hover);
}

.settings-dashboard-card:active {
    transform: translateY(0);
    border-color: var(--accent-border-strong);
    background: var(--accent-hover-bg);
    box-shadow: var(--shadow-subtle);
}

.settings-dashboard-card-muted {
    background: var(--surface-soft);
}

.settings-dashboard-card-danger {
    border-color: var(--danger-border-subtle);
    background: var(--danger-soft);
}

.settings-dashboard-card-danger:hover,
.settings-dashboard-card-danger:focus-visible {
    border-color: var(--danger-border-strong);
}

.settings-dashboard-card-danger:active {
    border-color: var(--danger-border-strong);
    background: var(--danger-surface);
}

.settings-dashboard-card-danger .settings-dashboard-icon {
    background: var(--danger-icon-gradient);
}

.settings-dashboard-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: var(--radius);
    color: var(--on-primary);
    background: var(--icon-gradient);
    font-weight: 900;
}

.settings-dashboard-content strong,
.settings-dashboard-content small {
    display: block;
}

.settings-dashboard-content strong {
    margin-bottom: 7px;
    font-size: 20px;
    line-height: 1.25;
}

.settings-dashboard-content small {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.45;
}

.theme-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.settings-theme-block {
    max-width: none;
    text-align: left;
}

.settings-theme-block h2 {
    margin-bottom: 10px;
}

.settings-theme-block p {
    max-width: none;
    margin: 0;
    color: var(--text-soft);
    text-align: left;
}

.settings-theme-block .theme-toggle {
    max-width: 420px;
}

.theme-choice {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    background: var(--button-glass);
    font-weight: 800;
    line-height: 1.2;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}

.theme-choice:hover,
.theme-choice:focus-visible {
    color: var(--text);
    border-color: var(--accent-border-strong);
    background: var(--accent-hover-bg);
}

.theme-choice:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.theme-choice.is-active {
    color: var(--on-primary);
    border-color: var(--button-primary-border);
    background: var(--button-primary);
    box-shadow: var(--button-primary-shadow);
}

.theme-choice:active {
    color: var(--text);
    border-color: var(--accent-border-strong);
    background: var(--accent-soft);
}

.theme-choice.is-active:active {
    color: var(--on-primary);
    background: var(--button-primary-active);
}

.device-subscription-card .settings-dashboard-content small + small {
    margin-top: 4px;
}

.settings-loading-block {
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    text-align: center;
}

.settings-loading-block p {
    margin: 0;
}

.settings-devices-list-block,
.settings-confirm-block,
.settings-payments-list-block,
.settings-empty-block {
    max-width: none;
    text-align: left;
}

.settings-payments-list-block .subscription-details {
    max-width: none;
    margin: 0;
}

.settings-empty-block {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    text-align: center;
}

.settings-empty-block p {
    margin: 0;
}

.device-empty-block .dashboard-empty {
    width: 100%;
    text-align: center;
}

.device-empty-block .dashboard-empty p {
    max-width: none;
}

.settings-confirm-block h2 {
    margin-bottom: 10px;
}

.settings-confirm-block p {
    max-width: none;
    margin: 0;
    color: var(--text-soft);
}

.settings-confirm-block .user-buttons {
    justify-content: flex-start;
    margin-top: 20px;
}

.settings-confirm-block-danger {
    border-color: var(--danger-border);
    background: var(--danger-soft);
}

.device-dashboard-card .device-user-agent-value {
    max-width: none;
    text-align: left;
}
