:root {
    --app-font: "Inter", "Segoe UI", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-rgb: 37, 99, 235;
    --color-secondary: #0f766e;
    --color-bg: #f4f7fb;
    --color-surface: #ffffff;
    --color-surface-soft: #f8fafc;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #dbe4f0;
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.055);
    --sidebar-bg: #f8fbff;
    --sidebar-text: #334155;
    --sidebar-active: #e8f1ff;
}

[data-theme="dark"] {
    --color-primary: #93c5fd;
    --color-primary-hover: #60a5fa;
    --color-primary-rgb: 147, 197, 253;
    --color-secondary: #2dd4bf;
    --color-bg: #0b1220;
    --color-surface: #111a2c;
    --color-surface-soft: #1a2438;
    --color-text: #e2e8f0;
    --color-muted: #94a3b8;
    --color-border: #25314a;
    --shadow-soft: 0 14px 32px rgba(2, 6, 23, 0.45);
    --sidebar-bg: #0b1120;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #1f2b44;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.app-body {
    font-family: var(--app-font);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0)),
        var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.app-progress-thin {
    height: 0.5rem;
}

.app-pre-wrap {
    white-space: pre-wrap;
}

.app-w-42 { width: 42px; }
.app-w-84 { width: 84px; }
.app-w-90 { width: 90px; }
.app-w-120 { width: 120px; }
.app-w-140 { width: 140px; }
.app-w-180 { width: 180px; }
.app-w-200 { width: 200px; }
.app-w-220 { width: 220px; }
.app-w-280 { width: 280px; }
.app-min-w-140 { min-width: 140px; }
.app-min-w-150 { min-width: 150px; }
.app-min-w-260 { min-width: 260px; }
.app-min-w-280 { min-width: 280px; }
.app-max-w-220 { max-width: 220px; }
.app-max-w-420 { max-width: 420px; }
.app-size-48 {
    width: 48px;
    height: 48px;
}

.app-debug-transcript {
    white-space: pre-wrap;
    max-height: 360px;
    overflow: auto;
}

.app-toast-delay-3500 {
    --toast-delay: 3500ms;
}

.app-toast-delay-5000 {
    --toast-delay: 5000ms;
}

/* Global UI effects across all pages */
.app-content > * {
    animation: appFadeUp 0.35s ease both;
}

.card,
.btn,
.form-control,
.form-select,
.nav-link,
.dropdown-menu,
.table tbody tr {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible {
    outline: 3px solid rgba(var(--color-primary-rgb), 0.18);
    outline-offset: 2px;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.9;
}

.profile-rating-picker {
    --profile-rating-accent: #f5bd00;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 11.75rem;
    min-height: 1.85rem;
    border: 1px solid var(--profile-rating-accent);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.profile-rating-score {
    flex: 0 0 auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0 0.4rem;
    margin: -1px 0 -1px -1px;
    border-radius: 999px;
    background: var(--profile-rating-accent);
    color: #fff;
    text-align: center;
    text-transform: uppercase;
}

.profile-rating-score strong {
    font-size: 0.78rem;
    line-height: 1;
    font-weight: 800;
}

.profile-rating-score span {
    margin-top: 0.06rem;
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 800;
}

.profile-rating-stars {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.04rem;
    padding: 0.14rem 0.24rem;
}

.profile-rating-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.profile-rating-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.92rem;
    height: 0.92rem;
    margin: 0;
    color: #cbd5e1;
    cursor: pointer;
    line-height: 1;
    transition: color 0.14s ease, transform 0.14s ease;
}

.profile-rating-star i {
    font-size: 0.84rem;
}

.profile-rating-star.is-active,
.profile-rating-star.is-preview {
    color: var(--profile-rating-accent);
}

.profile-rating-star:hover {
    transform: translateY(-1px) scale(1.04);
}

.profile-rating-input:focus-visible + .profile-rating-star {
    outline: 3px solid rgba(245, 189, 0, 0.35);
    outline-offset: 3px;
    border-radius: 0.65rem;
}

[data-theme="dark"] .profile-rating-picker {
    background: #111a2c;
}

[data-theme="dark"] .profile-rating-star {
    color: #475569;
}

[data-theme="dark"] .profile-rating-star.is-active,
[data-theme="dark"] .profile-rating-star.is-preview {
    color: var(--profile-rating-accent);
}

.profile-social-rating-form {
    position: relative;
    padding: 0.5rem 0.6rem 0.5rem 0.72rem;
    border: 1px solid var(--color-border);
    border-radius: 0.55rem;
    background: var(--color-surface-soft);
    overflow: hidden;
}

.profile-social-rating-form::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: #f5bd00;
}

.profile-social-rating-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.profile-social-rating-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.profile-social-rating-text {
    min-width: 0;
}

.profile-social-rating-icon {
    flex: 0 0 1.55rem;
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    background: rgba(245, 189, 0, 0.16);
    color: #b77900;
}

.profile-social-rating-title-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.04rem;
}

.profile-social-rating-status {
    font-size: 0.74rem;
    color: var(--color-muted);
}

.profile-social-rating-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-social-rating-mini-stars {
    display: flex;
    align-items: center;
    gap: 0.04rem;
    color: #cbd5e1;
    font-size: 0.68rem;
    line-height: 1;
}

.profile-social-rating-mini-stars .is-active {
    color: #f5bd00;
}

.profile-social-rating-summary .btn {
    flex: 0 0 auto;
    padding: 0.16rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.25;
}

.profile-social-rating-editor {
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.profile-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.7rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.profile-bulk-summary {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.profile-bulk-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
}

.profile-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.profile-select-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.profile-select-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.profile-select-control {
    min-height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.24rem 0.48rem;
    border: 1px solid rgba(var(--color-primary-rgb), 0.22);
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.06);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.profile-select-icon-on,
.profile-select-text-on {
    display: none;
}

.profile-select-input:checked + .profile-select-control {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.14);
}

.profile-select-input:checked + .profile-select-control .profile-select-icon-off {
    display: none;
}

.profile-select-input:checked + .profile-select-control .profile-select-icon-on {
    display: inline-block;
}

.profile-select-input:checked + .profile-select-control .profile-select-text-off {
    display: none;
}

.profile-select-input:checked + .profile-select-control .profile-select-text-on {
    display: inline;
}

.profile-select-input:focus-visible + .profile-select-control {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.18);
}

.profile-select-check:hover .profile-select-control {
    border-color: rgba(var(--color-primary-rgb), 0.42);
    background: rgba(var(--color-primary-rgb), 0.1);
}

.profile-select-check:hover .profile-select-input:checked + .profile-select-control {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.profile-card-item.is-selected .profile-fb-card {
    border-color: rgba(var(--color-primary-rgb), 0.62);
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.16), var(--shadow-sm);
}

@media (max-width: 575.98px) {
    .profile-social-rating-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-social-rating-actions {
        width: 100%;
        justify-content: space-between;
    }

    .profile-bulk-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-bulk-actions {
        justify-content: flex-start;
    }
}

.table tbody tr:hover {
    background-color: rgba(var(--color-primary-rgb), 0.05);
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.18);
}

@keyframes appFadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .app-content > * {
        animation: none;
    }

    .card,
    .btn,
    .form-control,
    .form-select,
    .nav-link,
    .dropdown-menu,
    .table tbody tr {
        transition: none;
    }
}

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

.app-main {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.app-sidebar {
    background: linear-gradient(180deg, #f8fbff, #f2f7ff 55%, #edf4ff);
    color: var(--sidebar-text);
    padding: 0.95rem 0.85rem;
    flex-direction: column;
    border-right: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    box-shadow: 10px 0 24px rgba(15, 23, 42, 0.08);
}

.app-sidebar .text-muted {
    color: #64748b !important;
}

.app-sidebar-head {
    padding: 0.55rem;
    margin-bottom: 0.45rem;
    border: 1px solid #dbeafe;
    border-radius: 0.95rem;
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.95));
    backdrop-filter: blur(8px);
}

.app-sidebar-scroll {
    overflow-y: auto;
    padding-right: 0.1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.app-sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.36);
    border-radius: 999px;
}

.app-logo {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.03rem;
    display: flex;
    align-items: center;
    gap: 0.62rem;
    margin-bottom: 0.35rem;
}

.app-logo-mark {
    width: 2.05rem;
    height: 2.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    font-size: 0.88rem;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(var(--color-primary-rgb), 0.35);
}

.app-logo-mark.has-brand-asset,
.app-brand-mark.has-brand-asset {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.app-logo-mark.has-brand-asset img,
.app-brand-mark.has-brand-asset img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.app-sidebar-subtitle {
    color: #64748b;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.app-sidebar-label {
    color: #64748b;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin: 0.22rem 0.55rem 0.38rem;
}

.app-sidebar-foot {
    margin-top: auto;
    padding: 0.72rem 0.55rem 0.5rem;
    border-top: 1px solid #dbeafe;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(239, 246, 255, 0.95));
}

.app-sidebar-foot .btn {
    border-radius: 0.75rem;
    border-color: var(--color-border);
    color: var(--color-text);
}

.app-sidebar-balance {
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    border-radius: 0.78rem;
    padding: 0.5rem 0.58rem;
    background: linear-gradient(140deg, #eff6ff, #eaf2ff);
    font-size: 0.82rem;
}

.app-sidebar-balance strong {
    color: var(--color-primary-hover);
}

.app-nav .nav-link {
    color: var(--sidebar-text);
    border-radius: 0.84rem;
    display: flex;
    align-items: center;
    gap: 0.62rem;
    padding: 0.56rem 0.7rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    border: 1px solid transparent;
}

.app-nav .nav-link i {
    width: 1.72rem;
    height: 1.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(var(--color-primary-rgb), 0.14);
    font-size: 0.9rem;
}

.app-nav .nav-link:hover,
.app-nav .nav-link.active {
    background: linear-gradient(145deg, rgba(var(--color-primary-rgb), 0.14), rgba(var(--color-primary-rgb), 0.1));
    color: var(--color-primary-hover);
    border-color: rgba(var(--color-primary-rgb), 0.16);
}

.app-nav .nav-link.active {
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 10px 18px rgba(var(--color-primary-rgb), 0.2);
}

.app-nav .nav-link.active i {
    background: rgba(255, 255, 255, 0.18);
}

.app-topbar {
    min-height: 72px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76));
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1045;
    overflow: visible;
}

.app-topbar-chip {
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-muted);
}

.app-topbar-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

.app-topbar-actions {
    min-width: 0;
    flex-wrap: nowrap;
}

.app-balance-chip {
    border-radius: 999px;
    font-weight: 600;
}

.app-balance-chip strong {
    font-size: 0.78rem;
}

.app-mobile-new-profile-fab {
    position: fixed;
    right: 0.9rem;
    bottom: 5.35rem;
    right: max(0.9rem, calc(env(safe-area-inset-right) + 0.7rem));
    bottom: max(5.35rem, calc(env(safe-area-inset-bottom) + 4.95rem));
    z-index: 1092;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.64rem 0.92rem;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(var(--color-primary-rgb), 0.34);
}

.app-mobile-new-profile-topbar {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.4rem;
    border-radius: 999px;
}

.app-mobile-new-profile-fab i {
    font-size: 0.92rem;
}

body.modal-open .app-mobile-new-profile-fab {
    opacity: 0;
    pointer-events: none;
}

.app-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1091;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.2rem;
    padding: 0.38rem max(0.55rem, env(safe-area-inset-left)) max(0.42rem, env(safe-area-inset-bottom)) max(0.55rem, env(safe-area-inset-right));
    border-top: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -14px 34px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px);
}

.app-mobile-bottom-link {
    min-width: 0;
    min-height: 3.1rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    border-radius: 0.5rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.68rem;
    line-height: 1.1;
    font-weight: 750;
}

.app-mobile-bottom-link i {
    font-size: 1.12rem;
    line-height: 1;
}

.app-mobile-bottom-link span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-mobile-bottom-link:hover,
.app-mobile-bottom-link:focus,
.app-mobile-bottom-link.active {
    background: #eaf2ff;
    color: var(--color-primary-hover);
}

.app-mobile-bottom-link {
    position: relative;
}

.app-mobile-bottom-link.active::after {
    content: "";
    position: absolute;
    top: 0.16rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1.1rem;
    height: 3px;
    border-radius: 999px;
    background: var(--color-primary);
}

@media (min-width: 1600px) {
    .app-shell .app-content:not(.app-content-home) {
        max-width: 1480px;
        margin-inline: auto;
    }
}

body.modal-open .app-mobile-bottom-nav {
    opacity: 0;
    pointer-events: none;
}

.app-user-menu {
    position: relative;
}

.app-user-trigger {
    border-radius: 999px;
    padding-right: 0.65rem;
}

.app-user-compact {
    background: transparent !important;
    border-color: transparent !important;
    color: #5f6781;
    box-shadow: none !important;
    padding-left: 0.2rem;
}

.app-user-compact:hover,
.app-user-compact:focus {
    background: #f1f4fb !important;
    border-color: #e5e9f2 !important;
    color: #4c5570;
}

.app-user-menu .dropdown-menu {
    min-width: 220px;
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    padding: 0.35rem;
    z-index: 1080;
}

.app-user-menu .dropdown-item {
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.app-user-menu .dropdown-item:hover {
    background: var(--color-surface-soft);
}

.app-topbar-icon-btn {
    border-radius: 999px;
    min-width: 2.15rem;
    min-height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-updates-icon-btn {
    width: 2rem;
    height: 2rem;
    border: 0;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.app-updates-icon-btn:hover,
.app-updates-icon-btn:focus {
    background: #f1f4fb;
    color: #5e6783;
}

.app-updates-icon-btn i {
    font-size: 0.92rem;
}

.app-updates-trigger {
    min-height: 2.15rem;
    border-radius: 999px;
    padding-right: 0.7rem;
}

.app-updates-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.app-topbar-counter {
    position: absolute;
    top: -0.32rem;
    right: -0.28rem;
    font-size: 0.62rem;
    line-height: 1;
    padding: 0.22rem 0.36rem;
    border: 2px solid var(--color-surface);
}

.app-notif-dot {
    position: absolute;
    top: 0.35rem;
    right: 0.32rem;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: #ff5b6b;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(255, 91, 107, 0.2);
}

.no-caret.dropdown-toggle::after {
    display: none !important;
}

.app-notif-menu {
    width: min(380px, calc(100vw - 1rem));
    max-height: 440px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    padding: 0.35rem;
    z-index: 1080;
}

.app-notif-item {
    border-radius: 0.6rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.app-notif-item.unread {
    background: rgba(var(--color-primary-rgb), 0.08);
}

.app-notif-item .xsmall {
    font-size: 0.72rem;
}

[data-theme="dark"] .app-topbar,
[data-theme="dark"] .app-public-nav {
    background:
        linear-gradient(180deg, rgba(11, 18, 32, 0.9), rgba(11, 18, 32, 0.76));
}

[data-theme="dark"] .app-public-announcement {
    background: #020407;
}

[data-theme="dark"] .app-public-nav-marketing {
    background: rgba(11, 18, 32, 0.96);
    border-bottom-color: rgba(148, 163, 184, 0.12);
}

[data-theme="dark"] .app-public-menu .nav-link,
[data-theme="dark"] .app-public-chat-btn {
    color: #dbe3f4;
}

[data-theme="dark"] .app-public-menu .nav-link:hover,
[data-theme="dark"] .app-public-menu .nav-link:focus,
[data-theme="dark"] .app-public-chat-btn:hover,
[data-theme="dark"] .app-public-chat-btn:focus {
    background: #172237;
    color: #fff;
}

[data-theme="dark"] .app-public-chat-btn {
    border-color: #334155;
    background: transparent;
}

[data-theme="dark"] .app-mobile-new-profile-fab {
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.5);
}

@media (max-width: 767.98px) {
    .app-public-announcement-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-public-nav-actions {
        margin-top: 0.85rem;
        flex-wrap: wrap;
    }

    .app-topbar {
        min-height: 64px;
    }

    .app-topbar-actions {
        gap: 0.4rem !important;
    }

    .app-topbar-actions > .btn,
    .app-topbar-actions .dropdown > .btn {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-updates-icon-btn {
        width: 2.75rem;
        height: 2.75rem;
    }

    .app-updates-label {
        display: none;
    }

    .app-balance-chip strong {
        font-size: 0.72rem;
    }

    .app-topbar-dropdown .app-notif-menu.dropdown-menu,
    .app-topbar-dropdown .app-notif-menu.dropdown-menu.show {
        position: fixed !important;
        top: 66px !important;
        left: 0.5rem !important;
        right: 0.5rem !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        max-height: calc(100vh - 78px);
        transform: none !important;
        overflow-y: auto;
        z-index: 1090;
    }

    .app-topbar-dropdown .app-notif-menu.dropdown-menu[data-bs-popper] {
        left: 0.5rem !important;
        right: 0.5rem !important;
    }
}

@media (max-width: 575.98px) {
    .app-public-nav .container-fluid {
        flex-wrap: wrap;
        row-gap: 0.55rem;
    }

    .app-public-nav .navbar-brand {
        max-width: calc(100% - 3.75rem);
        font-size: 1.08rem;
    }

    .app-public-nav .app-brand-mark {
        flex: 0 0 auto;
    }

    .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 0;
        width: 100%;
        margin-left: 0 !important;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .app-public-nav-actions {
        width: 100%;
        margin-left: 0 !important;
        flex-wrap: wrap;
    }

    .app-public-nav-actions .btn,
    .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto .btn {
        min-width: 0;
        min-height: 2.4rem;
        padding: 0.52rem 0.76rem !important;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .app-public-announcement-inner {
        overflow: hidden;
    }

    .app-public-announcement-inner > div:first-child {
        overflow-wrap: anywhere;
    }

    .app-mobile-new-profile-fab {
        padding: 0.62rem 0.82rem;
        font-size: 0.85rem;
        gap: 0.35rem;
    }

    .app-mobile-new-profile-fab i {
        font-size: 0.86rem;
    }

    .app-mobile-new-profile-topbar {
        min-width: 1.9rem;
        min-height: 1.9rem;
    }

    .app-user-trigger {
        padding-right: 0.45rem;
    }

    .app-user-trigger > .avatar-circle {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 0.72rem;
    }
}

.app-public-nav {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76));
    backdrop-filter: blur(8px);
}

.app-public-announcement {
    background: #05070b;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.82rem;
}

.app-public-announcement-inner {
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.app-public-announcement-inner > div {
    min-width: 0;
}

.app-public-announcement-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-public-announcement a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.app-public-announcement a:hover {
    color: #fff;
}

.app-public-nav-marketing {
    min-height: 4.9rem;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e7ebf3;
}

.app-public-nav .container-fluid,
.app-public-nav .navbar-brand {
    min-width: 0;
}

.app-public-nav .navbar-brand > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-brand-marketing {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0;
}

.app-brand-marketing .app-brand-mark {
    width: 2.55rem;
    height: 2.55rem;
}

.app-public-menu {
    align-items: center;
    gap: 0.35rem;
}

.app-public-menu .nav-link {
    color: #243049;
    font-weight: 600;
    padding: 0.6rem 0.85rem !important;
    border-radius: 999px;
}

.app-public-menu .nav-link:hover,
.app-public-menu .nav-link:focus {
    background: #f4f7fc;
    color: #111827;
}

.app-public-nav-actions .btn {
    border-radius: 1rem;
    padding: 0.72rem 1.05rem;
    font-weight: 700;
}

.app-public-theme-btn {
    min-width: 2.9rem;
    min-height: 2.9rem;
    padding: 0.6rem !important;
}

.app-public-chat-btn {
    border-color: #dde4f2;
    background: #fff;
    color: #243049;
}

.app-public-chat-btn:hover,
.app-public-chat-btn:focus {
    background: #f4f7fc;
    color: #111827;
}

.app-public-client-btn {
    background: #20252d;
    border-color: #20252d;
    color: #fff;
}

.app-public-client-btn:hover,
.app-public-client-btn:focus {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.app-offcanvas {
    background: #f8fbff;
    color: var(--color-text);
}

.app-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--color-border);
}

.app-offcanvas .btn-close {
    filter: none;
}

[data-theme="dark"] .app-sidebar {
    background: linear-gradient(180deg, #0a1020, #0e172b 55%, #10192f);
    border-right-color: rgba(148, 163, 184, 0.12);
    box-shadow: 14px 0 30px rgba(2, 6, 23, 0.34);
}

[data-theme="dark"] .app-sidebar .text-muted,
[data-theme="dark"] .app-sidebar-subtitle,
[data-theme="dark"] .app-sidebar-label {
    color: #9fb0c9 !important;
}

[data-theme="dark"] .app-sidebar-head {
    border-color: rgba(148, 163, 184, 0.16);
    background: linear-gradient(170deg, rgba(var(--color-primary-rgb), 0.2), rgba(15, 23, 42, 0.38));
}

[data-theme="dark"] .app-sidebar-foot {
    border-top-color: rgba(var(--color-primary-rgb), 0.22);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.42));
}

[data-theme="dark"] .app-sidebar-balance {
    color: #e2e8f0;
    border-color: rgba(var(--color-primary-rgb), 0.3);
    background: linear-gradient(140deg, rgba(30, 41, 59, 0.62), rgba(15, 23, 42, 0.48));
}

[data-theme="dark"] .app-sidebar-balance strong {
    color: var(--color-primary);
}

[data-theme="dark"] .app-nav .nav-link i {
    background: rgba(148, 163, 184, 0.14);
}

[data-theme="dark"] .app-nav .nav-link:hover,
[data-theme="dark"] .app-nav .nav-link.active {
    background: linear-gradient(145deg, rgba(var(--color-primary-rgb), 0.3), rgba(var(--color-primary-rgb), 0.2));
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.24);
}

[data-theme="dark"] .app-nav .nav-link.active {
    box-shadow:
        inset 0 0 0 1px rgba(var(--color-primary-rgb), 0.32),
        0 10px 18px rgba(var(--color-primary-rgb), 0.2);
}

[data-theme="dark"] .app-offcanvas {
    background: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .app-offcanvas .offcanvas-header {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] .app-offcanvas .btn-close {
    filter: invert(1);
}

/* Bootstrap utility contrast fallback in dark mode */
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-light-subtle {
    background-color: #1a2438 !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
}

[data-theme="dark"] .text-bg-light {
    background-color: #25314a !important;
    color: var(--color-text) !important;
}

[data-theme="dark"] .table-light,
[data-theme="dark"] .table-light th,
[data-theme="dark"] .table-light td {
    background-color: #1a2438 !important;
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
}

[data-theme="dark"] .btn-light {
    background-color: #1a2438;
    border-color: #334155;
    color: var(--color-text);
}

[data-theme="dark"] .btn-light:hover {
    background-color: #22304a;
    border-color: #3a4d6f;
    color: #f8fafc;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .dropdown-item {
    color: var(--color-text);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--color-surface-soft);
}

[data-theme="dark"] .app-topbar-counter {
    border-color: #111a2c;
}

[data-theme="dark"] .app-user-compact {
    color: #c7d0e2;
}

[data-theme="dark"] .app-user-compact:hover,
[data-theme="dark"] .app-user-compact:focus {
    background: #1a2438 !important;
    border-color: #2a3650 !important;
    color: #e2e8f0;
}

[data-theme="dark"] .app-updates-icon-btn {
    color: #b9c3d8;
}

[data-theme="dark"] .app-updates-icon-btn:hover,
[data-theme="dark"] .app-updates-icon-btn:focus {
    background: #1a2438;
    color: #e2e8f0;
}

[data-theme="dark"] .app-notif-dot {
    border-color: #111a2c;
}

[data-theme="dark"] .app-notif-item.unread {
    background: rgba(var(--color-primary-rgb), 0.2);
}

[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-black {
    color: var(--color-text) !important;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text);
}

.app-brand-mark {
    width: 1.95rem;
    height: 1.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem;
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    font-size: 0.92rem;
}

[data-theme="dark"] .app-brand-mark {
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
}

[data-theme="dark"] .app-brand-mark.has-brand-asset {
    background: transparent;
}

.app-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.app-mobile-brand .app-brand-mark {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.48rem;
}

.app-mobile-brand span:last-child {
    font-size: 0.95rem;
}

.app-content {
    min-height: calc(100vh - 62px);
    position: relative;
    z-index: auto;
    max-width: 1680px;
    margin-inline: auto;
}

.app-content-home {
    max-width: none;
    padding-bottom: 0 !important;
}

@media (max-width: 991.98px) {
    .app-shell .app-content:not(.app-content-home) {
        padding-bottom: 7.75rem !important;
    }
}

/* Anchor-jump targets clear the sticky topbar */
.app-content section[id],
.app-content [id^="section-"],
#walletAddFundsSection {
    scroll-margin-top: 5rem;
}

.toast-container.app-toast-layer {
    z-index: 1095 !important;
    pointer-events: none;
}

.modal-backdrop {
    z-index: 2000 !important;
}

.modal {
    z-index: 2010 !important;
}

.create-profile-modal {
    z-index: 2020 !important;
}

body.modal-open .app-topbar,
body.modal-open .app-sidebar,
body.modal-open .app-offcanvas {
    z-index: auto !important;
}

body.modal-open .toast-container.app-toast-layer {
    z-index: 1095 !important;
}

.toast-container.app-toast-layer .toast {
    pointer-events: auto;
    width: min(420px, calc(100vw - 1rem));
}

.app-toast {
    --toast-accent: var(--color-primary);
    --toast-soft-bg: rgba(255, 255, 255, 0.95);
    --toast-soft-border: rgba(148, 163, 184, 0.38);
    --toast-soft-text: #0f172a;
    --toast-delay: 3200ms;
    overflow: hidden;
    border-radius: 0.95rem;
    border: 1px solid var(--toast-soft-border) !important;
    background: var(--toast-soft-bg);
    color: var(--toast-soft-text);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
}

.app-toast::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--toast-accent), rgba(255, 255, 255, 0.72));
    transform-origin: left center;
    animation: appToastProgress var(--toast-delay) linear forwards;
}

.app-toast .app-toast-body {
    display: flex;
    align-items: flex-start;
    gap: 0.72rem;
    padding: 0.74rem 0.76rem;
}

.app-toast .app-toast-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.64rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.04rem;
}

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

.app-toast .app-toast-title {
    font-size: 0.73rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    opacity: 0.9;
    margin-bottom: 0.1rem;
}

.app-toast .app-toast-text {
    font-size: 0.85rem;
    line-height: 1.35;
    word-break: break-word;
    white-space: pre-wrap;
}

.app-toast .btn-close {
    margin-top: 0.06rem;
    opacity: 0.6;
    transform: scale(0.86);
}

.app-toast .btn-close:hover {
    opacity: 1;
}

.app-toast.app-toast-success {
    --toast-accent: #16a34a;
}

.app-toast.app-toast-success .app-toast-icon {
    background: rgba(22, 163, 74, 0.14);
    color: #166534;
}

.app-toast.app-toast-danger {
    --toast-accent: #dc2626;
}

.app-toast.app-toast-danger .app-toast-icon {
    background: rgba(220, 38, 38, 0.14);
    color: #991b1b;
}

.app-toast.app-toast-warning {
    --toast-accent: #f59e0b;
}

.app-toast.app-toast-warning .app-toast-icon {
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
}

.app-toast.app-toast-info {
    --toast-accent: var(--color-primary);
}

.app-toast.app-toast-info .app-toast-icon {
    background: rgba(var(--color-primary-rgb), 0.14);
    color: var(--color-primary-hover);
}

[data-theme="dark"] .app-toast {
    --toast-soft-bg: rgba(15, 23, 42, 0.94);
    --toast-soft-border: rgba(71, 85, 105, 0.48);
    --toast-soft-text: #e2e8f0;
    box-shadow: 0 20px 38px rgba(2, 6, 23, 0.58);
}

[data-theme="dark"] .app-toast.app-toast-success .app-toast-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

[data-theme="dark"] .app-toast.app-toast-danger .app-toast-icon {
    background: rgba(248, 113, 113, 0.2);
    color: #fecaca;
}

[data-theme="dark"] .app-toast.app-toast-warning .app-toast-icon {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
}

[data-theme="dark"] .app-toast.app-toast-info .app-toast-icon {
    background: rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-primary);
}

@keyframes appToastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

.toast-container.app-toast-public {
    top: 0.75rem !important;
}

.toast-container.app-toast-auth {
    top: calc(62px + 0.75rem) !important;
}

@media (max-width: 575.98px) {
    .toast-container.app-toast-layer {
        left: 0.5rem;
        right: 0.5rem;
    }
}

.avatar-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.card {
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.card-header {
    border-bottom-color: var(--color-border);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--color-muted);
}

.card-body {
    padding: 1.25rem;
}

.card-stat {
    border: 1px solid var(--color-border);
}

.table {
    color: var(--color-text);
}

.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table thead th {
    color: var(--color-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom-width: 1px;
    border-bottom-color: var(--color-border);
}

.table tbody tr:hover > * {
    background-color: rgba(var(--color-primary-rgb), 0.035);
}

.table-sticky thead th {
    position: sticky;
    top: 0;
    background: var(--color-surface);
    z-index: 2;
}

.form-control,
.form-select {
    border-color: var(--color-border);
    border-radius: 0.75rem;
    background: var(--color-surface);
    color: var(--color-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.16);
}

.form-text {
    color: var(--color-muted);
}

.btn {
    border-radius: 0.75rem;
}

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: rgba(var(--color-primary-rgb), 0.5);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.admin-page,
.admin-settings-page {
    max-width: 1480px;
    margin: 0 auto;
    min-width: 0;
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem;
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background:
        linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08), rgba(15, 118, 110, 0.07)),
        var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.admin-hero-copy {
    min-width: 0;
}

.admin-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.admin-metric-card,
.admin-settings-status,
.admin-tool-card,
.admin-side-panel,
.admin-settings-row-section,
.admin-settings-savebar {
    border: 1px solid var(--color-border);
    border-radius: 0.65rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.admin-metric-card,
.admin-settings-status {
    --admin-accent: var(--color-primary);
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-height: 100%;
    padding: 1rem;
    overflow: hidden;
}

.admin-tone-primary { --admin-accent: var(--color-primary); }
.admin-tone-info { --admin-accent: #0891b2; }
.admin-tone-success { --admin-accent: #16a34a; }
.admin-tone-warning { --admin-accent: #d97706; }
.admin-tone-danger { --admin-accent: #dc2626; }
.admin-tone-secondary { --admin-accent: #64748b; }

.admin-metric-icon,
.admin-settings-status-icon,
.admin-tool-icon,
.admin-queue-icon {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.62rem;
    background: color-mix(in srgb, var(--admin-accent) 13%, transparent);
    color: var(--admin-accent);
}

.admin-metric-body,
.admin-settings-status-copy,
.admin-tool-copy {
    min-width: 0;
}

.admin-metric-label,
.admin-settings-status-label {
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-metric-value {
    margin-top: 0.12rem;
    font-size: 1.75rem;
    line-height: 1.05;
    font-weight: 800;
}

.admin-metric-detail,
.admin-tool-detail,
.admin-settings-status-copy span:last-child {
    color: var(--color-muted);
    font-size: 0.86rem;
}

.admin-section-heading,
.admin-side-head,
.admin-settings-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.admin-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.admin-tool-card {
    --admin-accent: var(--color-primary);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
}

.admin-tool-card:hover,
.admin-queue-item:hover,
.admin-settings-nav-list a:hover {
    border-color: color-mix(in srgb, var(--color-primary) 34%, var(--color-border));
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
}

.admin-tool-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-weight: 800;
}

.admin-tool-detail {
    display: block;
    margin-top: 0.18rem;
}

.admin-tool-arrow {
    color: var(--color-muted);
    font-size: 1.25rem;
}

.admin-side-panel {
    padding: 1rem;
}

.admin-queue-list {
    display: grid;
    gap: 0.55rem;
}

.admin-queue-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: 0.6rem;
    color: var(--color-text);
    text-decoration: none;
}

.admin-queue-icon {
    --admin-accent: var(--color-secondary);
    width: 2rem;
    height: 2rem;
}

.admin-queue-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.admin-queue-count {
    min-width: 2.25rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: var(--color-surface-soft);
    color: var(--color-muted);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-queue-count.is-hot {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
}

.admin-settings-layout {
    display: grid;
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    min-width: 0;
    max-width: 100%;
}

.admin-settings-nav {
    position: sticky;
    top: calc(58px + 1rem);
    min-width: 0;
    max-width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 0.65rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.admin-settings-nav-title {
    margin: 0 0 0.55rem 0.2rem;
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-settings-nav-list {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    max-width: 100%;
}

.admin-settings-nav-list a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: var(--color-muted);
    text-decoration: none;
    font-weight: 700;
}

.admin-settings-nav-list a i {
    width: 1.1rem;
    color: var(--color-primary);
}

.admin-settings-form {
    min-width: 0;
    max-width: 100%;
}

.admin-settings-form .card,
.admin-settings-form .row,
.admin-settings-section,
.admin-settings-row-section {
    min-width: 0;
    max-width: 100%;
}

.admin-settings-form .form-control,
.admin-settings-form .form-select,
.admin-settings-form textarea {
    min-width: 0;
}

.admin-settings-status-copy {
    display: grid;
    gap: 0.1rem;
}

.admin-settings-status-copy strong {
    font-size: 1.05rem;
}

.admin-settings-section {
    scroll-margin-top: 5rem;
}

.admin-settings-row-section {
    --bs-gutter-x: 1rem;
    scroll-margin-top: 5rem;
    margin-right: 0;
    margin-left: 0;
    padding: 1rem 0.5rem 1rem;
}

.admin-settings-note {
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
}

.admin-settings-savebar {
    position: sticky;
    bottom: 1rem;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: color-mix(in srgb, var(--color-surface) 92%, transparent);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .admin-hero,
[data-theme="dark"] .admin-settings-note {
    background:
        linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1), rgba(45, 212, 191, 0.08)),
        var(--color-surface);
}

[data-theme="dark"] .admin-queue-count.is-hot {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

@media (max-width: 991.98px) {
    .admin-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-hero-actions {
        justify-content: flex-start;
    }

    .admin-settings-layout {
        grid-template-columns: 1fr;
    }

    .admin-settings-nav {
        position: static;
        overflow: hidden;
        width: 100%;
    }

    .admin-settings-nav-list {
        display: flex;
        gap: 0.35rem;
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 0.15rem;
    }

    .admin-settings-nav-list a {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (max-width: 575.98px) {
    .admin-hero-actions,
    .admin-settings-savebar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-hero-actions .btn,
    .admin-settings-savebar .btn {
        width: 100%;
    }
}

/* Admin form/list pages */
.admin-form-page {
    min-width: 0;
    max-width: 1480px;
    margin: 0 auto;
}

.admin-form-page-header {
    min-width: 0;
}

.admin-form-page-header > div,
.admin-form-card,
.admin-table-card,
.admin-helper-card,
.admin-form-page form,
.admin-form-page fieldset {
    min-width: 0;
}

.admin-form-page-header h1,
.admin-form-card h2,
.admin-table-card h2 {
    color: var(--color-text);
}

.admin-form-page .form-control,
.admin-form-page .form-select,
.admin-form-page textarea {
    min-width: 0;
}

.admin-form-page code,
.admin-form-page input,
.admin-form-page textarea,
.admin-form-page .small {
    overflow-wrap: anywhere;
}

.admin-form-card,
.admin-table-card,
.admin-helper-card,
.admin-form-stat-grid .card {
    border-color: var(--color-border);
    border-radius: 0.65rem;
    box-shadow: var(--shadow-soft);
}

.admin-form-card-head {
    min-width: 0;
}

@media (max-width: 575.98px) {
    .admin-form-page-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem !important;
        margin-bottom: 0.78rem !important;
    }

    .admin-form-page-header h1 {
        font-size: 1.18rem;
        line-height: 1.22;
    }

    .admin-form-page-header p {
        font-size: 0.8rem;
        line-height: 1.38;
    }

    .admin-form-page-actions,
    .admin-form-page-header > .btn {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .admin-form-page-header > .btn {
        display: inline-flex !important;
        align-items: center;
        gap: 0.35rem;
        white-space: nowrap;
    }

    .admin-form-page-actions .btn,
    .admin-form-page-header > .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-form-page-grid {
        --bs-gutter-y: 0.78rem;
    }

    .admin-form-card,
    .admin-table-card,
    .admin-helper-card,
    .admin-form-stat-grid .card {
        border-radius: 0.55rem;
    }

    .admin-form-card .card-body,
    .admin-table-card .card-body,
    .admin-helper-card .card-body,
    .admin-form-card .card-header,
    .admin-table-card .card-header {
        padding: 0.82rem;
    }

    .admin-form-card-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem;
        align-items: stretch !important;
    }

    .admin-form-card-head .btn,
    .admin-form-card form > .btn,
    .admin-form-card form > fieldset > .btn,
    .admin-announcements-page form .d-flex .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-form-card .mb-3 {
        margin-bottom: 0.72rem !important;
    }

    .admin-form-card .form-label {
        margin-bottom: 0.28rem;
        font-size: 0.78rem;
        font-weight: 700;
    }

    .admin-form-card .form-text,
    .admin-form-card .text-muted.small {
        font-size: 0.74rem;
        line-height: 1.35;
    }

    .admin-form-stat-grid {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
        margin-bottom: 0.75rem !important;
    }

    .admin-form-stat-grid > [class*="col-"] {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    .admin-form-stat-grid .card-body {
        padding: 0.65rem;
    }

    .admin-form-stat-grid .text-muted {
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .admin-form-stat-grid .h4 {
        font-size: 1.08rem;
    }

    .admin-helper-card input {
        font-size: 0.78rem;
    }

    .admin-form-page .app-mobile-card-table tbody td.app-mobile-card-actions {
        text-align: left !important;
    }

    .admin-form-page .app-mobile-card-table tbody td.app-mobile-card-actions .btn,
    .admin-form-page .app-mobile-card-table tbody td.app-mobile-card-actions form {
        width: 100%;
    }

    .admin-form-page .app-mobile-card-table tbody td.app-mobile-card-actions .d-flex {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .admin-form-page .app-mobile-card-table tbody td.app-mobile-card-actions .d-flex .btn,
    .admin-form-page .app-mobile-card-table tbody td.app-mobile-card-actions .d-flex form {
        width: 100%;
    }
}

/* Admin API and migrations polish */
.admin-api-page,
.admin-migrations-page,
.admin-site-review-page {
    min-width: 0;
    max-width: 1480px;
    margin: 0 auto;
}

.admin-api-page-header > div,
.admin-migrations-page-header > div,
.admin-site-review-header > div {
    min-width: 0;
}

.admin-api-page-header h1,
.admin-migrations-page-header h1,
.admin-site-review-header h1 {
    color: var(--color-text);
}

.admin-api-page > .card,
.admin-api-guide-card,
.admin-migrations-output-card,
.admin-migrations-result-card,
.admin-migrations-status-card,
.admin-site-review-page > .card,
.admin-site-review-page .card.shadow-sm {
    border-color: var(--color-border);
    border-radius: 0.65rem;
    box-shadow: var(--shadow-soft);
}

.admin-api-endpoint-list {
    display: grid;
    gap: 0.45rem;
}

.admin-api-endpoint-list > div {
    min-width: 0;
    padding: 0.5rem 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.5rem;
    background: var(--color-surface);
}

.admin-api-page code,
.admin-migrations-page code,
.admin-site-review-page code {
    overflow-wrap: anywhere;
}

.admin-api-page pre,
.admin-migrations-page pre,
.admin-site-review-page pre {
    max-width: 100%;
    overflow: auto;
    white-space: pre;
    font-size: 0.78rem;
    line-height: 1.45;
}

.admin-api-page .card-body > .d-flex {
    min-width: 0;
}

.admin-api-page .card-body > .d-flex h2 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.admin-migrations-summary-grid .card-body {
    min-width: 0;
}

.admin-migrations-status-table code {
    display: inline-block;
    max-width: 100%;
}

.admin-site-review-page .table {
    min-width: 0;
}

.admin-site-review-page .accordion-button {
    min-width: 0;
}

@media (max-width: 575.98px) {
    .admin-api-page-header,
    .admin-migrations-page-header,
    .admin-site-review-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem !important;
        margin-bottom: 0.78rem !important;
    }

    .admin-api-page-header h1,
    .admin-migrations-page-header h1,
    .admin-site-review-header h1 {
        font-size: 1.18rem;
    }

    .admin-api-page-header p,
    .admin-migrations-page-header p,
    .admin-site-review-header p {
        font-size: 0.8rem;
        line-height: 1.38;
    }

    .admin-api-page-header .btn,
    .admin-migrations-page-header .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-site-review-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .admin-site-review-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-api-endpoint-list {
        max-height: 15.5rem;
        padding: 0.68rem;
        overflow: auto;
    }

    .admin-api-endpoint-list > div {
        padding: 0.45rem 0.5rem;
        font-size: 0.76rem;
    }

    .admin-api-page > .card,
    .admin-api-guide-card,
    .admin-migrations-output-card,
    .admin-migrations-result-card,
    .admin-migrations-status-card {
        margin-bottom: 0.7rem !important;
        border-radius: 0.55rem;
    }

    .admin-api-page .card-body,
    .admin-migrations-output-card .card-body,
    .admin-migrations-result-card .list-group-item,
    .admin-migrations-status-card .card-header {
        padding: 0.78rem;
    }

    .admin-api-page .card-body > .d-flex {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem !important;
    }

    .admin-api-page .card-body > .d-flex h2,
    .admin-api-page .card-body h2 {
        font-size: 0.96rem;
        line-height: 1.35;
    }

    .admin-api-page .card-body > .d-flex form.d-inline-block,
    .admin-api-page .card-body > .d-flex form.d-inline-block .btn {
        display: block !important;
        width: 100%;
    }

    .admin-api-har-form {
        --bs-gutter-y: 0.65rem;
    }

    .admin-api-har-form .btn,
    .admin-api-har-form select {
        width: 100%;
    }

    .admin-api-page pre {
        max-height: 18rem;
        padding: 0.6rem !important;
        font-size: 0.72rem;
    }

    .admin-migrations-summary-grid {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
        margin-bottom: 0.75rem !important;
    }

    .admin-migrations-summary-grid > [class*="col-"],
    .admin-site-review-health-grid > [class*="col-"] {
        flex: 0 0 auto;
        width: 33.333333%;
    }

    .admin-site-review-stat-grid {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
        margin-bottom: 0.75rem !important;
    }

    .admin-site-review-stat-grid > [class*="col-"] {
        flex: 0 0 auto;
        width: 50%;
    }

    .admin-migrations-summary-grid .card-body,
    .admin-site-review-health-grid .card-body,
    .admin-site-review-stat-grid .card-body {
        padding: 0.65rem;
    }

    .admin-migrations-summary-grid .text-muted.small,
    .admin-site-review-health-grid .text-muted.small,
    .admin-site-review-stat-grid .text-muted.small {
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .admin-migrations-summary-grid .h3,
    .admin-site-review-health-grid .h3 {
        font-size: 1.2rem;
    }

    .admin-site-review-stat-grid .h5 {
        font-size: 0.98rem;
    }

    .admin-site-review-stat-grid .small.text-muted.mt-1,
    .admin-site-review-health-grid .small.text-muted.mt-1 {
        display: none;
    }

    .admin-migrations-status-card .card-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem !important;
    }

    .admin-migrations-status-card .card-header .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-migrations-status-table.app-mobile-card-table tbody td {
        grid-template-columns: minmax(4.8rem, 32%) minmax(0, 1fr);
    }

    .admin-migrations-status-table.app-mobile-card-table tbody td:first-child {
        display: flex;
        justify-content: flex-start;
        text-align: left;
    }

    .admin-migrations-status-table.app-mobile-card-table tbody td:first-child::before {
        display: none;
    }

    .admin-site-review-page > .card,
    .admin-site-review-page .card.shadow-sm {
        margin-bottom: 0.7rem !important;
        border-radius: 0.55rem;
    }

    .admin-site-review-page .card-header {
        padding: 0.72rem 0.78rem;
        font-size: 0.86rem;
        font-weight: 800;
    }

    .admin-site-review-page .card-body,
    .admin-site-review-page .list-group-item {
        padding: 0.78rem;
    }

    .admin-site-review-page .list-group-item .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-site-review-page .accordion-button {
        align-items: flex-start;
        padding: 0.78rem;
        font-size: 0.86rem;
        line-height: 1.35;
    }

    .admin-site-review-page .accordion-body {
        padding: 0.78rem;
        font-size: 0.84rem;
    }

    .admin-site-review-page ul {
        padding-left: 1.05rem;
    }

    .admin-site-review-page li {
        margin-bottom: 0.45rem !important;
    }
}

.btn-outline-secondary {
    border-color: var(--color-border);
    color: var(--color-muted);
}

.badge-status {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-status.checking {
    background: #fef3c7;
    color: #92400e;
}

.badge-status.checked {
    background: #dbeafe;
    color: #1e40af;
}

.badge-status.working {
    background: #e0f2fe;
    color: #0c4a6e;
}

.badge-status.worked {
    background: #fff7ed;
    color: #9a3412;
}

.badge-status.finished {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-status.public {
    background: #e0ecff;
    color: var(--color-primary-hover);
}

.badge-status.private {
    background: #e5e7eb;
    color: #374151;
}

.badge-status.approved,
.badge-status.active,
.badge-status.success {
    background: #dcfce7;
    color: #166534;
}

.badge-status.rejected,
.badge-status.expired,
.badge-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-status.dead {
    background: #e5e7eb;
    color: #111827;
}

.empty-state {
    border: 1px dashed var(--color-border);
    border-radius: 1rem;
    padding: 2.25rem 1.25rem;
    text-align: center;
    background: var(--color-surface-soft);
    color: var(--color-muted);
    line-height: 1.6;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    font-size: 1.35rem;
    margin-bottom: 0.7rem;
}

.dashboard-onboarding {
    position: relative;
    border: 1px solid rgba(var(--color-primary-rgb), 0.4);
    border-radius: 1.1rem;
    background:
        linear-gradient(120deg, rgba(var(--color-primary-rgb), 0.1), rgba(15, 118, 110, 0.07)),
        var(--color-surface);
    box-shadow: 0 14px 34px -14px rgba(var(--color-primary-rgb), 0.35);
    padding: 1.3rem 1.4rem 1.4rem;
    overflow: hidden;
}

.dashboard-onboarding::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.dashboard-onboarding-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

.dashboard-onboarding-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-text);
}

.dashboard-onboarding-count {
    color: var(--color-primary);
}

.dashboard-onboarding-sub {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.dashboard-onboarding-reward {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px dashed rgba(var(--color-primary-rgb), 0.5);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
}

.dashboard-onboarding-progress {
    height: 0.5rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.dashboard-onboarding-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-onboarding-step {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    border: 1px solid var(--color-border);
    border-radius: 0.9rem;
    background: var(--color-surface);
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-onboarding-step:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--color-primary-rgb), 0.5);
    box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.25);
    color: var(--color-text);
}

.dashboard-onboarding-step.is-done {
    opacity: 0.72;
}

.dashboard-onboarding-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.dashboard-onboarding-step-num {
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-onboarding-step.is-done .dashboard-onboarding-step-num {
    color: #16a34a;
}

.dashboard-onboarding-check {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.75rem;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    font-size: 1.1rem;
}

.dashboard-onboarding-step.is-done .dashboard-onboarding-check {
    background: rgba(34, 197, 94, 0.16);
    color: #16a34a;
}

.dashboard-onboarding-copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.dashboard-onboarding-copy strong {
    font-size: 0.95rem;
}

.dashboard-onboarding-copy span {
    color: var(--color-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.dashboard-onboarding-step.is-done .dashboard-onboarding-copy strong {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.dashboard-onboarding-cta {
    margin-top: auto;
    padding-top: 0.2rem;
}

[data-theme="dark"] .dashboard-onboarding {
    background:
        linear-gradient(120deg, rgba(var(--color-primary-rgb), 0.1), rgba(45, 212, 191, 0.06)),
        var(--color-surface);
    box-shadow: 0 14px 34px -14px rgba(2, 6, 23, 0.6);
}

[data-theme="dark"] .dashboard-onboarding-reward {
    background: rgba(15, 23, 42, 0.4);
}

[data-theme="dark"] .dashboard-onboarding-step.is-done .dashboard-onboarding-check {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .dashboard-onboarding-step.is-done .dashboard-onboarding-step-num {
    color: #4ade80;
}

@media (max-width: 767.98px) {
    .dashboard-onboarding {
        padding: 1rem 1rem 1.1rem;
    }

    .dashboard-onboarding-title {
        font-size: 1.15rem;
    }

    .dashboard-onboarding-steps {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .dashboard-onboarding-step {
        flex-direction: row;
        align-items: center;
        padding: 0.7rem 0.85rem;
    }

    .dashboard-onboarding-step-top {
        flex: 0 0 auto;
    }

    .dashboard-onboarding-step-num {
        display: none;
    }

    .dashboard-onboarding-copy {
        flex: 1 1 auto;
    }

    .dashboard-onboarding-cta {
        margin-top: 0;
        margin-left: auto;
        padding-top: 0;
        flex: 0 0 auto;
    }
}

.profile-status-history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: transparent;
    padding: 0.1rem 0;
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.profile-status-history-toggle:hover,
.profile-status-history-toggle:focus-visible {
    color: var(--color-text);
}

.profile-status-history-chevron {
    font-size: 0.68rem;
    transition: transform 0.2s ease;
}

.profile-status-history-toggle.is-open .profile-status-history-chevron {
    transform: rotate(180deg);
}

.profile-status-history-list {
    list-style: none;
    display: grid;
    gap: 0.32rem;
    margin: 0.4rem 0 0;
    padding: 0.1rem 0 0.1rem 0.5rem;
    border-left: 2px solid var(--color-border);
}

.profile-status-history-list li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    font-size: 0.76rem;
    line-height: 1.3;
}

.profile-status-history-dot {
    flex: 0 0 auto;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #94a3b8;
}

.profile-status-history-dot[data-history-status="checking"] {
    background: #f59e0b;
}

.profile-status-history-dot[data-history-status="checked"] {
    background: #6366f1;
}

.profile-status-history-dot[data-history-status="working"] {
    background: #3b82f6;
}

.profile-status-history-dot[data-history-status="worked"] {
    background: #0ea5e9;
}

.profile-status-history-dot[data-history-status="finished"] {
    background: #22c55e;
}

.profile-status-history-dot[data-history-status="rejected"],
.profile-status-history-dot[data-history-status="dead"] {
    background: #ef4444;
}

.profile-status-history-copy {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-status-history-copy strong {
    color: var(--color-text);
    font-weight: 700;
}

.profile-status-history-list time {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: 0.7rem;
    color: var(--color-muted);
}

@media (max-width: 767.98px) {
    .profile-status-history-toggle {
        min-height: 2.1rem;
        padding: 0.3rem 0;
    }
}

.wallet-promo-strip {
    border: 1px dashed rgba(var(--color-primary-rgb), 0.35);
    border-radius: 0.65rem;
    background: var(--color-surface);
}

.wallet-promo-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border: 0;
    background: transparent;
    padding: 0.6rem 0.9rem;
    color: var(--color-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
}

.wallet-promo-toggle:hover,
.wallet-promo-toggle:focus-visible {
    color: var(--color-text);
}

.wallet-promo-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.wallet-promo-toggle-label i {
    color: var(--color-primary);
    font-size: 1rem;
}

.wallet-promo-chevron {
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.wallet-promo-toggle.is-open .wallet-promo-chevron {
    transform: rotate(180deg);
}

.wallet-promo-body {
    padding: 0.1rem 0.9rem 0.85rem;
}

.wallet-promo-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.wallet-promo-input {
    width: 14rem;
    max-width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.wallet-promo-submit {
    min-width: 7.2rem;
}

.wallet-promo-feedback {
    margin-top: 0.4rem;
    color: #dc2626;
    font-weight: 600;
}

.wallet-promo-success {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.wallet-promo-success-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    color: #16a34a;
    font-size: 1.2rem;
}

.wallet-promo-success-copy {
    display: grid;
    gap: 0.05rem;
    min-width: 0;
}

.wallet-promo-success-copy strong {
    color: var(--color-text);
}

.wallet-promo-shake {
    animation: walletPromoShake 0.4s ease;
}

@keyframes walletPromoShake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

[data-theme="dark"] .wallet-promo-strip {
    border-color: rgba(var(--color-primary-rgb), 0.4);
}

[data-theme="dark"] .wallet-promo-feedback {
    color: #fca5a5;
}

[data-theme="dark"] .wallet-promo-success-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

@media (prefers-reduced-motion: reduce) {
    .wallet-promo-shake {
        animation: none;
    }
}

@media (max-width: 575.98px) {
    .wallet-promo-form,
    .wallet-promo-input-group {
        width: 100%;
    }

    .wallet-promo-input {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }
}

.badge.insurance-expiring {
    animation: insuranceExpiringPulse 1.7s ease-in-out infinite;
}

@keyframes insuranceExpiringPulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.62;
    }
}

@media (prefers-reduced-motion: reduce) {
    .badge.insurance-expiring {
        animation: none;
    }
}

.copy-btn .bi {
    pointer-events: none;
}

.table-search-input {
    min-width: 240px;
}

.profile-kpi {
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: var(--color-surface-soft);
    padding: 0.75rem 0.85rem;
}

.profile-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
    gap: 0.45rem;
}

.profile-kpi-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.18rem;
}

.profile-kpi-label {
    font-size: 0.76rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-kpi-value {
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--color-text);
}

.profile-control-card {
    border: 1px solid var(--color-border);
    background:
        radial-gradient(circle at 92% 10%, rgba(var(--color-primary-rgb), 0.08), transparent 34%),
        radial-gradient(circle at 6% 100%, rgba(14, 165, 233, 0.08), transparent 28%),
        var(--color-surface);
}

.profile-control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-control-cta {
    min-width: 145px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.16rem;
    line-height: 1.1;
}

.profile-control-cta-sell {
    border: 0;
    box-shadow: 0 10px 20px rgba(var(--color-primary-rgb), 0.26);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    padding: 0.58rem 0.88rem;
    text-align: left;
}

.profile-control-cta-sell:hover,
.profile-control-cta-sell:focus {
    background: var(--color-primary-hover);
    box-shadow: 0 14px 30px rgba(var(--color-primary-rgb), 0.32);
}

.profile-control-cta-sub {
    font-size: 0.68rem;
    opacity: 0.95;
    font-weight: 500;
}

.create-profile-modal .modal-content {
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    overflow: hidden;
    max-height: calc(100dvh - 1.5rem);
    display: flex;
    flex-direction: column;
}

.create-profile-modal .modal-header {
    background: linear-gradient(165deg, rgba(var(--color-primary-rgb), 0.09), rgba(var(--color-primary-rgb), 0.02));
}

.create-profile-modal form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.create-profile-modal .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    min-height: 0;
}

.create-profile-modal .modal-footer {
    flex-shrink: 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

@media (min-width: 992px) {
    .create-order-dialog {
        max-width: 880px;
    }
}

.create-order-header {
    align-items: center;
    gap: 0.65rem;
}

.create-order-header-main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.create-order-header-icon {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(var(--color-primary-rgb), 0.14);
    color: var(--color-primary);
    font-size: 1.05rem;
}

.create-order-header-sub {
    font-size: 0.78rem;
    color: var(--color-muted);
    margin-top: 0.1rem;
}

.create-order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: 1rem;
    align-items: start;
}

.create-order-main {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.create-order-field-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.create-order-line-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    border-radius: 999px;
    padding: 0.14rem 0.55rem;
    white-space: nowrap;
}

.create-order-textarea {
    border-radius: 0.75rem;
    min-height: 168px;
    font-size: 0.88rem;
    line-height: 1.6;
    resize: vertical;
}

.create-order-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.create-order-tool-btn {
    border-radius: 999px;
    font-size: 0.76rem;
    padding: 0.26rem 0.7rem;
    white-space: nowrap;
}

.create-order-toolbar-hint {
    margin-left: auto;
    font-size: 0.73rem;
    color: var(--color-muted);
}

.create-order-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.create-order-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    border-radius: 999px;
    padding: 0.26rem 0.62rem;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.1;
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    color: var(--color-muted);
}

.create-order-chip i {
    font-size: 0.78rem;
}

.create-order-chip-valid {
    border-color: rgba(25, 135, 84, 0.35);
    background: rgba(25, 135, 84, 0.1);
    color: #146c43;
}

.create-order-chip-valid.is-zero {
    border-color: var(--color-border);
    background: var(--color-surface-soft);
    color: var(--color-muted);
}

.create-order-chip-invalid {
    border-color: rgba(220, 53, 69, 0.32);
    background: rgba(220, 53, 69, 0.1);
    color: #b02a37;
}

.create-order-chip-dupe {
    border-color: rgba(255, 153, 0, 0.38);
    background: rgba(255, 179, 0, 0.12);
    color: #92600a;
}

.create-order-chip-used {
    border-color: var(--color-border);
    background: var(--color-surface-soft);
    color: var(--color-muted);
}

.create-order-issues {
    border: 1px solid rgba(255, 153, 0, 0.35);
    background: rgba(255, 193, 7, 0.07);
    border-radius: 0.75rem;
    overflow: hidden;
}

.create-order-issues-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #92600a;
    border-bottom: 1px dashed rgba(255, 153, 0, 0.35);
}

.create-order-issue-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
    max-height: 172px;
    overflow-y: auto;
}

.create-order-issue-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.28rem 0.7rem;
    font-size: 0.77rem;
    min-width: 0;
}

.create-order-issue-link {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-muted);
}

.create-order-issue-badge {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 0.16rem 0.52rem;
    font-size: 0.66rem;
    font-weight: 700;
    white-space: nowrap;
}

.create-order-issue-badge.issue-invalid {
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

.create-order-issue-badge.issue-dupe {
    background: rgba(255, 179, 0, 0.16);
    color: #92600a;
}

.create-order-issue-badge.issue-used {
    background: rgba(108, 117, 125, 0.14);
    color: var(--color-muted);
}

.create-order-issue-more {
    color: var(--color-muted);
    font-style: italic;
}

.create-order-side {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 1rem;
}

.create-order-summary {
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    border-radius: 0.85rem;
    padding: 0.85rem 0.95rem;
}

.create-order-summary-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    margin-bottom: 0.55rem;
}

.create-order-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.82rem;
}

.create-order-summary-row span {
    color: var(--color-muted);
}

.create-order-summary-row strong {
    color: var(--color-text);
    font-weight: 600;
}

.create-order-summary-create strong {
    color: var(--color-primary);
    font-weight: 700;
}

.create-order-summary-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    border-top: 1px dashed var(--color-border);
    margin-top: 0.45rem;
    padding-top: 0.55rem;
}

.create-order-summary-total span {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
}

.create-order-summary-total strong {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
}

.create-order-summary-note {
    font-size: 0.72rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
}

.create-order-trust {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    padding: 0 0.15rem;
    font-size: 0.76rem;
    color: var(--color-muted);
}

.create-order-trust li {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.create-order-trust i {
    color: var(--color-primary);
    font-size: 0.85rem;
}

.create-order-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem 0.75rem;
}

.create-order-footer > * {
    margin: 0;
}

.create-order-footer-total {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
}

.create-order-footer-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
}

.create-order-footer-total strong {
    font-size: 1.12rem;
    color: var(--color-text);
    white-space: nowrap;
}

.create-order-footer-total small {
    font-size: 0.74rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.create-order-footer-actions {
    display: flex;
    gap: 0.55rem;
    margin-left: auto;
}

.create-order-submit {
    min-width: 168px;
    white-space: nowrap;
}

[data-theme="dark"] .create-order-summary,
[data-theme="dark"] .create-order-line-count,
[data-theme="dark"] .create-order-chip-used,
[data-theme="dark"] .create-order-chip-valid.is-zero {
    background: rgba(15, 23, 42, 0.55);
}

[data-theme="dark"] .create-order-chip-valid {
    background: rgba(25, 135, 84, 0.18);
    color: #4ade80;
}

[data-theme="dark"] .create-order-chip-valid.is-zero {
    background: rgba(15, 23, 42, 0.55);
    color: var(--color-muted);
}

[data-theme="dark"] .create-order-chip-invalid {
    background: rgba(220, 53, 69, 0.2);
    color: #f87171;
}

[data-theme="dark"] .create-order-chip-dupe {
    background: rgba(255, 179, 0, 0.16);
    color: #fbbf24;
}

[data-theme="dark"] .create-order-issues {
    background: rgba(255, 179, 0, 0.08);
}

[data-theme="dark"] .create-order-issues-head {
    color: #fbbf24;
}

[data-theme="dark"] .create-order-issue-badge.issue-invalid {
    background: rgba(220, 53, 69, 0.22);
    color: #f87171;
}

[data-theme="dark"] .create-order-issue-badge.issue-dupe {
    background: rgba(255, 179, 0, 0.2);
    color: #fbbf24;
}

@media (max-width: 991.98px) {
    .create-order-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .create-order-side {
        position: static;
    }
}

@media (pointer: coarse) {
    .create-order-textarea {
        font-size: 16px;
    }
}

@media (max-width: 575.98px) {
    .create-profile-modal .modal-dialog {
        margin: 0;
        height: 100dvh;
    }

    .create-profile-modal .modal-content {
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .create-profile-modal .modal-header {
        padding: 0.75rem 0.9rem;
    }

    .create-profile-modal .modal-body {
        padding: 0.75rem 0.85rem 0.9rem;
    }

    .create-order-header-icon {
        width: 2.05rem;
        height: 2.05rem;
        border-radius: 0.62rem;
        font-size: 0.92rem;
    }

    .create-order-header-sub {
        display: none;
    }

    .create-order-layout {
        gap: 0.85rem;
    }

    .create-profile-modal .create-order-textarea {
        min-height: 132px;
        font-size: 16px;
    }

    .create-order-toolbar-hint {
        flex-basis: 100%;
        margin-left: 0;
    }

    .create-order-trust {
        display: none;
    }

    .create-order-summary {
        padding: 0.72rem 0.8rem;
    }

    .create-order-issue-list {
        max-height: 132px;
    }

    .create-order-footer {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
        padding: 0.6rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.08);
    }

    .create-order-footer-total {
        justify-content: space-between;
        width: 100%;
    }

    .create-order-footer-total small {
        margin-left: auto;
    }

    .create-order-footer-actions {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        gap: 0.55rem;
        width: 100%;
        margin-left: 0;
    }

    .create-order-footer-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .create-order-submit {
        min-width: 0;
    }
}

.profile-kpi-modern {
    position: relative;
    padding-left: 2.1rem;
    border-radius: 0.9rem;
    background: linear-gradient(160deg, var(--color-surface-soft), rgba(var(--color-primary-rgb), 0.04));
}

.profile-kpi-compact {
    padding: 0.5rem 0.58rem;
    min-height: 64px;
}

.profile-kpi-icon {
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 0.82rem;
}

.profile-kpi-compact .profile-kpi-label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.profile-kpi-compact .profile-kpi-value {
    font-size: 1.08rem;
    line-height: 1.05;
    margin-left: 0.1rem;
}

.profile-overview-board {
    border: 1px solid var(--color-border);
    border-radius: 0.95rem;
    background: linear-gradient(160deg, var(--color-surface), rgba(var(--color-primary-rgb), 0.03));
    padding: 0.55rem;
}

.profile-sticky-filter-wrap {
    position: sticky;
    top: var(--profile-sticky-top, calc(72px + env(safe-area-inset-top) + 0.95rem));
    z-index: 1042;
}

.profile-overview-board-sticky {
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.profile-search-sticky-bar {
    padding: 0.45rem;
}

.profile-search-sticky-inner {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.profile-search-sticky-bar .profile-overview-search {
    flex: 1 1 260px;
}

.profile-search-history {
    margin-top: 0.38rem;
    display: flex;
    align-items: center;
    gap: 0.34rem;
    flex-wrap: wrap;
}

.profile-search-history-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.profile-search-history-list {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex-wrap: wrap;
}

.profile-search-history-chip {
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    color: var(--color-muted);
    border-radius: 999px;
    padding: 0.16rem 0.46rem;
    font-size: 0.72rem;
    line-height: 1.15;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-search-history-chip:hover {
    color: var(--color-text);
    border-color: rgba(var(--color-primary-rgb), 0.34);
    background: rgba(var(--color-primary-rgb), 0.08);
}

[data-theme="dark"] .profile-overview-board-sticky {
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.4);
}

.profile-overview-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.profile-overview-search {
    flex: 1 1 280px;
}

.profile-overview-mini {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.profile-mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    color: var(--color-muted);
    border-radius: 0.65rem;
    padding: 0.36rem 0.52rem;
    font-size: 0.76rem;
    line-height: 1.1;
}

.profile-mini-chip i {
    color: var(--color-primary);
    font-size: 0.8rem;
}

.profile-mini-chip strong {
    color: var(--color-text);
    font-size: 0.84rem;
    margin-left: 0.18rem;
    font-weight: 700;
}

.profile-filter-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
    gap: 0.4rem;
}

.profile-filter-kpi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    text-decoration: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: 0.72rem;
    padding: 0.42rem 0.5rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.profile-filter-kpi:hover {
    border-color: rgba(var(--color-primary-rgb), 0.32);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.profile-filter-kpi.is-active {
    border-color: rgba(var(--color-primary-rgb), 0.45);
    background: rgba(var(--color-primary-rgb), 0.1);
}

.profile-filter-kpi-label {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.1;
}

.profile-filter-kpi-label i {
    font-size: 0.82rem;
    color: var(--color-primary);
}

.profile-filter-kpi-count {
    min-width: 1.9rem;
    border-radius: 999px;
    text-align: center;
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    color: var(--color-text);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.12rem 0.34rem;
}

.profile-filter-kpi.is-active .profile-filter-kpi-count {
    border-color: rgba(var(--color-primary-rgb), 0.45);
    color: var(--color-primary);
}

.profile-filter-bar {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    padding: 0.38rem;
}

.profile-filter-bar .btn {
    border-radius: 0.65rem;
}

.profile-card-item.is-pinned .profile-fb-card {
    border-color: rgba(15, 118, 110, 0.38);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.14);
}

.profile-social-ribbon {
    position: absolute;
    top: -1px;
    right: -1px;
    left: auto;
    width: auto;
    min-width: 4.7rem;
    padding: 0.34rem 0.68rem 0.34rem 0.58rem;
    text-align: left;
    transform: none;
    z-index: 5;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 0 0.9rem 0 0.45rem;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.profile-social-ribbon i {
    font-size: 0.68rem;
}

.profile-social-ribbon::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
}

.profile-social-ribbon.is-live {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: rgba(255, 255, 255, 0.28);
}

.profile-social-ribbon.is-dead {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: rgba(255, 255, 255, 0.28);
}

.profile-social-ribbon.is-live::after {
    border-top: 7px solid #047857;
}

.profile-social-ribbon.is-dead::after {
    border-top: 7px solid #991b1b;
}

[data-theme="dark"] .profile-social-ribbon {
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.45);
}

[data-theme="dark"] .profile-social-ribbon.is-live {
    background: linear-gradient(135deg, #059669, #047857);
}

[data-theme="dark"] .profile-social-ribbon.is-dead {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

[data-theme="dark"] .profile-social-ribbon.is-live::after {
    border-top-color: #065f46;
}

[data-theme="dark"] .profile-social-ribbon.is-dead::after {
    border-top-color: #7f1d1d;
}

.profile-fb-card-body {
    padding: 0.72rem;
}

.profile-card-zone {
    min-width: 0;
}

.profile-card-zone + .profile-card-zone {
    margin-top: 0.62rem;
    padding-top: 0.62rem;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.profile-card-zone-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.42rem;
    margin-bottom: 0.34rem;
}

.profile-fb-card.has-social-ribbon .profile-card-zone-identity > .profile-card-zone-head {
    min-height: 1.55rem;
    padding-right: 5.55rem;
}

.profile-fb-card.has-social-ribbon .profile-card-zone-identity > .profile-card-zone-head .badge-status {
    flex-shrink: 0;
}

.profile-card-zone-title {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.profile-card-zone-note {
    margin-top: 0.14rem;
    border: 1px dashed var(--color-border);
    border-radius: 0.58rem;
    padding: 0.45rem 0.52rem;
    font-size: 0.74rem;
    color: var(--color-muted);
    background: var(--color-surface-soft);
}

[data-theme="dark"] .profile-card-zone + .profile-card-zone {
    border-top-color: rgba(71, 85, 105, 0.55);
}

.profile-progress-pill {
    --profile-progress-accent: #0fa975;
    --profile-progress-accent-2: #0ca36d;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.2rem;
    align-items: center;
}

.profile-progress-pill[data-profile-progress-tone="bg-primary"] {
    --profile-progress-accent: var(--color-primary);
    --profile-progress-accent-2: var(--color-primary-hover);
}

.profile-progress-pill[data-profile-progress-tone="bg-success"] {
    --profile-progress-accent: #0fa975;
    --profile-progress-accent-2: #0b9a69;
}

.profile-progress-pill[data-profile-progress-tone="bg-info"] {
    --profile-progress-accent: #0891b2;
    --profile-progress-accent-2: #0e7490;
}

.profile-progress-pill[data-profile-progress-tone="bg-warning"] {
    --profile-progress-accent: #d97706;
    --profile-progress-accent-2: #b45309;
}

.profile-progress-pill[data-profile-progress-tone="bg-danger"] {
    --profile-progress-accent: #dc2626;
    --profile-progress-accent-2: #b91c1c;
}

.profile-progress-pill[data-profile-progress-tone="bg-secondary"] {
    --profile-progress-accent: #64748b;
    --profile-progress-accent-2: #475569;
}

.profile-progress-pill-value {
    min-width: 2.55rem;
    padding: 0.18rem 0.34rem;
    border-radius: 0.56rem;
    background: linear-gradient(135deg, var(--profile-progress-accent), var(--profile-progress-accent-2));
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.profile-progress-track.progress {
    height: 1.06rem;
    padding: 0.08rem;
    border-radius: 0.56rem;
    background: #fff;
    border: 1px solid var(--profile-progress-accent);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.profile-progress-fill.progress-bar {
    border-radius: 0.34rem;
    background: linear-gradient(135deg, var(--profile-progress-accent), var(--profile-progress-accent-2));
    transition: width 0.25s ease;
}

[data-theme="dark"] .profile-progress-track.progress {
    background: rgba(15, 23, 42, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 575.98px) {
    .profile-progress-pill {
        gap: 0.18rem;
    }

    .profile-progress-pill-value {
        min-width: 2.35rem;
        font-size: 0.72rem;
        padding: 0.16rem 0.3rem;
    }

    .profile-progress-track.progress {
        height: 0.96rem;
        padding: 0.06rem;
    }
}

.profile-fb-stats-grid {
    --bs-gutter-x: 0.38rem;
    --bs-gutter-y: 0.38rem;
}

.profile-fb-avatar-wrap {
    width: 5rem;
    height: 5rem;
    border-radius: 0.95rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    background: var(--color-surface-soft);
    flex-shrink: 0;
}

.profile-fb-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-fb-avatar-fallback {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
}

.profile-card-top {
    border: 0;
    border-radius: 0.8rem;
    padding: 0.12rem;
    background: transparent;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 0.75rem;
    row-gap: 0.32rem;
}

[data-theme="dark"] .profile-card-top {
    background: transparent;
}

[data-theme="dark"] .profile-card-item.is-pinned .profile-fb-card {
    border-color: rgba(45, 212, 191, 0.55);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.2);
}

.profile-card-top-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.42rem;
}

.marketplace-card-item .profile-fb-card.has-social-ribbon .profile-card-top-head {
    padding-top: 0.5rem;
}

.profile-card-top-content {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.profile-card-top-title .small {
    line-height: 1.14;
}

.profile-card-top-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.profile-card-handle,
.profile-card-country {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    padding: 0.1rem 0.42rem;
    font-size: 0.68rem;
    line-height: 1.15;
}

.profile-card-country i {
    color: var(--color-primary);
}

.profile-card-top-meta {
    min-width: 0;
    justify-self: end;
}

.profile-card-top-meta-head {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem;
    width: 100%;
}

.profile-card-id-badge {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--color-muted);
    background: rgba(148, 163, 184, 0.16);
    border: 0;
}

.profile-premade-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    max-width: 100%;
    padding: 0.18rem 0.5rem 0.18rem 0.24rem;
    color: #fff;
    background: #0369a1;
    border: 1px solid #075985;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1.15;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14);
}

.profile-premade-source-icon {
    width: 1.05rem;
    height: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #0369a1;
    background: #fff;
    border-radius: 999px;
    font-size: 0.62rem;
}

.profile-premade-source-badge span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-pin-toggle {
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    color: var(--color-muted);
    border-radius: 999px;
    font-size: 0.66rem;
    line-height: 1.1;
    padding: 0.14rem 0.46rem;
    min-height: 1.5rem;
}

.profile-pin-toggle:hover {
    color: var(--color-text);
    border-color: rgba(var(--color-primary-rgb), 0.35);
    background: rgba(var(--color-primary-rgb), 0.08);
}

.profile-pin-toggle.is-pinned {
    color: #0f766e;
    border-color: rgba(15, 118, 110, 0.36);
    background: rgba(15, 118, 110, 0.12);
}

.profile-card-item.is-pinned .profile-card-id-badge {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.14);
}

[data-theme="dark"] .profile-pin-toggle {
    border-color: #334155;
    background: rgba(15, 23, 42, 0.45);
    color: #94a3b8;
}

[data-theme="dark"] .profile-pin-toggle:hover {
    color: #e2e8f0;
    border-color: rgba(var(--color-primary-rgb), 0.5);
    background: rgba(var(--color-primary-rgb), 0.22);
}

[data-theme="dark"] .profile-pin-toggle.is-pinned {
    color: #99f6e4;
    border-color: rgba(45, 212, 191, 0.58);
    background: rgba(15, 118, 110, 0.3);
}

[data-theme="dark"] .profile-card-item.is-pinned .profile-card-id-badge {
    color: #99f6e4;
    background: rgba(15, 118, 110, 0.3);
}

[data-theme="dark"] .profile-premade-source-badge {
    color: #e0f2fe;
    background: #075985;
    border-color: rgba(125, 211, 252, 0.45);
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.32);
}

[data-theme="dark"] .profile-premade-source-icon {
    color: #075985;
    background: #e0f2fe;
}

.profile-card-top-meta .small {
    font-size: 0.66rem;
    line-height: 1.16;
}

.profile-fb-name {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
}

.profile-fb-headline {
    font-size: 0.77rem;
    color: var(--color-muted);
    line-height: 1.24;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.12em;
    margin-top: 0.05rem;
}

.profile-info-block {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0.08rem 0 0;
    margin-top: 0;
    display: grid;
    gap: 0.3rem;
}

.profile-info-block-top {
    grid-template-columns: 1fr;
    grid-column: 1 / -1;
}

.profile-link-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 0.56rem;
    background: rgba(148, 163, 184, 0.14);
    padding: 0.24rem 0.42rem;
    font-size: 0.72rem;
    color: var(--color-text);
    text-decoration: none;
}

.profile-link-line i {
    color: var(--color-primary);
    flex-shrink: 0;
}

.profile-link-line span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-link-line:hover {
    background: rgba(148, 163, 184, 0.2);
}

.profile-link-line.is-empty {
    color: var(--color-muted);
}

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

.profile-mini-item {
    background: var(--color-surface-soft);
    border-radius: 0.56rem;
    padding: 0.3rem 0.42rem;
}

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

.profile-pill-action {
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    box-shadow: none;
}

.profile-pill-action:hover {
    filter: brightness(0.97);
}

.profile-pill-action:focus-visible {
    outline: 2px solid rgba(var(--color-primary-rgb), 0.32);
    outline-offset: 2px;
}

.profile-mini-label {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    font-size: 0.64rem;
    color: var(--color-muted);
    line-height: 1.15;
}

.profile-mini-label i {
    color: var(--color-primary);
}

.profile-mini-value {
    margin-top: 0.1rem;
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.profile-info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0;
    background: transparent;
    padding: 0.24rem 0;
    font-size: 0.71rem;
    line-height: 1.18;
    color: var(--color-muted);
}

.profile-info-row:last-child {
    border-bottom: 0;
}

.profile-info-row i {
    color: var(--color-muted);
}

.profile-info-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.profile-info-row strong {
    color: var(--color-text);
    font-weight: 600;
    text-align: right;
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

.profile-info-span-2 {
    grid-column: 1 / -1;
}

.profile-info-link strong {
    max-width: 68%;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.profile-fb-stat {
    border: 1px solid var(--color-border);
    border-radius: 0.62rem;
    background: var(--color-surface-soft);
    padding: 0.42rem 0.5rem;
}

.profile-fb-stat small {
    display: block;
    color: var(--color-muted);
    font-size: 0.7rem;
    line-height: 1.1;
}

.profile-fb-stat strong {
    display: block;
    color: var(--color-text);
    font-size: 0.79rem;
    line-height: 1.2;
    margin-top: 0.14rem;
    word-break: break-word;
}

.profile-fb-details {
    display: grid;
    gap: 0.42rem;
}

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

.profile-fb-detail-span-2 {
    grid-column: 1 / -1;
}

.profile-fb-detail-row {
    border: 1px solid var(--color-border);
    border-radius: 0.62rem;
    background: var(--color-surface-soft);
    padding: 0.42rem 0.52rem;
}

.profile-fb-detail-row .text-break {
    word-break: break-word;
}

.profile-credential-card {
    border: 1px solid var(--color-border);
    border-radius: 0.72rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(var(--color-primary-rgb), 0.08), transparent 36%),
        var(--color-surface-soft);
    padding: 0.5rem 0.56rem;
}

.profile-credential-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.42rem;
    margin-bottom: 0.42rem;
}

.profile-credential-title {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-text);
}

.profile-credential-title i {
    color: var(--color-primary);
}

.profile-credential-list {
    display: grid;
    gap: 0.4rem;
}

.profile-credential-item {
    display: grid;
    gap: 0.22rem;
}

.profile-credential-label {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--color-muted);
    line-height: 1.2;
}

.profile-credential-label i {
    color: var(--color-primary);
}

.profile-credential-card .input-group .form-control {
    font-size: 0.76rem;
    min-height: 31px;
}

.profile-credential-card .input-group .btn {
    padding: 0.19rem 0.42rem;
}

.profile-credential-otp {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.profile-credential-otp .otp-code {
    min-width: 7.2ch;
    text-align: center;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
    padding: 0.24rem 0.42rem;
}

.profile-credential-otp .otp-countdown {
    font-size: 0.7rem;
}

.profile-quick-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    margin-top: 0.36rem;
}

.social-media-kpi {
    border: 1px solid var(--color-border);
    border-radius: 0.72rem;
    background: var(--color-surface-soft);
    padding: 0.46rem 0.56rem;
    line-height: 1.15;
}

.social-media-kpi span {
    display: block;
    font-size: 0.7rem;
    color: var(--color-muted);
}

.social-media-kpi strong {
    display: block;
    margin-top: 0.14rem;
    font-size: 0.98rem;
    color: var(--color-text);
}

.social-media-card {
    border: 1px solid var(--color-border);
}

.social-media-credential-list {
    display: grid;
    gap: 0.44rem;
}

.social-media-credential-item {
    display: grid;
    gap: 0.2rem;
}

.social-media-credential-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-muted);
}

.social-media-credential-label i {
    color: var(--color-primary);
}

.profile-card-pill-row {
    margin-top: 0.16rem;
    width: 100%;
    align-self: start;
}

.profile-quick-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    padding: 0.1rem 0.42rem;
    font-size: 0.69rem;
    color: var(--color-muted);
    max-width: 100%;
}

.profile-quick-meta-item i {
    color: inherit;
}

.profile-card-pill-row .badge {
    font-size: 0.66rem;
    font-weight: 600;
}

.profile-card-handle-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

.profile-card-handle-row .profile-card-id-badge {
    flex-shrink: 0;
}

.profile-card-handle-row .profile-card-handle {
    min-width: 0;
}

.profile-mini-value-sub {
    font-size: 0.88em;
    font-weight: 500;
    color: var(--color-muted);
    white-space: nowrap;
}

.profile-id-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.14rem 0.62rem;
    margin-top: 0.3rem;
    font-size: 0.68rem;
    color: var(--color-muted);
}

.profile-id-dates-item {
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
    min-width: 0;
}

.profile-id-dates-item i {
    font-size: 0.7rem;
    color: var(--color-primary);
}

body.profiles-view-list .profile-id-dates {
    margin-top: 0.2rem;
}

.profile-card-zone-controls {
    width: auto;
    flex-shrink: 0;
}

/* In desktop list view the ribbon sits over the workflow column, so the identity head needs no clearance */
@media (min-width: 992px) {
    body.profiles-view-list .profile-fb-card.has-social-ribbon .profile-card-zone-identity > .profile-card-zone-head {
        min-height: 0;
        padding-right: 0;
    }
}

/* Light-theme muted text on tinted pills lands below 4.5:1; darken slightly */
.profile-card-item .profile-card-handle,
.profile-card-item .profile-card-id-badge,
.profile-card-item .profile-quick-meta-item {
    color: #57657c;
}

[data-theme="dark"] .profile-card-item .profile-card-handle,
[data-theme="dark"] .profile-card-item .profile-card-id-badge,
[data-theme="dark"] .profile-card-item .profile-quick-meta-item {
    color: var(--color-muted);
}

.profile-addon-quick {
    border: 1px solid var(--color-border);
    border-radius: 0.62rem;
    background: var(--color-surface-soft);
    padding: 0.42rem 0.5rem;
}

.profile-addon-quick .form-select {
    min-width: 84px;
}

.profile-detail-card {
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.profile-detail-card:hover {
    border-color: rgba(var(--color-primary-rgb), 0.28);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

.profile-cover-preview {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
}

.profile-detail-grid {
    font-size: 0.9rem;
}

.profile-detail-bio {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.min-w-0 {
    min-width: 0;
}

.profile-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.profile-feed-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.95rem;
    background: var(--color-surface);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.profile-feed-item:hover {
    border-color: rgba(var(--color-primary-rgb), 0.3);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.profile-feed-avatar-wrap {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(var(--color-primary-rgb), 0.15);
    background: var(--color-surface-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-feed-avatar-wrap-sm {
    width: 2.5rem;
    height: 2.5rem;
}

.profile-feed-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-feed-avatar-fallback {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
}

.profile-feed-body {
    min-width: 0;
}

.profile-feed-body h3 {
    color: var(--color-text);
}

.profile-feed-link {
    color: var(--color-primary);
    text-decoration: none;
    max-width: 260px;
}

.profile-feed-link:hover {
    text-decoration: underline;
}

.profile-feed-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-top: 0.36rem;
}

.profile-feed-actions .btn {
    padding-top: 0.24rem;
    padding-bottom: 0.24rem;
}

.profile-addon-panel {
    display: flex;
    flex-direction: column;
    gap: 0.34rem;
    margin-top: 0.42rem;
    padding: 0.45rem 0.55rem;
    background: var(--color-surface-soft);
    border: 1px dashed var(--color-border);
    border-radius: 0.7rem;
}

.profile-addon-panel-head {
    display: flex;
    align-items: center;
    gap: 0.32rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
}

.profile-addon-panel-hint {
    margin-left: auto;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.profile-addon-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.profile-addon-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.55rem;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.profile-addon-icon-speedup {
    background: rgba(245, 158, 11, 0.16);
    color: #d97706;
}

.profile-addon-icon-insurance {
    background: rgba(16, 185, 129, 0.16);
    color: #059669;
}

.profile-addon-copy {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
    min-width: 0;
    flex: 1 1 auto;
}

.profile-addon-name {
    font-size: 0.83rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
}

.profile-addon-desc {
    font-size: 0.74rem;
    line-height: 1.25;
    color: var(--color-muted);
}

.profile-addon-buy {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.profile-addon-buy-price {
    margin-left: 0.42rem;
    padding-left: 0.42rem;
    border-left: 1px solid rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

.profile-addon-row-done .profile-addon-icon {
    opacity: 0.65;
}

[data-theme="dark"] .profile-addon-icon-speedup {
    color: #fbbf24;
}

[data-theme="dark"] .profile-addon-icon-insurance {
    color: #34d399;
}

/* Dark skin's pale btn-primary + white label is unreadable; keep a solid blue here */
[data-theme="dark"] .profile-addon-buy.btn-primary,
.softim-skin[data-theme="dark"] .btn-primary.profile-addon-buy {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

[data-theme="dark"] .profile-addon-buy.btn-primary:hover,
[data-theme="dark"] .profile-addon-buy.btn-primary:focus-visible,
.softim-skin[data-theme="dark"] .btn-primary.profile-addon-buy:hover,
.softim-skin[data-theme="dark"] .btn-primary.profile-addon-buy:focus-visible {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

body.profiles-view-list #profilesFeedList > .profile-card-item {
    flex: 0 0 100%;
    max-width: 100%;
}

body.profiles-view-list .profile-fb-card {
    border-radius: 0.8rem;
}

body.profiles-view-list .profile-fb-card-body {
    padding: 0.56rem 0.6rem;
}

body.profiles-view-list .profile-card-zone + .profile-card-zone {
    margin-top: 0.46rem;
    padding-top: 0.46rem;
}

body.profiles-view-list .profile-card-zone-head {
    margin-bottom: 0.24rem;
}

body.profiles-view-list .profile-card-zone-title {
    font-size: 0.62rem;
}

body.profiles-view-list .profile-fb-avatar-wrap {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.72rem;
}

body.profiles-view-list .profile-card-top {
    column-gap: 0.58rem;
    row-gap: 0.22rem;
}

body.profiles-view-list .profile-fb-name {
    font-size: 0.92rem;
}

body.profiles-view-list .profile-fb-headline {
    display: none;
}

body.profiles-view-list .profile-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28rem;
}

body.profiles-view-list .profile-mini-item {
    padding: 0.24rem 0.36rem;
}

body.profiles-view-list .profile-quick-meta {
    margin-top: 0.22rem;
    gap: 0.24rem;
}

body.profiles-view-list [data-profile-worked-wait] {
    display: block !important;
    margin-top: 0.18rem !important;
    font-size: 0.78rem;
}

body.profiles-view-list [data-profile-dead-task-message],
body.profiles-view-list [data-profile-reset-task-message],
body.profiles-view-list [data-profile-approve-task-message] {
    display: none !important;
}

body.profiles-view-list .profile-feed-actions {
    margin-top: 0.24rem;
    gap: 0.24rem;
}

body.profiles-view-list .profile-feed-actions .btn {
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
}

body.profiles-view-list .profile-addon-panel {
    margin-top: 0.28rem;
    padding: 0.34rem 0.45rem;
    gap: 0.26rem;
}

body.profiles-view-list .profile-addon-icon {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.85rem;
}

@media (max-width: 767.98px) {
    .profile-control-head .badge {
        font-size: 0.68rem;
    }

    .profile-control-cta {
        width: 100%;
    }

    .profile-control-cta-sell {
        align-items: flex-start;
    }

    .profile-fb-avatar-wrap {
        width: 4rem;
        height: 4rem;
    }

    .profile-card-top {
        padding: 0.08rem;
        column-gap: 0.6rem;
        row-gap: 0.28rem;
    }

    .profile-card-top-meta {
        min-width: 0;
        justify-self: start;
        text-align: left !important;
    }

    .profile-card-top-meta-head {
        justify-content: flex-start;
    }

    .marketplace-card-item .profile-fb-card.has-social-ribbon .profile-card-top-head {
        padding-top: 0.34rem;
    }

    .profile-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.08rem;
    }

    .profile-info-link strong {
        max-width: 100%;
        text-align: left;
    }

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

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

    .profile-feed-item {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: flex-start;
    }

    .profile-feed-actions {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: flex-start;
        padding-top: 0.2rem;
    }

    .profile-feed-actions .btn,
    .profile-feed-actions form {
        flex: 1 1 auto;
    }

    .profile-feed-link {
        max-width: 100%;
    }

    .profile-overview-board {
        padding: 0.45rem;
    }

    .profile-overview-search {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

    .profile-sticky-filter-wrap {
        position: sticky;
        top: var(--profile-sticky-top, calc(64px + env(safe-area-inset-top) + 0.7rem));
        z-index: 1042;
    }

    .profile-overview-board-sticky {
        backdrop-filter: none;
        box-shadow: none;
    }

    .profile-search-sticky-bar {
        padding: 0.3rem;
    }

    .profile-search-sticky-inner {
        flex-direction: row;
        align-items: center;
    }

    .profile-view-toggle {
        display: none !important;
    }

    .profile-view-toggle .btn {
        width: 100%;
    }

    .profile-search-history {
        margin-top: 0.28rem;
        gap: 0.24rem;
    }

    .profile-search-history-label {
        font-size: 0.62rem;
    }

    .profile-search-history-chip {
        font-size: 0.68rem;
        padding: 0.14rem 0.4rem;
        max-width: 148px;
    }

    .profile-search-sticky-bar .input-group-text {
        padding: 0.34rem 0.48rem;
    }

    .profile-search-sticky-bar .table-search-input {
        min-width: 0;
        padding-top: 0.36rem;
        padding-bottom: 0.36rem;
        font-size: 0.92rem;
    }

    .profile-overview-mini {
        margin-left: 0;
    }

    .profile-filter-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .profile-fb-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hero-illusion {
    padding: 2rem;
    border: 1px solid var(--color-border);
    background: linear-gradient(120deg, rgba(var(--color-primary-rgb), 0.08), rgba(15, 118, 110, 0.06));
}

.hero-blob {
    position: absolute;
    border-radius: 999px;
    filter: blur(28px);
    opacity: 0.65;
    pointer-events: none;
}

.hero-blob-a {
    width: 220px;
    height: 220px;
    top: -80px;
    right: 10%;
    background: rgba(var(--color-primary-rgb), 0.35);
}

.hero-blob-b {
    width: 180px;
    height: 180px;
    bottom: -70px;
    left: 8%;
    background: rgba(15, 118, 110, 0.3);
}

.glass-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .glass-card {
    background: rgba(17, 26, 44, 0.7);
}

.icon-stat-card,
.icon-feature-card,
.mini-illustration-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-stat-card:hover,
.icon-feature-card:hover,
.mini-illustration-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.mini-illustration-card .progress {
    height: 0.6rem;
    border-radius: 999px;
    background: var(--color-surface-soft);
}

.home-hero {
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid var(--color-border);
    background: linear-gradient(130deg, rgba(var(--color-primary-rgb), 0.08), rgba(2, 132, 199, 0.05));
}

.home-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.75;
    pointer-events: none;
}

.home-glow-one {
    width: 260px;
    height: 260px;
    top: -120px;
    right: 8%;
    background: rgba(var(--color-primary-rgb), 0.35);
}

.home-glow-two {
    width: 220px;
    height: 220px;
    bottom: -110px;
    left: 5%;
    background: rgba(16, 185, 129, 0.28);
}

.home-badge {
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    border: 1px solid rgba(var(--color-primary-rgb), 0.25);
}

.home-mockup {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

[data-theme="dark"] .home-mockup {
    background: rgba(17, 26, 44, 0.85);
}

.home-metric {
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: var(--color-surface-soft);
}

.home-progress-group .progress {
    height: 0.6rem;
    border-radius: 999px;
    background: var(--color-surface-soft);
}

.home-progress-group .progress-bar {
    background: var(--color-primary);
}

.home-progress-group .home-progress-alt {
    background: var(--color-secondary);
}

.home-brand-strip {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.home-feature-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.home-process-card {
    border: 1px solid var(--color-border);
    background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.04), rgba(15, 23, 42, 0));
}

.process-step {
    padding: 0.4rem;
}

.process-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.8rem;
}

.home-plan-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-plan-card:hover {
    transform: translateY(-4px);
}

.home-final-cta {
    border: 1px solid var(--color-border);
    background: linear-gradient(145deg, rgba(var(--color-primary-rgb), 0.08), rgba(16, 185, 129, 0.06));
}

.template-classic .public-profile {
    max-width: 760px;
    margin: 0 auto;
}

.template-modern .public-profile {
    max-width: 900px;
    margin: 0 auto;
}

.template-minimal .public-profile {
    max-width: 680px;
    margin: 0 auto;
}

@media (max-width: 991.98px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: static;
        height: auto;
        box-shadow: none;
    }
}

/* Protection Plans (subscriptions.php) */
.subs-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(var(--color-primary-rgb), 0.12);
    border-radius: 1rem;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 34%),
        linear-gradient(165deg, rgba(var(--color-primary-rgb), 0.08), rgba(15, 23, 42, 0.02)),
        var(--color-surface);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.subs-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.subs-title {
    font-size: clamp(1.45rem, 2.1vw, 2rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.subs-lead {
    max-width: 62ch;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.subs-hero-note {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.subs-current-board {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: var(--color-surface);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.subs-current-name {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.subs-current-copy {
    color: var(--color-muted);
    max-width: 54ch;
}

.subs-current-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.subs-current-stat {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 1));
    padding: 0.72rem 0.78rem;
}

.subs-current-stat span {
    display: block;
    font-size: 0.76rem;
    color: var(--color-muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.subs-current-stat strong {
    display: block;
    color: var(--color-text);
    font-size: 0.88rem;
}

.subs-plan-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    height: 100%;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 0.9rem;
    background: var(--color-surface);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.subs-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.08);
}

.subs-plan-card.is-featured {
    border-color: rgba(var(--color-primary-rgb), 0.44);
    box-shadow: 0 22px 42px rgba(var(--color-primary-rgb), 0.14);
}

.subs-plan-card.is-current {
    border-color: rgba(16, 185, 129, 0.34);
    box-shadow: 0 22px 42px rgba(16, 185, 129, 0.12);
}

.subs-plan-card.is-free {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 1));
}

.subs-plan-card.is-pro {
    background:
        radial-gradient(circle at top right, rgba(var(--color-primary-rgb), 0.12), transparent 32%),
        linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 1));
}

.subs-plan-card.is-agency {
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(240, 253, 250, 0.72), rgba(255, 255, 255, 1));
}

.subs-plan-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.subs-plan-name {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.subs-plan-copy {
    color: var(--color-muted);
    font-size: 0.86rem;
}

.subs-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.3rem 0.62rem;
    background: var(--color-primary-hover);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.subs-plan-badge.is-soft {
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
}

.subs-price-row {
    display: flex;
    align-items: flex-end;
    gap: 0.55rem;
}

.subs-price {
    font-size: 1.95rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.subs-price-note {
    color: var(--color-muted);
    font-size: 0.82rem;
    padding-bottom: 0.24rem;
}

.subs-feature-list {
    display: grid;
    gap: 0.55rem;
}

.subs-feature-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.85rem;
    background: rgba(248, 250, 252, 0.72);
    padding: 0.68rem 0.75rem;
    color: var(--color-text);
}

.subs-feature-item span {
    color: var(--color-muted);
    font-weight: 600;
}

.subs-feature-item strong {
    color: var(--color-text);
    font-size: 0.88rem;
}

.subs-plan-desc {
    color: var(--color-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.subs-pay-box {
    border: 1px solid rgba(var(--color-primary-rgb), 0.14);
    border-radius: 0.9rem;
    background: rgba(239, 246, 255, 0.74);
    padding: 0.72rem 0.78rem;
}

.subs-pay-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
    margin-bottom: 0.25rem;
}

.subs-pay-value {
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.05;
}

.subs-credit-note {
    margin-top: 0.35rem;
    color: #15803d;
    font-size: 0.84rem;
    font-weight: 600;
}

.subs-plan-action {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: auto;
}

.subs-confirm-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.85rem;
    background: rgba(248, 250, 252, 0.7);
    padding: 0.62rem 0.72rem;
    color: var(--color-text);
    font-size: 0.86rem;
}

.subs-confirm-check .form-check-input {
    margin: 0;
}

.subs-disabled-note {
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

[data-theme="dark"] .subs-hero,
[data-theme="dark"] .subs-current-board,
[data-theme="dark"] .subs-plan-card,
[data-theme="dark"] .subs-current-stat,
[data-theme="dark"] .subs-feature-item,
[data-theme="dark"] .subs-pay-box,
[data-theme="dark"] .subs-confirm-check {
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .subs-hero {
    background:
        radial-gradient(circle at top right, rgba(var(--color-primary-rgb), 0.18), transparent 34%),
        linear-gradient(165deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.94));
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.34);
}

[data-theme="dark"] .subs-current-board,
[data-theme="dark"] .subs-plan-card {
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.28);
}

[data-theme="dark"] .subs-plan-card.is-free,
[data-theme="dark"] .subs-plan-card.is-pro,
[data-theme="dark"] .subs-plan-card.is-agency,
[data-theme="dark"] .subs-current-stat,
[data-theme="dark"] .subs-feature-item,
[data-theme="dark"] .subs-confirm-check {
    background: rgba(15, 23, 42, 0.58);
}

[data-theme="dark"] .subs-pay-box {
    background: rgba(30, 41, 59, 0.74);
}

[data-theme="dark"] .subs-lead,
[data-theme="dark"] .subs-current-copy,
[data-theme="dark"] .subs-current-stat span,
[data-theme="dark"] .subs-plan-copy,
[data-theme="dark"] .subs-feature-item span,
[data-theme="dark"] .subs-plan-desc,
[data-theme="dark"] .subs-pay-label,
[data-theme="dark"] .subs-disabled-note {
    color: #cbd5e1;
}

[data-theme="dark"] .subs-title,
[data-theme="dark"] .subs-current-name,
[data-theme="dark"] .subs-current-stat strong,
[data-theme="dark"] .subs-plan-name,
[data-theme="dark"] .subs-price,
[data-theme="dark"] .subs-price-note,
[data-theme="dark"] .subs-feature-item strong,
[data-theme="dark"] .subs-pay-value,
[data-theme="dark"] .subs-confirm-check {
    color: #e2e8f0;
}

[data-theme="dark"] .subs-plan-badge.is-soft {
    background: rgba(var(--color-primary-rgb), 0.16);
    color: var(--color-primary);
}

[data-theme="dark"] .subs-credit-note {
    color: #86efac;
}

@media (max-width: 991.98px) {
    .subs-hero,
    .subs-current-board {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .subs-hero-note {
        justify-content: flex-start;
    }

    .subs-current-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .subs-hero,
    .subs-current-board,
    .subs-plan-card {
        padding: 0.82rem;
        border-radius: 0.9rem;
    }

    .subs-title {
        font-size: 1.5rem;
    }

    .subs-plan-top,
    .subs-price-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .subs-price {
        font-size: 1.7rem;
    }

    .subs-feature-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .subs-confirm-check {
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .subs-hero,
    .subs-current-board {
        gap: 0.65rem;
        margin-bottom: 0.78rem !important;
    }

    .subs-kicker {
        font-size: 0.66rem;
    }

    .subs-title {
        max-width: 18rem;
        font-size: 1.24rem;
        line-height: 1.18;
    }

    .subs-lead,
    .subs-current-copy,
    .subs-plan-copy,
    .subs-plan-desc {
        font-size: 0.8rem;
        line-height: 1.38;
    }

    .subs-hero-note {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.42rem;
    }

    .subs-hero-note .badge {
        justify-content: center;
        min-width: 0;
        white-space: normal;
    }

    .subs-current-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.42rem;
    }

    .subs-current-stat {
        padding: 0.55rem;
    }

    .subs-current-stat span {
        margin-bottom: 0.2rem;
        font-size: 0.62rem;
        letter-spacing: 0;
    }

    .subs-current-stat strong {
        font-size: 0.76rem;
        overflow-wrap: anywhere;
    }

    .subs-plan-card {
        gap: 0.62rem;
        margin-bottom: 0.7rem;
    }

    .subs-plan-top {
        gap: 0.48rem;
    }

    .subs-plan-badge {
        border-radius: 0.45rem;
        padding: 0.24rem 0.45rem;
        font-size: 0.66rem;
    }

    .subs-price-row {
        gap: 0.25rem;
    }

    .subs-price {
        font-size: 1.45rem;
    }

    .subs-feature-list {
        gap: 0.42rem;
    }

    .subs-feature-item {
        align-items: center;
        flex-direction: row;
        padding: 0.5rem 0.58rem;
    }

    .subs-feature-item span,
    .subs-feature-item strong {
        font-size: 0.78rem;
    }

    .subs-pay-box,
    .subs-confirm-check {
        border-radius: 0.55rem;
        padding: 0.58rem;
    }
}

/* Auth v2 */
.auth-v2-wrap {
    width: 100%;
    max-width: 1120px;
    min-width: 0;
}

.auth-screen > .row {
    min-height: calc(100vh - 168px);
}

.auth-v2-brand {
    padding: 0.5rem 0.25rem;
}

.auth-screen {
    position: relative;
}

.auth-screen::before {
    content: "";
    position: absolute;
    inset: -60px 0 auto;
    height: 380px;
    background:
        radial-gradient(42% 60% at 22% 32%, rgba(var(--color-primary-rgb), 0.12), transparent 70%),
        radial-gradient(36% 55% at 78% 18%, rgba(45, 212, 191, 0.1), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.auth-hero-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 0;
    border-radius: 1.1rem;
    color: #fff;
    background:
        radial-gradient(120% 90% at 88% -12%, rgba(45, 212, 191, 0.38), transparent 55%),
        radial-gradient(110% 110% at -12% 112%, rgba(96, 165, 250, 0.45), transparent 60%),
        linear-gradient(150deg, #1e3a8a, #1d4ed8 48%, #0f766e);
    box-shadow: 0 24px 48px -24px rgba(30, 58, 138, 0.55);
    padding: 2rem 1.75rem;
}

.auth-hero-panel::before {
    content: "";
    position: absolute;
    top: -130px;
    right: -130px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    pointer-events: none;
}

.auth-hero-panel::after {
    content: "";
    position: absolute;
    top: -85px;
    right: -85px;
    width: 245px;
    height: 245px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    align-self: flex-start;
    padding: 0.42rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-hero-sub {
    color: rgba(255, 255, 255, 0.78);
    max-width: 38ch;
}

.auth-v2-heading {
    font-size: 2.3rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
    max-width: 17ch;
    color: #fff;
}

.auth-kicker {
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-trust-list {
    display: grid;
    gap: 0.6rem;
}

.auth-trust-list div {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.auth-trust-list i {
    color: var(--color-secondary);
    line-height: 1.35;
    flex-shrink: 0;
}

.auth-hero-panel .auth-trust-list div {
    color: rgba(255, 255, 255, 0.85);
}

.auth-hero-panel .auth-trust-list i {
    color: #5eead4;
}

/* Wallet UX */
.wallet-sticky-summary {
    position: sticky;
    top: calc(72px + 0.5rem);
    z-index: 1035;
}

.wallet-balance-value {
    letter-spacing: -0.01em;
}

.wallet-summary-metrics .badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.42rem 0.62rem;
}

.wallet-pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    line-height: 1;
    font-size: 0.55rem;
    font-weight: 800;
    border: 1px solid transparent;
    overflow: hidden;
    flex-shrink: 0;
    vertical-align: middle;
}

.wallet-pay-icon-lg {
    width: 2rem;
    height: 2rem;
    font-size: 0.82rem;
}

.wallet-pay-icon-naira {
    background: linear-gradient(145deg, #16a34a, #15803d);
    color: #fff;
    border-color: rgba(21, 128, 61, 0.5);
}

.wallet-pay-icon-usdt {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.14);
    padding: 0.14rem;
}

.wallet-pay-icon-usdt img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

[data-theme="dark"] .wallet-pay-icon-usdt {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.45);
}

[data-theme="dark"] .wallet-pay-icon-naira {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    border-color: rgba(74, 222, 128, 0.4);
}

.wallet-pay-tabs .nav-link {
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
    font-weight: 600;
}

.wallet-add-funds-card {
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    overflow: hidden;
}

.wallet-add-funds-card .wallet-pay-tabs {
    display: none;
}

.wallet-funding-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--color-border);
}

.wallet-funding-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
}

.wallet-funding-title {
    margin: 0.16rem 0 0;
    color: var(--color-text);
    font-size: 1.2rem;
    line-height: 1.08;
    font-weight: 850;
}

.wallet-funding-copy {
    margin: 0.28rem 0 0;
    max-width: 46rem;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.wallet-funding-balance {
    min-width: 8.5rem;
    border: 1px solid rgba(var(--color-primary-rgb), 0.18);
    border-radius: 0.72rem;
    background: rgba(var(--color-primary-rgb), 0.06);
    padding: 0.62rem 0.72rem;
    text-align: right;
}

.wallet-funding-balance span,
.wallet-funding-balance strong {
    display: block;
}

.wallet-funding-balance span {
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.wallet-funding-balance strong {
    margin-top: 0.12rem;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.1;
}

.wallet-funding-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.55rem;
}

.wallet-funding-method {
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 0.7rem;
    background: var(--color-surface);
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 3.85rem;
    padding: 0.62rem 0.7rem;
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.wallet-funding-method:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--color-primary-rgb), 0.32);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.wallet-funding-method.is-active {
    border-color: rgba(var(--color-primary-rgb), 0.58);
    background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.12), rgba(var(--color-primary-rgb), 0.04));
    box-shadow: 0 12px 24px rgba(var(--color-primary-rgb), 0.12);
}

.wallet-funding-method > i {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.55rem;
    background: rgba(var(--color-primary-rgb), 0.08);
    flex: 0 0 auto;
}

.wallet-funding-method strong,
.wallet-funding-method small {
    display: block;
    min-width: 0;
}

.wallet-funding-method strong {
    color: var(--color-text);
    font-size: 0.86rem;
    line-height: 1.15;
}

.wallet-funding-method small {
    margin-top: 0.1rem;
    color: var(--color-muted);
    font-size: 0.72rem;
    line-height: 1.2;
}

.wallet-amount-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
    margin-top: 0.55rem;
}

.wallet-amount-preset {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    min-height: 1.9rem;
    padding: 0.24rem 0.58rem;
    font-size: 0.76rem;
    font-weight: 800;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.wallet-amount-preset:hover,
.wallet-amount-preset.is-active {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
}

.wallet-compact-card .nav-tabs .nav-link {
    font-size: 0.82rem;
    padding-inline: 0.4rem;
}

.wallet-info-offcanvas {
    width: min(440px, 96vw);
}

.wallet-info-offcanvas .offcanvas-header {
    border-bottom: 1px solid var(--color-border);
}

.wallet-history-collapse {
    transition: height 0.2s ease;
}

.invoice-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.14);
    color: var(--color-primary);
}

.invoice-estimate-box {
    border: 1px solid var(--color-border);
    border-radius: 0.65rem;
    background: var(--color-surface);
    min-height: 88px;
    padding: 0.62rem 0.72rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    overflow: hidden;
}

.invoice-estimate-box-strong {
    background: linear-gradient(165deg, rgba(var(--color-primary-rgb), 0.08), rgba(var(--color-primary-rgb), 0.02)), var(--color-surface);
}

.invoice-estimate-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.invoice-estimate-amount {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
    white-space: nowrap;
}

.invoice-create-btn {
    min-height: 42px;
    font-weight: 600;
}

.wallet-invoice-steps,
.invoice-trust-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.wallet-invoice-step,
.invoice-trust-step {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.8rem;
}

.wallet-invoice-step span,
.invoice-trust-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    font-weight: 800;
    flex-shrink: 0;
}

.wallet-invoice-step strong,
.invoice-trust-step strong {
    display: block;
    color: var(--color-text);
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.wallet-invoice-step small,
.invoice-trust-step small {
    display: block;
    color: var(--color-muted);
    line-height: 1.4;
}

.wallet-safe-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.wallet-safe-strip-item {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.72rem 0.78rem;
    color: var(--color-text);
    font-size: 0.82rem;
    line-height: 1.45;
}

.invoice-trust-card {
    border: 1px solid rgba(var(--color-primary-rgb), 0.12);
    border-radius: 0.95rem;
    background:
        radial-gradient(circle at top right, rgba(var(--color-primary-rgb), 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
    padding: 0.95rem 1rem;
}

.invoice-trust-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.invoice-trust-checks {
    display: grid;
    gap: 0.55rem;
}

.invoice-trust-check {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    color: var(--color-text);
    font-size: 0.86rem;
}

.invoice-trust-check i {
    color: var(--color-primary);
    margin-top: 0.08rem;
}

.invoice-bank-card {
    border: 1px solid rgba(var(--color-primary-rgb), 0.14);
    border-radius: 0.95rem;
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.bank-logo-chip {
    display: inline-flex;
    align-items: center;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 0.55rem;
    padding: 0.35rem 0.6rem;
    /* Logo art is white-on-transparent; keep the dark backdrop on paper too. */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.bank-logo-chip img {
    display: block;
    max-width: 100%;
}

.bank-logo-chip-sm {
    padding: 0.25rem 0.45rem;
}

.invoice-page-head {
    gap: 0.75rem;
}

.invoice-page-actions {
    flex-wrap: wrap;
}

.invoice-page-card {
    padding: 1rem;
}

.invoice-status-row {
    gap: 0.6rem;
}

.invoice-amount-card {
    position: relative;
}

.invoice-credit-pill {
    display: inline-flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 120px;
    border: 1px solid rgba(var(--color-primary-rgb), 0.12);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.86);
    padding: 0.55rem 0.7rem;
}

.invoice-credit-pill span {
    color: var(--color-muted);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.invoice-credit-pill strong {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.2;
}

.invoice-transfer-notice {
    border-color: rgba(var(--color-primary-rgb), 0.12) !important;
}

.invoice-wait-notice {
    line-height: 1.45;
}

.invoice-wait-countdown {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--color-text);
}

.wallet-dv-panel {
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: linear-gradient(155deg, rgba(var(--color-primary-rgb), 0.08), rgba(16, 185, 129, 0.06)), var(--color-surface);
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.wallet-dv-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    font-size: 1rem;
}

.wallet-dv-brand-strip {
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    padding: 0.65rem 0.75rem;
    background: var(--color-surface-soft);
}

.wallet-dv-icon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.wallet-dv-icon-item {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.16rem 0.44rem 0.16rem 0.16rem;
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--color-surface);
    color: var(--color-text);
}

.wallet-dv-icon-code {
    line-height: 1;
}

.wallet-coin-logo {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 0.65rem;
    font-weight: 800;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.wallet-coin-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wallet-coin-logo-sm {
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.56rem;
}

.wallet-coin-logo.is-usdt {
    background: #26a17b;
    color: #fff;
}

.wallet-coin-logo.is-eth {
    background: #e5e7eb;
    color: #111827;
}

.wallet-coin-logo.is-trx {
    background: #ef4444;
    color: #fff;
}

.wallet-coin-logo.is-bnb {
    background: #f3ba2f;
    color: #111827;
}

.wallet-coin-logo.is-btc {
    background: #f7931a;
    color: #fff;
}

.wallet-coin-logo.is-ltc {
    background: #b8bec9;
    color: #111827;
}

.wallet-coin-logo.is-doge {
    background: #c3a634;
    color: #111827;
}

.wallet-coin-logo.is-ton {
    background: #0088cc;
    color: #fff;
}

.wallet-coin-logo.is-generic {
    background: rgba(var(--color-primary-rgb), 0.14);
    color: var(--color-primary);
}

.wallet-dv-history-item {
    border: 1px solid var(--color-border);
    border-radius: 0.8rem;
    padding: 0.55rem 0.65rem !important;
    margin-bottom: 0.45rem;
    background: var(--color-surface-soft);
}

.wallet-simple-guide,
.profile-simple-guide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

body:has(#walletAddFundsSection) .wallet-simple-guide {
    display: none !important;
}

.wallet-simple-guide-actions,
.profile-simple-guide-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.wallet-simple-guide > div:first-child,
.profile-simple-guide-copy {
    min-width: 0;
}

.wallet-shkeeper-panel {
    border: 1px solid rgba(var(--color-primary-rgb), 0.14);
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 32%),
        linear-gradient(160deg, rgba(var(--color-primary-rgb), 0.08), rgba(var(--color-primary-rgb), 0.02)),
        var(--color-surface);
    padding: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.wallet-shkeeper-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.8rem;
    background: linear-gradient(145deg, #0f172a, var(--color-primary-hover));
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.2);
}

.wallet-shkeeper-summary-card {
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: var(--color-surface);
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.wallet-btc-panel {
    border: 1px solid rgba(247, 147, 26, 0.18);
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.16), transparent 34%),
        linear-gradient(160deg, rgba(247, 147, 26, 0.07), rgba(247, 147, 26, 0.02)),
        var(--color-surface);
    padding: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.wallet-btc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.wallet-btc-logo {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 0.78rem;
    box-shadow: 0 10px 22px rgba(247, 147, 26, 0.2);
}

.wallet-btc-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.wallet-btc-qr-card,
.wallet-btc-address-card,
.wallet-btc-meta-item {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    background: var(--color-surface);
}

.wallet-btc-qr-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.wallet-btc-main {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.wallet-btc-address-card {
    padding: 0.9rem;
}

.wallet-btc-address {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.wallet-btc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.wallet-btc-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.wallet-btc-meta-item {
    padding: 0.78rem 0.85rem;
}

.wallet-btc-meta-item span {
    display: block;
    font-size: 0.78rem;
    color: var(--color-muted);
    margin-bottom: 0.28rem;
}

.wallet-btc-meta-item strong {
    display: block;
    color: var(--color-text);
    font-size: 0.95rem;
}

.wallet-shkeeper-summary-eyebrow {
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wallet-shkeeper-summary-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
}

.wallet-shkeeper-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.wallet-shkeeper-launch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}

.wallet-shkeeper-launch-badge {
    white-space: normal;
    text-align: center;
}

.wallet-shkeeper-launch-assets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.wallet-shkeeper-launch-asset {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.88);
    padding: 0.85rem 0.9rem;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.wallet-shkeeper-launch-asset:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--color-primary-rgb), 0.34);
    box-shadow: 0 12px 26px rgba(var(--color-primary-rgb), 0.1);
}

.wallet-shkeeper-launch-asset.is-active {
    border-color: rgba(var(--color-primary-rgb), 0.72);
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.84), rgba(239, 246, 255, 0.98));
    box-shadow: 0 16px 30px rgba(var(--color-primary-rgb), 0.14);
}

.wallet-shkeeper-launch-asset .wallet-coin-logo {
    flex-shrink: 0;
}

.wallet-shkeeper-launch-asset-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wallet-shkeeper-launch-asset-copy strong {
    font-size: 0.95rem;
    color: #0f172a;
}

.wallet-shkeeper-launch-asset-copy small {
    color: #64748b;
}

.wallet-shkeeper-config-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    padding: 1rem 1rem 0.95rem;
    margin-bottom: 1rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.wallet-shkeeper-config-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.wallet-shkeeper-config-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.wallet-shkeeper-config-note {
    max-width: 250px;
    font-size: 0.84rem;
    color: #64748b;
    text-align: right;
}

.wallet-shkeeper-selected-coin {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    padding: 0.26rem 0.55rem;
}

.wallet-shkeeper-selected-coin-label {
    font-size: 0.72rem;
    color: #64748b;
}

.wallet-shkeeper-selected-coin strong {
    font-size: 0.84rem;
    color: #0f172a;
}

.wallet-shkeeper-network-head,
.wallet-shkeeper-summary-head {
    min-width: 0;
}

.wallet-shkeeper-summary-actions {
    align-items: stretch;
}

.wallet-shkeeper-chain-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.wallet-shkeeper-chain-button {
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 0.55rem 0.85rem;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.wallet-shkeeper-chain-button:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--color-primary-rgb), 0.34);
    box-shadow: 0 10px 20px rgba(var(--color-primary-rgb), 0.08);
}

.wallet-shkeeper-chain-button.is-active {
    border-color: rgba(var(--color-primary-rgb), 0.76);
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.92), rgba(239, 246, 255, 0.98));
    color: var(--color-primary-hover);
    box-shadow: 0 12px 24px rgba(var(--color-primary-rgb), 0.14);
}

.wallet-shkeeper-coin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.65rem;
}

.wallet-shkeeper-coin-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.86);
    color: var(--color-text);
    font-weight: 700;
    padding: 0.65rem 0.55rem;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.wallet-shkeeper-coin-option:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--color-primary-rgb), 0.32);
    box-shadow: 0 10px 22px rgba(var(--color-primary-rgb), 0.1);
}

.wallet-shkeeper-coin-option.is-active {
    border-color: rgba(var(--color-primary-rgb), 0.72);
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.9), rgba(239, 246, 255, 0.96));
    box-shadow: 0 14px 28px rgba(var(--color-primary-rgb), 0.14);
}

.wallet-shkeeper-modal .modal-dialog {
    max-width: min(920px, calc(100vw - 1rem));
    margin: 0.5rem auto;
}

.wallet-shkeeper-modal .modal-content {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1.4rem;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.16);
    height: min(680px, calc(100dvh - 1rem));
}

.wallet-shkeeper-modal .modal-header {
    padding: 1rem 1rem 0.65rem;
    flex-shrink: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.wallet-shkeeper-modal .modal-body {
    padding: 1rem;
    min-height: 0;
    overflow: hidden;
}

.wallet-shkeeper-modal-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1rem;
    min-height: 0;
    height: 100%;
}

.wallet-shkeeper-hero {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.2rem;
    background: #ffffff;
    padding: 0.95rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wallet-shkeeper-hero-top {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.wallet-shkeeper-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    border-radius: 999px;
    padding: 0.35rem 0.68rem;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.wallet-shkeeper-status-pill.is-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
}

.wallet-shkeeper-status-pill.is-success {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
}

.wallet-shkeeper-status-pill.is-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.wallet-shkeeper-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
}

.wallet-shkeeper-hero-amount {
    font-size: clamp(1.65rem, 2vw, 2.35rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    margin-top: 0.25rem;
}

.wallet-shkeeper-hero-amount span {
    font-size: 0.7em;
    color: #334155;
}

.wallet-shkeeper-hero-fiat {
    margin-top: 0.25rem;
    color: #64748b;
    font-weight: 600;
}

.wallet-shkeeper-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.wallet-shkeeper-action-card,
.wallet-shkeeper-meta-item {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1rem;
    background: #ffffff;
}

.wallet-shkeeper-action-card {
    padding: 0.8rem;
}

.wallet-shkeeper-action-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.55rem;
}

.wallet-shkeeper-action-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.55rem;
    min-height: 48px;
}

.wallet-shkeeper-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.wallet-shkeeper-meta-item {
    padding: 0.68rem 0.75rem;
}

.wallet-shkeeper-meta-item span {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0.32rem;
}

.wallet-shkeeper-meta-item strong {
    display: block;
    font-size: 0.94rem;
    color: #0f172a;
}

.wallet-shkeeper-inline-hint {
    margin-top: auto;
    padding-top: 0.7rem;
    font-size: 0.82rem;
    color: #64748b;
}

.wallet-shkeeper-qr-panel {
    display: flex;
}

.wallet-shkeeper-qr-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1rem;
    background: #ffffff;
    width: 100%;
    padding: 0.85rem 0.85rem 0.75rem;
    text-align: center;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wallet-shkeeper-qr-frame {
    min-height: 250px;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    flex: 1 1 auto;
}

.wallet-shkeeper-qr-frame img {
    max-width: 100%;
    height: auto;
}

.wallet-shkeeper-qr-empty {
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.wallet-shkeeper-qr-empty i {
    font-size: 1.75rem;
}

.wallet-shkeeper-qr-caption {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: #64748b;
}

[data-theme="dark"] .wallet-shkeeper-panel,
[data-theme="dark"] .wallet-simple-guide,
[data-theme="dark"] .profile-simple-guide,
[data-theme="dark"] .wallet-add-funds-card,
[data-theme="dark"] .wallet-funding-method,
[data-theme="dark"] .wallet-funding-balance,
[data-theme="dark"] .wallet-amount-preset,
[data-theme="dark"] .wallet-shkeeper-summary-card,
[data-theme="dark"] .wallet-btc-panel,
[data-theme="dark"] .wallet-btc-qr-card,
[data-theme="dark"] .wallet-btc-address-card,
[data-theme="dark"] .wallet-btc-meta-item,
[data-theme="dark"] .wallet-shkeeper-config-card,
[data-theme="dark"] .wallet-shkeeper-launch-asset,
[data-theme="dark"] .wallet-shkeeper-selected-coin,
[data-theme="dark"] .wallet-shkeeper-chain-button,
[data-theme="dark"] .wallet-shkeeper-coin-option,
[data-theme="dark"] .wallet-shkeeper-hero,
[data-theme="dark"] .wallet-shkeeper-action-card,
[data-theme="dark"] .wallet-shkeeper-meta-item,
[data-theme="dark"] .wallet-shkeeper-qr-card {
    border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .wallet-shkeeper-panel {
    background:
        radial-gradient(circle at top right, rgba(var(--color-primary-rgb), 0.18), transparent 32%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.94));
    box-shadow: 0 24px 44px rgba(2, 6, 23, 0.36);
}

[data-theme="dark"] .wallet-btc-panel {
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.14), transparent 32%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.94));
    box-shadow: 0 24px 44px rgba(2, 6, 23, 0.36);
}

[data-theme="dark"] .wallet-pay-tabs .nav-link,
[data-theme="dark"] .wallet-compact-card .nav-tabs .nav-link,
[data-theme="dark"] .wallet-funding-method,
[data-theme="dark"] .wallet-amount-preset {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .wallet-funding-method.is-active,
[data-theme="dark"] .wallet-amount-preset.is-active {
    background: rgba(var(--color-primary-rgb), 0.2);
    border-color: rgba(var(--color-primary-rgb), 0.42);
}

[data-theme="dark"] .wallet-funding-balance {
    background: rgba(var(--color-primary-rgb), 0.14);
    border-color: rgba(var(--color-primary-rgb), 0.3);
}

[data-theme="dark"] .wallet-funding-method small,
[data-theme="dark"] .wallet-funding-copy,
[data-theme="dark"] .wallet-funding-balance span {
    color: #cbd5e1;
}

[data-theme="dark"] .wallet-funding-method strong,
[data-theme="dark"] .wallet-funding-title,
[data-theme="dark"] .wallet-funding-balance strong {
    color: #e2e8f0;
}

[data-theme="dark"] .wallet-pay-tabs .nav-link,
[data-theme="dark"] .wallet-compact-card .nav-tabs .nav-link,
[data-theme="dark"] .wallet-info-offcanvas .small,
[data-theme="dark"] .wallet-info-offcanvas .text-muted,
[data-theme="dark"] .wallet-shkeeper-summary-eyebrow,
[data-theme="dark"] .wallet-shkeeper-launch-row .small,
[data-theme="dark"] .wallet-shkeeper-launch-badge,
[data-theme="dark"] .wallet-shkeeper-panel .form-text,
[data-theme="dark"] .wallet-shkeeper-summary-card .small,
[data-theme="dark"] .wallet-shkeeper-modal .small,
[data-theme="dark"] .wallet-shkeeper-modal .text-muted {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .wallet-pay-tabs .nav-link,
[data-theme="dark"] .wallet-compact-card .nav-tabs .nav-link {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .wallet-pay-tabs .nav-link.active,
[data-theme="dark"] .wallet-compact-card .nav-tabs .nav-link.active {
    color: #eff6ff;
    background: rgba(var(--color-primary-rgb), 0.22);
    border-color: rgba(var(--color-primary-rgb), 0.42);
}

[data-theme="dark"] .wallet-pay-tabs .nav-link:hover,
[data-theme="dark"] .wallet-compact-card .nav-tabs .nav-link:hover {
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(var(--color-primary-rgb), 0.28);
}

[data-theme="dark"] .wallet-info-offcanvas,
[data-theme="dark"] .wallet-compact-card,
[data-theme="dark"] #walletAddFundsSection .card,
[data-theme="dark"] #walletAddFundsSection .card .card-body,
[data-theme="dark"] .wallet-history-collapse,
[data-theme="dark"] .invoice-panel,
[data-theme="dark"] .invoice-estimate-box,
[data-theme="dark"] .wallet-btc-panel {
    color: #e2e8f0;
}

[data-theme="dark"] .invoice-panel {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

[data-theme="dark"] .invoice-trust-card,
[data-theme="dark"] .invoice-bank-card {
    border-color: rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at top right, rgba(var(--color-primary-rgb), 0.16), transparent 34%),
        linear-gradient(180deg, rgba(16, 24, 39, 0.95), rgba(17, 26, 44, 0.95));
}

[data-theme="dark"] .bank-logo-chip {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.35);
}

[data-theme="dark"] .invoice-estimate-box {
    background: linear-gradient(165deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.94));
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .wallet-invoice-step,
[data-theme="dark"] .invoice-trust-step,
[data-theme="dark"] .wallet-safe-strip-item,
[data-theme="dark"] .invoice-credit-pill {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .invoice-estimate-title,
[data-theme="dark"] .invoice-estimate-amount,
[data-theme="dark"] .wallet-invoice-step strong,
[data-theme="dark"] .invoice-trust-step strong,
[data-theme="dark"] .invoice-trust-check,
[data-theme="dark"] .invoice-credit-pill strong,
[data-theme="dark"] .wallet-btc-address,
[data-theme="dark"] .wallet-btc-panel .fw-semibold,
[data-theme="dark"] .wallet-btc-meta-item strong,
[data-theme="dark"] .wallet-shkeeper-summary-title,
[data-theme="dark"] .wallet-shkeeper-panel .fw-semibold,
[data-theme="dark"] .wallet-compact-card .fw-semibold,
[data-theme="dark"] .wallet-info-offcanvas .fw-semibold,
[data-theme="dark"] .wallet-info-offcanvas pre,
[data-theme="dark"] .wallet-shkeeper-panel .form-label,
[data-theme="dark"] .wallet-shkeeper-panel .input-group-text,
[data-theme="dark"] .wallet-shkeeper-config-card .form-label,
[data-theme="dark"] .wallet-shkeeper-network-head .form-label {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .wallet-shkeeper-panel .form-control,
[data-theme="dark"] .wallet-shkeeper-panel .form-select,
[data-theme="dark"] .wallet-shkeeper-panel .input-group-text,
[data-theme="dark"] .invoice-panel .form-control,
[data-theme="dark"] .invoice-panel .form-select,
[data-theme="dark"] .invoice-panel .input-group-text {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}

[data-theme="dark"] .wallet-shkeeper-panel .form-control::placeholder,
[data-theme="dark"] .invoice-panel .form-control::placeholder {
    color: #94a3b8;
}

[data-theme="dark"] .wallet-btc-panel .small,
[data-theme="dark"] .wallet-btc-panel .text-muted,
[data-theme="dark"] .wallet-btc-meta-item span {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .wallet-info-offcanvas .border.rounded-3,
[data-theme="dark"] .wallet-compact-card .list-group-item,
[data-theme="dark"] .wallet-compact-card .empty-state {
    background: rgba(15, 23, 42, 0.56);
    border-color: rgba(148, 163, 184, 0.16);
    color: #e2e8f0;
}

[data-theme="dark"] .wallet-compact-card .list-group-item .small,
[data-theme="dark"] .wallet-compact-card .list-group-item .text-muted {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .btn-outline-secondary,
[data-theme="dark"] .wallet-info-offcanvas .btn-outline-secondary,
[data-theme="dark"] .wallet-compact-card .btn-outline-secondary,
[data-theme="dark"] .wallet-shkeeper-panel .btn-outline-secondary,
[data-theme="dark"] .wallet-shkeeper-modal .btn-outline-secondary {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}

[data-theme="dark"] .btn-outline-secondary:hover,
[data-theme="dark"] .wallet-info-offcanvas .btn-outline-secondary:hover,
[data-theme="dark"] .wallet-compact-card .btn-outline-secondary:hover,
[data-theme="dark"] .wallet-shkeeper-panel .btn-outline-secondary:hover,
[data-theme="dark"] .wallet-shkeeper-modal .btn-outline-secondary:hover {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(var(--color-primary-rgb), 0.35);
    color: #f8fafc;
}

[data-theme="dark"] .wallet-shkeeper-modal .modal-content {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
}

[data-theme="dark"] .wallet-shkeeper-hero,
[data-theme="dark"] .wallet-shkeeper-config-card,
[data-theme="dark"] .wallet-shkeeper-action-card,
[data-theme="dark"] .wallet-shkeeper-meta-item,
[data-theme="dark"] .wallet-shkeeper-qr-card,
[data-theme="dark"] .wallet-shkeeper-qr-frame {
    background: rgba(15, 23, 42, 0.72);
}

[data-theme="dark"] .wallet-shkeeper-coin-option {
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
}

[data-theme="dark"] .wallet-shkeeper-launch-asset {
    background: rgba(15, 23, 42, 0.72);
}

[data-theme="dark"] .wallet-shkeeper-launch-asset.is-active {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.94));
    border-color: rgba(var(--color-primary-rgb), 0.8);
    box-shadow: 0 14px 28px rgba(var(--color-primary-rgb), 0.2);
}

[data-theme="dark"] .wallet-shkeeper-launch-asset-copy strong {
    color: #e2e8f0;
}

[data-theme="dark"] .wallet-shkeeper-launch-asset-copy small {
    color: #cbd5e1;
}

[data-theme="dark"] .wallet-shkeeper-selected-coin-label {
    color: #cbd5e1;
}

[data-theme="dark"] .wallet-shkeeper-selected-coin {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .wallet-shkeeper-selected-coin strong,
[data-theme="dark"] .wallet-shkeeper-chain-button {
    color: #e2e8f0;
}

[data-theme="dark"] .wallet-shkeeper-chain-button {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(148, 163, 184, 0.3);
}

[data-theme="dark"] .wallet-shkeeper-chain-button:hover {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(var(--color-primary-rgb), 0.55);
    color: #eff6ff;
}

[data-theme="dark"] .wallet-shkeeper-chain-button.is-active {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.94));
    border-color: rgba(var(--color-primary-rgb), 0.8);
    color: #bfdbfe;
    box-shadow: 0 14px 28px rgba(var(--color-primary-rgb), 0.2);
}

[data-theme="dark"] .wallet-shkeeper-coin-option.is-active {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.94));
    border-color: rgba(var(--color-primary-rgb), 0.8);
    box-shadow: 0 14px 28px rgba(var(--color-primary-rgb), 0.2);
}

[data-theme="dark"] .wallet-shkeeper-hero-amount,
[data-theme="dark"] .wallet-shkeeper-action-value,
[data-theme="dark"] .wallet-shkeeper-meta-item strong,
[data-theme="dark"] .wallet-shkeeper-config-title {
    color: #e2e8f0;
}

[data-theme="dark"] .wallet-shkeeper-hero-amount span,
[data-theme="dark"] .wallet-shkeeper-hero-fiat,
[data-theme="dark"] .wallet-shkeeper-action-label,
[data-theme="dark"] .wallet-shkeeper-meta-item span,
[data-theme="dark"] .wallet-shkeeper-config-note,
[data-theme="dark"] .wallet-shkeeper-qr-caption,
[data-theme="dark"] .wallet-shkeeper-qr-empty,
[data-theme="dark"] .wallet-shkeeper-inline-hint {
    color: #cbd5e1;
}

[data-theme="dark"] .wallet-shkeeper-modal .modal-header {
    background: rgba(15, 23, 42, 0.98);
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .wallet-shkeeper-status-pill.is-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
}

[data-theme="dark"] .wallet-shkeeper-status-pill.is-success {
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
}

[data-theme="dark"] .wallet-shkeeper-status-pill.is-danger {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

[data-theme="dark"] .wallet-shkeeper-launch-badge,
[data-theme="dark"] .wallet-shkeeper-panel .badge.text-bg-light,
[data-theme="dark"] .wallet-shkeeper-summary-card .badge.text-bg-light,
[data-theme="dark"] .wallet-info-offcanvas .badge.text-bg-light {
    color: #e2e8f0 !important;
    background: rgba(15, 23, 42, 0.62) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

@media (max-width: 767.98px) {
    body:has(#walletAddFundsSection) .app-mobile-new-profile-fab {
        display: none !important;
    }

    body:has(#walletAddFundsSection) .app-email-verification-alert {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.55rem !important;
        padding: 0.64rem 0.72rem !important;
    }

    body:has(#walletAddFundsSection) .app-email-verification-alert .small {
        display: none;
    }

    body:has(#walletAddFundsSection) .app-email-verification-alert .fw-semibold {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    body:has(#walletAddFundsSection) .app-email-verification-alert .btn {
        width: 2.35rem;
        min-width: 2.35rem;
        padding-inline: 0;
    }

    body:has(#walletAddFundsSection) .app-email-verification-alert .btn i {
        margin-right: 0 !important;
    }

    body:has(#walletAddFundsSection) .app-email-verification-alert .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    body:has(#walletAddFundsSection) .wallet-simple-guide {
        display: none !important;
    }

    body:has(#walletAddFundsSection) .wallet-page-title-wrap {
        margin-bottom: 0.72rem !important;
    }

    body:has(#walletAddFundsSection) .wallet-page-title-wrap h1 {
        font-size: 1.32rem;
    }

    body:has(#walletAddFundsSection) .wallet-balance-summary-row {
        display: none;
    }

    .wallet-funding-head {
        grid-template-columns: 1fr;
        gap: 0.48rem;
        padding-bottom: 0.58rem;
    }

    .wallet-funding-title {
        font-size: 1.02rem;
    }

    .wallet-funding-copy {
        display: none;
    }

    .wallet-funding-balance {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        text-align: left;
        padding: 0.55rem 0.65rem;
    }

    .wallet-funding-balance strong {
        margin-top: 0;
    }

    .wallet-funding-method-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.42rem;
        overflow: visible;
        padding-bottom: 0.08rem;
    }

    .wallet-funding-method {
        min-width: 0;
        width: 100%;
        min-height: 2.55rem;
        border-radius: 0.58rem;
        padding: 0.46rem 0.52rem;
        gap: 0.45rem;
    }

    .wallet-funding-method > i {
        width: 1.55rem;
        height: 1.55rem;
        border-radius: 0.48rem;
    }

    .wallet-funding-method .wallet-pay-icon {
        width: 1.55rem;
        height: 1.55rem;
    }

    .wallet-funding-method strong {
        font-size: 0.78rem;
    }

    .wallet-funding-method small {
        display: none;
    }

    .wallet-amount-presets {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.3rem;
    }

    .wallet-amount-preset {
        min-width: 0;
        padding-inline: 0.3rem;
    }

    body:has(#walletAddFundsSection) .wallet-invoice-steps {
        display: none;
    }

    body:has(#walletAddFundsSection) .invoice-panel {
        padding: 0.85rem !important;
    }

    body:has(#walletAddFundsSection) .wallet-safe-strip {
        display: none;
    }

    .wallet-btc-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .wallet-btc-actions .btn,
    .wallet-btc-actions form {
        width: 100%;
    }

    .wallet-simple-guide,
    .profile-simple-guide {
        align-items: stretch;
        flex-direction: column;
    }

    .wallet-simple-guide-actions,
    .profile-simple-guide-actions {
        justify-content: flex-start;
    }

    .wallet-dv-panel {
        padding: 0.75rem;
    }

    .wallet-dv-brand-strip {
        padding: 0.58rem;
    }

    .wallet-dv-icon-item {
        font-size: 0.64rem;
    }

    .wallet-coin-logo {
        width: 1.35rem;
        height: 1.35rem;
    }

    .wallet-shkeeper-panel,
    .wallet-shkeeper-summary-card,
    .wallet-btc-panel {
        padding: 0.85rem;
    }

    .wallet-shkeeper-panel {
        border-radius: 1rem;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    }

    .wallet-shkeeper-panel-head {
        flex-direction: column;
        align-items: stretch !important;
    }

    .wallet-shkeeper-panel-head .badge {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: center;
        padding: 0.55rem 0.75rem;
    }

    .wallet-shkeeper-launch-row {
        align-items: stretch;
        flex-direction: column;
        gap: 0.65rem;
    }

    .wallet-shkeeper-launch-badge {
        width: 100%;
        border-radius: 0.9rem !important;
        padding: 0.55rem 0.7rem;
    }

    .wallet-shkeeper-launch-assets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

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

    .wallet-btc-shell,
    .wallet-btc-meta {
        grid-template-columns: 1fr;
    }

    .wallet-btc-qr-card {
        padding: 0.85rem;
    }

    .wallet-btc-qr-card img {
        max-width: 190px;
    }

    .wallet-btc-actions .btn {
        width: 100%;
    }

    .wallet-shkeeper-launch-asset {
        min-height: 78px;
        padding: 0.8rem 0.75rem;
        gap: 0.6rem;
        align-items: flex-start;
    }

    .wallet-shkeeper-launch-asset-copy strong {
        font-size: 0.88rem;
        line-height: 1.2;
    }

    .wallet-shkeeper-launch-asset-copy small {
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .wallet-shkeeper-config-card {
        padding: 0.9rem 0.85rem;
    }

    .wallet-shkeeper-config-title {
        font-size: 0.96rem;
    }

    .wallet-shkeeper-config-head {
        flex-direction: column;
        gap: 0.55rem;
        margin-bottom: 0.75rem;
    }

    .wallet-shkeeper-config-note {
        max-width: none;
        text-align: left;
    }

    .wallet-shkeeper-config-card .form-label {
        font-size: 0.84rem;
        font-weight: 700;
    }

    .wallet-shkeeper-config-card .form-control {
        min-height: 52px;
        border-radius: 0.95rem;
        font-size: 16px;
    }

    .wallet-shkeeper-config-card .btn-primary {
        min-height: 52px;
        border-radius: 0.95rem;
        font-weight: 700;
    }

    .wallet-shkeeper-selected-coin {
        width: 100%;
        justify-content: space-between;
        padding: 0.45rem 0.7rem;
    }

    .wallet-shkeeper-network-head {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }

    .wallet-shkeeper-chain-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .wallet-shkeeper-chain-button {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 46px;
        justify-content: center;
        padding: 0.65rem 0.75rem;
    }

    .wallet-shkeeper-summary-grid,
    .wallet-shkeeper-modal-shell {
        grid-template-columns: 1fr;
    }

    .wallet-shkeeper-summary-head {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.55rem !important;
    }

    .wallet-shkeeper-summary-title {
        font-size: 1rem;
    }

    .wallet-shkeeper-summary-card .badge {
        align-self: flex-start;
    }

    .wallet-shkeeper-summary-actions {
        gap: 0.55rem !important;
    }

    .wallet-shkeeper-summary-actions .btn {
        flex: 1 1 calc(50% - 0.275rem);
        min-height: 44px;
    }

    .wallet-shkeeper-summary-actions .btn-primary {
        flex-basis: 100%;
    }

    .wallet-shkeeper-action-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .wallet-shkeeper-modal .modal-dialog {
        max-width: 100vw;
        min-height: 100dvh;
        margin: 0;
    }

    .wallet-shkeeper-modal .modal-header {
        padding: 0.95rem 0.95rem 0.75rem;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .wallet-shkeeper-modal .modal-body {
        padding: 0.75rem 0.75rem 1rem;
        overflow: auto;
    }

    .wallet-shkeeper-modal .modal-content {
        height: 100dvh;
        border-radius: 0;
        border-width: 0;
    }

    .wallet-shkeeper-modal-shell {
        gap: 0.75rem;
        align-content: start;
    }

    .wallet-shkeeper-hero {
        order: 1;
        padding: 0.85rem;
    }

    .wallet-shkeeper-hero-top {
        padding-bottom: 0.6rem;
    }

    .wallet-shkeeper-hero-amount {
        font-size: clamp(1.45rem, 7vw, 1.95rem);
    }

    .wallet-shkeeper-action-card {
        padding: 0.75rem;
    }

    .wallet-shkeeper-action-value {
        min-height: 0;
        margin-bottom: 0.45rem;
    }

    .wallet-shkeeper-action-card .btn {
        width: 100%;
        min-height: 42px;
    }

    .wallet-shkeeper-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .wallet-shkeeper-meta-item {
        padding: 0.62rem 0.68rem;
    }

    .wallet-shkeeper-inline-hint {
        margin-top: 0.7rem;
        padding-top: 0.6rem;
    }

    .wallet-shkeeper-qr-panel {
        order: 2;
    }

    .wallet-shkeeper-qr-card {
        padding: 0.75rem;
    }

    .wallet-shkeeper-qr-frame {
        min-height: 180px;
        max-height: 220px;
        padding: 0.75rem;
    }

    .wallet-shkeeper-qr-frame img {
        max-width: min(180px, 100%);
    }

}

@media (max-width: 479.98px) {
    .wallet-shkeeper-launch-assets {
        grid-template-columns: 1fr;
    }

    .wallet-shkeeper-launch-asset {
        padding: 0.72rem;
    }

    .wallet-shkeeper-summary-grid,
    .wallet-shkeeper-meta-grid {
        grid-template-columns: 1fr;
    }

    .wallet-shkeeper-modal .modal-header {
        padding: 0.85rem 0.85rem 0.7rem;
    }

    .wallet-shkeeper-modal .modal-body {
        padding: 0.65rem 0.65rem 0.9rem;
    }

    .wallet-shkeeper-chain-buttons {
        grid-template-columns: 1fr;
    }

    .wallet-shkeeper-summary-actions .btn {
        flex-basis: 100%;
    }
}

@media (max-width: 991.98px) {
    .wallet-sticky-summary {
        top: calc(72px + 0.4rem);
    }
}

@media (max-width: 767.98px) {
    .invoice-page-head {
        margin-bottom: 0.75rem !important;
    }

    .invoice-page-head h1 {
        font-size: 1.08rem;
        line-height: 1.2;
    }

    .invoice-page-actions {
        display: none !important;
    }

    .invoice-page-card {
        padding: 0.8rem;
    }

    .invoice-status-row {
        margin-bottom: 0.7rem !important;
    }

    .invoice-trust-steps,
    .invoice-trust-card {
        display: none !important;
    }

    .invoice-amount-card,
    .invoice-bank-card,
    .invoice-transfer-notice {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        border-radius: 0.8rem !important;
    }

    .invoice-amount-card .h4 {
        font-size: 1.18rem;
    }

    .invoice-credit-pill {
        min-width: 104px;
        padding: 0.46rem 0.58rem;
    }

    .invoice-credit-pill span {
        font-size: 0.62rem;
    }

    .invoice-credit-pill strong {
        font-size: 0.82rem;
    }

    .invoice-bank-section {
        margin-bottom: 0.75rem !important;
    }

    .invoice-bank-section h2 {
        margin-bottom: 0.45rem;
    }

    .invoice-bank-card .mb-2 {
        margin-bottom: 0.45rem !important;
    }

    .invoice-bank-card .mt-3 {
        margin-top: 0.7rem !important;
    }

    .invoice-bank-card .btn,
    .invoice-amount-card .btn,
    .invoice-transfer-notice .btn,
    .invoice-cancel-form .btn {
        min-height: 36px;
        padding: 0.38rem 0.65rem;
        font-size: 0.78rem;
    }

    .invoice-transfer-notice .form-control {
        font-size: 0.84rem;
    }

    .invoice-cancel-form {
        display: block !important;
        margin-bottom: 0.65rem;
    }

    .invoice-cancel-form .btn {
        width: 100%;
    }

    .wallet-summary-metrics {
        gap: 0.35rem !important;
    }

    .wallet-summary-metrics .badge {
        font-size: 0.7rem;
        padding: 0.34rem 0.5rem;
    }

    .wallet-sticky-summary .card-body {
        padding-top: 0.55rem !important;
        padding-bottom: 0.55rem !important;
    }

    .wallet-sticky-summary .btn {
        padding: 0.35rem 0.58rem;
        font-size: 0.78rem;
    }

    .wallet-simple-guide-actions .btn,
    .profile-simple-guide-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .wallet-balance-value {
        font-size: 1.02rem;
    }

    .invoice-create-btn {
        margin-top: 0.15rem;
    }

    .wallet-invoice-steps,
    .wallet-safe-strip {
        grid-template-columns: 1fr;
    }

    .invoice-estimate-box {
        min-height: 80px;
    }

    .invoice-estimate-amount {
        font-size: 1rem;
    }

    #walletAddFundsSection .card-body,
    .wallet-compact-card .card-body {
        padding: 0.9rem;
    }
}

.auth-v2-metric {
    border: 1px solid var(--color-border);
    border-radius: 0.65rem;
    background: var(--color-surface-soft);
    text-align: center;
    min-height: 64px;
    padding: 0.55rem 0.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-v2-metric small {
    display: block;
    color: var(--color-muted);
    font-size: 0.72rem;
}

.auth-v2-metric strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1.2;
}

.auth-hero-panel .auth-v2-metric {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
}

.auth-hero-panel .auth-v2-metric small {
    color: rgba(255, 255, 255, 0.68);
}

.auth-hero-panel .auth-v2-metric strong {
    color: #fff;
}

.auth-v2-illustration {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 0.9rem;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 30px -22px rgba(2, 6, 23, 0.6);
    padding: 0.6rem;
    margin-top: 1.25rem;
}

.auth-v2-card,
.softim-skin[data-theme] .card.auth-v2-card {
    border: 1px solid var(--color-border);
    border-radius: 1.1rem;
    background: var(--color-surface);
    box-shadow: 0 24px 50px -30px rgba(15, 23, 42, 0.25);
    min-width: 0;
}

.auth-v2-card:hover,
body.app-body[data-theme="light"] .auth-v2-card:hover {
    transform: none;
    background: var(--color-surface) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text);
    box-shadow: 0 24px 50px -30px rgba(15, 23, 42, 0.25);
}

.auth-v2-form .form-label {
    font-weight: 600;
    margin-bottom: 0.45rem;
}

/* Unified field: one bordered pill wraps icon, input, and toggle */
.auth-v2-form .input-group {
    border: 1px solid var(--color-border);
    border-radius: 0.8rem;
    background: var(--color-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-v2-form .input-group > .form-control,
.auth-v2-form .input-group > .input-group-text,
.auth-v2-form .input-group > .auth-password-toggle {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.auth-v2-form .input-group > .form-control {
    min-width: 0;
    border-radius: 0.8rem;
}

.auth-v2-icon {
    color: var(--color-muted);
    font-size: 1.02rem;
    padding-right: 0.25rem;
    transition: color 0.15s ease;
}

.auth-v2-form .input-group .auth-password-toggle {
    min-width: 3rem;
    color: var(--color-muted);
    border-radius: 0.8rem;
}

.auth-v2-form .input-group .auth-password-toggle:hover,
.auth-v2-form .input-group .auth-password-toggle:focus {
    color: var(--color-primary);
    background: transparent;
}

.auth-v2-form .input-group:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.22rem rgba(var(--color-primary-rgb), 0.13);
}

.auth-v2-form .input-group:focus-within .auth-v2-icon {
    color: var(--color-primary);
}

/* Validation state moves to the wrapper since children are borderless */
.auth-v2-form .input-group:has(> .form-control.is-invalid),
.auth-v2-form.was-validated .input-group:has(> .form-control:invalid) {
    border-color: #dc2626;
}

.auth-v2-form .input-group:has(> .form-control.is-invalid):focus-within,
.auth-v2-form.was-validated .input-group:has(> .form-control:invalid):focus-within {
    box-shadow: 0 0 0 0.22rem rgba(220, 38, 38, 0.12);
}

.auth-v2-form .input-group:has(> .form-control.is-valid) {
    border-color: #16a34a;
}

.auth-v2-form .input-group:has(> .form-control.is-valid):focus-within {
    box-shadow: 0 0 0 0.22rem rgba(22, 163, 74, 0.12);
}

.auth-help-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-help-link:hover,
.auth-help-link:focus {
    text-decoration: underline;
}

.auth-form-row {
    min-height: 1.65rem;
}

.auth-submit-btn {
    min-height: 3.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 0;
    border-radius: 0.8rem;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.08));
    box-shadow: 0 14px 26px -14px rgba(var(--color-primary-rgb), 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.auth-submit-btn:hover,
.auth-submit-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 16px 30px -14px rgba(var(--color-primary-rgb), 0.65);
}

.auth-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 16px -10px rgba(var(--color-primary-rgb), 0.5);
}

/* !important needed: the softim skin forces .form-text color with !important */
.form-text.auth-capslock-hint {
    color: #b45309 !important;
    font-weight: 600;
}

[data-theme="dark"] .form-text.auth-capslock-hint {
    color: #fbbf24 !important;
}

.form-text.auth-match-hint {
    color: var(--color-secondary) !important;
    font-weight: 600;
}

.auth-switch-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
    color: var(--color-muted);
    padding: 1.1rem 0 0;
    text-align: center;
}

.auth-switch-card a {
    font-weight: 700;
    text-decoration: none;
}

.auth-switch-card a:hover,
.auth-switch-card a:focus {
    text-decoration: underline;
}

.auth-password-meter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
}

.auth-password-meter span {
    height: 0.32rem;
    border-radius: 999px;
    background: var(--color-border);
}

.auth-password-meter[data-strength="1"] span:nth-child(1) {
    background: #dc2626;
}

.auth-password-meter[data-strength="2"] span:nth-child(-n + 2) {
    background: #d97706;
}

.auth-password-meter[data-strength="3"] span {
    background: var(--color-secondary);
}

.auth-password-hint {
    min-height: 1.2rem;
}

[data-theme="dark"] .auth-hero-panel {
    background:
        radial-gradient(120% 90% at 88% -12%, rgba(45, 212, 191, 0.22), transparent 55%),
        radial-gradient(110% 110% at -12% 112%, rgba(59, 130, 246, 0.28), transparent 60%),
        linear-gradient(150deg, #0b1220, #172554 52%, #134e4a);
    box-shadow: 0 24px 48px -26px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .auth-v2-illustration {
    background: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] .auth-v2-card,
.softim-skin[data-theme="dark"] .card.auth-v2-card {
    box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.6);
}

/* Dark skin's pale btn-primary + white label is unreadable; keep a solid blue here */
[data-theme="dark"] .auth-submit-btn,
.softim-skin[data-theme="dark"] .btn-primary.auth-submit-btn {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 14px 26px -14px rgba(37, 99, 235, 0.6);
}

[data-theme="dark"] .auth-submit-btn:hover,
[data-theme="dark"] .auth-submit-btn:focus-visible,
.softim-skin[data-theme="dark"] .btn-primary.auth-submit-btn:hover,
.softim-skin[data-theme="dark"] .btn-primary.auth-submit-btn:focus-visible {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

[data-theme="dark"] .auth-v2-card:hover,
body.app-body[data-theme="dark"] .auth-v2-card:hover {
    background: var(--color-surface) !important;
    border-color: var(--color-border) !important;
    color: var(--color-text);
}

/* Settings page */
.settings-avatar-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
}

.settings-avatar-placeholder {
    width: 96px;
    height: 96px;
    background: var(--color-primary);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .auth-v2-wrap {
        max-width: 720px;
    }

    .auth-screen > .row {
        min-height: auto;
    }

    .auth-v2-brand {
        padding: 0;
    }

    .auth-hero-panel {
        min-height: auto;
    }

    .auth-v2-illustration {
        max-height: 180px;
    }
}

@media (max-width: 575.98px) {
    .auth-v2-wrap,
    .auth-v2-card,
    .auth-v2-form,
    .auth-v2-form .input-group {
        max-width: 100%;
        min-width: 0;
    }

    .auth-screen {
        overflow-x: hidden;
    }

    .auth-screen > .row {
        --bs-gutter-x: 0;
        margin-right: 0;
        margin-left: 0;
    }

    .auth-screen > .row > [class*="col-"] {
        padding-right: 0;
        padding-left: 0;
    }

    .auth-v2-form .input-group > .form-control {
        flex: 1 1 auto;
        width: 0;
        min-width: 0;
    }

    .auth-v2-card .card-body {
        padding: 1.25rem 1.1rem !important;
    }

    .auth-v2-heading {
        font-size: 1.6rem;
        max-width: none;
    }

    .auth-hero-panel {
        border-radius: 0.9rem;
        padding: 1.5rem 1.2rem;
    }

    .auth-hero-panel::before,
    .auth-hero-panel::after {
        opacity: 0.6;
    }

    .auth-v2-metric {
        min-height: 54px;
        padding: 0.45rem 0.3rem;
    }

    .auth-trust-list div {
        font-size: 0.86rem;
    }

    .auth-form-row .text-muted {
        display: none;
    }

    .auth-submit-btn {
        min-height: 3.2rem;
        font-size: 1.02rem;
    }

    .auth-switch-card {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .auth-screen::before {
        height: 240px;
    }

    /* Compact one-row public nav on auth pages: brand + theme + opposite CTA.
       Overrides the site-wide 2x2 button grid, which wastes ~150px here. */
    .app-page-login-php .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto,
    .app-page-register-php .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto {
        display: flex !important;
        grid-template-columns: none;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        width: auto;
        max-width: none;
        margin-top: 0;
        margin-left: auto !important;
        gap: 0.4rem;
    }

    .app-page-login-php .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto .btn,
    .app-page-register-php .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto .btn {
        width: auto;
        white-space: nowrap;
    }

    .app-page-login-php .app-public-nav a[href*="faq.php"],
    .app-page-register-php .app-public-nav a[href*="faq.php"],
    .app-page-login-php .app-public-nav .d-flex.ms-auto a[href*="login.php"],
    .app-page-register-php .app-public-nav .d-flex.ms-auto a[href*="register.php"] {
        display: none !important;
    }

    .app-page-login-php .app-public-nav:not(.app-public-nav-marketing) .container-fluid,
    .app-page-register-php .app-public-nav:not(.app-public-nav-marketing) .container-fluid {
        flex-wrap: nowrap;
    }

    .app-page-login-php .app-public-nav .navbar-brand,
    .app-page-register-php .app-public-nav .navbar-brand {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        margin-right: 0.5rem;
    }

    .app-page-login-php .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto .btn,
    .app-page-register-php .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto .btn {
        flex: 0 0 auto;
    }
}

/* Auth pages */
.auth-shell {
    max-width: 1080px;
}

.auth-title {
    letter-spacing: -0.01em;
}

.auth-marketing-card {
    background: linear-gradient(145deg, rgba(var(--color-primary-rgb), 0.1), rgba(14, 165, 233, 0.07));
}

.ticket-chat-thread {
    display: grid;
    gap: 0.58rem;
    margin: 0.15rem 0 0.35rem;
}

.ticket-chat-thread-scroll {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.ticket-chat-thread-scroll::-webkit-scrollbar {
    width: 6px;
}

.ticket-chat-thread-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.42);
    border-radius: 999px;
}

.ticket-chat-row {
    display: flex;
    width: 100%;
    align-items: flex-end;
    gap: 0.45rem;
}

.ticket-chat-row-user {
    justify-content: flex-end;
}

.ticket-chat-row-admin {
    justify-content: flex-start;
}

.ticket-chat-bubble-wrap {
    display: block;
    min-width: 0;
}

.ticket-chat-bubble {
    max-width: min(88vw, 700px);
    border-radius: 0.84rem;
    padding: 0.62rem 0.72rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    position: relative;
}

.ticket-chat-bubble-user {
    background: linear-gradient(145deg, rgba(var(--color-primary-rgb), 0.18), rgba(var(--color-primary-rgb), 0.1));
    border-color: rgba(var(--color-primary-rgb), 0.36);
    border-bottom-right-radius: 0.32rem;
}

.ticket-chat-bubble-admin {
    background: var(--color-surface-soft);
    border-bottom-left-radius: 0.32rem;
}

.ticket-chat-avatar {
    width: 1.72rem;
    height: 1.72rem;
    border-radius: 999px;
    flex: 0 0 1.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}

.ticket-chat-avatar-user {
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary));
    color: #fff;
    border-color: rgba(var(--color-primary-rgb), 0.56);
}

.ticket-chat-avatar-admin {
    background: linear-gradient(145deg, #0f172a, #334155);
    color: #fff;
}

.ticket-chat-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.26rem;
    font-size: 0.68rem;
    color: var(--color-muted);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.ticket-chat-text {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--color-text);
    word-break: break-word;
}

.ticket-chat-empty {
    font-size: 0.78rem;
    color: var(--color-muted);
    text-align: center;
    padding: 0.62rem 0.4rem;
    border: 1px dashed var(--color-border);
    border-radius: 0.68rem;
    background: var(--color-surface-soft);
}

.ticket-conversation-card {
    border: 1px solid var(--color-border);
    border-radius: 0.92rem;
    background:
        radial-gradient(circle at 0% 0%, rgba(var(--color-primary-rgb), 0.08), transparent 40%),
        var(--color-surface);
}

.ticket-conversation-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.42rem;
}

.ticket-conversation-meta {
    font-size: 0.74rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.ticket-chat-composer {
    margin-top: 0.4rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--color-border);
}

.ticket-chat-composer .form-control {
    resize: vertical;
    min-height: 56px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.ticket-chat-composer .btn {
    min-width: 88px;
}

.support-ticket-table > tbody > tr > td {
    vertical-align: middle;
}

.support-ticket-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.support-ticket-search {
    width: 220px;
}

.support-new-ticket-btn {
    min-width: 118px;
    font-weight: 700;
}

.new-support-ticket-modal .modal-dialog {
    max-width: min(900px, calc(100vw - 2rem));
}

.new-support-ticket-modal .modal-body {
    padding: 1rem 1.05rem;
}

.new-support-ticket-modal .form-label {
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 0.42rem;
}

.new-support-ticket-modal fieldset {
    min-width: 0;
    padding: 0;
    border: 0;
}

.new-support-ticket-modal legend.form-label {
    float: none;
    width: auto;
    line-height: 1.4;
    padding: 0;
}

.new-support-ticket-modal legend.form-label + * {
    clear: none;
}

.support-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.48rem;
}

.support-topic-chip {
    border: 1px solid var(--color-border);
    border-radius: 0.55rem;
    background: var(--color-surface);
    color: var(--color-text);
    min-height: 3.7rem;
    padding: 0.58rem 0.65rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.support-topic-chip span {
    font-weight: 800;
    font-size: 0.86rem;
    line-height: 1.15;
}

.support-topic-chip small {
    color: var(--color-muted);
    font-size: 0.68rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.support-topic-chip:hover,
.support-topic-chip:focus {
    border-color: rgba(var(--color-primary-rgb), 0.42);
    box-shadow: 0 8px 20px rgba(var(--color-primary-rgb), 0.08);
}

.support-topic-chip.is-active {
    border-color: rgba(79, 70, 229, 0.65);
    background: rgba(79, 70, 229, 0.08);
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.1);
}

.support-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
    gap: 0.45rem;
}

.support-category-chip {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: 0.55rem;
    background: var(--color-surface);
    color: var(--color-text);
    min-height: 4.05rem;
    padding: 0.58rem 0.62rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.support-category-chip input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.support-category-chip-title {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    font-weight: 800;
    font-size: 0.84rem;
    line-height: 1.15;
}

.support-category-icon {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    flex: 0 0 auto;
}

.support-category-chip small {
    color: var(--color-muted);
    font-size: 0.66rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.support-category-chip:hover,
.support-category-chip:focus-within {
    border-color: rgba(var(--color-primary-rgb), 0.42);
    box-shadow: 0 8px 20px rgba(var(--color-primary-rgb), 0.08);
}

.support-category-chip.is-active {
    border-color: rgba(16, 185, 129, 0.62);
    background: rgba(16, 185, 129, 0.08);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.support-category-chip.is-active .support-category-icon {
    background: #10b981;
    color: #fff;
}

.support-faq-suggestions {
    border: 1px solid rgba(var(--color-primary-rgb), 0.14);
    border-radius: 0.6rem;
    background: rgba(var(--color-primary-rgb), 0.04);
    padding: 0.65rem 0.72rem;
}

.support-faq-suggestions-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.support-faq-suggestions-head span {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--color-text);
}

.support-faq-suggestions-head small {
    color: var(--color-muted);
    font-size: 0.76rem;
}

.support-faq-suggestion {
    border-top: 1px solid rgba(var(--color-primary-rgb), 0.12);
    padding: 0.42rem 0 0;
    margin-top: 0.42rem;
}

.support-faq-suggestion:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.support-faq-suggestion summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 0.84rem;
    color: var(--color-text);
}

.support-faq-suggestion div {
    color: var(--color-muted);
    font-size: 0.88rem;
    margin-top: 0.35rem;
}

@media (max-width: 575.98px) {
    .new-support-ticket-modal .modal-dialog {
        width: 100vw;
        max-width: none !important;
        min-height: 100dvh;
        height: 100dvh;
        margin: 0;
        align-items: stretch;
    }

    .new-support-ticket-modal .modal-content {
        min-height: 100dvh;
        height: 100dvh;
        border: 0;
        border-radius: 0;
        display: flex;
        overflow: hidden;
    }

    .new-support-ticket-modal form {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .new-support-ticket-modal .modal-header {
        flex: 0 0 auto;
        padding: 0.82rem 0.95rem;
    }

    .new-support-ticket-modal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 0.82rem 0.95rem;
    }

    .new-support-ticket-modal .modal-footer {
        flex: 0 0 auto;
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: var(--color-surface);
        padding: 0.72rem 0.95rem;
        box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
    }

    .support-category-grid,
    .support-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .support-category-chip {
        min-height: 3.65rem;
        padding: 0.5rem 0.55rem;
    }

    .support-topic-chip {
        min-height: 3.35rem;
        padding: 0.5rem 0.55rem;
    }

    .support-category-chip-title,
    .support-topic-chip span {
        font-size: 0.78rem;
    }

    .support-category-chip small,
    .support-topic-chip small {
        font-size: 0.61rem;
    }

    .support-category-icon {
        width: 1.12rem;
        height: 1.12rem;
    }

    .support-faq-suggestions {
        padding: 0.58rem 0.62rem;
    }

    .support-faq-suggestions-head {
        align-items: flex-start;
    }

    .support-faq-suggestions-head small {
        width: 100%;
    }

    .new-support-ticket-modal textarea[name="message"] {
        min-height: 8.8rem;
    }
}

@supports not (height: 100dvh) {
    @media (max-width: 575.98px) {
        .new-support-ticket-modal .modal-dialog,
        .new-support-ticket-modal .modal-content {
            min-height: 100vh;
            height: 100vh;
        }
    }
}

@media (max-width: 360px) {
    .support-category-grid,
    .support-topic-grid {
        grid-template-columns: 1fr;
    }
}

.support-mail-shell {
    border-color: rgba(var(--color-primary-rgb), 0.12);
    overflow: hidden;
}

.support-inbox {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem;
}

.support-inbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: var(--color-surface);
    padding: 0.72rem 0.8rem;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.support-inbox-item:hover,
.support-inbox-item:focus-visible {
    color: inherit;
    border-color: rgba(var(--color-primary-rgb), 0.32);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.09);
    transform: translateY(-1px);
}

.support-inbox-dot {
    flex-shrink: 0;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 999px;
    margin-top: 0.42rem;
    background: var(--color-muted);
}

.support-inbox-dot-open {
    background: #f59e0b;
}

.support-inbox-dot-in_progress {
    background: #0ea5e9;
}

.support-inbox-dot-closed {
    background: #22c55e;
}

.support-inbox-main {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 0.3rem;
}

.support-inbox-top {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.support-inbox-subject {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: var(--color-text);
    font-size: 0.92rem;
}

.support-inbox-id {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--color-muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.support-inbox-preview {
    color: var(--color-muted);
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.support-inbox-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.32rem 0.4rem;
}

.support-inbox-chips .badge {
    font-size: 0.66rem;
}

.support-inbox-profile {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-inbox-time {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.support-inbox-chevron {
    flex-shrink: 0;
    align-self: center;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.support-filter-count {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.02rem 0.42rem;
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.12);
    font-size: 0.7rem;
    font-weight: 700;
}

.support-ticket-filter-group .btn-primary .support-filter-count {
    background: rgba(255, 255, 255, 0.28);
}

.support-mail-detail-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
}

.support-mail-detail-title {
    min-width: 0;
}

.support-mail-detail-title h2 {
    overflow-wrap: anywhere;
}

.support-mail-detail-kicker {
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.12rem;
}

.support-mail-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
}

.support-mail-detail-body {
    display: grid;
    gap: 0.85rem;
}

.support-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.support-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    border-radius: 999px;
    padding: 0.3rem 0.66rem;
    font-size: 0.76rem;
    color: var(--color-text);
    max-width: 100%;
    min-width: 0;
    text-decoration: none;
}

.support-meta-chip i {
    color: var(--color-primary);
    font-size: 0.8rem;
}

.support-meta-chip-label {
    color: var(--color-muted);
    font-weight: 600;
    white-space: nowrap;
}

.support-meta-chip strong {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.support-meta-chip em {
    font-style: normal;
    color: var(--color-muted);
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.support-meta-chip-link:hover,
a.support-meta-chip-link:focus-visible {
    border-color: rgba(var(--color-primary-rgb), 0.35);
    color: var(--color-text);
}

.support-meta-chip .support-meta-chip-ext {
    font-size: 0.64rem;
    color: var(--color-muted);
}

.support-waiting-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    border: 1px solid rgba(var(--color-primary-rgb), 0.22);
    background: rgba(var(--color-primary-rgb), 0.06);
    border-radius: 0.85rem;
    padding: 0.62rem 0.75rem;
}

.support-waiting-icon {
    flex-shrink: 0;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--color-primary-rgb), 0.14);
    color: var(--color-primary);
    font-size: 0.9rem;
}

.support-waiting-copy strong {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text);
}

.support-waiting-copy small {
    display: block;
    font-size: 0.75rem;
    color: var(--color-muted);
    line-height: 1.4;
}

.support-chat-thread {
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: var(--color-surface-soft);
    padding: 0.85rem;
}

.support-chat-thread .ticket-chat-bubble {
    max-width: min(92%, 720px);
}

.support-composer {
    border-top: 0;
    padding-top: 0;
    margin-top: 0.4rem;
}

form.support-composer .btn {
    min-width: 0;
}

.support-composer-box {
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: var(--color-surface);
    overflow: hidden;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.support-composer-box:focus-within {
    border-color: rgba(var(--color-primary-rgb), 0.45);
    box-shadow: 0 0 0 0.25rem rgba(var(--color-primary-rgb), 0.08);
}

.support-composer .support-composer-input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    resize: none;
    min-height: 48px;
    max-height: 180px;
    font-size: 0.88rem;
    padding: 0.6rem 0.75rem 0.3rem;
    background: transparent;
}

.support-composer-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.4rem 0.5rem 0.5rem;
}

.support-composer-attach {
    border-radius: 999px;
    font-size: 0.74rem;
    padding: 0.24rem 0.65rem;
}

.support-composer-file {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: min(100%, 260px);
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    background: rgba(var(--color-primary-rgb), 0.08);
    color: var(--color-text);
    border-radius: 999px;
    padding: 0.18rem 0.3rem 0.18rem 0.55rem;
    font-size: 0.72rem;
}

.support-composer-file-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-composer-file-clear {
    border: 0;
    background: transparent;
    color: var(--color-muted);
    padding: 0 0.2rem;
    font-size: 0.68rem;
    line-height: 1;
}

.support-composer-file-clear:hover {
    color: #dc3545;
}

.support-composer-hint {
    font-size: 0.7rem;
    color: var(--color-muted);
}

.support-composer .btn.support-composer-send {
    margin-left: auto;
    min-width: 92px;
    border-radius: 999px;
}

[data-ticket-reply-form][aria-busy="true"] .support-composer-box {
    opacity: 0.7;
    pointer-events: none;
}

@media (pointer: coarse) {
    .support-composer .support-composer-input {
        font-size: 16px;
    }
}

@media (max-width: 575.98px) {
    .invoice-page-card {
        padding: 0.72rem;
    }

    .invoice-status-row {
        align-items: flex-start !important;
    }

    #invoiceTimeLeftWrap {
        font-size: 0.72rem;
    }

    .invoice-amount-card .h4 {
        font-size: 1.08rem;
    }

    .invoice-credit-pill {
        width: 100%;
        min-width: 0;
    }

    .invoice-bank-card .d-flex.align-items-center.gap-2,
    .invoice-bank-card .d-flex.flex-wrap.align-items-center.gap-2 {
        align-items: flex-start !important;
        gap: 0.45rem !important;
    }

    .support-ticket-toolbar,
    .support-ticket-search,
    .support-new-ticket-btn,
    .support-ticket-filter-group {
        width: 100%;
    }

    .support-ticket-filter-group .btn {
        flex: 1 1 0;
    }

    .support-ticket-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
    }

    .support-ticket-filter-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.42rem;
    }

    .support-ticket-filter-group .btn {
        border-radius: 0.45rem !important;
        margin-left: 0 !important;
        min-width: 0;
    }

    .support-inbox {
        padding: 0.55rem;
        gap: 0.45rem;
    }

    .support-inbox-item {
        padding: 0.6rem 0.62rem;
        gap: 0.5rem;
    }

    .support-inbox-chevron {
        display: none;
    }

    .support-inbox-time {
        flex-basis: 100%;
        margin-left: 0;
    }

    .support-detail-meta {
        gap: 0.32rem;
    }

    .support-meta-chip strong {
        max-width: 150px;
    }

    .support-composer-hint {
        display: none;
    }

    .support-composer .btn.support-composer-send {
        min-width: 80px;
    }
}

@media (max-width: 767.98px) {
    .support-mail-detail-toolbar {
        grid-template-columns: 1fr;
    }

    .support-mail-detail-actions {
        justify-content: flex-start;
    }

    .support-chat-thread {
        padding: 0.6rem;
    }

    .support-chat-thread .ticket-chat-bubble {
        max-width: 100%;
    }
}

.support-kpi-card {
    border-color: rgba(var(--color-primary-rgb), 0.12);
    background:
        radial-gradient(circle at top right, rgba(var(--color-primary-rgb), 0.08), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
}

.support-kpi-label {
    display: block;
    color: var(--color-muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.support-kpi-value {
    display: block;
    color: var(--color-text);
    font-size: 1.7rem;
    line-height: 1;
    margin-bottom: 0.3rem;
}


.profile-ticket-conversation {
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
}

.profile-ticket-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.profile-ticket-modal-form .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.profile-ticket-modal-form .modal-footer {
    flex: 0 0 auto;
    background: var(--color-surface);
    box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.06);
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.profile-ticket-chat-thread {
    max-height: 170px;
}

.profile-ticket-conversation .card-body {
    padding: 0.65rem 0.75rem !important;
}

.profile-ticket-conversation .ticket-mail-item {
    max-width: 100%;
}

.profile-ticket-conversation .ticket-mail-head {
    margin-bottom: 0.2rem;
}

.ticket-mail-thread {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ticket-mail-item {
    border: 1px solid var(--color-border);
    border-radius: 0.8rem;
    background: var(--color-surface);
    padding: 0;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    max-width: min(92%, 760px);
}

.ticket-message-card.card {
    margin-bottom: 0;
}

.ticket-mail-item-user {
    border-left: 4px solid rgba(var(--color-primary-rgb), 0.85);
    background: linear-gradient(145deg, rgba(var(--color-primary-rgb), 0.06), transparent 75%), var(--color-surface);
    margin-left: auto;
    margin-right: 0;
}

.ticket-mail-item-admin {
    border-left: 4px solid rgba(15, 118, 110, 0.8);
    background: linear-gradient(145deg, rgba(15, 118, 110, 0.08), transparent 75%), var(--color-surface);
    margin-right: auto;
    margin-left: 0;
}

.ticket-mail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.32rem;
}

.ticket-mail-from {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.ticket-mail-item-user .ticket-mail-from {
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
    border-color: rgba(var(--color-primary-rgb), 0.5);
}

.ticket-mail-item-admin .ticket-mail-from {
    background: linear-gradient(145deg, #0f766e, #0d9488);
    border-color: rgba(13, 148, 136, 0.5);
}

.ticket-mail-time {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-muted);
}

.ticket-mail-body {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--color-text);
    word-break: break-word;
    border-radius: 0.62rem;
    padding: 0.46rem 0.54rem;
    border: 1px solid transparent;
}

.ticket-mail-item-user .ticket-mail-body {
    background: rgba(var(--color-primary-rgb), 0.12);
    border-color: rgba(var(--color-primary-rgb), 0.22);
}

.ticket-mail-item-admin .ticket-mail-body {
    background: rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.22);
}

.ticket-mail-empty {
    font-size: 0.78rem;
    color: var(--color-muted);
    text-align: center;
    padding: 0.68rem 0.45rem;
    border: 1px dashed var(--color-border);
    border-radius: 0.7rem;
    background: var(--color-surface-soft);
}

.support-attachment-panel {
    border: 1px solid var(--color-border);
    border-radius: 0.8rem;
    background: var(--color-surface-soft);
    padding: 0.75rem;
}

.support-attachment-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.58rem;
}

.support-attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.65rem;
}

.support-attachment-card {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: 0.7rem;
    background: var(--color-surface);
    padding: 0.45rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.support-attachment-card:hover {
    border-color: rgba(var(--color-primary-rgb), 0.35);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.support-attachment-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.55rem;
    background: var(--color-surface-soft);
}

.support-attachment-card span,
.support-attachment-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-attachment-card span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text);
}

.support-attachment-card small {
    font-size: 0.68rem;
    color: var(--color-muted);
}

[data-theme="dark"] .ticket-mail-item {
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.35);
}

[data-theme="dark"] .ticket-mail-item-user .ticket-mail-from {
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary));
}

[data-theme="dark"] .ticket-mail-item-admin .ticket-mail-from {
    background: linear-gradient(145deg, #14b8a6, #0f766e);
}

[data-theme="dark"] .ticket-mail-item-user .ticket-mail-body {
    background: rgba(var(--color-primary-rgb), 0.2);
    border-color: rgba(var(--color-primary-rgb), 0.35);
}

[data-theme="dark"] .ticket-mail-item-admin .ticket-mail-body {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.35);
}

[data-theme="dark"] .support-attachment-panel,
[data-theme="dark"] .support-attachment-card {
    border-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 767.98px) {
    .ticket-chat-thread-scroll,
    .profile-ticket-chat-thread {
        max-height: 140px;
    }

    .ticket-chat-bubble {
        max-width: min(84vw, 540px);
        padding: 0.52rem 0.62rem;
    }

    .ticket-chat-avatar {
        width: 1.55rem;
        height: 1.55rem;
        flex-basis: 1.55rem;
        font-size: 0.76rem;
    }

    .ticket-chat-meta {
        font-size: 0.65rem;
    }

    .ticket-chat-text {
        font-size: 0.78rem;
    }

    .ticket-chat-composer .btn {
        min-width: 74px;
    }

    .ticket-mail-item {
        padding: 0;
        max-width: 100%;
    }

    .ticket-mail-from {
        font-size: 0.7rem;
    }

    .ticket-mail-time {
        font-size: 0.64rem;
    }

    .ticket-mail-body {
        font-size: 0.78rem;
    }

    .support-attachment-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

[data-theme="dark"] .support-kpi-card {
    border-color: rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at top right, rgba(var(--color-primary-rgb), 0.16), transparent 34%),
        linear-gradient(180deg, rgba(16, 24, 39, 0.95), rgba(17, 26, 44, 0.95));
}

[data-theme="dark"] .support-waiting-banner {
    background: rgba(var(--color-primary-rgb), 0.14);
    border-color: rgba(var(--color-primary-rgb), 0.3);
}

[data-theme="dark"] .support-topic-chip {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.76);
}

[data-theme="dark"] .support-category-chip,
[data-theme="dark"] .support-faq-suggestions {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.76);
}

[data-theme="dark"] .support-topic-chip:hover,
[data-theme="dark"] .support-topic-chip:focus,
[data-theme="dark"] .support-category-chip:hover,
[data-theme="dark"] .support-category-chip:focus-within {
    border-color: rgba(129, 140, 248, 0.62);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.22);
}

[data-theme="dark"] .support-topic-chip.is-active {
    border-color: rgba(129, 140, 248, 0.72);
    background: rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] .support-category-chip.is-active {
    border-color: rgba(45, 212, 191, 0.66);
    background: rgba(20, 184, 166, 0.2);
}

[data-theme="dark"] .support-category-icon {
    background: rgba(129, 140, 248, 0.18);
    color: #a5b4fc;
}

[data-theme="dark"] .support-category-chip.is-active .support-category-icon {
    background: #14b8a6;
    color: #fff;
}

[data-theme="dark"] .support-mail-shell,
[data-theme="dark"] .support-inbox-item,
[data-theme="dark"] .support-meta-chip,
[data-theme="dark"] .support-inbox-profile,
[data-theme="dark"] .support-chat-thread,
[data-theme="dark"] .support-composer-box {
    border-color: rgba(148, 163, 184, 0.18);
}

[data-theme="dark"] .support-inbox-item,
[data-theme="dark"] .support-composer-box {
    background: rgba(15, 23, 42, 0.72);
}

[data-theme="dark"] .support-meta-chip,
[data-theme="dark"] .support-inbox-profile,
[data-theme="dark"] .support-chat-thread {
    background: rgba(15, 23, 42, 0.55);
}

[data-theme="dark"] .support-filter-count {
    background: rgba(148, 163, 184, 0.16);
}

[data-theme="dark"] .support-kpi-value,
[data-theme="dark"] .support-inbox-subject,
[data-theme="dark"] .support-meta-chip strong,
[data-theme="dark"] .support-waiting-copy strong {
    color: #e2e8f0;
}

[data-theme="dark"] .auth-marketing-card {
    background: linear-gradient(145deg, rgba(var(--color-primary-rgb), 0.16), rgba(45, 212, 191, 0.1));
}

/* ===== Profile friends modal ===== */

@media (min-width: 992px) {
    .profile-friends-modal .modal-dialog {
        max-width: 860px;
    }
}

.profile-friends-modal .modal-content {
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    overflow: hidden;
}

.profile-friends-modal .modal-header {
    background: linear-gradient(165deg, rgba(var(--color-primary-rgb), 0.09), rgba(var(--color-primary-rgb), 0.02));
}

.pfm-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border: 1px solid rgba(255, 153, 0, 0.32);
    background: rgba(255, 193, 7, 0.08);
    border-radius: 0.65rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.74rem;
    line-height: 1.4;
    color: #92600a;
    margin-bottom: 0.7rem;
}

.pfm-note i {
    flex-shrink: 0;
    margin-top: 0.08rem;
}

.pfm-toolbar {
    position: sticky;
    /* Offset the modal-body padding so the bar pins flush with the top edge. */
    top: -1rem;
    z-index: 5;
    margin: 0 -1rem 0.45rem;
    padding: 0.55rem 1rem 0.5rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: grid;
    gap: 0.45rem;
}

.pfm-toolbar > div {
    min-width: 0;
}

.pfm-toolbar-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pfm-search {
    position: relative;
    flex: 1 1 200px;
    min-width: 150px;
}

.pfm-search i {
    position: absolute;
    left: 0.62rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.pfm-search .form-control {
    padding-left: 1.9rem;
    border-radius: 999px;
}

.pfm-quick {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    /* Lives above the sticky toolbar and scrolls away after use so it never
       eats into the pinned area on small screens. */
    margin-bottom: 0.6rem;
}

.pfm-quick-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-muted);
    white-space: nowrap;
}

.pfm-quick-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.pfm-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.76rem;
    line-height: 1.2;
    padding: 0.28rem 0.68rem;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pfm-chip:hover {
    border-color: rgba(var(--color-primary-rgb), 0.45);
    background: rgba(var(--color-primary-rgb), 0.06);
}

.pfm-chip:focus-visible {
    outline: 3px solid rgba(var(--color-primary-rgb), 0.18);
    outline-offset: 2px;
}

.pfm-chip.is-active {
    border-color: rgba(var(--color-primary-rgb), 0.55);
    background: rgba(var(--color-primary-rgb), 0.14);
    font-weight: 600;
}

.pfm-chip-count {
    font-size: 0.68rem;
    color: var(--color-muted);
}

.pfm-chip.is-active .pfm-chip-count {
    color: inherit;
}

/* Reserved-width checkmark: the space is always there so toggling a chip
   never reflows the row; the "/ ''" alt keeps it out of accessible names.
   Browsers without alt-text support drop the rule - tint alone marks state. */
.pfm-chip::before {
    content: "\2713" / "";
    width: 0.75em;
    font-size: 0.7rem;
    line-height: 1;
    opacity: 0;
    flex-shrink: 0;
}

.pfm-chip.is-active::before {
    opacity: 1;
}

.pfm-toolbar-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pfm-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 200px;
    min-width: 0;
}

.pfm-progress-track {
    flex: 1 1 60px;
    min-width: 40px;
    height: 6px;
    border-radius: 999px;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.pfm-progress-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--bs-warning, #ffc107);
    transition: width 0.2s ease, background-color 0.2s ease;
}

.pfm-progress-bar.is-met {
    background: var(--bs-success, #198754);
}

.pfm-progress-goal {
    font-size: 0.72rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.pfm-advanced-toggle {
    border-radius: 999px;
    font-size: 0.76rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pfm-advanced-toggle.is-open {
    background: rgba(var(--color-primary-rgb), 0.1);
    border-color: rgba(var(--color-primary-rgb), 0.45);
}

/* Dot signalling "filters are active in here" even while collapsed. */
.pfm-advanced-toggle.has-filters::after {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.9);
    flex-shrink: 0;
}

.pfm-advanced {
    display: grid;
    gap: 0.45rem;
}

.pfm-advanced > div {
    min-width: 0;
}

.pfm-select-actions {
    border-radius: 999px;
}

.pfm-select-actions .btn {
    white-space: nowrap;
    font-size: 0.76rem;
}

.pfm-select-actions .btn:first-child {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

.pfm-select-actions .btn:last-child {
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

.pfm-count {
    white-space: nowrap;
    font-size: 0.72rem;
}

.pfm-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.pfm-filter-select {
    width: auto;
    max-width: 150px;
}

.pfm-age-range {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-muted);
}

.pfm-age-range .form-control {
    width: 82px;
}

.pfm-clear-filters {
    font-size: 0.74rem;
    border-radius: 999px;
}

.pfm-shown {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.pfm-hint {
    line-height: 1.35;
}

.pfm-list {
    border: 1px solid var(--color-border);
    border-radius: 0.8rem;
    overflow: hidden;
    background: var(--color-surface);
}

.pfm-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    margin: 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    transition: background-color 0.12s ease;
    min-width: 0;
}

div.pfm-item {
    cursor: default;
}

.pfm-item:last-child {
    border-bottom: 0;
}

label.pfm-item:hover {
    background: var(--color-surface-soft);
}

.pfm-item.is-selected {
    background: rgba(var(--color-primary-rgb), 0.06);
}

label.pfm-item.is-selected:hover {
    background: rgba(var(--color-primary-rgb), 0.1);
}

.pfm-check {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
}

.pfm-avatar {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

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

.pfm-name {
    display: block;
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pfm-meta {
    display: block;
    font-size: 0.72rem;
    color: var(--color-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pfm-geo {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
    background: var(--color-surface-soft);
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
}

.pfm-empty {
    padding: 0.9rem;
    font-size: 0.8rem;
    color: var(--color-muted);
    text-align: center;
}

[data-theme="dark"] .pfm-toolbar,
[data-theme="dark"] .pfm-list,
[data-theme="dark"] .pfm-item {
    background: var(--color-surface);
}

[data-theme="dark"] .pfm-item.is-selected {
    background: rgba(var(--color-primary-rgb), 0.16);
}

[data-theme="dark"] .pfm-note {
    background: rgba(255, 179, 0, 0.1);
    border-color: rgba(255, 179, 0, 0.3);
    color: #fbbf24;
}

[data-theme="dark"] .pfm-geo {
    background: rgba(15, 23, 42, 0.55);
}

@media (pointer: coarse) {
    .pfm-toolbar .form-control,
    .pfm-toolbar .form-select {
        font-size: 16px;
    }

    .pfm-chip {
        padding: 0.42rem 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .profile-friends-modal .modal-body {
        padding: 0.75rem 0.85rem;
    }

    .pfm-toolbar {
        top: -0.75rem;
        margin: 0 -0.85rem 0.45rem;
        padding: 0.5rem 0.85rem 0.45rem;
    }

    .pfm-search {
        flex-basis: 100%;
    }

    .pfm-toolbar-filters .pfm-filter-select {
        flex: 1 1 40%;
        max-width: none;
    }

    .pfm-age-range {
        flex: 1 1 100%;
        min-width: 0;
    }

    .pfm-age-range .form-control {
        flex: 1 1 0;
        width: 0;
        min-width: 0;
    }

    .pfm-shown {
        flex-basis: 100%;
        margin-left: 0;
    }

    .pfm-item {
        padding: 0.55rem 0.6rem;
        gap: 0.5rem;
    }

    .pfm-avatar {
        width: 1.85rem;
        height: 1.85rem;
        font-size: 0.74rem;
    }

    .profile-friends-modal .modal-footer {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }

    .profile-friends-modal .modal-footer .btn {
        flex: 1 1 0;
    }
}

.auth-illustration {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 0.9rem;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    padding: 0.5rem;
}

.auth-stat-grid .auth-stat {
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    background: var(--color-surface-soft);
    text-align: center;
    padding: 0.4rem;
}

.auth-stat-grid .auth-stat small {
    display: block;
    color: var(--color-muted);
    font-size: 0.72rem;
}

.auth-stat-grid .auth-stat strong {
    font-size: 0.9rem;
    line-height: 1.2;
}

.auth-input-icon {
    background: var(--color-surface-soft);
    border-color: var(--color-border);
    color: var(--color-muted);
}

.auth-form-card .input-group .form-control {
    border-left: 0;
}

.auth-form-card .list-group-item {
    background: transparent;
    border-color: var(--color-border);
}

@media (max-width: 991.98px) {
    .auth-shell {
        max-width: 680px;
    }

    .auth-illustration {
        max-height: 170px;
    }
}

@media (max-width: 575.98px) {
    .auth-shell {
        max-width: 100%;
    }

    .auth-marketing-card .card-body,
    .auth-form-card .card-body {
        padding: 1rem !important;
    }

    .auth-title {
        font-size: 1.4rem;
    }
}

/* ------------------------------------------------------------------
   Dashboard Skin: soft light admin style (reference-like)
------------------------------------------------------------------- */
body.app-body[data-theme="light"] {
    background: #f4f7fb;
    color: #25324a;
}

body.app-body[data-theme="light"] .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
}

body.app-body[data-theme="light"] .app-sidebar {
    background: #f8fafc;
    border-right: 1px solid #e1e8f2;
    box-shadow: none;
    padding: 0.82rem 0.72rem;
}

body.app-body[data-theme="light"] .app-sidebar-head {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.62rem;
    margin-bottom: 0.78rem;
}

body.app-body[data-theme="light"] .app-logo {
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: 0;
    color: #25324a;
}

body.app-body[data-theme="light"] .app-logo-mark {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: none;
}

body.app-body[data-theme="light"] .app-logo-mark.has-brand-asset {
    border-radius: 0.48rem;
    background: transparent;
}

body.app-body[data-theme="light"] .app-sidebar-label {
    color: #7b879c;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
}

body.app-body[data-theme="light"] .app-nav .nav-link {
    color: #475569;
    border-radius: 0.48rem;
    padding: 0.52rem 0.62rem;
    margin-bottom: 0.12rem;
    font-weight: 600;
    min-height: 40px;
}

body.app-body[data-theme="light"] .app-nav .nav-link i {
    width: 1.58rem;
    height: 1.58rem;
    border-radius: 0.42rem;
    background: #edf2f7;
    color: #64748b;
    font-size: 0.82rem;
}

body.app-body[data-theme="light"] .app-nav .nav-link:hover {
    background: #eef5ff;
    color: #1d4ed8;
    border-color: transparent;
}

body.app-body[data-theme="light"] .app-nav .nav-link.active {
    background: #eaf2ff;
    color: #1d4ed8;
    box-shadow: inset 3px 0 0 var(--color-primary);
}

body.app-body[data-theme="light"] .app-nav .nav-link.active i {
    background: #dbeafe;
    color: #1d4ed8;
}

body.app-body[data-theme="light"] .app-sidebar-foot {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0), #f8fafc 42%);
    border-top: 1px solid #e1e8f2;
}

body.app-body[data-theme="light"] .app-sidebar-balance {
    background: #ffffff;
    border: 1px solid #e4e8f1;
    color: #5b6480;
}

body.app-body[data-theme="light"] .app-sidebar-balance strong {
    color: var(--color-primary-hover);
}

body.app-body[data-theme="light"] .app-topbar {
    min-height: 62px;
    background: #ffffff;
    border-bottom: 1px solid #e1e8f2;
    backdrop-filter: none;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

body.app-body[data-theme="light"] .app-topbar-chip {
    background: #f5f7fb;
    border-color: #e5e9f2;
    color: #64748b;
}

.app-topbar-search {
    flex: 1 1 auto;
    max-width: 560px;
    margin: 0 1rem;
    position: relative;
    align-items: center;
}

.app-topbar-search i {
    position: absolute;
    right: 0.8rem;
    color: #a4acc0;
    font-size: 0.86rem;
    pointer-events: none;
}

.app-topbar-search .form-control {
    height: 36px;
    border-radius: 0.55rem;
    border: 1px solid #e5e9f2;
    background: #f4f6fb;
    color: #5d6681;
    padding-right: 2rem;
    box-shadow: none;
}

.app-topbar-search .form-control::placeholder {
    color: #a1a8ba;
}

body.app-body[data-theme="light"] .app-content {
    padding-top: 1.35rem !important;
}

body.app-body[data-theme="light"] .card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

body.app-body[data-theme="light"] .card-header {
    background: #fff;
    border-bottom-color: #edf0f6;
}

body.app-body[data-theme="light"] .btn.btn-light.border {
    background: #ffffff;
    border-color: #e1e7f2 !important;
    color: #475569;
}

body.app-body[data-theme="light"] .app-user-trigger,
body.app-body[data-theme="light"] .app-updates-trigger,
body.app-body[data-theme="light"] .app-balance-chip {
    border-radius: 999px;
    min-height: 34px;
}

body.app-body[data-theme="light"] .avatar-circle {
    background: #eaf2ff;
    color: #1d4ed8;
}

body.app-body[data-theme="light"] .table thead th {
    color: #7a839e;
    font-weight: 700;
    border-bottom-color: #e7ebf4;
}

@media (max-width: 991.98px) {
    .app-topbar-search {
        display: none !important;
    }
}

/* ------------------------------------------------------------------
   Global Softim Skin (applies to all pages)
------------------------------------------------------------------- */
.softim-skin[data-theme="light"] {
    background: #f4f7fb;
    color: #25324a;
}

.softim-skin[data-theme="light"] .app-public-nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e9f2 !important;
}

.softim-skin[data-theme="light"] .app-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e1e8f2;
    min-height: 62px;
}

.softim-skin[data-theme="light"] .app-sidebar {
    background: #f8fafc;
    border-right: 1px solid #e1e8f2;
    box-shadow: none;
}

.softim-skin[data-theme="light"] .app-sidebar-head,
.softim-skin[data-theme="light"] .app-sidebar-foot {
    border-color: #e1e8f2;
}

.softim-skin[data-theme="light"] .card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.softim-skin[data-theme="light"] .card-header {
    background: #fff;
    border-bottom-color: #edf1f8;
}

.softim-skin[data-theme="light"] .btn-outline-primary {
    color: var(--color-primary);
    border-color: rgba(var(--color-primary-rgb), 0.35);
}

.softim-skin[data-theme="light"] .btn-outline-primary:hover,
.softim-skin[data-theme="light"] .btn-outline-primary:focus {
    background: rgba(var(--color-primary-rgb), 0.1);
    border-color: rgba(var(--color-primary-rgb), 0.45);
    color: var(--color-primary-hover);
}

.softim-skin[data-theme="light"] .form-control,
.softim-skin[data-theme="light"] .form-select {
    border-color: #d8e2ef;
    background: #ffffff;
    color: #25324a;
}

.softim-skin[data-theme="light"] .form-control:focus,
.softim-skin[data-theme="light"] .form-select:focus {
    border-color: #9bbcf8;
    box-shadow: 0 0 0 0.18rem rgba(var(--color-primary-rgb), 0.13);
}

.softim-skin[data-theme="light"] .table > :not(caption) > * > * {
    border-bottom-color: #edf1f8;
}

.softim-skin[data-theme="light"] .table thead th {
    color: #7b86a3;
    font-weight: 700;
    background: #fbfcff;
}

.softim-skin[data-theme="light"] .text-muted,
.softim-skin[data-theme="light"] .form-text {
    color: #7d89a6 !important;
}

.softim-skin .badge.text-bg-primary {
    background-color: var(--color-primary) !important;
}

.softim-skin[data-theme="light"] .breadcrumb {
    --bs-breadcrumb-divider-color: #aab4ca;
}

.softim-skin[data-theme="light"] .dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.softim-skin[data-theme="light"] .empty-state {
    border: 1px dashed #d9e1ef;
    background: #fbfcff;
}

.softim-skin[data-theme="light"] .app-footer {
    background: #ffffff;
    border-top-color: #e2e8f0 !important;
}

/* ------------------------------------------------------------------
   Operations homepage
------------------------------------------------------------------- */
.ops-home {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.25rem 4.5rem;
}

.ops-home::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px, 100%);
    height: 640px;
    background:
        radial-gradient(560px 320px at 22% 30%, rgba(var(--color-primary-rgb), 0.14), transparent 70%),
        radial-gradient(520px 300px at 82% 18%, rgba(45, 212, 191, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ops-home > section {
    position: relative;
    z-index: 1;
}

@supports (animation-timeline: view()) {
    .ops-home > section:not(.ops-hero) {
        animation: opsReveal 0.55s ease both;
        animation-timeline: view();
        animation-range: entry 0% entry 30%;
    }
}

@keyframes opsReveal {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ops-home > section:not(.ops-hero) {
        animation: none;
    }
}

.ops-hero {
    min-height: min(700px, calc(100vh - 160px));
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(460px, 1.05fr);
    gap: 3rem;
    align-items: center;
    padding: 2.5rem 0 3.5rem;
}

.ops-hero-copy {
    max-width: 620px;
}

.ops-eyebrow,
.ops-section-tag,
.ops-plan-slug,
.ops-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ops-eyebrow,
.ops-section-tag,
.ops-plan-slug {
    background: rgba(var(--color-primary-rgb), 0.09);
    color: var(--color-primary);
}

.ops-eyebrow {
    border: 1px solid rgba(var(--color-primary-rgb), 0.18);
    padding: 0.5rem 0.85rem;
    margin-bottom: 1.15rem;
}

.ops-section-tag,
.ops-plan-slug {
    padding: 0.32rem 0.66rem;
}

.ops-hero h1 {
    margin: 0 0 1.1rem;
    color: var(--color-text);
    font-size: clamp(2.4rem, 4.7vw, 3.55rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.ops-accent {
    background: linear-gradient(92deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.ops-lead {
    max-width: 560px;
    color: var(--color-muted);
    font-size: 1.08rem;
    line-height: 1.75;
    margin-bottom: 1.6rem;
}

.ops-hero-actions,
.ops-cta-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ops-hero-actions .btn,
.ops-cta-actions .btn {
    border-radius: 0.7rem;
    font-weight: 700;
}

.ops-hero-actions .btn-primary {
    box-shadow: 0 14px 28px -8px rgba(var(--color-primary-rgb), 0.45);
}

.ops-hero-proof {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.8rem;
}

.ops-hero-proof div {
    border: 1px solid var(--color-border);
    border-radius: 0.85rem;
    background: var(--color-surface);
    padding: 0.8rem 0.9rem;
}

.ops-hero-proof strong,
.ops-hero-proof span {
    display: block;
}

.ops-hero-proof strong {
    color: var(--color-text);
    line-height: 1.15;
}

.ops-hero-proof span {
    color: var(--color-muted);
    font-size: 0.82rem;
    margin-top: 0.14rem;
}

/* Product preview window */
.ops-product-preview {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: 1.1rem;
    background: var(--color-surface);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 28px 56px -16px rgba(15, 23, 42, 0.22);
    min-width: 0;
    width: 100%;
}

.ops-preview-toolbar {
    min-height: 3.2rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.78rem 1rem;
    border-bottom: 1px solid var(--color-border);
    border-radius: 1.1rem 1.1rem 0 0;
    background: var(--color-surface-soft);
}

.ops-preview-toolbar strong {
    margin-left: 0.35rem;
    color: var(--color-text);
}

.ops-preview-dot {
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 999px;
    background: var(--color-border);
}

.ops-preview-dot:nth-child(1) {
    background: #ef4444;
}

.ops-preview-dot:nth-child(2) {
    background: #f59e0b;
}

.ops-preview-dot:nth-child(3) {
    background: #22c55e;
}

.ops-preview-body {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    min-height: 440px;
    border-radius: 0 0 1.1rem 1.1rem;
    overflow: hidden;
}

.ops-preview-sidebar {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    padding: 1rem;
    border-right: 1px solid var(--color-border);
    background: rgba(248, 250, 252, 0.72);
}

.ops-preview-sidebar span {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 0.6rem;
    color: var(--color-muted);
    font-weight: 700;
    padding: 0.62rem 0.7rem;
}

.ops-preview-sidebar span.is-active {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.09);
}

.ops-preview-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    min-width: 0;
}

.ops-preview-summary,
.ops-payment-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.ops-preview-summary div,
.ops-payment-strip span,
.ops-preview-row,
.ops-status-stack div {
    border: 1px solid var(--color-border);
    border-radius: 0.7rem;
    background: var(--color-surface-soft);
}

.ops-preview-summary div {
    padding: 0.85rem;
}

.ops-preview-summary span {
    display: block;
    color: var(--color-muted);
    font-size: 0.78rem;
    margin-bottom: 0.16rem;
}

.ops-preview-summary strong {
    color: var(--color-text);
    font-size: 1.26rem;
    line-height: 1.1;
}

.ops-preview-list {
    display: grid;
    gap: 0.72rem;
}

.ops-preview-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.ops-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.6rem;
    background: #111827;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.ops-preview-row strong,
.ops-preview-row small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ops-preview-row small {
    color: var(--color-muted);
}

.ops-preview-row em {
    border-radius: 999px;
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.34rem 0.58rem;
}

.ops-preview-row em.is-working,
.ops-status.is-working {
    background: #dbeafe;
    color: var(--color-primary-hover);
}

.ops-preview-row em.is-pending,
.ops-status.is-pending {
    background: #fef3c7;
    color: #92400e;
}

.ops-preview-row em.is-done,
.ops-status.is-done {
    background: #dcfce7;
    color: #166534;
}

.ops-payment-strip {
    margin-top: auto;
}

.ops-payment-strip span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 3rem;
    color: var(--color-text);
    font-weight: 700;
    padding: 0.65rem;
}

.ops-payment-strip i {
    color: var(--color-secondary);
}

.ops-preview-float {
    position: absolute;
    left: -1.1rem;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.62rem;
    padding: 0.68rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 0.95rem;
    background: var(--color-surface);
    box-shadow: 0 18px 36px -10px rgba(15, 23, 42, 0.28);
    animation: opsFloat 5.5s ease-in-out infinite;
}

.ops-preview-float i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
    font-size: 1.1rem;
}

.ops-preview-float strong {
    display: block;
    color: var(--color-text);
    font-size: 0.86rem;
    line-height: 1.2;
}

.ops-preview-float small {
    display: block;
    color: var(--color-muted);
    font-size: 0.75rem;
}

@keyframes opsFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ops-preview-float {
        animation: none;
    }
}

/* Module strip */
.ops-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.ops-strip div,
.ops-panel,
.ops-visual-panel,
.ops-plan,
.ops-insurance-trust {
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.ops-strip div {
    padding: 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ops-strip div:hover,
.ops-workflow article:hover,
.ops-feature-grid article:hover,
.ops-insurance-grid article:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--color-primary-rgb), 0.35);
    box-shadow: 0 18px 36px -12px rgba(15, 23, 42, 0.18);
}

.ops-strip i,
.ops-feature-grid i,
.ops-insurance-grid i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 0.75rem;
    background: rgba(15, 118, 110, 0.1);
    color: var(--color-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.ops-strip strong,
.ops-strip span {
    display: block;
}

.ops-strip strong,
.ops-feature-grid h3,
.ops-workflow h3,
.ops-plan h3,
.ops-panel h2,
.ops-section h2,
.ops-insurance-copy h2 {
    color: var(--color-text);
}

.ops-strip span,
.ops-section-head p,
.ops-workflow p,
.ops-feature-grid p,
.ops-plan p,
.ops-plan li,
.ops-panel p,
.ops-insurance-copy p,
.ops-insurance-grid span,
.ops-status-stack small {
    color: var(--color-muted);
}

.ops-strip span {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-top: 0.3rem;
}

/* Section rhythm */
.ops-section,
.ops-split,
.ops-insurance-trust,
.ops-cta {
    margin-top: clamp(3rem, 7vw, 4.75rem);
}

.ops-section-head {
    max-width: 720px;
    margin: 0 auto 2.4rem;
    text-align: center;
}

.ops-section-head h2,
.ops-panel h2,
.ops-insurance-copy h2,
.ops-cta h2 {
    margin: 0.85rem 0 0.6rem;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.015em;
}

.ops-section-head p,
.ops-panel p,
.ops-insurance-copy p,
.ops-cta p {
    margin-bottom: 0;
    line-height: 1.7;
}

.ops-workflow,
.ops-feature-grid,
.ops-plan-grid {
    display: grid;
    gap: 1rem;
}

/* Workflow steps */
.ops-workflow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-workflow article,
.ops-feature-grid article {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    padding: 1.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ops-workflow article > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    font-weight: 800;
    margin-bottom: 0.9rem;
    box-shadow: 0 8px 18px -6px rgba(var(--color-primary-rgb), 0.55);
}

@media (min-width: 1200px) {
    .ops-workflow article:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 2.5rem;
        right: calc(-1rem - 1px);
        width: calc(1rem + 2px);
        height: 2px;
        background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.45), rgba(var(--color-primary-rgb), 0.12));
    }
}

.ops-workflow h3,
.ops-feature-grid h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.ops-workflow p,
.ops-feature-grid p {
    margin-bottom: 0;
    font-size: 0.94rem;
    line-height: 1.6;
}

/* Insurance trust panel */
.ops-insurance-trust {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
    gap: 1.6rem;
    align-items: center;
    border-radius: 1.3rem;
    padding: clamp(1.4rem, 3.4vw, 2.4rem);
    background:
        linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.07), rgba(15, 118, 110, 0.07)),
        var(--color-surface);
}

.ops-insurance-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ops-insurance-grid {
    display: grid;
    gap: 0.85rem;
}

.ops-insurance-grid article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.2rem 0.9rem;
    align-items: start;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.75);
    padding: 1.05rem 1.15rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ops-insurance-grid i {
    grid-row: span 2;
    margin-bottom: 0;
}

.ops-insurance-grid strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 0.1rem;
}

.ops-insurance-grid span {
    display: block;
    font-size: 0.92rem;
    line-height: 1.55;
}

/* Payments split */
.ops-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
    gap: 1rem;
}

.ops-panel,
.ops-visual-panel {
    padding: clamp(1.25rem, 3vw, 1.9rem);
}

.ops-status-stack {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.3rem;
}

.ops-status-stack div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.15rem 0.75rem;
    align-items: center;
    padding: 0.8rem;
}

.ops-status {
    grid-row: span 2;
    display: inline-flex;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
}

.ops-status.is-working {
    background: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.18);
}

.ops-status.is-pending {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.ops-status.is-done {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.ops-status-stack strong,
.ops-status-stack small {
    display: block;
}

.ops-visual-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(150deg, rgba(var(--color-primary-rgb), 0.06), rgba(15, 118, 110, 0.05)),
        var(--color-surface);
}

.ops-visual-panel img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.ops-feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* Plans */
.ops-plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    padding-top: 0.75rem;
}

.ops-plan-grid > .alert {
    grid-column: 1 / -1;
}

.ops-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    border-radius: 1.1rem;
    padding: 1.55rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ops-plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -14px rgba(15, 23, 42, 0.2);
}

.ops-plan.is-featured {
    border: 1.5px solid transparent;
    background:
        linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
        linear-gradient(160deg, var(--color-primary), var(--color-secondary)) border-box;
    box-shadow: 0 26px 52px -16px rgba(var(--color-primary-rgb), 0.4);
    transform: translateY(-10px);
}

.ops-plan.is-featured:hover {
    transform: translateY(-14px);
}

.ops-plan-badge {
    position: absolute;
    top: 1.05rem;
    right: 1.05rem;
    background: linear-gradient(120deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    padding: 0.32rem 0.62rem;
    box-shadow: 0 8px 18px -6px rgba(var(--color-primary-rgb), 0.5);
}

.ops-plan h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.ops-plan > strong {
    display: block;
    color: var(--color-text);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.ops-plan > strong small {
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 700;
    margin-left: 0.25rem;
    letter-spacing: 0;
}

.ops-plan ul {
    display: grid;
    gap: 0.55rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ops-plan li {
    position: relative;
    padding-left: 1.45rem;
    font-size: 0.95rem;
}

.ops-plan li::before {
    content: "\f26a";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: 0.05rem;
    color: var(--color-secondary);
    font-size: 0.95rem;
}

/* Closing CTA */
.ops-cta {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 1.4rem;
    padding: clamp(2.25rem, 5.5vw, 3.6rem) 1.5rem;
    background:
        radial-gradient(640px 320px at 50% -60%, rgba(255, 255, 255, 0.22), transparent 70%),
        linear-gradient(135deg, #1d4ed8, #0f766e);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(29, 78, 216, 0.5);
}

.ops-cta .ops-section-tag {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.ops-cta h2 {
    max-width: 660px;
    color: #fff;
}

.ops-cta p {
    max-width: 580px;
    color: rgba(255, 255, 255, 0.85);
}

.ops-cta-actions {
    justify-content: center;
    margin-top: 1.3rem;
}

.ops-cta .btn-primary {
    background: #fff;
    border-color: #fff;
    color: #1d4ed8;
}

.ops-cta .btn-primary:hover,
.ops-cta .btn-primary:focus {
    background: #eff6ff;
    border-color: #eff6ff;
    color: #1e40af;
}

.softim-skin .ops-cta .btn-outline-primary {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.75);
    color: #fff;
}

.softim-skin .ops-cta .btn-outline-primary:hover,
.softim-skin .ops-cta .btn-outline-primary:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
    color: #fff;
}

/* Dark theme */
[data-theme="dark"] .ops-home::before {
    background:
        radial-gradient(560px 320px at 22% 30%, rgba(var(--color-primary-rgb), 0.1), transparent 70%),
        radial-gradient(520px 300px at 82% 18%, rgba(45, 212, 191, 0.08), transparent 70%);
}

[data-theme="dark"] .ops-product-preview,
[data-theme="dark"] .ops-hero-proof div,
[data-theme="dark"] .ops-strip div,
[data-theme="dark"] .ops-panel,
[data-theme="dark"] .ops-visual-panel,
[data-theme="dark"] .ops-plan,
[data-theme="dark"] .ops-insurance-trust,
[data-theme="dark"] .ops-workflow article,
[data-theme="dark"] .ops-feature-grid article,
[data-theme="dark"] .ops-preview-float {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .ops-plan.is-featured {
    border-color: transparent;
    background:
        linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
        linear-gradient(160deg, var(--color-primary), var(--color-secondary)) border-box;
}

[data-theme="dark"] .ops-preview-sidebar,
[data-theme="dark"] .ops-preview-toolbar,
[data-theme="dark"] .ops-preview-summary div,
[data-theme="dark"] .ops-payment-strip span,
[data-theme="dark"] .ops-preview-row,
[data-theme="dark"] .ops-status-stack div,
[data-theme="dark"] .ops-insurance-grid article {
    background: var(--color-surface-soft);
    border-color: var(--color-border);
}

[data-theme="dark"] .ops-preview-row em.is-working {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

[data-theme="dark"] .ops-preview-row em.is-pending {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
}

[data-theme="dark"] .ops-preview-row em.is-done {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

[data-theme="dark"] .ops-avatar {
    background: #e2e8f0;
    color: #0f172a;
}

[data-theme="dark"] .ops-preview-float i {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
}

[data-theme="dark"] .ops-cta {
    background:
        radial-gradient(640px 320px at 50% -60%, rgba(255, 255, 255, 0.12), transparent 70%),
        linear-gradient(135deg, #1e40af, #0f766e);
    box-shadow: 0 30px 60px -20px rgba(2, 6, 23, 0.6);
}

/* Responsive */
@media (max-width: 1199.98px) {
    .ops-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 2.5rem;
    }

    .ops-hero-copy {
        max-width: 720px;
    }

    .ops-product-preview {
        max-width: 860px;
    }

    .ops-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ops-workflow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .ops-home {
        padding-inline: 0.9rem;
    }

    .ops-preview-body,
    .ops-split,
    .ops-insurance-trust,
    .ops-feature-grid,
    .ops-plan-grid {
        grid-template-columns: 1fr;
    }

    .ops-plan-grid {
        padding-top: 0;
    }

    .ops-plan.is-featured,
    .ops-plan.is-featured:hover {
        transform: none;
    }

    .ops-plan.is-featured {
        order: -1;
    }

    .ops-preview-sidebar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .ops-preview-sidebar span {
        justify-content: center;
    }

    .ops-preview-float {
        left: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .ops-home {
        padding-inline: 0.7rem;
        overflow: hidden;
    }

    .ops-hero {
        gap: 1.5rem;
        padding-top: 1.25rem;
        padding-bottom: 2.5rem;
    }

    .ops-hero h1 {
        font-size: 2.15rem;
    }

    .ops-lead {
        font-size: 1rem;
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    .ops-eyebrow {
        max-width: 100%;
        white-space: normal;
    }

    .ops-hero-actions .btn,
    .ops-cta-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .ops-strip,
    .ops-workflow {
        grid-template-columns: 1fr;
    }

    .ops-hero-proof,
    .ops-preview-summary,
    .ops-payment-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .ops-preview-body {
        min-height: auto;
    }

    .ops-preview-sidebar {
        grid-template-columns: 1fr 1fr;
    }

    .ops-preview-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ops-preview-row em {
        grid-column: 2;
        justify-self: start;
    }

    .ops-preview-float {
        display: none;
    }

    .ops-section-head {
        margin-bottom: 1.6rem;
    }

    .ops-preview-main {
        padding: 0.85rem;
        gap: 0.85rem;
    }

    .ops-preview-summary div {
        padding: 0.7rem;
    }

    .ops-preview-summary strong {
        font-size: 1.08rem;
    }

    .ops-preview-sidebar {
        padding: 0.7rem;
        gap: 0.3rem;
    }

    .ops-preview-sidebar span {
        padding: 0.5rem 0.45rem;
        font-size: 0.84rem;
        justify-content: flex-start;
    }

    .ops-payment-strip span {
        min-height: 2.6rem;
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }

    .ops-strip div,
    .ops-feature-grid article,
    .ops-workflow article {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.05rem 0.9rem;
        align-items: start;
        padding: 1rem 1.05rem;
    }

    .ops-strip i,
    .ops-feature-grid i {
        grid-row: span 2;
        margin-top: 0.15rem;
        margin-bottom: 0;
    }

    .ops-strip span {
        margin-top: 0.2rem;
    }

    .ops-feature-grid h3,
    .ops-workflow h3 {
        margin: 0.2rem 0 0.3rem;
    }

    .ops-workflow article > span {
        grid-row: span 2;
        width: 2rem;
        height: 2rem;
        margin-bottom: 0;
    }

    .ops-cta {
        border-radius: 1.1rem;
        padding: 2rem 1.15rem;
    }

    .ops-panel,
    .ops-visual-panel,
    .ops-insurance-trust {
        padding: 1.1rem;
    }
}

/* Mobile header & marketing nav polish */
@media (max-width: 991.98px) {
    .app-public-nav-marketing {
        min-height: auto;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    .app-public-nav-marketing .navbar-brand {
        max-width: calc(100% - 4.5rem);
        font-size: 1.15rem;
    }

    .app-public-nav-marketing .app-brand-mark {
        width: 2.1rem;
        height: 2.1rem;
    }

    .app-public-nav-marketing .navbar-collapse {
        padding: 0.9rem 0 0.4rem;
    }

    .app-public-menu {
        width: 100%;
        gap: 0.15rem;
        align-items: stretch;
    }

    .app-public-menu .nav-link {
        text-align: left;
        border-radius: 0.65rem;
        padding: 0.72rem 0.9rem !important;
    }

    .app-public-nav-actions {
        width: 100%;
        margin: 0.9rem 0 0.35rem !important;
    }

    .app-public-nav-actions .app-public-chat-btn,
    .app-public-nav-actions .app-public-client-btn {
        flex: 1 1 0;
        text-align: center;
        white-space: nowrap;
        font-size: 0.92rem;
        padding: 0.68rem 0.6rem;
    }
}

@media (max-width: 767.98px) {
    .app-public-announcement-inner {
        flex-direction: row;
    }

    .app-public-announcement-inner > div:first-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-public-announcement-links {
        display: none;
    }
}

/* Sticky marketing nav + anchor offsets */
.app-public-nav-marketing {
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 26px -14px rgba(15, 23, 42, 0.16);
}

.ops-home [id] {
    scroll-margin-top: 5.75rem;
}

/* Hero reassurance + platform row */
.ops-hero-note {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.9rem 0 0;
    color: var(--color-muted);
    font-size: 0.88rem;
}

.ops-hero-note i {
    color: #16a34a;
}

.ops-platforms {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.6rem;
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.ops-platforms div {
    display: flex;
    gap: 0.55rem;
}

.ops-platforms i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border: 1px solid var(--color-border);
    border-radius: 0.7rem;
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 1.05rem;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ops-platforms i:hover {
    transform: translateY(-2px);
    color: var(--color-primary);
    border-color: rgba(var(--color-primary-rgb), 0.4);
}

/* Live pulse on active order status */
.ops-preview-row em.is-working::before {
    content: "";
    display: inline-block;
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: currentColor;
    margin-right: 0.35rem;
    animation: opsPulse 1.6s ease-in-out infinite;
}

@keyframes opsPulse {
    0%,
    100% {
        opacity: 0.35;
    }

    50% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ops-preview-row em.is-working::before {
        animation: none;
    }
}

/* Homepage FAQ teaser */
.ops-faq-list {
    max-width: 780px;
    margin: 0 auto;
    display: grid;
    gap: 0.75rem;
}

.ops-faq-list details {
    border: 1px solid var(--color-border);
    border-radius: 0.95rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.ops-faq-list details[open] {
    border-color: rgba(var(--color-primary-rgb), 0.45);
}

.ops-faq-list summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.02rem 1.15rem;
    color: var(--color-text);
    font-weight: 700;
}

.ops-faq-list summary::-webkit-details-marker {
    display: none;
}

.ops-faq-list summary::after {
    content: "\f282";
    font-family: "bootstrap-icons";
    flex: 0 0 auto;
    color: var(--color-muted);
    transition: transform 0.2s ease;
}

.ops-faq-list details[open] summary::after {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.ops-faq-list details > p {
    margin: 0;
    padding: 0 1.15rem 1.05rem;
    color: var(--color-muted);
    line-height: 1.65;
}

.ops-faq-more {
    text-align: center;
    margin-top: 1.5rem;
}

/* Marketing footer */
.ops-footer {
    background: var(--color-surface);
    border-color: var(--color-border) !important;
    margin-top: 3rem;
}

.ops-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2.75rem 1.25rem 1.4rem;
}

.ops-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.ops-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text);
    font-size: 1.12rem;
    font-weight: 800;
    text-decoration: none;
}

.ops-footer-logo .app-brand-mark {
    width: 2.2rem;
    height: 2.2rem;
}

.ops-footer-brand p {
    max-width: 320px;
    margin: 0.85rem 0 0;
    color: var(--color-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.ops-footer-col {
    display: grid;
    align-content: start;
    gap: 0.55rem;
}

.ops-footer-col strong {
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.35rem;
}

.ops-footer-col a {
    width: fit-content;
    color: var(--color-muted);
    font-size: 0.94rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.ops-footer-col a:hover,
.ops-footer-col a:focus {
    color: var(--color-primary);
}

.ops-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid var(--color-border);
    margin-top: 2.25rem;
    padding-top: 1.2rem;
    color: var(--color-muted);
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    .ops-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.75rem;
    }

    .ops-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .ops-footer-inner {
        padding: 2rem 0.9rem 1.2rem;
    }

    .ops-platforms {
        margin-top: 1.35rem;
    }

    .ops-faq-list summary {
        padding: 0.9rem 1rem;
    }

    .ops-faq-list details > p {
        padding: 0 1rem 0.9rem;
    }
}

/* Profile page UI refresh */
.profile-page-shell {
    display: grid;
    gap: 0;
}

.profile-control-card.profile-hero {
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.09), rgba(15, 118, 110, 0.06)),
        var(--color-surface);
    box-shadow: var(--shadow-soft);
    padding: clamp(1rem, 2.4vw, 1.45rem);
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 1rem;
    overflow: hidden;
}

.profile-hero-main,
.profile-hero-side,
.profile-filter-heading,
.profile-live-head > div {
    min-width: 0;
}

.profile-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: var(--color-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
}

.profile-section-kicker i {
    color: var(--color-primary);
}

.profile-hero-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.45rem;
}

.profile-hero-title,
.profile-section-title {
    margin: 0;
    color: var(--color-text);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: 0;
}

.profile-hero-title {
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
}

.profile-section-title {
    font-size: 1.04rem;
}

.profile-hero-copy,
.profile-section-copy {
    color: var(--color-muted);
    line-height: 1.5;
    margin: 0.38rem 0 0;
}

.profile-hero-copy {
    max-width: 56rem;
    font-size: 0.96rem;
}

.profile-section-copy {
    font-size: 0.88rem;
}

.profile-health-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.38rem 0.58rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.profile-health-badge.is-success {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.26);
}

.profile-health-badge.is-warning {
    color: #92400e;
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.3);
}

.profile-hero-actions {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.profile-hero-actions .btn {
    min-height: 2.65rem;
    border-radius: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-control-cta.profile-control-cta-sell {
    min-width: 12.25rem;
    justify-content: center;
    border: 0;
    background: linear-gradient(135deg, var(--color-primary), #0f766e);
    box-shadow: 0 12px 24px rgba(var(--color-primary-rgb), 0.24);
}

.profile-control-cta.profile-control-cta-sell:hover,
.profile-control-cta.profile-control-cta-sell:focus {
    background: linear-gradient(135deg, var(--color-primary-hover), #0f766e);
    box-shadow: 0 16px 30px rgba(15, 118, 110, 0.22);
}

.profile-hero-chip-grid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 1rem;
}

.profile-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--color-muted);
    padding: 0.34rem 0.58rem;
    font-size: 0.78rem;
    line-height: 1.15;
}

.profile-hero-chip i {
    color: var(--color-primary);
}

.profile-hero-chip strong {
    color: var(--color-text);
    font-weight: 800;
}

.profile-queue-panel {
    height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.78);
    padding: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.profile-queue-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.profile-queue-limit {
    border: 1px solid rgba(var(--color-primary-rgb), 0.25);
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.09);
    color: var(--color-primary);
    padding: 0.22rem 0.48rem;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.profile-queue-number {
    margin-top: 0.72rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
    font-weight: 850;
    color: var(--color-text);
    letter-spacing: 0;
}

.profile-queue-caption {
    margin-top: 0.22rem;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.profile-queue-progress {
    height: 0.58rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.22);
    margin-top: 0.78rem;
}

.profile-queue-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.profile-hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.profile-hero-stat {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.78rem;
    background: rgba(248, 250, 252, 0.78);
    padding: 0.56rem;
}

.profile-hero-stat span {
    display: block;
    color: var(--color-muted);
    font-size: 0.73rem;
    line-height: 1.2;
}

.profile-hero-stat strong {
    display: block;
    margin-top: 0.18rem;
    color: var(--color-text);
    font-size: 1.02rem;
    line-height: 1.05;
}

.profile-overview-board.profile-filter-board {
    padding: 0.85rem;
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.05), rgba(var(--color-primary-rgb), 0.035)),
        var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.profile-filter-board .profile-overview-top {
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.profile-filter-board .profile-overview-mini {
    margin-left: 0;
    justify-content: flex-end;
}

.profile-filter-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 0.5rem;
}

.profile-filter-kpi {
    min-height: 4.25rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 0.85rem;
    padding: 0.62rem;
    background: var(--color-surface);
}

.profile-filter-kpi:hover {
    transform: translateY(-2px);
}

.profile-filter-kpi.is-active {
    background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.13), rgba(15, 118, 110, 0.05));
}

.profile-filter-kpi-label {
    width: 100%;
    justify-content: space-between;
    font-size: 0.78rem;
    letter-spacing: 0;
}

.profile-filter-kpi-label i {
    width: 1.7rem;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.56rem;
    background: rgba(var(--color-primary-rgb), 0.09);
}

.profile-filter-kpi-count {
    min-width: 2.45rem;
    padding: 0.18rem 0.45rem;
    font-size: 0.9rem;
    align-self: flex-start;
}

.profile-filter-title-mobile,
.profile-filter-create-mobile {
    display: none;
}

.profile-sticky-filter-wrap {
    z-index: 1044;
}

.profile-search-sticky-bar {
    border-radius: 0.95rem;
    padding: 0.55rem;
    background: rgba(255, 255, 255, 0.9);
}

.profile-search-sticky-inner {
    gap: 0.55rem;
}

.profile-search-sticky-bar .input-group-text,
.profile-search-sticky-bar .table-search-input {
    min-height: 2.55rem;
}

.profile-search-sticky-bar .input-group-text {
    border-radius: 0.72rem 0 0 0.72rem;
    background: var(--color-surface-soft);
    color: var(--color-primary);
}

.profile-search-sticky-bar .table-search-input {
    border-radius: 0 0.72rem 0.72rem 0;
}

.profile-view-toggle {
    flex: 0 0 auto;
    border: 1px solid var(--color-border);
    border-radius: 0.78rem;
    padding: 0.18rem;
    background: var(--color-surface-soft);
}

.profile-view-toggle .btn {
    min-width: 4.8rem;
    white-space: nowrap;
    border: 0 !important;
    border-radius: 0.6rem !important;
    min-height: 2.15rem;
}

.profile-view-toggle .btn-primary {
    box-shadow: 0 8px 18px rgba(var(--color-primary-rgb), 0.2);
}

.profile-bulk-toolbar {
    position: sticky;
    top: calc(var(--profile-sticky-top, 86px) + 4.1rem);
    z-index: 1041;
    border-radius: 0.95rem;
    padding: 0.72rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
}

.profile-bulk-icon {
    border-radius: 0.7rem;
}

.profile-bulk-actions .btn {
    border-radius: 0.66rem;
}

.profile-live-shell {
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.profile-live-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.045), rgba(15, 118, 110, 0.035));
}

.profile-live-body {
    padding: 1rem;
}

.profile-live-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.profile-live-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-muted);
    padding: 0.32rem 0.52rem;
    font-size: 0.78rem;
    line-height: 1.15;
}

.profile-live-meta i {
    color: var(--color-primary);
}

.profile-live-meta strong {
    color: var(--color-text);
}

.profile-live-meta .profile-live-status {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.08);
    color: #15803d;
    font-weight: 700;
}

.profile-live-status .profile-live-status-dot,
.profile-live-status .profile-live-status-text {
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
}

.profile-live-status .profile-live-status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #22c55e;
    animation: profileLiveDotPulse 1.8s ease-in-out infinite;
}

@keyframes profileLiveDotPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    }
}

.profile-live-meta .profile-live-status.is-stale {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.profile-live-status.is-stale .profile-live-status-dot {
    background: #f59e0b;
    animation: none;
}

.profile-live-meta .profile-live-status.is-paused {
    border-color: var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
}

.profile-live-status.is-paused .profile-live-status-dot {
    background: #94a3b8;
    animation: none;
}

[data-theme="dark"] .profile-live-meta .profile-live-status {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
}

[data-theme="dark"] .profile-live-meta .profile-live-status.is-stale {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.14);
}

.profile-card-item.profile-card-flash .profile-fb-card {
    animation: profileCardFlash 2.4s ease;
}

@keyframes profileCardFlash {
    0% {
        border-color: rgba(var(--color-primary-rgb), 0.7);
        box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.35), 0 4px 14px rgba(15, 23, 42, 0.06);
    }

    100% {
        border-color: rgba(148, 163, 184, 0.34);
        box-shadow: 0 0 0 10px rgba(var(--color-primary-rgb), 0), 0 4px 14px rgba(15, 23, 42, 0.06);
    }
}

.profile-live-shell .progress-bar {
    transition: width 0.6s ease;
}

@media (hover: hover) and (pointer: fine) {
    .profile-fb-card:hover {
        transform: translateY(-2px);
        border-color: rgba(var(--color-primary-rgb), 0.3);
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    }
}

@media (max-width: 767.98px) {
    .profile-filter-kpi-grid {
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
        scroll-padding-inline: 0.4rem;
        -webkit-overflow-scrolling: touch;
    }

    .profile-filter-kpi-grid .profile-filter-kpi {
        scroll-snap-align: start;
    }
}

@media (max-width: 575.98px) {
    .card-body.profile-fb-card-body {
        padding: 0.72rem;
    }

    .profile-fb-card .profile-card-zone + .profile-card-zone {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .profile-fb-card .profile-fb-avatar-wrap {
        width: 3.5rem;
        height: 3.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-live-status .profile-live-status-dot,
    .profile-card-item.profile-card-flash .profile-fb-card {
        animation: none;
    }

    .profile-live-shell .progress-bar {
        transition: none;
    }

    .profile-fb-card:hover {
        transform: none;
    }
}

.profile-fb-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 0.95rem;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.58), rgba(255, 255, 255, 0)),
        var(--color-surface);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.profile-fb-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--color-primary-rgb), 0.34);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.profile-fb-card-body {
    padding: 0.82rem;
}

.profile-card-zone-title,
.profile-kpi-label,
.profile-kpi-compact .profile-kpi-label,
.profile-search-history-label,
.profile-progress-pill-value,
.profile-credential-otp .otp-code {
    letter-spacing: 0;
}

body.profiles-view-list .profile-fb-card {
    border-radius: 0.95rem;
}

body.profiles-view-list .profile-fb-card-body {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.25fr);
    gap: 0.72rem;
    align-items: start;
}

body.profiles-view-list .profile-card-zone + .profile-card-zone {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

body.profiles-view-list .profile-card-zone-identity {
    border-right: 1px solid rgba(148, 163, 184, 0.24);
    padding-right: 0.72rem;
}

body.profiles-view-list .profile-card-zone-workflow {
    padding-top: 0.05rem;
}

[data-theme="dark"] .profile-control-card.profile-hero {
    background:
        linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.12), rgba(45, 212, 191, 0.08)),
        var(--color-surface);
}

[data-theme="dark"] .profile-hero-chip,
[data-theme="dark"] .profile-queue-panel,
[data-theme="dark"] .profile-hero-stat,
[data-theme="dark"] .profile-search-sticky-bar,
[data-theme="dark"] .profile-bulk-toolbar,
[data-theme="dark"] .profile-live-meta span {
    background: rgba(17, 26, 44, 0.88);
}

[data-theme="dark"] .profile-health-badge.is-success {
    color: #86efac;
    background: rgba(16, 185, 129, 0.16);
}

[data-theme="dark"] .profile-health-badge.is-warning {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.16);
}

[data-theme="dark"] .profile-filter-board,
[data-theme="dark"] .profile-live-head {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08), rgba(45, 212, 191, 0.05));
}

[data-theme="dark"] .profile-fb-card {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.4), rgba(17, 26, 44, 0)),
        var(--color-surface);
}

@media (max-width: 991.98px) {
    .profile-control-card.profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-hero-title-row,
    .profile-live-head {
        flex-direction: column;
    }

    .profile-health-badge,
    .profile-live-meta {
        align-self: flex-start;
    }

    body.profiles-view-list .profile-fb-card-body {
        display: block;
    }

    body.profiles-view-list .profile-card-zone-identity {
        border-right: 0;
        padding-right: 0;
    }

    body.profiles-view-list .profile-card-zone + .profile-card-zone {
        margin-top: 0.62rem;
        padding-top: 0.62rem;
        border-top: 1px solid rgba(148, 163, 184, 0.24);
    }
}

@media (max-width: 767.98px) {
    .profile-control-card.profile-hero,
    .profile-overview-board.profile-filter-board,
    .profile-live-shell {
        border-radius: 0.86rem;
    }

    .profile-hero-actions .btn,
    .profile-control-cta.profile-control-cta-sell {
        width: 100%;
    }

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

    .profile-hero-chip {
        justify-content: space-between;
        border-radius: 0.78rem;
    }

    .profile-hero-stat-grid,
    .profile-filter-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-filter-kpi {
        min-height: 3.8rem;
    }

    .profile-bulk-toolbar {
        position: static;
        backdrop-filter: none;
    }

    .profile-live-body {
        padding: 0.75rem;
    }
}

@media (max-width: 479.98px) {
    .profile-hero-stat-grid,
    .profile-filter-kpi-grid {
        grid-template-columns: 1fr;
    }

    .profile-queue-top,
    .profile-card-top-head {
        align-items: flex-start;
    }

    .profile-queue-top {
        flex-direction: column;
    }

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

    .profile-card-top-meta {
        justify-self: start;
    }
}

/* Premade marketplace UI refresh */
.marketplace-page-shell {
    display: grid;
    gap: 0;
}

.profile-control-card.marketplace-hero {
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(var(--color-primary-rgb), 0.07)),
        var(--color-surface);
    box-shadow: var(--shadow-soft);
    padding: clamp(1rem, 2.4vw, 1.45rem);
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
    gap: 1rem;
    overflow: hidden;
}

.marketplace-hero-main,
.marketplace-hero-panel {
    min-width: 0;
}

.marketplace-stock-card {
    height: 100%;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.78);
    padding: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.marketplace-stock-number {
    margin-top: 0.72rem;
    color: var(--color-text);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0;
}

.marketplace-stock-caption {
    margin-top: 0.22rem;
    color: var(--color-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.marketplace-stock-progress {
    margin-top: 0.78rem;
}

.marketplace-toolbar {
    border-radius: 1rem;
    padding: 0.85rem;
    background:
        linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.045), rgba(15, 118, 110, 0.045)),
        var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.marketplace-toolbar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.marketplace-toolbar-head > div {
    min-width: 0;
}

.marketplace-toolbar-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.38rem;
}

.marketplace-toolbar-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-muted);
    padding: 0.32rem 0.52rem;
    font-size: 0.78rem;
}

.marketplace-toolbar-meta i {
    color: var(--color-primary);
}

.marketplace-toolbar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.marketplace-filter-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.marketplace-filter-btn {
    min-height: 2.25rem;
    border-radius: 0.72rem;
    display: inline-flex;
    align-items: center;
}

.marketplace-filter-btn .badge {
    min-width: 1.85rem;
}

.marketplace-search-wrap {
    width: min(100%, 26rem);
    flex: 0 0 min(100%, 26rem);
}

.marketplace-search-wrap .input-group-text,
.marketplace-search-wrap .form-control {
    min-height: 2.55rem;
}

.marketplace-search-wrap .input-group-text {
    border-radius: 0.72rem 0 0 0.72rem;
    background: var(--color-surface-soft);
    color: var(--color-primary);
}

.marketplace-search-wrap .form-control {
    border-radius: 0 0.72rem 0.72rem 0;
}

.marketplace-grid-shell {
    margin-bottom: 1.25rem;
}

.marketplace-grid .profile-fb-card {
    border-color: rgba(148, 163, 184, 0.36);
}

.marketplace-card-item .profile-card-zone-workflow {
    display: flex;
    flex-direction: column;
}

.marketplace-card-item .profile-card-top-head {
    grid-template-columns: minmax(8.5rem, 1fr) minmax(8rem, auto);
}

.marketplace-card-item .profile-card-top-title {
    min-width: 0;
}

.marketplace-card-item .profile-fb-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.marketplace-card-item .profile-card-top-meta {
    max-width: 11.5rem;
}

.marketplace-card-item .profile-feed-actions {
    margin-top: auto;
    padding-top: 0.75rem;
}

.marketplace-price-chip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem;
    border: 1px solid rgba(15, 118, 110, 0.28);
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--color-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.22rem 0.48rem;
    white-space: nowrap;
}

.marketplace-price-chip i {
    color: var(--color-secondary);
}

.marketplace-price-note {
    max-width: 100%;
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
}

.marketplace-buy-btn {
    min-width: 7.4rem;
    border-radius: 0.66rem;
    box-shadow: 0 8px 18px rgba(var(--color-primary-rgb), 0.2);
}

#premadePurchaseBanner {
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 0.95rem;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

[data-theme="dark"] .profile-control-card.marketplace-hero {
    background:
        linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(var(--color-primary-rgb), 0.09)),
        var(--color-surface);
}

[data-theme="dark"] .marketplace-stock-card,
[data-theme="dark"] .marketplace-toolbar-meta span,
[data-theme="dark"] .marketplace-search-wrap .input-group-text {
    background: rgba(17, 26, 44, 0.88);
}

[data-theme="dark"] .marketplace-toolbar {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08), rgba(45, 212, 191, 0.05));
}

[data-theme="dark"] .marketplace-price-chip {
    background: rgba(45, 212, 191, 0.14);
    border-color: rgba(45, 212, 191, 0.3);
    color: #5eead4;
}

[data-theme="dark"] .marketplace-price-chip i {
    color: #5eead4;
}

[data-theme="dark"] #premadePurchaseBanner {
    background: rgba(16, 185, 129, 0.15);
    color: #86efac;
}

@media (max-width: 991.98px) {
    .profile-control-card.marketplace-hero {
        grid-template-columns: 1fr;
    }

    .marketplace-toolbar-head,
    .marketplace-toolbar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .marketplace-toolbar-meta {
        justify-content: flex-start;
    }

    .marketplace-search-wrap {
        width: 100%;
        flex-basis: auto;
    }
}

@media (max-width: 767.98px) {
    .profile-control-card.marketplace-hero,
    .marketplace-toolbar,
    .marketplace-grid-shell {
        border-radius: 0.86rem;
    }

    .marketplace-filter-strip {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketplace-filter-btn {
        justify-content: center;
        width: 100%;
    }

    .marketplace-card-item .profile-feed-actions .btn,
    .marketplace-card-item .profile-feed-actions form {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .marketplace-card-item .profile-card-top-head {
        grid-template-columns: 1fr;
    }

    .marketplace-card-item .profile-card-top-meta {
        justify-self: start;
        max-width: 100%;
        text-align: left !important;
    }

    .marketplace-card-item .profile-card-top-meta-head,
    .marketplace-card-item .marketplace-price-chip {
        justify-content: flex-start;
    }
}

@media (max-width: 479.98px) {
    .marketplace-filter-strip {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------
   Site-wide mobile UX pass
------------------------------------------------------------------- */
[data-theme="dark"] .app-mobile-bottom-nav {
    background: rgba(11, 18, 32, 0.96);
    border-top-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 -14px 34px rgba(2, 6, 23, 0.5);
}

[data-theme="dark"] .app-mobile-bottom-link {
    color: #94a3b8;
}

[data-theme="dark"] .app-mobile-bottom-link:hover,
[data-theme="dark"] .app-mobile-bottom-link:focus,
[data-theme="dark"] .app-mobile-bottom-link.active {
    background: rgba(147, 197, 253, 0.14);
    color: var(--color-primary);
}

@media (max-width: 991.98px) {
    .app-shell {
        display: block;
    }

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

    .app-shell .app-footer {
        padding-bottom: 6.2rem !important;
    }
}

@media (max-width: 767.98px) {
    .app-topbar {
        min-height: 60px;
        padding-left: 0.68rem !important;
        padding-right: 0.68rem !important;
    }

    .app-topbar-actions {
        gap: 0.3rem !important;
    }

    .app-topbar-actions > .btn,
    .app-topbar-actions .dropdown > .btn {
        min-width: 2.48rem;
        min-height: 2.48rem;
    }

    .app-balance-chip {
        max-width: 6.4rem;
        overflow: hidden;
    }

    .app-balance-chip strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .table-responsive {
        border: 1px solid var(--color-border);
        border-radius: 0.5rem;
        background: var(--color-surface);
    }

    .table-responsive > .table {
        min-width: 680px;
        margin-bottom: 0;
    }

    .card,
    .admin-metric-card,
    .admin-settings-status,
    .admin-tool-card,
    .admin-side-panel,
    .admin-settings-row-section,
    .admin-settings-savebar,
    .profile-control-card.profile-hero,
    .profile-overview-board.profile-filter-board,
    .profile-live-shell,
    .profile-control-card.marketplace-hero,
    .marketplace-toolbar,
    .wallet-simple-guide,
    .profile-simple-guide,
    .support-mail-shell {
        border-radius: 0.5rem;
    }

    .modal-dialog {
        margin: 0.55rem;
    }

    .modal-content {
        border-radius: 0.5rem;
    }

    .wallet-sticky-summary {
        position: static;
    }

    .wallet-pay-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: thin;
    }

    .wallet-pay-tabs .nav-item,
    .wallet-pay-tabs .nav-link {
        flex: 0 0 auto;
    }

    .wallet-invoice-steps,
    .wallet-safe-strip,
    .wallet-shkeeper-summary-grid,
    .wallet-shkeeper-action-grid,
    .wallet-shkeeper-meta-grid,
    .wallet-btc-meta {
        grid-template-columns: 1fr;
    }

    .wallet-btc-shell,
    .wallet-shkeeper-modal-shell {
        grid-template-columns: 1fr;
    }

    .profile-ticket-conversation .ticket-mail-item {
        max-width: 100%;
    }

    .profile-search-sticky-inner,
    .marketplace-toolbar-controls,
    .support-ticket-toolbar {
        gap: 0.55rem;
    }
}

@media (max-width: 575.98px) {
    body.app-body {
        background: var(--color-bg);
    }

    .app-shell .app-content:not(.app-content-home) {
        padding: 0.8rem 0.72rem 7.85rem !important;
        overflow-x: hidden;
    }

    .app-mobile-brand span:last-child {
        max-width: 5.8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-topbar [data-theme-toggle] {
        display: none !important;
    }

    .card-body,
    .admin-side-panel,
    .support-mail-detail-body {
        padding: 1rem;
    }

    .form-control,
    .form-select,
    .btn {
        min-height: 2.44rem;
    }

    .btn-sm {
        min-height: 2.15rem;
    }

    .input-group > .btn,
    .input-group > .form-control,
    .input-group > .form-select,
    .input-group > .input-group-text {
        min-height: 2.48rem;
    }

    .app-content .d-grid > .btn,
    .admin-hero-actions .btn,
    .profile-hero-actions .btn,
    .wallet-simple-guide-actions .btn,
    .profile-simple-guide-actions .btn,
    .support-ticket-toolbar .btn,
    .support-new-ticket-btn,
    .marketplace-filter-btn,
    .marketplace-buy-btn {
        width: 100%;
    }

    .app-mobile-new-profile-fab {
        right: max(0.75rem, calc(env(safe-area-inset-right) + 0.55rem));
        bottom: max(5.15rem, calc(env(safe-area-inset-bottom) + 4.75rem));
        padding: 0.58rem 0.78rem;
    }

    .app-mobile-bottom-nav {
        gap: 0.12rem;
        padding-top: 0.32rem;
        padding-left: max(0.38rem, env(safe-area-inset-left));
        padding-right: max(0.38rem, env(safe-area-inset-right));
    }

    .app-mobile-bottom-link {
        min-height: 2.92rem;
        font-size: 0.64rem;
    }

    .app-mobile-bottom-link i {
        font-size: 1.02rem;
    }

    .app-shell .app-footer .container-fluid {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .app-balance-chip {
        padding: 0.3rem 0.5rem !important;
        min-width: 0 !important;
    }

    .app-balance-chip strong {
        font-size: 0.76rem;
        letter-spacing: -0.01em;
    }

    .app-balance-chip i {
        font-size: 0.85rem;
    }

    .app-shell .alert {
        overflow: hidden;
        padding: 0.82rem !important;
    }

    .app-shell .alert > div {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .app-shell .alert .btn {
        width: auto;
        min-height: 2.18rem;
    }

    body:has(.profile-page-shell) .app-email-verification-alert {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.55rem !important;
        width: auto;
        max-width: 100%;
        margin-bottom: 0.72rem;
        padding: 0.64rem 0.72rem !important;
    }

    body:has(.profile-page-shell) .app-email-verification-alert .small {
        display: none;
    }

    body:has(.profile-page-shell) .app-email-verification-alert .fw-semibold {
        font-size: 0.88rem;
        line-height: 1.2;
    }

    body:has(.profile-page-shell) .app-email-verification-alert .btn {
        padding-inline: 0.7rem;
        white-space: nowrap;
    }

    body:has(.profile-page-shell) .app-email-verification-alert .btn i {
        margin-right: 0.25rem !important;
    }

    .profile-control-card.profile-hero {
        padding: 0.85rem;
        gap: 0.72rem;
    }

    .profile-hero-title {
        font-size: 1.45rem;
    }

    .profile-hero-copy {
        font-size: 0.86rem;
        line-height: 1.4;
    }

    .profile-hero-actions {
        gap: 0.45rem;
        margin-top: 0.72rem;
    }

    .profile-hero-actions .btn {
        min-height: 2.46rem;
        border-radius: 0.5rem;
    }

    .profile-hero-chip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin-top: 0.72rem;
    }

    .profile-hero-chip {
        padding: 0.38rem 0.48rem;
        font-size: 0.72rem;
        line-height: 1.2;
    }

    .profile-hero-chip:nth-child(n+5) {
        display: none;
    }

    .profile-queue-panel {
        padding: 0.72rem;
        border-radius: 0.5rem;
    }

    .profile-queue-number {
        font-size: 1.72rem;
        margin-top: 0.55rem;
    }

    .profile-hero-stat-grid {
        gap: 0.4rem;
        margin-top: 0.65rem;
    }

    .profile-hero-stat {
        padding: 0.5rem;
        border-radius: 0.5rem;
    }

    .profile-page-shell .profile-control-card.profile-hero {
        display: none;
    }

    .profile-simple-guide {
        display: none !important;
    }

    .profile-live-head {
        padding: 0.72rem;
    }

    .profile-live-head .profile-section-copy {
        display: none;
    }

    .profile-live-meta {
        width: 100%;
        justify-content: flex-start;
    }

    .profile-live-body {
        padding: 0.55rem;
    }

    .profile-overview-board.profile-filter-board {
        padding: 0.72rem;
    }

    .profile-filter-heading .profile-section-copy {
        display: none;
    }

    .profile-mobile-command {
        gap: 0.5rem;
        padding: 0.64rem;
    }

    .profile-mobile-command .btn,
    body:has(.profile-page-shell) .app-email-verification-alert .btn {
        width: 2.45rem;
        min-width: 2.45rem;
        padding-inline: 0;
    }

    .profile-mobile-command .btn i,
    body:has(.profile-page-shell) .app-email-verification-alert .btn i {
        margin-right: 0 !important;
    }

    .profile-mobile-command-label,
    body:has(.profile-page-shell) .app-email-verification-alert .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .profile-filter-kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 379.98px) {
    .app-mobile-brand span:last-child {
        display: none !important;
    }

    .app-balance-chip {
        max-width: 5.6rem;
    }

    .app-topbar-actions > .btn,
    .app-topbar-actions .dropdown > .btn {
        min-width: 2.36rem;
    }

    .app-mobile-bottom-link {
        font-size: 0.6rem;
    }
}

/* Profile page UX refinements */
.profile-search-clear {
    border-radius: 0 0.72rem 0.72rem 0 !important;
    color: var(--color-muted);
}

.profile-search-sticky-bar .table-search-input {
    border-radius: 0 !important;
}

.profile-search-result-count {
    flex: 0 0 auto;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-surface-soft);
    color: var(--color-muted);
    padding: 0.3rem 0.58rem;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.profile-search-result-count strong {
    color: var(--color-text);
}

.profile-mobile-command {
    display: none;
}

.app-email-verification-copy {
    min-width: 0;
}

@media (max-width: 767.98px) {
    .profile-page-shell,
    .profile-control-card.profile-hero,
    .profile-hero-main,
    .profile-hero-side,
    .profile-hero-actions,
    .profile-simple-guide,
    .profile-simple-guide-copy,
    .profile-simple-guide-actions,
    .profile-sticky-filter-wrap,
    .profile-search-sticky-bar,
    .profile-search-sticky-inner,
    .profile-overview-board,
    .profile-live-shell,
    .profile-live-body {
        min-width: 0;
        max-width: 100%;
    }

    .profile-page-shell {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .profile-mobile-command {
        order: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
        border: 1px solid var(--color-border);
        border-radius: 0.5rem;
        background: var(--color-surface);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
        padding: 0.72rem;
    }

    .profile-mobile-command > div {
        min-width: 0;
    }

    .profile-mobile-command-title {
        color: var(--color-text);
        font-size: 1.08rem;
        font-weight: 850;
        line-height: 1.1;
    }

    .profile-mobile-command-meta {
        color: var(--color-muted);
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .profile-mobile-command .btn {
        flex: 0 0 auto;
        min-width: 5.35rem;
        padding-inline: 0.72rem;
        justify-content: center;
        white-space: nowrap;
    }

    .profile-sticky-filter-wrap {
        order: 1;
    }

    .profile-live-shell {
        order: 2;
    }

    .profile-overview-board.profile-filter-board {
        order: 3;
    }

    .profile-control-card.profile-hero {
        order: 4;
    }

    .profile-simple-guide {
        order: 5;
    }

    .profile-page-shell > .alert {
        order: 5;
        width: 100%;
        max-width: 100%;
    }

    #bulkProfileActionForm,
    .profile-bulk-toolbar {
        order: 6;
    }

    .profile-control-card.profile-hero,
    .profile-simple-guide,
    .profile-mobile-command,
    .profile-sticky-filter-wrap,
    .profile-overview-board.profile-filter-board,
    .profile-live-shell {
        align-self: stretch;
        width: auto;
        max-width: 100%;
    }

    body:has(.profile-page-shell) .app-mobile-new-profile-fab {
        display: none !important;
    }

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

    .profile-hero-actions .btn,
    .profile-control-cta.profile-control-cta-sell {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        justify-content: flex-start;
        align-items: center;
        text-align: left;
        white-space: normal;
    }

    .profile-control-cta.profile-control-cta-sell {
        color: #ffffff !important;
        display: grid !important;
        grid-template-columns: 1fr;
        justify-items: start;
        row-gap: 0.16rem;
    }

    .profile-control-cta.profile-control-cta-sell > span {
        color: inherit !important;
        opacity: 1;
    }

    .profile-hero-actions .btn > span {
        min-width: 0;
        max-width: 100%;
    }

    .profile-control-cta-sub {
        display: block;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .profile-hero-copy,
    .profile-section-copy,
    .profile-simple-guide-copy,
    .profile-live-head {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .profile-simple-guide {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.78rem;
    }

    .profile-simple-guide-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 0.5rem;
        width: 100%;
    }

    .profile-simple-guide-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .profile-search-result-count {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .profile-hero-chip-grid,
    .profile-filter-kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: 100%;
        overflow: visible;
        gap: 0.48rem;
    }

    .profile-hero-chip {
        min-width: 0;
        width: 100%;
        justify-content: flex-start !important;
        border-radius: 0.5rem !important;
    }

    .profile-filter-kpi {
        min-width: 0;
        width: 100%;
        min-height: 3.55rem;
        border-radius: 0.5rem;
    }

    .profile-feed-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .profile-feed-actions form,
    .profile-feed-actions .btn,
    .profile-feed-actions > span {
        width: 100%;
    }

    .profile-feed-actions > span:not(.d-none) {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .profile-feed-actions > span.d-none {
        display: none !important;
    }
}

@media (max-width: 359.98px) {
    .profile-hero-chip-grid,
    .profile-filter-kpi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479.98px) {
    .profile-card-top-meta-head {
        gap: 0.35rem;
    }

    .profile-select-control {
        min-height: 2rem;
    }

    .profile-pin-toggle {
        min-height: 2rem;
        padding-inline: 0.55rem;
    }
}

@media (max-width: 575.98px) {
    body:has(.profile-page-shell) .app-email-verification-alert {
        position: relative;
        margin-right: 0.72rem;
        padding-right: 3.6rem !important;
    }

    .profile-page-shell {
        padding-right: 0.72rem;
    }

    .profile-page-shell .profile-control-card.profile-hero,
    .profile-simple-guide {
        display: none !important;
    }

    .profile-mobile-command {
        position: relative;
        display: block;
        gap: 0.5rem;
        padding: 0.64rem;
        padding-right: 3.6rem;
    }

    .profile-mobile-command .btn,
    body:has(.profile-page-shell) .app-email-verification-alert .btn {
        position: absolute;
        top: 50%;
        right: 6rem;
        transform: translateY(-50%);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.45rem;
        min-width: 2.45rem;
        padding-inline: 0;
    }

    .profile-mobile-command .btn i,
    body:has(.profile-page-shell) .app-email-verification-alert .btn i {
        margin-right: 0 !important;
    }

    .profile-mobile-command-label,
    body:has(.profile-page-shell) .app-email-verification-alert .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .profile-filter-kpi-grid {
        grid-template-columns: 1fr !important;
    }

    .profile-filter-kpi {
        min-height: 3.25rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .profile-filter-kpi-label {
        width: auto;
        max-width: calc(100% - 3rem);
        justify-content: flex-start;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .profile-filter-kpi-count {
        flex: 0 0 auto;
        align-self: center;
    }
}

@media (max-width: 575.98px) {
    body:has(.profile-page-shell) .app-content:not(.app-content-home) {
        padding-inline: 0.72rem !important;
    }

    body:has(.profile-page-shell) .app-email-verification-alert {
        position: static;
        grid-template-columns: minmax(0, 1fr) auto;
        margin: 0 0 0.7rem;
        padding: 0.58rem 0.62rem !important;
        border-radius: 0.62rem !important;
    }

    body:has(.profile-page-shell) .app-email-verification-alert .btn {
        position: static;
        transform: none;
        width: 2.2rem;
        min-width: 2.2rem;
        padding: 0;
    }

    body:has(.profile-page-shell) .app-email-verification-alert .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .profile-page-shell {
        padding-right: 0;
        gap: 0.68rem;
    }

    .profile-page-shell .profile-control-card.profile-hero,
    .profile-simple-guide {
        display: none !important;
    }

    .profile-mobile-command {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.66rem;
        padding: 0.82rem;
        padding-right: 0.82rem;
        border-radius: 0.72rem;
        background:
            linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.1), rgba(15, 118, 110, 0.055)),
            var(--color-surface);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        overflow: hidden;
    }

    .profile-mobile-command-top {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.42rem;
        min-width: 0;
    }

    .profile-mobile-command-copy {
        min-width: 0;
    }

    .profile-mobile-command-title {
        margin-top: 0.18rem;
        font-size: 1.2rem;
        line-height: 1.04;
    }

    .profile-mobile-command-meta {
        margin-top: 0.14rem;
        font-size: 0.76rem;
    }

    .profile-mobile-command .profile-health-badge {
        justify-self: start;
        max-width: 100%;
        padding: 0.28rem 0.45rem;
        border-radius: 999px;
        font-size: 0.68rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .profile-mobile-command-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.42rem;
    }

    .profile-mobile-command-stat {
        min-width: 0;
        border: 1px solid rgba(148, 163, 184, 0.34);
        border-radius: 0.62rem;
        background: rgba(255, 255, 255, 0.76);
        padding: 0.5rem 0.48rem;
    }

    .profile-mobile-command-stat strong,
    .profile-mobile-command-stat small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .profile-mobile-command-stat strong {
        color: var(--color-text);
        font-size: 1rem;
        line-height: 1.05;
        font-weight: 850;
    }

    .profile-mobile-command-stat small {
        margin-top: 0.16rem;
        color: var(--color-muted);
        font-size: 0.68rem;
        font-weight: 700;
    }

    .profile-mobile-command-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.42rem;
    }

    .profile-mobile-command-actions .btn:first-child {
        grid-column: 1 / -1;
    }

    .profile-mobile-command .btn {
        position: static;
        transform: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.32rem;
        width: 100%;
        min-width: 0;
        min-height: 2.18rem;
        border-radius: 0.58rem;
        padding: 0.42rem 0.48rem;
        font-size: 0.75rem;
        font-weight: 800;
        white-space: nowrap;
    }

    .profile-mobile-command .btn i {
        margin-right: 0 !important;
        font-size: 0.9rem;
    }

    .profile-mobile-command-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
    }

    .profile-sticky-filter-wrap {
        margin-bottom: 0 !important;
    }

    .profile-search-sticky-bar {
        border-radius: 0.72rem;
        padding: 0.48rem;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    .profile-search-sticky-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.42rem;
    }

    .profile-overview-search {
        grid-column: 1 / -1;
    }

    .profile-search-sticky-bar .input-group-text,
    .profile-search-sticky-bar .table-search-input,
    .profile-search-sticky-bar .profile-search-clear {
        min-height: 2.36rem;
    }

    .profile-search-result-count {
        order: 0;
        width: auto;
        min-height: 2rem;
        justify-content: flex-start;
        padding-inline: 0.55rem;
        font-size: 0.72rem;
    }

    .profile-view-toggle {
        display: none;
    }

    .profile-live-shell {
        border-radius: 0.72rem;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    }

    .profile-live-head {
        align-items: center;
        padding: 0.72rem 0.78rem;
    }

    .profile-live-head .profile-section-title {
        font-size: 1.06rem;
    }

    .profile-live-meta {
        justify-content: flex-start;
        gap: 0.36rem;
    }

    .profile-live-meta span {
        padding: 0.25rem 0.48rem;
        font-size: 0.72rem;
    }

    .profile-live-body {
        padding: 0.58rem;
    }

    .profile-live-body .empty-state {
        padding: 1rem 0.7rem;
    }

    .profile-live-body .empty-state .text-muted {
        max-width: 19rem;
        margin-inline: auto;
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .profile-live-body .empty-state .d-flex {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem !important;
        width: 100%;
        max-width: 16.5rem;
        margin-inline: auto;
    }

    .profile-live-body .empty-state .btn {
        width: 100%;
        min-width: 0;
        white-space: nowrap;
    }

    .profile-overview-board.profile-filter-board {
        border-radius: 0.72rem;
        padding: 0.68rem;
    }

    .profile-filter-board .profile-overview-top {
        gap: 0.46rem;
        margin-bottom: 0.5rem;
    }

    .profile-filter-heading .profile-section-title {
        font-size: 1rem;
    }

    .profile-filter-board .profile-overview-mini {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
    }

    .profile-filter-board .profile-overview-mini::-webkit-scrollbar {
        display: none;
    }

    .profile-filter-kpi-grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 0.42rem;
        overflow-x: auto;
        padding-bottom: 0.12rem;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .profile-filter-kpi-grid::-webkit-scrollbar {
        display: none;
    }

    .profile-filter-kpi {
        flex: 0 0 auto;
        min-height: 2.28rem;
        width: auto;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.38rem;
        border-radius: 999px;
        padding: 0.34rem 0.48rem;
        scroll-snap-align: start;
    }

    .profile-filter-kpi-label {
        width: auto;
        max-width: none;
        justify-content: flex-start;
        gap: 0.32rem;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        font-size: 0.74rem;
    }

    .profile-filter-kpi-label i {
        width: 1.42rem;
        height: 1.42rem;
        border-radius: 0.48rem;
    }

    .profile-filter-kpi-count {
        align-self: center;
        min-width: 1.55rem;
        padding: 0.12rem 0.32rem;
        font-size: 0.72rem;
    }
}

@media (max-width: 359.98px) {
    .profile-mobile-command-actions {
        grid-template-columns: 1fr;
    }

    .profile-live-body .empty-state .d-flex {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .profile-overview-board.profile-filter-board {
        order: 0;
    }

    .profile-sticky-filter-wrap {
        order: 1;
    }

    .profile-live-shell {
        order: 2;
    }

    .profile-mobile-command {
        order: 3;
        display: none !important;
    }

    .profile-control-card.profile-hero,
    .profile-simple-guide,
    .profile-page-shell > .alert {
        order: 4;
    }

    .profile-overview-board.profile-filter-board {
        display: grid;
        gap: 0.5rem;
        border: 1px solid var(--color-border);
        background:
            linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.07), rgba(15, 118, 110, 0.04)),
            var(--color-surface);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    .profile-filter-board .profile-overview-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0;
    }

    .profile-filter-heading {
        min-width: 0;
    }

    .profile-filter-title-full {
        display: none;
    }

    .profile-filter-title-mobile {
        display: inline;
    }

    .profile-filter-heading .profile-section-title {
        margin-top: 0.1rem;
        font-size: 0.98rem;
        line-height: 1.05;
    }

    .profile-filter-heading .profile-section-copy {
        display: none !important;
    }

    .profile-filter-create-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        width: auto;
        min-height: 2.05rem;
        border-radius: 0.56rem;
        padding-inline: 0.68rem;
        font-size: 0.74rem;
        font-weight: 800;
        white-space: nowrap;
    }

    .profile-filter-create-mobile i {
        margin-right: 0 !important;
    }

    .profile-filter-board .profile-overview-mini {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        gap: 0.38rem;
        margin: 0;
        padding: 0;
    }

    .profile-filter-board .profile-mini-chip {
        padding: 0.25rem 0.42rem;
        font-size: 0.7rem;
    }

    .profile-filter-kpi-grid {
        margin-top: 0;
    }

    .profile-filter-kpi {
        min-height: 2.1rem;
        padding: 0.28rem 0.42rem;
        background: rgba(255, 255, 255, 0.82);
    }

    .profile-filter-kpi.is-active {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #ffffff;
        box-shadow: 0 8px 18px rgba(var(--color-primary-rgb), 0.22);
    }

    .profile-filter-kpi.is-active .profile-filter-kpi-label i {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.18);
    }

    .profile-filter-kpi.is-active .profile-filter-kpi-count {
        color: var(--color-primary);
        border-color: rgba(255, 255, 255, 0.64);
        background: #ffffff;
    }
}

/* All-page UX polish */
.app-page-header {
    min-width: 0;
}

.app-page-header h1,
.app-content > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4:first-child h1 {
    letter-spacing: 0;
}

.app-page-actions {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.card-header,
.modal-header,
.modal-footer {
    gap: 0.65rem;
}

.card-header > *,
.modal-header > *,
.modal-footer > * {
    min-width: 0;
}

.card-title,
.card h2,
.card h3,
.modal-title {
    overflow-wrap: anywhere;
}

.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--color-primary-rgb), 0.35) transparent;
}

.table-responsive::-webkit-scrollbar {
    height: 0.5rem;
}

.table-responsive::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.28);
}

.admin-note-details {
    display: block;
}

.admin-note-details summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.admin-note-details summary::-webkit-details-marker {
    display: none;
}

.admin-note-details summary::after {
    content: "\F282";
    margin-left: auto;
    font-family: "bootstrap-icons";
    font-size: 0.8rem;
    transition: transform 0.15s ease;
}

.admin-note-details[open] summary::after {
    transform: rotate(180deg);
}

.admin-note-details-body {
    overflow-wrap: anywhere;
}

.app-mobile-card-table-wrap {
    isolation: isolate;
}

@media (max-width: 767.98px) {
    .app-page-header,
    .app-content > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4:first-child {
        display: grid !important;
        grid-template-columns: 1fr;
        align-items: start !important;
        gap: 0.58rem !important;
        margin-bottom: 0.88rem !important;
    }

    .app-page-header h1,
    .app-content > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4:first-child h1 {
        font-size: 1.35rem;
        line-height: 1.12;
    }

    .app-page-header p,
    .app-content > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4:first-child p {
        font-size: 0.86rem;
        line-height: 1.38;
    }

    .app-page-actions,
    .app-content > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4:first-child > .d-flex,
    .card-header .d-flex,
    .modal-footer {
        width: 100%;
    }

    .app-page-actions {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr));
        gap: 0.45rem !important;
    }

    .app-page-actions .btn,
    .app-content > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4:first-child > .btn,
    .app-content > .d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.mb-4:first-child > .d-flex .btn {
        justify-content: center;
        min-width: 0;
    }

    .app-content > .row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .card-header {
        align-items: flex-start !important;
        flex-wrap: wrap;
        padding: 0.82rem 1rem;
    }

    .card-header .btn,
    .card-header .btn-group {
        flex: 0 1 auto;
    }

    .card .card-body > .d-flex.flex-wrap.justify-content-between.align-items-center,
    .card .card-body > .d-flex.flex-wrap.justify-content-between.align-items-start {
        gap: 0.62rem !important;
    }

    .app-email-verification-alert {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.55rem !important;
        margin-bottom: 0.72rem;
        padding: 0.64rem 0.72rem !important;
    }

    .app-email-verification-alert .small {
        display: none;
    }

    .app-email-verification-alert .fw-semibold {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .app-email-verification-alert .btn {
        width: 2.36rem;
        min-width: 2.36rem;
        padding-inline: 0;
    }

    .app-email-verification-alert .btn i {
        margin-right: 0 !important;
    }

    .app-email-verification-alert .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .app-mobile-new-profile-fab {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto {
        display: grid !important;
        flex: 0 0 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 100%;
        min-width: 0;
        width: 100%;
        margin-top: 0.55rem;
        margin-left: 0 !important;
    }

    .app-public-nav:not(.app-public-nav-marketing) .container-fluid > .d-flex.ms-auto .btn {
        min-width: 0;
        width: 100%;
        padding-inline: 0.48rem;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .table-responsive.app-mobile-card-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .app-mobile-card-table {
        width: 100%;
        min-width: 0 !important;
        margin-bottom: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .app-mobile-card-table thead {
        display: none;
    }

    .app-mobile-card-table tbody,
    .app-mobile-card-table tr,
    .app-mobile-card-table td {
        display: block;
        width: 100%;
    }

    .app-mobile-card-table tbody tr {
        margin-bottom: 0.68rem;
        padding: 0.52rem 0.68rem;
        border: 1px solid var(--color-border);
        border-radius: 0.5rem;
        background: var(--color-surface);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
    }

    .app-mobile-card-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .app-mobile-card-table tbody td {
        display: grid;
        grid-template-columns: minmax(5.8rem, 38%) minmax(0, 1fr);
        gap: 0.62rem;
        align-items: center;
        min-height: 0;
        padding: 0.46rem 0;
        border: 0;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .app-mobile-card-table tbody td + td {
        border-top: 1px solid rgba(148, 163, 184, 0.16);
    }

    .app-mobile-card-table tbody td::before {
        content: attr(data-mobile-label);
        align-self: start;
        color: var(--color-muted);
        font-size: 0.68rem;
        font-weight: 800;
        line-height: 1.25;
        text-align: left;
        text-transform: uppercase;
    }

    .app-mobile-card-table tbody td.app-mobile-card-full {
        display: block;
        text-align: center !important;
    }

    .app-mobile-card-table tbody td.app-mobile-card-actions {
        display: block;
        text-align: left;
    }

    .app-mobile-card-table tbody td.app-mobile-card-actions::before {
        display: block;
        margin-bottom: 0.42rem;
    }

    .app-mobile-card-table tbody td.app-mobile-card-full::before,
    .app-mobile-card-table tbody td[data-mobile-label=""]::before {
        display: none;
    }

    .app-mobile-card-table tbody td .btn,
    .app-mobile-card-table tbody td form {
        max-width: 100%;
    }

    .app-mobile-card-table tbody td .btn {
        white-space: normal;
    }

    .app-mobile-card-table tbody td .d-flex,
    .app-mobile-card-table tbody td .btn-group {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .app-mobile-card-table tbody td.app-mobile-card-actions .d-flex,
    .app-mobile-card-table tbody td.app-mobile-card-actions .btn-group,
    .app-mobile-card-table tbody td.app-mobile-card-actions form {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.42rem;
        width: 100%;
    }

    .app-mobile-card-table tbody td.app-mobile-card-actions .form-control,
    .app-mobile-card-table tbody td.app-mobile-card-actions .form-select {
        flex: 1 1 8.5rem;
        min-width: 0;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .pagination .page-link {
        min-width: 2.1rem;
        border-radius: 0.42rem !important;
        text-align: center;
    }

    .wallet-history-card > .card-body {
        padding: 0.85rem;
    }

    .wallet-history-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center !important;
    }

    .wallet-history-actions {
        justify-content: end;
    }

    .wallet-history-mobile-search .table-search-input {
        min-width: 0;
        width: 100%;
    }

    body.app-page-wallet-php #transactionsTable.app-mobile-card-table tbody td:nth-child(3) {
        font-weight: 800;
    }

    body.app-page-wallet-php #transactionsTable.app-mobile-card-table tbody td:nth-child(4) {
        display: block;
        text-align: left;
    }

    body.app-page-wallet-php #transactionsTable.app-mobile-card-table tbody td:nth-child(4)::before {
        display: block;
        margin-bottom: 0.35rem;
    }

    body.app-page-wallet-php #transactionsTable.app-mobile-card-table tbody td:nth-child(4) .btn {
        width: 100%;
        justify-content: center;
    }

    body.app-page-admin-users-php .app-mobile-card-table tbody td:first-child {
        display: block;
        text-align: left;
    }

    body.app-page-admin-users-php .app-mobile-card-table tbody td:first-child::before {
        display: block;
        margin-bottom: 0.35rem;
    }

    body[class*="app-page-admin-"] .card-body > form.row {
        --bs-gutter-y: 0.62rem;
    }

    body[class*="app-page-admin-"] .app-content > h1:first-child {
        margin-bottom: 0.78rem !important;
        font-size: 1.2rem;
        line-height: 1.18;
    }

    body[class*="app-page-admin-"] .app-content > h1:first-child i {
        margin-right: 0.35rem !important;
    }

    body[class*="app-page-admin-"] .card.shadow-sm {
        border-radius: 0.55rem;
    }

    body[class*="app-page-admin-"] .card.shadow-sm > .card-body {
        padding: 0.82rem;
    }

    body[class*="app-page-admin-"] .admin-note-details {
        margin-bottom: 0.75rem !important;
        padding: 0.62rem 0.72rem;
        border-radius: 0.55rem;
    }

    body[class*="app-page-admin-"] .admin-note-details summary {
        font-size: 0.82rem;
        line-height: 1.25;
    }

    body[class*="app-page-admin-"] .admin-note-details-body {
        font-size: 0.74rem;
        line-height: 1.45;
    }

    body[class*="app-page-admin-"] .card-body > .d-flex.justify-content-between,
    body[class*="app-page-admin-"] .card-body > .d-flex.flex-wrap.justify-content-between {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem !important;
        align-items: stretch !important;
    }

    body[class*="app-page-admin-"] .card-body > .d-flex.justify-content-between .btn,
    body[class*="app-page-admin-"] .card-body > .d-flex.flex-wrap.justify-content-between .btn {
        justify-content: center;
    }

    body[class*="app-page-admin-"] .card-body > form.row .btn,
    body[class*="app-page-admin-"] form.card .btn {
        width: 100%;
        justify-content: center;
    }

    body[class*="app-page-admin-"] .card-body > form.row .form-control,
    body[class*="app-page-admin-"] .card-body > form.row .form-select,
    body[class*="app-page-admin-"] form.card .form-control,
    body[class*="app-page-admin-"] form.card .form-select {
        min-width: 0;
    }

    body[class*="app-page-admin-"] .row:has(.card-stat) {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    body[class*="app-page-admin-"] .row:has(.card-stat) > [class*="col-"] {
        flex: 0 0 auto;
        width: 50%;
    }

    body[class*="app-page-admin-"] .admin-form-stat-grid > [class*="col-"] {
        width: 33.333333%;
    }

    body[class*="app-page-admin-"] .row:has(.card-stat) .card-body {
        padding: 0.68rem;
    }

    body[class*="app-page-admin-"] .row:has(.card-stat) .text-muted {
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    body[class*="app-page-admin-"] .row:has(.card-stat) .h4,
    body[class*="app-page-admin-"] .row:has(.card-stat) .h5 {
        font-size: 1.02rem;
    }

    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions .btn,
    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions form,
    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions .d-inline-flex {
        width: 100%;
    }

    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions .d-inline,
    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions .d-inline-flex {
        display: block !important;
        margin-top: 0.42rem;
    }

    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions .row,
    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions .d-grid {
        width: 100%;
    }

    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions input,
    body[class*="app-page-admin-"] .app-mobile-card-table tbody td.app-mobile-card-actions select {
        min-width: 0;
    }

    body.app-page-admin-users-php .app-mobile-card-table tbody td.app-mobile-card-actions form.row,
    body.app-page-admin-profiles-php .app-mobile-card-table tbody td.app-mobile-card-actions form.d-inline-flex,
    body.app-page-admin-deposits-php .app-mobile-card-table tbody td.app-mobile-card-actions form.d-inline-flex {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem !important;
        align-items: stretch !important;
    }

    body.app-page-admin-users-php .app-mobile-card-table tbody td.app-mobile-card-actions form.row .btn,
    body.app-page-admin-profiles-php .app-mobile-card-table tbody td.app-mobile-card-actions form.d-inline-flex .btn,
    body.app-page-admin-deposits-php .app-mobile-card-table tbody td.app-mobile-card-actions form.d-inline-flex .btn {
        width: 100%;
    }
}

[data-theme="dark"] .app-mobile-card-table tbody tr {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.28);
}

[data-theme="dark"] .app-mobile-card-table tbody td + td {
    border-top-color: rgba(148, 163, 184, 0.15);
}

/* Worker health diagnostics */
body.app-page-admin-workers-php .admin-worker-table td {
    vertical-align: top;
}

body.app-page-admin-workers-php .admin-worker-table code,
body.app-page-admin-workers-php .admin-worker-error,
body.app-page-admin-workers-php .admin-worker-source,
body.app-page-admin-workers-php .admin-worker-details {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.app-page-admin-workers-php .admin-worker-detail-badges {
    align-items: flex-start;
}

body.app-page-admin-workers-php .admin-worker-detail-badges .badge {
    white-space: normal;
    text-align: left;
    line-height: 1.25;
}

@media (max-width: 991.98px) {
    body.app-page-admin-workers-php .admin-worker-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    body.app-page-admin-workers-php .admin-worker-table {
        width: 100%;
        min-width: 0 !important;
        margin-bottom: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    body.app-page-admin-workers-php .admin-worker-table thead {
        display: none;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody,
    body.app-page-admin-workers-php .admin-worker-table tr,
    body.app-page-admin-workers-php .admin-worker-table td {
        display: block;
        width: 100%;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody tr {
        margin-bottom: 0.78rem;
        padding: 0.58rem 0.78rem;
        border: 1px solid var(--color-border);
        border-radius: 0.58rem;
        background: var(--color-surface);
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    }

    body.app-page-admin-workers-php .admin-worker-table tbody tr:last-child {
        margin-bottom: 0;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody td {
        display: grid;
        grid-template-columns: minmax(7.4rem, 32%) minmax(0, 1fr);
        gap: 0.65rem;
        align-items: start;
        min-height: 0;
        padding: 0.5rem 0;
        border: 0;
        text-align: left;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody td + td {
        border-top: 1px solid rgba(148, 163, 184, 0.16);
    }

    body.app-page-admin-workers-php .admin-worker-table tbody td::before {
        content: attr(data-mobile-label);
        color: var(--color-muted);
        font-size: 0.68rem;
        font-weight: 800;
        line-height: 1.25;
        text-transform: uppercase;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody td.admin-worker-source,
    body.app-page-admin-workers-php .admin-worker-table tbody td.admin-worker-error,
    body.app-page-admin-workers-php .admin-worker-table tbody td.admin-worker-details {
        display: block;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody td.admin-worker-source::before,
    body.app-page-admin-workers-php .admin-worker-table tbody td.admin-worker-error::before,
    body.app-page-admin-workers-php .admin-worker-table tbody td.admin-worker-details::before {
        display: block;
        margin-bottom: 0.35rem;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody td.admin-worker-name {
        font-size: 1rem;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody td.admin-worker-status .badge {
        justify-self: start;
    }
}

@media (max-width: 575.98px) {
    body.app-page-admin-workers-php .admin-worker-table-card {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody tr {
        padding: 0.52rem 0.68rem;
        border-radius: 0.52rem;
    }

    body.app-page-admin-workers-php .admin-worker-table tbody td {
        grid-template-columns: minmax(5.9rem, 36%) minmax(0, 1fr);
        gap: 0.58rem;
        padding: 0.46rem 0;
    }
}

[data-theme="dark"] .admin-worker-table tbody tr {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.28);
}

[data-theme="dark"] .admin-worker-table tbody td + td {
    border-top-color: rgba(148, 163, 184, 0.15);
}

/* User-facing settings polish */
.settings-page-shell {
    min-width: 0;
}

.settings-summary-copy {
    min-width: 0;
}

.settings-summary-badges {
    flex-wrap: wrap;
}

@media (max-width: 575.98px) {
    .settings-page-header {
        margin-bottom: 0.78rem !important;
    }

    .settings-summary-row {
        margin-bottom: 0.78rem !important;
    }

    .settings-account-info-card {
        display: none;
    }

    .settings-summary-card .card-body {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 0.72rem;
        padding: 0.85rem;
        text-align: left !important;
    }

    .settings-summary-card .settings-avatar-placeholder {
        width: 3.1rem;
        height: 3.1rem;
        margin-bottom: 0 !important;
        font-size: 1.05rem;
    }

    .settings-summary-card h2,
    .settings-summary-card p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .settings-summary-badges {
        justify-content: flex-start !important;
        gap: 0.32rem !important;
    }

    .settings-summary-badges .badge {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .settings-forms-row .card-body {
        padding: 0.9rem;
    }

    .settings-forms-row .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Admin mail settings polish */
.admin-mail-settings-page {
    min-width: 0;
}

.admin-mail-page-header {
    min-width: 0;
}

.admin-mail-page-header > div {
    min-width: 0;
}

.admin-mail-page-header .btn {
    flex-shrink: 0;
}

.admin-mail-debug-details summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.75rem;
    cursor: pointer;
    list-style: none;
}

.admin-mail-debug-details summary::-webkit-details-marker {
    display: none;
}

.admin-mail-debug-details summary::after {
    content: "+";
    display: inline-grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    font-weight: 800;
}

.admin-mail-debug-details[open] summary::after {
    content: "-";
}

.admin-mail-debug-body code,
.admin-mail-preview-card textarea,
.admin-mail-test-debug-card pre {
    overflow-wrap: anywhere;
}

.admin-mail-preview-frame iframe {
    display: block;
    min-height: 680px;
}

@media (max-width: 575.98px) {
    .admin-mail-page-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem !important;
        margin-bottom: 0.78rem !important;
    }

    .admin-mail-page-header h1 {
        font-size: 1.18rem;
    }

    .admin-mail-page-header p {
        font-size: 0.82rem;
    }

    .admin-mail-page-header .btn {
        width: 100%;
        justify-content: center;
    }

    .admin-mail-status-grid {
        --bs-gutter-y: 0.5rem;
        margin-bottom: 0.75rem !important;
    }

    .admin-mail-status-grid .card-body,
    .admin-mail-config-card > .card-body,
    .admin-mail-preview-card > .card-body,
    .admin-mail-test-debug-card > .card-body {
        padding: 0.82rem;
    }

    .admin-mail-status-grid .card-body {
        display: grid;
        grid-template-columns: minmax(5.4rem, 35%) minmax(0, 1fr);
        gap: 0.35rem 0.7rem;
        align-items: center;
    }

    .admin-mail-status-grid .text-muted.small:first-child {
        grid-row: 1 / span 2;
        align-self: start;
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .admin-mail-status-grid .h5 {
        margin-bottom: 0 !important;
        font-size: 0.95rem;
    }

    .admin-mail-status-grid .small.text-muted:last-child {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .admin-mail-config-card .row,
    .admin-mail-preview-card .row {
        --bs-gutter-y: 0.72rem;
    }

    .admin-mail-config-card .alert,
    .admin-mail-preview-card .card {
        border-radius: 0.5rem;
    }

    .admin-mail-debug-details summary {
        justify-content: flex-start;
    }

    .admin-mail-debug-details summary::after {
        margin-left: auto;
    }

    .admin-mail-config-card .input-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem;
    }

    .admin-mail-config-card .input-group > .form-control,
    .admin-mail-config-card .input-group > .btn {
        width: 100%;
        border-radius: var(--bs-border-radius) !important;
    }

    .admin-mail-config-card .d-flex.mt-4,
    .admin-mail-preview-picker {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem !important;
    }

    .admin-mail-config-card .d-flex.mt-4 .btn,
    .admin-mail-preview-picker .btn,
    .admin-mail-preview-picker select {
        width: 100%;
    }

    .admin-mail-preview-card h2 {
        font-size: 1rem;
    }

    .admin-mail-preview-frame iframe {
        min-height: 430px;
    }

    .admin-mail-preview-card textarea {
        min-height: 9rem;
        font-size: 0.72rem;
    }
}

/* Cross-page mobile UX polish */
.app-list-page,
.faq-page-shell,
.referral-page-shell,
.social-media-page-shell {
    min-width: 0;
}

.app-list-page-header > div,
.faq-page-header > div,
.referral-page-header > div,
.social-media-hero-card .card-body > .d-flex > div {
    min-width: 0;
}

.app-list-feed-copy {
    flex: 1 1 14rem;
    min-width: 0;
}

.app-list-feed-title {
    flex-wrap: wrap;
}

.app-list-feed-title strong,
.app-list-feed-copy,
.referral-invite-card input,
.social-media-results-table input {
    overflow-wrap: anywhere;
}

.app-list-feed-actions {
    flex-shrink: 0;
}

.faq-topic-link {
    min-height: 3.2rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.faq-topic-link:hover,
.faq-topic-link:focus {
    border-color: rgba(var(--color-primary-rgb), 0.4) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.referral-link-group .form-control {
    min-width: 0;
    text-overflow: ellipsis;
}

.social-media-results-table .input-group {
    min-width: 12rem;
}

@media (max-width: 575.98px) {
    .app-list-page-header,
    .faq-page-header,
    .referral-page-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem !important;
        margin-bottom: 0.78rem !important;
    }

    .app-list-page-header h1,
    .faq-page-header h1,
    .referral-page-header h1,
    .social-media-hero-card h1 {
        font-size: 1.16rem !important;
        line-height: 1.22;
    }

    .app-list-page-header p,
    .faq-page-header p,
    .referral-page-header p,
    .social-media-hero-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .app-list-page-actions {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        width: 100%;
    }

    .app-list-page-actions form,
    .app-list-page-actions .btn,
    .faq-page-header .btn,
    .referral-page-header .btn {
        width: 100%;
    }

    .app-list-feed-card .card-body {
        padding: 0;
    }

    .app-list-feed-item {
        padding: 0.78rem !important;
    }

    .app-list-feed-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem !important;
    }

    .app-list-feed-copy {
        padding-right: 0 !important;
    }

    .app-list-feed-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .app-list-feed-actions .btn,
    .app-list-feed-actions form,
    .app-list-feed-actions form .btn {
        width: 100%;
        justify-content: center;
    }

    .faq-topic-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.52rem;
        margin-right: -0.75rem;
        margin-left: -0.15rem;
        padding: 0 0.75rem 0.3rem 0.15rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .faq-topic-grid > [class*="col-"] {
        flex: 0 0 11.25rem;
        width: 11.25rem;
        max-width: none;
        padding: 0;
        scroll-snap-align: start;
    }

    .faq-topic-link {
        padding: 0.72rem !important;
        min-height: 2.8rem;
    }

    .faq-section-card {
        margin-bottom: 0.7rem !important;
    }

    .faq-section-card .card-header {
        padding: 0.78rem;
    }

    .faq-section-card .accordion-button {
        align-items: flex-start;
        gap: 0.45rem;
        padding: 0.78rem;
        font-size: 0.86rem;
        line-height: 1.35;
    }

    .faq-section-card .accordion-button i {
        margin-top: 0.08rem;
    }

    .faq-section-card .accordion-body {
        padding: 0.78rem;
        font-size: 0.84rem;
    }

    .faq-side-rail .card {
        margin-bottom: 0.7rem !important;
    }

    .faq-side-rail .card-header,
    .faq-side-rail .card-body {
        padding: 0.78rem;
    }

    .referral-stats-grid {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
        margin-bottom: 0.78rem !important;
    }

    .referral-stats-grid > [class*="col-"] {
        flex: 0 0 auto;
        width: 50%;
    }

    .referral-stats-grid .card-body {
        padding: 0.72rem;
    }

    .referral-stats-grid .h4 {
        font-size: 1rem;
    }

    .referral-invite-card,
    .referral-main-grid,
    .referral-history-grid {
        margin-bottom: 0.78rem !important;
    }

    .referral-invite-card .card-body,
    .referral-withdraw-card .card-body,
    .referral-table-card .card-body {
        padding: 0.85rem;
    }

    .referral-link-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem;
    }

    .referral-link-group .form-control,
    .referral-link-group .btn {
        width: 100%;
        border-radius: var(--bs-border-radius) !important;
    }

    .referral-withdraw-card form .d-flex {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem !important;
    }

    .referral-withdraw-card .btn {
        width: 100%;
        justify-content: center;
    }

    .social-media-hero-card {
        margin-bottom: 0.78rem !important;
    }

    .social-media-hero-card .card-body {
        padding: 0.85rem !important;
    }

    .social-media-hero-card .card-body > .d-flex {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.6rem !important;
        margin-bottom: 0.72rem !important;
    }

    .social-media-hero-card .btn {
        width: 100%;
        justify-content: center;
    }

    .social-media-kpi {
        padding: 0.44rem 0.5rem;
        border-radius: 0.5rem;
    }

    .social-media-results-table.app-mobile-card-table tbody td:nth-child(3) {
        display: block;
        text-align: left;
    }

    .social-media-results-table.app-mobile-card-table tbody td:nth-child(3)::before {
        display: block;
        margin-bottom: 0.45rem;
    }

    .social-media-results-table .input-group {
        min-width: 0;
        width: 100%;
    }

    .social-media-results-table .input-group .btn {
        flex: 0 0 auto;
    }
}

/* Marketplace UX refinement */
body.app-page-premade-profiles-php .marketplace-page-shell {
    gap: 0.85rem;
}

body.app-page-premade-profiles-php .marketplace-toolbar-controls {
    display: grid;
    grid-template-columns: minmax(18rem, 26rem) minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
}

body.app-page-premade-profiles-php .marketplace-filter-strip {
    min-width: 0;
    justify-content: flex-end;
}

body.app-page-premade-profiles-php .marketplace-grid .profile-fb-card {
    border-radius: 0.65rem;
}

body.app-page-premade-profiles-php .marketplace-card-item .profile-info-block-top {
    margin-top: 0.7rem;
}

body.app-page-premade-profiles-php .marketplace-card-item .profile-feed-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
    gap: 0.48rem;
}

body.app-page-premade-profiles-php .marketplace-card-item .profile-feed-actions form,
body.app-page-premade-profiles-php .marketplace-card-item .profile-feed-actions .btn {
    min-width: 0;
}

body.app-page-premade-profiles-php .marketplace-empty-state {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem 1rem;
    align-items: center;
    border-style: solid;
    border-radius: 0.65rem;
    background:
        linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.055), rgba(15, 118, 110, 0.045)),
        var(--color-surface);
    padding: 1.05rem;
    text-align: left;
}

body.app-page-premade-profiles-php .marketplace-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(var(--color-primary-rgb), 0.24);
    border-radius: 0.65rem;
    background: rgba(var(--color-primary-rgb), 0.09);
    color: var(--color-primary);
    font-size: 1.25rem;
}

body.app-page-premade-profiles-php .marketplace-empty-copy {
    min-width: 0;
}

body.app-page-premade-profiles-php .marketplace-empty-actions {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
}

body.app-page-premade-profiles-php .marketplace-empty-actions .btn {
    justify-content: center;
}

body.app-page-premade-profiles-php .marketplace-empty-checklist {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

body.app-page-premade-profiles-php .marketplace-empty-checklist span {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 0.55rem;
    background: var(--color-surface-soft);
    color: var(--color-muted);
    padding: 0.52rem 0.62rem;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
}

body.app-page-premade-profiles-php .marketplace-empty-checklist i {
    flex: 0 0 auto;
    color: var(--color-primary);
}

body.app-page-premade-profiles-php .marketplace-empty-state-compact {
    justify-items: center;
    text-align: center;
}

[data-theme="dark"] .marketplace-empty-state {
    background:
        linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.09), rgba(45, 212, 191, 0.055)),
        var(--color-surface);
}

@media (max-width: 991.98px) {
    body.app-page-premade-profiles-php .marketplace-toolbar-controls {
        grid-template-columns: 1fr;
    }

    body.app-page-premade-profiles-php .marketplace-filter-strip {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    body.app-page-premade-profiles-php .profile-control-card.marketplace-hero {
        gap: 0.58rem;
        margin-bottom: 0 !important;
        padding: 0.78rem;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-section-kicker {
        font-size: 0.68rem;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-title-row {
        display: grid;
        gap: 0.42rem;
        margin-top: 0.34rem;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-title {
        font-size: 1.32rem;
        line-height: 1.08;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-copy {
        display: none;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-health-badge {
        justify-self: start;
        padding: 0.32rem 0.52rem;
        font-size: 0.72rem;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        margin-top: 0.62rem;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-actions .btn {
        min-height: 2.34rem;
        border-radius: 0.5rem;
        padding-inline: 0.48rem;
        font-size: 0.86rem;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-chip-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
        margin-top: 0.62rem;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-chip {
        justify-content: space-between;
        border-radius: 0.5rem;
        padding: 0.36rem 0.48rem;
        overflow: hidden;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-chip:nth-child(n+5) {
        display: none;
    }

    body.app-page-premade-profiles-php .marketplace-hero-panel {
        display: none;
    }

    body.app-page-premade-profiles-php .marketplace-admin-note {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.45rem;
        align-items: start;
        margin-bottom: 0 !important;
        padding: 0.62rem 0.72rem !important;
        font-size: 0.8rem;
        line-height: 1.35;
    }

    body.app-page-premade-profiles-php .marketplace-admin-note i {
        margin-right: 0 !important;
        margin-top: 0.08rem;
    }

    body.app-page-premade-profiles-php .marketplace-toolbar {
        margin-bottom: 0 !important;
        padding: 0.68rem;
    }

    body.app-page-premade-profiles-php .marketplace-toolbar-head {
        gap: 0.5rem;
        margin-bottom: 0.55rem;
    }

    body.app-page-premade-profiles-php .marketplace-toolbar-head .profile-section-copy {
        display: none;
    }

    body.app-page-premade-profiles-php .marketplace-toolbar-controls {
        gap: 0.55rem;
    }

    body.app-page-premade-profiles-php .marketplace-search-wrap .input-group-text,
    body.app-page-premade-profiles-php .marketplace-search-wrap .form-control {
        min-height: 2.42rem;
    }

    body.app-page-premade-profiles-php .marketplace-filter-strip {
        display: flex !important;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.42rem;
        margin-inline: -0.05rem;
        overflow-x: auto;
        padding: 0.02rem 0.05rem 0.22rem;
        scrollbar-width: thin;
    }

    body.app-page-premade-profiles-php .marketplace-filter-btn {
        flex: 0 0 auto;
        width: auto !important;
        min-width: 7.15rem;
        justify-content: center;
        white-space: nowrap;
    }

    body.app-page-premade-profiles-php .marketplace-grid-shell {
        margin-bottom: 0.8rem;
    }

    body.app-page-premade-profiles-php .marketplace-grid-shell .profile-live-head {
        padding: 0.68rem;
    }

    body.app-page-premade-profiles-php .marketplace-grid-shell .profile-section-copy {
        display: none;
    }

    body.app-page-premade-profiles-php .marketplace-empty-state {
        gap: 0.72rem;
        padding: 0.82rem;
    }

    body.app-page-premade-profiles-php .marketplace-empty-checklist {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    body.app-page-premade-profiles-php .marketplace-page-shell {
        gap: 0.68rem;
    }

    body.app-page-premade-profiles-php .marketplace-hero .profile-hero-actions .btn {
        width: 100%;
    }

    body.app-page-premade-profiles-php .marketplace-empty-state {
        grid-template-columns: 1fr;
    }

    body.app-page-premade-profiles-php .marketplace-empty-icon {
        width: 2.6rem;
        height: 2.6rem;
        font-size: 1.08rem;
    }

    body.app-page-premade-profiles-php .marketplace-empty-actions {
        grid-column: 1;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    body.app-page-premade-profiles-php .marketplace-empty-actions .btn {
        width: 100%;
    }
}

/* ===== Sidebar menu UI/UX (desktop collapse, mobile offcanvas, a11y) ===== */

.app-sidebar-toggle {
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 0.55rem;
    background: transparent;
    color: var(--sidebar-text);
    font-size: 0.78rem;
}

.app-sidebar-toggle:hover {
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary-hover);
    border-color: rgba(var(--color-primary-rgb), 0.3);
}

.app-sidebar-toggle i {
    line-height: 1;
}

[data-theme="dark"] .app-sidebar-toggle {
    border-color: rgba(148, 163, 184, 0.24);
    color: #cbd5e1;
}

[data-theme="dark"] .app-sidebar-toggle:hover {
    background: rgba(var(--color-primary-rgb), 0.24);
    color: #fff;
}

.app-nav .nav-link:focus-visible,
.app-mobile-bottom-link:focus-visible,
.app-sidebar-toggle:focus-visible,
.app-sidebar-balance:focus-visible {
    outline: 2px solid rgba(var(--color-primary-rgb), 0.65);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
    .app-shell {
        transition: grid-template-columns 0.18s ease;
    }

    .app-sidebar-toggle i {
        transition: transform 0.18s ease;
    }
}

@media (min-width: 992px) {
    body.app-body.app-sidebar-collapsed .app-shell {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    body.app-sidebar-collapsed .app-sidebar {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    body.app-sidebar-collapsed .app-sidebar-head-row {
        flex-direction: column;
        justify-content: center;
    }

    body.app-sidebar-collapsed .app-logo {
        margin-bottom: 0;
    }

    body.app-sidebar-collapsed .app-logo > span:not(.app-logo-mark),
    body.app-sidebar-collapsed .app-sidebar-subtitle,
    body.app-sidebar-collapsed .app-sidebar-label,
    body.app-sidebar-collapsed .app-nav .nav-link span,
    body.app-sidebar-collapsed .app-sidebar-balance span,
    body.app-sidebar-collapsed .app-sidebar-user-label,
    body.app-sidebar-collapsed .app-sidebar-user-meta,
    body.app-sidebar-collapsed .app-sidebar-foot .btn span {
        display: none;
    }

    body.app-sidebar-collapsed .app-sidebar-toggle i {
        transform: rotate(180deg);
    }

    body.app-sidebar-collapsed .app-nav .nav-link {
        justify-content: center;
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }

    body.app-sidebar-collapsed .app-sidebar-balance {
        justify-content: center;
        padding-left: 0.3rem;
        padding-right: 0.3rem;
    }

    body.app-sidebar-collapsed .app-sidebar-user {
        justify-content: center;
    }

    body.app-sidebar-collapsed .app-sidebar-foot {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    body.app-sidebar-collapsed .app-sidebar-foot .btn i {
        margin-right: 0 !important;
    }
}

.app-offcanvas {
    --bs-offcanvas-width: min(21rem, 88vw);
}

.app-offcanvas .app-nav .nav-link {
    padding-top: 0.68rem;
    padding-bottom: 0.68rem;
}

.app-offcanvas-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.app-offcanvas-user-meta {
    min-width: 0;
    flex: 1;
}

.app-offcanvas-balance {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
    flex-shrink: 0;
}

[data-theme="dark"] .app-offcanvas-user {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

/* ===== Mobile bottom nav UX (active pill, press feedback, hide-on-scroll) ===== */

.app-mobile-bottom-nav {
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.22s ease;
}

body.app-bottom-nav-hidden .app-mobile-bottom-nav {
    transform: translateY(calc(100% + env(safe-area-inset-bottom) + 4px));
}

.app-mobile-new-profile-fab {
    transition: transform 0.22s ease, opacity 0.22s ease;
}

body.app-bottom-nav-hidden .app-mobile-new-profile-fab {
    transform: translateY(9rem);
    opacity: 0;
    pointer-events: none;
}

/* Active item: the icon sits in a primary pill instead of a full-cell wash. */
.app-mobile-bottom-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.1rem;
    height: 1.55rem;
    border-radius: 999px;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.app-mobile-bottom-link:hover,
.app-mobile-bottom-link:focus,
.app-mobile-bottom-link.active,
[data-theme="dark"] .app-mobile-bottom-link:hover,
[data-theme="dark"] .app-mobile-bottom-link:focus,
[data-theme="dark"] .app-mobile-bottom-link.active {
    background: transparent;
}

.app-mobile-bottom-link.active::after {
    display: none;
}

.app-mobile-bottom-link:hover i,
.app-mobile-bottom-link:focus-visible i {
    background: rgba(var(--color-primary-rgb), 0.12);
}

.app-mobile-bottom-link.active i,
[data-theme="dark"] .app-mobile-bottom-link.active i {
    background: linear-gradient(145deg, var(--color-primary), var(--color-primary-hover));
    color: #fff;
    box-shadow: 0 6px 14px rgba(var(--color-primary-rgb), 0.3);
}

.app-mobile-bottom-link.active span {
    font-weight: 800;
}

.app-mobile-bottom-link {
    transition: transform 0.12s ease, color 0.18s ease;
}

.app-mobile-bottom-link:active {
    transform: scale(0.9);
}

@media (prefers-reduced-motion: reduce) {
    .app-mobile-bottom-nav,
    .app-mobile-new-profile-fab,
    .app-mobile-bottom-link,
    .app-mobile-bottom-link i {
        transition: none;
    }
}

/* ===== Insurance plans (subscriptions.php) UX pass ===== */

.subs-feature-item.is-key {
    border-color: rgba(var(--color-primary-rgb), 0.28);
    background: rgba(var(--color-primary-rgb), 0.08);
}

.subs-feature-item.is-key strong {
    color: var(--color-primary-hover);
    font-size: 0.98rem;
}

[data-theme="dark"] .subs-feature-item.is-key {
    border-color: rgba(var(--color-primary-rgb), 0.4);
    background: rgba(var(--color-primary-rgb), 0.16);
}

[data-theme="dark"] .subs-feature-item.is-key strong {
    color: #93c5fd;
}

.subs-balance-note {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.subs-balance-note.is-ok {
    color: var(--color-muted);
}

.subs-balance-note.is-short {
    color: #b45309;
}

[data-theme="dark"] .subs-balance-note.is-short {
    color: #fbbf24;
}

.subs-plan-card.is-current .subs-plan-badge {
    background: #059669;
}

@media (max-width: 991.98px) {
    .subs-col-featured {
        order: -1;
    }
}

.subs-faq-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.subs-faq-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    border: 1px solid var(--color-border);
    border-radius: 0.9rem;
    background: var(--color-surface);
    padding: 0.8rem 0.9rem;
    font-size: 0.84rem;
}

.subs-faq-item i {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
}

.subs-faq-item strong {
    display: block;
    color: var(--color-text);
    margin-bottom: 0.12rem;
}

.subs-faq-item span {
    color: var(--color-muted);
    line-height: 1.45;
}

[data-theme="dark"] .subs-faq-item {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 767.98px) {
    .subs-faq-strip {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== Back-to-top pill ===== */

.app-back-to-top {
    position: fixed;
    left: max(0.75rem, env(safe-area-inset-left));
    bottom: max(5.15rem, calc(env(safe-area-inset-bottom) + 4.75rem));
    z-index: 1090;
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(0.8rem);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.app-back-to-top:hover {
    color: var(--color-primary);
    border-color: rgba(var(--color-primary-rgb), 0.4);
}

body.modal-open .app-back-to-top {
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 992px) {
    .app-back-to-top {
        left: auto;
        right: 1.25rem;
        bottom: 1.25rem;
    }
}

[data-theme="dark"] .app-back-to-top {
    background: var(--color-surface);
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .app-back-to-top {
        transition: none;
    }
}

/* ===== FAQ search ===== */

.faq-search-card:focus-within {
    border-color: rgba(var(--color-primary-rgb), 0.45);
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.12);
}

.faq-search-card .form-control {
    background: transparent;
}

[data-theme="dark"] .faq-search-card:focus-within {
    border-color: rgba(var(--color-primary-rgb), 0.55);
}
