:root {
    --bg-main: #f3f6fb;
    --bg-surface: #ffffff;
    --bg-soft: #f8fafc;
    --text-main: #172033;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --border-color: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --success: #059669;
    --success-soft: #ecfdf5;
    --warning: #d97706;
    --warning-soft: #fff7ed;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
    --radius: 8px;
    --sidebar-width: 288px;
    --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dark-mode {
    --bg-main: #0f172a;
    --bg-surface: #111827;
    --bg-soft: #172033;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-dim: #94a3b8;
    --border-color: #253349;
    --primary-soft: rgba(37, 99, 235, 0.16);
    --success-soft: rgba(5, 150, 105, 0.14);
    --warning-soft: rgba(217, 119, 6, 0.14);
    --danger-soft: rgba(220, 38, 38, 0.14);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    top: 0 !important;
    margin: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

button,
input,
textarea {
    font: inherit;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 18px;
    z-index: 1000;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.brand-name {
    color: var(--text-main);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}

.nav-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 2px 16px 0;
}

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

.nav-section-title {
    margin: 14px 10px 6px;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.nav-link,
.platform-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    color: var(--text-muted);
    background: transparent;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-link i {
    width: 18px;
    text-align: center;
}

.nav-link:hover,
.platform-header:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

.platform-header {
    justify-content: space-between;
}

.platform-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.platform-name img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 5px;
    flex: 0 0 auto;
    filter: none !important;
    opacity: 1 !important;
}

.platform-name i {
    font-size: 16px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

/* Color definitions for non-image FontAwesome icons */
.platform-name i.fa-facebook { color: #1877f2 !important; }
.platform-name i.fa-tiktok { color: #00f2fe !important; text-shadow: 1px 1px 0 #fe0979; }
.platform-name i.fa-instagram { color: #e1306c !important; }
.platform-name i.fa-youtube { color: #ff0000 !important; }
.platform-name i.fa-telegram { color: #0088cc !important; }
.platform-name i.fa-threads { color: #000000 !important; }
.platform-name i.fa-spotify { color: #1db954 !important; }
.platform-name i.fa-x-twitter { color: #1da1f2 !important; }
.platform-name i.fa-google { color: #ea4335 !important; }
.platform-name i.fa-store { color: #0f146d !important; }
.platform-name i.fa-bag-shopping { color: #ee4d2d !important; }
.platform-name i.fa-gift { color: #f59e0b !important; }
.platform-name i.fa-atom { color: #3b82f6 !important; }
.platform-name i.fa-comment-dots { color: #0068ff !important; }
.platform-name i.fa-globe { color: #10b981 !important; }
.platform-name i.fa-layer-group { color: #8b5cf6 !important; }

.platform-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chevron {
    font-size: 12px;
    transition: transform .2s ease;
}

.platform-accordion.expanded .chevron,
.nav-accordion.expanded .chevron {
    transform: rotate(180deg);
}

.platform-sub-menu,
.nav-submenu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0 8px 14px;
}

.platform-accordion.expanded .platform-sub-menu,
.nav-accordion.expanded .nav-submenu {
    display: flex;
}

.platform-sub-menu a,
.nav-submenu a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    color: var(--text-muted);
    padding: 8px 10px;
    border-left: 2px solid var(--border-color);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    word-break: break-word;
    white-space: normal;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.platform-sub-menu a:hover,
.nav-submenu a:hover {
    color: var(--primary);
    border-left-color: var(--primary);
    background: var(--primary-soft);
}

.platform-sub-menu a.active,
.nav-submenu a.active {
    color: #2563eb !important;
    border-left: 3px solid #2563eb !important;
    background: rgba(37, 99, 235, 0.14) !important;
    font-weight: 700 !important;
}

body.dark-mode .platform-sub-menu a.active,
body.dark-mode .nav-submenu a.active {
    color: #60a5fa !important;
    border-left-color: #60a5fa !important;
    background: rgba(37, 99, 235, 0.28) !important;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
}

.user-brief {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-brief strong {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-brief span {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: capitalize;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible !important;
    min-height: 72px;
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
}

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

.topbar-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 2px 4px;
    text-decoration: none;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.topbar-logo:hover {
    transform: scale(1.04);
}

.topbar-logo img {
    height: 32px;
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.topbar-title-wrap {
    min-width: 0;
}

.topbar h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.topbar p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-muted);
    background: var(--bg-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

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

.sidebar-toggle {
    display: none;
}

.balance-pill,
.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 14px;
}

.balance-pill {
    padding: 0 14px;
    color: #075985;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.logout-link {
    padding: 0 12px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.logout-link:hover {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: transparent;
}

.content-container {
    padding: 28px;
}

.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 22px;
}

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

.panel-header.compact {
    margin-bottom: 12px;
}

.panel-header h2 {
    margin: 2px 0 0;
    font-size: 22px;
    line-height: 1.25;
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.panel-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 18px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px;
}

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

.page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.page-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-muted);
    background: var(--bg-surface);
    font-size: 14px;
    font-weight: 800;
}

.page-tab.active,
.page-tab:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

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

.order-panel {
    margin-bottom: 0;
}

.order-aside {
    position: -webkit-sticky;
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: fit-content;
    align-self: start;
}

.form-group {
    margin-bottom: 18px;
}

.list-group-item {
    padding: 4px 8px !important;
    line-height: 1.25em !important;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    display: block;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.form-label span {
    color: var(--danger);
}

.form-control {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-main);
    padding: 10px 12px;
    outline: none;
    transition: border .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.form-control[readonly] {
    background: var(--bg-soft);
    cursor: default;
}

.input-hint {
    color: var(--success);
    font-size: 12px;
    font-weight: 800;
    margin-top: 6px;
}

.server-note {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 18px;
    max-height: 260px;
    overflow: auto;
    overflow-x: hidden;
    line-height: 1.5;
    font-size: 14px;
    word-break: break-word;
}

.server-note strong {
    display: block;
    margin-bottom: 8px;
    color: #1e3a8a;
}

.server-note p {
    margin: 0 0 8px;
}

.server-note p:last-child {
    margin-bottom: 0;
}

.server-note ul,
.server-note ol {
    margin: 8px 0;
    padding-left: 20px;
}

.server-note li {
    margin-bottom: 6px;
}

.server-note a {
    color: var(--primary) !important;
    font-weight: 700;
    text-decoration: underline;
}

body.dark-mode .server-note {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.1);
    color: #93c5fd;
}

body.dark-mode .server-note strong {
    color: #60a5fa;
}

.server-note * {
    background: transparent !important;
    color: inherit !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: none !important;
}

body.dark-mode .server-note * {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.server-note .card {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.server-note .card-body {
    padding: 6px 0 !important;
    background: transparent !important;
}

.server-note ul.list-group {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.server-note li.list-group-item {
    background: transparent !important;
    padding: 4px 0 !important;
    border: 0 !important;
    line-height: 1.4 !important;
}

.server-note .text-danger,
.server-note .text-danger *,
.server-note [class*="danger"],
.server-note [class*="danger"] * {
    color: #ef4444 !important;
}

.option-fields {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 14px;
    margin-bottom: 16px;
}

.server-radio-container {
    display: grid;
    gap: 8px;
}

.server-card {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-surface);
    cursor: pointer;
    transition: border .18s ease, background .18s ease, box-shadow .18s ease;
}

.server-card:hover {
    border-color: #b6c3d4;
    background: var(--bg-soft);
}

.server-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 1px var(--primary);
}

.server-card input {
    display: none;
}

.server-radio-indicator {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    border-radius: 50%;
    border: 2px solid #b6c3d4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.server-card.selected .server-radio-indicator {
    border-color: var(--primary);
}

.server-card.selected .server-radio-indicator::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.server-card-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.server-title {
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.server-title b {
    color: var(--primary);
}

.server-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.badge-rate,
.badge-speed,
.badge-success-soft,
.badge-warning-soft {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}

.badge-rate {
    color: #ffffff;
    background: var(--primary);
}

.badge-speed {
    color: var(--text-muted);
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
}

.badge-success-soft {
    color: var(--success);
    background: var(--success-soft);
}

.badge-warning-soft {
    color: var(--warning);
    background: var(--warning-soft);
}

.toggle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    color: var(--text-muted);
    background: var(--bg-soft);
    font-size: 13px;
    font-weight: 700;
}

.toggle-option span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.toggle-option small {
    color: var(--text-dim);
    white-space: nowrap;
}

.toggle-option input {
    width: 16px;
    height: 16px;
}

.estimation-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 14px;
    margin-bottom: 18px;
}

.estimation-row,
.estimation-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.estimation-row {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.estimation-total-row {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    font-size: 16px;
}

.estimation-total-row strong {
    color: var(--primary);
    font-size: 20px;
}

.btn {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

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

.btn:disabled {
    background: var(--text-dim);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-success {
    background: var(--success);
    box-shadow: none;
}

.btn-warning {
    background: var(--warning);
    box-shadow: none;
}

.warning-panel {
    background: var(--warning-soft);
    border-color: color-mix(in srgb, var(--warning) 30%, var(--border-color));
}

.notice-panel {
    border-left: 4px solid var(--primary);
}

.support-panel p,
.rich-note {
    color: var(--text-muted);
    font-size: 14px;
}

.note-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 14px;
}

.note-list li {
    margin-bottom: 9px;
}

.bank-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 18px;
}

.qr-box {
    text-align: center;
}

.qr-box img {
    width: 190px;
    height: 190px;
    border: 8px solid #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

.qr-box span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.bank-info {
    display: grid;
    gap: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    color: var(--text-muted);
}

.info-row strong {
    color: var(--text-main);
    text-align: right;
}

.transfer-content span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.copy-box {
    width: 100%;
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.danger-text {
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
    margin: 0;
}

.promo-banner {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--success);
    background: var(--success-soft);
    border: 1px solid color-mix(in srgb, var(--success) 25%, var(--border-color));
    border-radius: var(--radius);
    padding: 14px;
    font-size: 14px;
}

.promo-banner i {
    font-size: 20px;
}

.pricing-note {
    color: var(--text-muted);
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 20px;
}

.pricing-platform {
    margin-top: 24px;
}

.pricing-platform h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--primary);
    font-size: 20px;
}

.category-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.category-block h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 20px;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.custom-table th {
    text-align: left;
    background: var(--bg-soft);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.custom-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    color: var(--text-main);
    font-size: 13px;
    vertical-align: middle;
}

.custom-table tr:hover td {
    background: var(--bg-soft);
}

.table-service {
    min-width: 240px;
    font-weight: 700;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-pending {
    background: #fef3c7;
    color: #a16207;
}

.badge-processing {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-completed {
    background: #d1fae5;
    color: #047857;
}

.badge-canceled {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-partial {
    background: #ede9fe;
    color: #6d28d9;
}

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

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

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

.break-word {
    word-break: break-all;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ==========================================
   PILL SELECT WRAPPERS (LANGUAGE & CURRENCY)
   ========================================== */
.pill-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius, 10px);
    background: var(--bg-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    height: 40px;
    flex-shrink: 0;
}

.pill-select-wrapper:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.pill-select-wrapper .select-icon {
    position: absolute;
    left: 11px;
    font-size: 13px;
    color: #2563eb;
    pointer-events: none;
    z-index: 2;
}

body.dark-mode .pill-select-wrapper .select-icon {
    color: #60a5fa;
}

.currency-pill,
.language-pill {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    padding: 0 24px 0 32px;
    height: 100%;
    cursor: pointer;
    outline: none;
    border-radius: var(--radius, 10px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 7px center;
    background-size: 11px;
}

body.dark-mode .currency-pill,
body.dark-mode .language-pill {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.currency-pill option,
.language-pill option {
    background-color: var(--bg-surface, #0f172a);
    color: var(--text-main, #f8fafc);
    font-weight: 600;
    padding: 8px;
}

.google-language,
.header-actions {
    position: relative;
}

.public-language,
.public-currency {
    width: auto;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.14);
}

/* RESPONSIVE HEADER SELECT PILLS: DISPLAY FLAG & CURRENCY SYMBOL LOGOS ON COMPACT SCREENS */
@media (max-width: 992px) {
    .pill-select-wrapper {
        min-width: 44px !important;
        height: 38px !important;
        padding: 0 2px !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
    }

    .pill-select-wrapper .select-icon {
        display: none !important;
    }

    .currency-pill,
    .language-pill,
    .public-currency,
    .public-language {
        width: 100% !important;
        min-width: 44px !important;
        height: 38px !important;
        padding: 0 14px 0 6px !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        color: var(--text-main) !important;
        text-align: center !important;
        text-align-last: center !important;
        background-position: right 3px center !important;
        background-size: 9px !important;
    }

    .currency-pill option,
    .language-pill option,
    .public-currency option,
    .public-language option {
        font-size: 13px !important;
        color: #f8fafc !important;
        background-color: #0f172a !important;
        text-align: left !important;
    }
}

#google_translate_element,
.goog-te-banner-frame,
.goog-te-gadget,
.skiptranslate iframe,
body>.skiptranslate {
    display: none !important;
}

/* Final header responsive overrides */
@media (max-width: 1024px) {
    .topbar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 6px !important;
        padding: 0 10px !important;
        height: 56px !important;
        min-height: 56px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .topbar-left {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }

    .topbar-actions {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex-shrink: 0 !important;
    }

    .balance-pill-compact {
        height: 32px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
        gap: 5px !important;
    }

    .icon-btn-clean {
        width: 32px !important;
        height: 32px !important;
    }

    .avatar-circle-blue {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
    }

    .profile-username-text {
        display: none !important;
    }

    .pill-select-wrapper.google-language,
    .pill-select-wrapper.currency-select-wrapper {
        height: 32px !important;
    }

    .language-pill,
    .currency-pill {
        font-size: 12px !important;
        padding: 0 6px !important;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 10px !important;
    }

    .topbar p {
        display: none !important;
    }

    .topbar h1 {
        font-size: 16px !important;
    }

    .topbar-actions {
        display: grid !important;
        grid-template-columns: 1fr repeat(4, 40px);
        overflow: visible;
        align-items: center;
    }

    .topbar-actions .balance-pill {
        width: 100%;
        min-width: 0;
        max-width: none;
        justify-content: center;
        padding: 0 10px;
    }

    .topbar-actions .balance-pill span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-actions .language-pill {
        width: 40px;
        min-width: 40px;
        padding: 0 4px;
        text-align: center;
    }

    .topbar-actions .profile-trigger {
        width: 40px;
        justify-content: center;
    }

    .topbar-actions .profile-trigger strong {
        display: none;
    }
}

@media (max-width: 420px) {
    .topbar-actions {
        grid-template-columns: 1fr repeat(3, 40px);
    }

    .topbar-actions .theme-toggle {
        display: none;
    }
}

/* Responsive polish: laptop, tablet, mobile */
@media (max-width: 1366px) {
    :root {
        --sidebar-width: 260px;
    }

    .sidebar {
        padding: 14px;
    }

    .content-container {
        padding: 22px;
    }

    .topbar {
        padding: 12px 22px;
    }

    .order-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .server-card {
        min-height: 54px !important;
        padding: 9px 11px !important;
    }
}

@media (max-width: 1180px) {

    .order-layout,
    .deposit-layout,
    .profile-layout,
    .dashboard-grid-2,
    .admin-grid {
        grid-template-columns: 1fr !important;
    }

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

    .order-aside .panel {
        margin-bottom: 0;
    }

    .bank-card {
        grid-template-columns: 180px 1fr;
    }
}

@media (max-width: 1024px) {
    .topbar {
        align-items: flex-start;
        flex-wrap: wrap;
        min-height: auto;
    }

    .topbar-left {
        flex: 1 1 420px;
    }

    .topbar-actions {
        flex: 1 1 100%;
        justify-content: flex-start;
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding-bottom: 2px;
    }

    .panel {
        padding: 18px;
    }

    .custom-table {
        min-width: 720px;
    }

    .method-grid,
    .promo-grid,
    .stats-grid,
    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .sidebar {
        width: min(88vw, 320px);
    }

    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .topbar {
        position: sticky;
        padding: 10px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 56px;
        gap: 12px;
    }

    .topbar-left {
        width: auto;
        flex: 1 1 auto;
        gap: 10px;
        display: flex;
        align-items: center;
    }

    .topbar-left p {
        display: none !important;
    }

    .topbar h1 {
        max-width: calc(100vw - 220px);
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
    }

    .topbar-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    .balance-pill {
        max-width: 140px;
        overflow: hidden;
        min-height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

    .balance-pill span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .icon-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .language-pill {
        min-height: 36px !important;
        font-size: 12.5px !important;
    }

    .user-avatar.small {
        width: 32px !important;
        height: 32px !important;
    }

    .content-container {
        padding: 14px;
    }

    .order-aside,
    .form-grid,
    .toggle-grid,
    .bank-card,
    .method-grid,
    .promo-grid,
    .profile-info-grid,
    .api-key-row>div,
    .api-config>div,
    .repeat-fields,
    .copy-line,
    .stats-grid,
    .quick-actions {
        grid-template-columns: 1fr !important;
    }

    .server-card {
        min-height: 52px !important;
        padding: 9px 10px !important;
    }

    .server-title {
        font-size: 12.5px !important;
    }

    .server-badges {
        row-gap: 4px !important;
    }

    .reaction-flex {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .reaction-btn {
        width: 100% !important;
        height: 58px !important;
    }

    .floating-support-btn {
        right: 14px;
        bottom: 14px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 640px) {
    .content-container {
        padding: 10px;
    }

    .panel,
    .order-panel,
    .order-aside .panel {
        padding: 14px;
        margin-bottom: 14px;
    }

    .panel-header,
    .order-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .order-heading h2,
    .panel-header h2 {
        font-size: 18px;
    }

    .form-label {
        font-size: 12.5px;
    }

    .compact-control,
    .form-control,
    .form-control.compact-control {
        min-height: 42px;
        font-size: 13px;
    }

    .server-card {
        align-items: flex-start !important;
        gap: 8px !important;
        min-height: 0 !important;
        padding: 9px !important;
    }

    .server-radio-indicator {
        margin-top: 2px !important;
    }

    .badge-rate,
    .badge-speed,
    .badge-success-soft,
    .badge-warning-soft,
    .badge-custom {
        font-size: 10px !important;
        padding: 2px 5px !important;
    }

    .server-note {
        max-height: 180px !important;
        font-size: 12.5px !important;
    }

    .estimation-row,
    .estimation-total-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .btn {
        min-height: 44px;
    }

    .custom-table {
        min-width: 640px;
    }

    .profile-trigger strong {
        display: none;
    }
}

@media (max-width: 420px) {
    .topbar {
        padding: 8px 10px;
        gap: 8px;
    }

    .topbar-left {
        gap: 6px;
    }

    .topbar h1 {
        max-width: calc(100vw - 190px);
        font-size: 15px;
    }

    .topbar-actions {
        gap: 5px;
    }

    .balance-pill {
        max-width: 100px;
        padding: 0 8px;
        font-size: 12px;
    }

    .balance-pill span {
        max-width: 60px;
    }

    .user-avatar.small {
        width: 30px !important;
        height: 30px !important;
    }

    .reaction-flex {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .server-title {
        -webkit-line-clamp: 3;
    }
}

.goog-te-combo {
    display: none !important;
}

.dropdown {
    position: relative !important;
    overflow: visible !important;
}

.dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 380px;
    max-width: calc(100vw - 16px);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    z-index: 99999;
    overflow: hidden;
}

.dropdown.open > .dropdown-panel {
    display: block;
    animation: dropSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* RIGHT EDGE OFFCANVAS NOTIFICATION DRAWER WITH ULTRA SMOOTH SLIDE ANIMATION */
.notification-panel {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 45% !important;
    max-width: 100vw !important;
    height: 100vh !important;
    background: var(--bg-surface) !important;
    border-left: 1px solid var(--border-color) !important;
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.35) !important;
    z-index: 999999 !important;
    flex-direction: column !important;
    overflow: hidden !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate3d(100%, 0, 0) !important;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s ease !important;
    will-change: transform, opacity;
}

.dropdown.open > .notification-panel {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) !important;
}

.notification-panel .dropdown-header {
    padding: 18px 20px !important;
    border-bottom: 1px solid var(--border-color) !important;
    flex-shrink: 0 !important;
    background: var(--bg-surface) !important;
}

.notification-panel .notification-tabs {
    padding: 12px 18px !important;
    border-bottom: 1px solid var(--border-color) !important;
    flex-shrink: 0 !important;
}

.notification-panel .notification-list {
    flex: 1 !important;
    max-height: none !important;
    height: 100% !important;
    overflow-y: auto !important;
    padding: 16px 18px !important;
}

@media (max-width: 576px) {
    .notification-panel {
        width: 100vw !important;
        border-radius: 0 !important;
    }
}

.notification-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border-color);
}

.notification-tabs button {
    border: 0;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--text-muted);
    background: var(--bg-surface);
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
}

.notification-tabs button.active {
    color: #fff;
    background: var(--primary);
}

.notification-list {
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    display: grid;
    gap: 10px;
    background: var(--bg-soft);
}

.notification-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    display: grid;
    gap: 6px;
}

.notification-item strong {
    font-size: 13px;
}

.notification-item small {
    color: var(--text-muted);
    font-size: 12px;
}

.empty-mini {
    color: var(--text-muted);
    text-align: center;
    padding: 24px;
    font-weight: 700;
}

.profile-trigger {
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-main);
}

.user-avatar.small {
    width: 36px;
    height: 36px;
}

.profile-panel {
    width: 230px;
}

.profile-summary {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    gap: 3px;
}

.profile-summary span {
    color: var(--primary);
    font-weight: 800;
}

.profile-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: var(--text-main);
    font-weight: 700;
}

.profile-panel a:hover {
    background: var(--bg-soft);
}

.danger-link {
    color: var(--danger) !important;
    border-top: 1px solid var(--border-color);
}

.notice-banner {
    margin-bottom: 18px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
}

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

.stat-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 16px;
    display: grid;
    gap: 5px;
}

.stat-card i {
    color: var(--primary);
    font-size: 20px;
}

.stat-card strong {
    font-size: 20px;
}

.stat-card span {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-actions a {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
    color: var(--text-main);
    font-weight: 800;
    display: flex;
    gap: 10px;
    align-items: center;
}

.quick-actions a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.notification-feed {
    display: grid;
    gap: 12px;
}

.notification-feed>div {
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 12px;
    display: grid;
    gap: 4px;
}

.notification-feed span,
.notification-feed small {
    color: var(--text-muted);
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 22px;
    align-items: start;
    margin-bottom: 22px;
}

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

.profile-info-grid label span,
.api-key-row label {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.api-key-row {
    border-top: 1px solid var(--border-color);
    margin-top: 18px;
    padding-top: 18px;
}

.api-key-row label small {
    color: var(--danger);
    margin-left: 6px;
}

.api-key-row>div {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 8px;
}

.btn-light {
    background: var(--bg-soft);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.truncate {
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.api-config {
    display: grid;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 14px;
}

.api-config>div {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.api-config>div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.api-config button,
.copy-line button {
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    border-radius: var(--radius);
    min-height: 36px;
    padding: 0 10px;
    cursor: pointer;
    font-weight: 800;
}

.api-doc-grid {
    display: grid;
    gap: 14px;
}

.api-doc-grid article {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
}

.api-doc-grid h3 {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 15px;
}

pre {
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    overflow: auto;
}

.copy-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    background: var(--primary-soft);
    color: var(--primary);
    padding: 12px;
    margin-top: 18px;
}

.copy-line span {
    word-break: break-all;
    font-weight: 800;
}

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

.method-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-surface);
    padding: 20px;
    display: grid;
    place-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-main);
}

.method-card i {
    font-size: 30px;
    color: var(--primary);
}

.method-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.qr-box.crypto {
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 18px;
    border-radius: var(--radius);
}

.promo-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    background: var(--bg-soft);
}

.promo-card>span {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f59e0b;
    color: #fff;
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: 800;
}

.promo-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.promo-card p {
    margin: 0 0 12px;
    color: var(--text-muted);
}

.promo-card small {
    color: var(--success);
    font-weight: 800;
}

.input-hint {
    color: var(--success);
    font-size: 12px;
    font-weight: 800;
    margin-top: 6px;
}

.server-note {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 18px;
    max-height: 260px;
    overflow: auto;
    line-height: 1.5;
    font-size: 14px;
}

.server-note strong {
    display: block;
    margin-bottom: 8px;
    color: #1e3a8a;
}

.option-fields {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 14px;
    margin-bottom: 16px;
}

.repeat-fields {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.empty-state {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    text-align: center;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-soft);
    padding: 24px;
}

.empty-state i {
    color: var(--text-dim);
    font-size: 28px;
}

.empty-state strong {
    color: var(--text-main);
}

.table-empty {
    min-height: 120px;
    border: 0;
    background: transparent;
}

.toast-container {
    position: fixed;
    right: 18px;
    top: 18px;
    z-index: 2000;
    display: grid;
    gap: 10px;
}

.toast {
    min-width: 280px;
    max-width: min(420px, calc(100vw - 36px));
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-main);
    box-shadow: var(--shadow);
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    animation: toastIn .2s ease both;
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.success {
    border-left-color: var(--success);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-support-btn {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 950;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    font-size: 22px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-support-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.5);
    color: #ffffff;
}

@media (max-width: 768px) {
    .floating-support-btn {
        right: 14px !important;
        bottom: 74px !important;
        width: 46px !important;
        height: 46px !important;
        font-size: 19px !important;
    }
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 10%, rgba(37, 99, 235, .16), transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(8, 145, 178, .14), transparent 30%),
        var(--bg-main);
}

.auth-card {
    width: min(100%, 430px);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.auth-header {
    text-align: center;
    margin-bottom: 22px;
}

.auth-logo {
    margin: 0 auto 14px;
}

.auth-header h1 {
    margin: 0;
    font-size: 26px;
}

.auth-header p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.auth-alert {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--border-color));
    border-radius: var(--radius);
    padding: 11px 12px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 13px;
}

.auth-footer {
    color: var(--text-muted);
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
}

.auth-footer a {
    font-weight: 800;
}

@media (max-width: 1100px) {

    .order-layout,
    .deposit-layout,
    .profile-layout,
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
        z-index: 99999;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0) !important;
        z-index: 99999;
        width: 250px;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .6);
        backdrop-filter: blur(3px);
        z-index: 99990 !important;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block !important;
    }

    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .topbar {
        padding: 12px 16px;
    }

    .topbar p {
        display: none;
    }

    .logout-link span {
        display: none;
    }

    .content-container {
        padding: 18px;
    }

    .form-grid,
    .toggle-grid,
    .bank-card,
    .method-grid,
    .promo-grid,
    .profile-info-grid,
    .api-key-row>div,
    .api-config>div,
    .repeat-fields,
    .copy-line {
        grid-template-columns: 1fr;
    }

    .qr-box img {
        width: 170px;
        height: 170px;
    }
}

/* Custom styling for SMM Dashboard & Order Page matching likesubviet.com */

.warning-banner a:hover {
    text-decoration: none !important;
}

.stat-widget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

/* Styled Alert Boxes in Column Right */
.warning-box,
.info-box {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.warning-box {
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    color: #451a03;
}

.warning-box h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 800;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.warning-box ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.6;
    color: #78350f;
}

.warning-box li {
    margin-bottom: 10px;
}

.warning-box li:last-child {
    margin-bottom: 0;
}

.info-box {
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e3a8a;
}

.info-box h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 800;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.info-box p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #2563eb;
}

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

/* Server Card styling overrides */
.server-card {
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 14px;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
}

.server-card:hover {
    border-color: var(--border-color);
    background: var(--bg-soft);
}

.server-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 1px var(--primary), 0 10px 20px -5px rgba(59, 130, 246, 0.12);
}

.server-radio-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.server-card.selected .server-radio-indicator {
    border-color: var(--primary);
}

.server-card.selected .server-radio-indicator::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.server-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
}

.reaction-group-badge {
    font-size: 16px;
    letter-spacing: 2px;
    margin-left: 4px;
}

.server-title .server-id-tag {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 6px;
}

.server-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

/* Styled capsules/badges like Screenshot 2 */
.badge-custom {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-custom.rate {
    background: #3b82f6;
    color: #ffffff;
}

.badge-custom.maintenance {
    background: #fee2e2;
    color: #ef4444;
}

.badge-custom.active-now {
    background: #d1fae5;
    color: #10b981;
}

.badge-custom.refill-ok {
    background: #ffedd5;
    color: #f97316;
}

/* Emoji / Reactions Box styling */
.reaction-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.reaction-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 72px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 4px;
    color: var(--text-main);
}

.reaction-btn:hover {
    border-color: var(--primary);
    background: var(--bg-soft);
    transform: translateY(-2px);
}

.reaction-btn.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 8px 16px -4px rgba(59, 130, 246, 0.15);
}

.reaction-btn img,
.reaction-btn span.emoji {
    font-size: 24px;
    transition: transform 0.2s ease;
}

.reaction-btn:hover img,
.reaction-btn:hover span.emoji {
    transform: scale(1.15);
}

.reaction-btn .emoji-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.reaction-btn.active .emoji-label {
    color: var(--primary);
}

/* Server note: handle Bootstrap HTML from providers */
.server-note .text-danger {
    color: var(--danger) !important;
}

.server-note .text-success {
    color: var(--success) !important;
}

.server-note .fw-semibold,
.server-note .fw-bold {
    font-weight: 700 !important;
}

.server-note .list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.server-note .list-group-item {
    padding: 4px 0 !important;
    border: none !important;
    background: transparent !important;
}

.server-note .card {
    background: transparent !important;
    border: none !important;
}

.server-note .card-body {
    padding: 0 !important;
}

.server-note .small {
    font-size: 0.875em;
}

/* Dark mode overrides for boxes that used hardcoded colors */
body.dark-mode .warning-box {
    background-color: var(--warning-soft);
    border-color: var(--border-color);
    color: var(--text-main);
}

body.dark-mode .warning-box h4 {
    color: var(--warning);
}

body.dark-mode .warning-box ul {
    color: var(--text-muted);
}

body.dark-mode .info-box {
    background-color: var(--primary-soft);
    border-color: var(--border-color);
    color: var(--text-main);
}

body.dark-mode .info-box h4 {
    color: var(--primary);
}

body.dark-mode .info-box p {
    color: var(--text-muted);
}

body.dark-mode .server-note {
    background: var(--primary-soft);
    border-color: var(--border-color);
    color: var(--text-main);
}

body.dark-mode .server-note strong {
    color: var(--primary);
}

/* Toggle-card labels dark mode */
body.dark-mode .toggle-card {
    background: var(--bg-surface);
}

body.dark-mode .toggle-card-left label {
    color: var(--text-main);
}

/* Styled structured Collapsible Toggle Cards */
.toggle-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #ffffff;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.toggle-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-card-left input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.toggle-card-left label {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-badge {
    background: #f1f5f9;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* Fix bullet points display error in server notes */
#details-desc-text ul,
#details-desc-text ol {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 8px 0 !important;
}

#details-desc-text li {
    list-style: none !important;
    margin-bottom: 12px !important;
    padding-left: 0 !important;
    line-height: 1.6 !important;
    position: relative !important;
}

#details-desc-text li br {
    display: none !important;
}

#details-desc-text p {
    display: block !important;
    margin: 0 0 8px !important;
}

#details-desc-text ul,
#details-desc-text ol {
    list-style: initial !important;
    padding-left: 20px !important;
}

#details-desc-text ol {
    list-style-type: decimal !important;
}

#details-desc-text ul {
    list-style-type: disc !important;
}

#details-desc-text li {
    display: list-item !important;
    list-style: inherit !important;
    margin-bottom: 6px !important;
}

/* Prevent very long SMM URLs or links from stretching the tables */
.custom-table td a,
.custom-table td span.break-word {
    word-break: break-all !important;
    white-space: normal !important;
}

/* Sidebar submenu link wrapping to prevent link text overflow stretching */
.platform-sub-menu a {
    word-break: break-word !important;
    white-space: normal !important;
    display: block !important;
}

/* Professional compact order experience */
.order-heading {
    margin-bottom: 14px;
}

.order-heading h2 {
    margin: 2px 0 0;
    font-size: 22px;
}

.category-tab-pill {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-tab-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.category-tab-pill.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    font-weight: 700;
}

.order-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
}

.order-panel,
.order-aside .panel {
    padding: 18px;
}

.form-group {
    margin-bottom: 14px;
}

.compact-control,
.form-control.compact-control {
    min-height: 40px;
    padding: 9px 11px;
    border-radius: 7px;
    font-size: 13px;
}

.server-search {
    position: relative;
    margin-bottom: 10px;
}

.server-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

.server-search .form-control {
    padding-left: 34px;
}

.server-radio-container {
    gap: 7px;
}

.server-card {
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 58px !important;
    margin-bottom: 0 !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transform: translateZ(0);
    transition:
        border-color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease !important;
}

.server-card:hover {
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border-color)) !important;
    background: var(--bg-soft) !important;
    transform: translateY(-1px);
}

.server-card.selected {
    border: 2px solid #2563eb !important;
    background: rgba(37, 99, 235, 0.1) !important;
    box-shadow: inset 4px 0 0 #2563eb, 0 6px 16px rgba(37, 99, 235, 0.18) !important;
}
body.dark-mode .server-card.selected {
    border-color: #3b82f6 !important;
    background: rgba(37, 99, 235, 0.22) !important;
}

.server-radio-indicator {
    width: 16px !important;
    height: 16px !important;
    margin-top: 0 !important;
}

.server-card.selected .server-radio-indicator::after {
    width: 8px !important;
    height: 8px !important;
}

.server-card-info {
    min-width: 0;
    gap: 5px !important;
}

.server-title {
    display: block !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.server-title b,
.server-title .server-id-tag {
    color: var(--primary);
}

.server-badges {
    gap: 5px !important;
}

.badge-rate,
.badge-speed,
.badge-success-soft,
.badge-warning-soft,
.badge-custom {
    min-height: 20px !important;
    padding: 2px 6px !important;
    border-radius: 5px !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
}

.server-note {
    max-height: 220px !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
}

.reaction-container {
    padding: 14px !important;
    border-radius: 8px !important;
    margin-bottom: 14px !important;
}

.reaction-flex {
    gap: 8px !important;
}

.reaction-btn {
    width: 58px !important;
    height: 62px !important;
    border-radius: 8px !important;
}

.toggle-option,
.option-fields,
.estimation-panel {
    border-radius: 8px !important;
}



/* ===== GOOGLE TRANSLATE ===== */
body {
    top: 0px !important;
}

/* Ẩn an toàn div gốc Google inject khỏi màn hình nhưng giữ DOM hoạt động */
#google_translate_element {
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: auto !important;
}

/* Ẩn banner Google Translate ở đầu trang */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.skiptranslate:not(#google_translate_element) {
    display: none !important;
}

/* Ẩn combo gốc của Google khỏi màn hình nhưng giữ DOM hoạt động */
.goog-te-combo {
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: auto !important;
}

/* ==========================================
   CONSOLIDATED MOBILE & TABLET RESPONSIVE FIXES
   ========================================== */

@media (max-width: 1024px) {

    /* Topbar Layout - Spacious Two-Row Layout */
    .topbar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 10px 14px !important;
        min-height: auto !important;
        gap: 8px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1010 !important;
        background: var(--bg-surface) !important;
        border-bottom: 1px solid var(--border-color) !important;
        backdrop-filter: blur(14px) !important;
    }

    /* Row 1: Hamburger Menu + Page Title */
    .topbar-left {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: auto;
        gap: 8px !important;
        flex: 0 0 auto !important;
    }

    .topbar-left>div {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .topbar h1 {
        font-size: 18px !important;
        font-weight: 800 !important;
        color: var(--text-main) !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: calc(100vw - 80px) !important;
    }

    .topbar p {
        display: none !important;
    }

    .sidebar-toggle {
        display: inline-flex !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }

    /* Row 2: Actions Row (Balance + Toggles) - Full width, zero scrollbars */
    .topbar-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        flex: 0 0 auto !important;
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding-bottom: 0 !important;
        margin-top: 2px !important;
    }

    .topbar-actions>* {
        flex: 0 0 auto !important;
    }

    /* Balance pill expands beautifully to fill left space */
    .balance-pill {
        flex: 1 1 auto !important;
        justify-content: center !important;
        padding: 0 10px !important;
        min-height: 36px !important;
        height: 36px !important;
        font-size: 13px !important;
    }

    .balance-pill span {
        max-width: 130px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .icon-btn,
    .theme-toggle,
    .notification-trigger {
        width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
    }

    .google-language {
        display: inline-flex !important;
        align-items: center !important;
    }

    .language-pill {
        min-height: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        font-size: 12px !important;
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .profile-trigger {
        min-height: 36px !important;
        height: 36px !important;
        width: 36px !important;
        padding: 0 !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .profile-trigger .user-avatar.small {
        width: 32px !important;
        height: 32px !important;
        margin: 0 !important;
    }

    .profile-trigger strong {
        display: none !important;
    }

    .notification-list {
        max-height: min(400px, calc(100vh - 180px)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .balance-pill span {
        max-width: 90px !important;
    }
}

@media (max-width: 420px) {

    /* Ultra-small screen balance text width */
    .balance-pill span {
        max-width: 75px !important;
    }
}

/* Global Table Responsive Utility - Ensures smooth swiping and prevents broken overflow layouts */
.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    box-sizing: border-box !important;
    display: block !important;
}

@media (max-width: 768px) {
    html, body {
        max-width: 100vw;
        overflow-x: clip;
    }

    .topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    }

    .content {
        padding: 12px !important;
    }

    .content-container {
        padding: 12px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .panel {
        padding: 14px 12px !important;
        margin-bottom: 14px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .panel-header {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
}

/* ===== GLOBAL LEFT CLICK BURST & SPARK ANIMATIONS ===== */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.25);
    transform: scale(0);
    animation: ripple-animation 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 10;
}

body.dark-mode .ripple-effect {
    background: rgba(255, 255, 255, 0.22);
}

@keyframes ripple-animation {
    to {
        transform: scale(3.5);
        opacity: 0;
    }
}

.global-click-burst {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    border-radius: 50%;
    border: 2px solid var(--primary, #2563eb);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.4) 0%, rgba(99, 102, 241, 0) 70%);
    animation: global-burst-anim 0.55s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

body.dark-mode .global-click-burst {
    border-color: #6366f1;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.5) 0%, rgba(99, 102, 241, 0) 70%);
}

.global-click-spark {
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: global-spark-anim 0.55s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes global-burst-anim {
    0% {
        width: 8px;
        height: 8px;
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.2);
    }

    50% {
        opacity: 0.7;
    }

    100% {
        width: 64px;
        height: 64px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.6);
        border-color: rgba(99, 102, 241, 0);
    }
}

@keyframes global-spark-anim {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0);
    }
}

/* ===== MOBILE BOTTOM NAVIGATION BAR (KHỚP 100% ẢNH MẪU 2) ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    box-sizing: border-box;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 700;
    text-decoration: none;
    flex: 1;
    text-align: center;
    position: relative;
    transition: color 0.15s ease;
}

.mobile-bottom-nav .nav-item i {
    font-size: 18px;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary);
}

/* Floating center button for "Mua dịch vụ" matching Screenshot 2 */
.mobile-bottom-nav .nav-item-order {
    position: relative;
    top: -12px;
}

.mobile-bottom-nav .order-btn-bubble {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    border: 3px solid var(--bg-surface);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mobile-bottom-nav .order-btn-bubble i {
    font-size: 21px;
}

.mobile-bottom-nav .nav-item-order.active .order-btn-bubble {
    transform: scale(1.08);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.5);
}

@media (max-width: 1024px) {
    .mobile-bottom-nav {
        display: flex !important;
    }
    body {
        padding-bottom: 68px !important;
    }
}

/* FORCE 2-COLUMN GRID FOR PLATFORM BUTTONS MATCHING SCREENSHOTS 1 & 2 */
.platform-buttons-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.platform-grid-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--border-color) !important;
    background: var(--bg-surface) !important;
    color: var(--text-main) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    min-height: 40px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
.platform-grid-btn span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    min-width: 0 !important;
    font-size: 11.5px !important;
}

/* SMOOTH SLIDE-UP ANIMATIONS & ENHANCED CARDS */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popupScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.welcome-card-premium,
.stats-grid-premium,
.stats-grid-6,
.panel-premium,
.stats-header-card,
.detail-panel,
.alert-telegram-banner {
    animation: slideUpFade 0.45s cubic-bezier(0.16, 1, 0.3, 1) ease-out;
}

/* FLOATING SUPPORT WIDGET MATCHING SCREENSHOT 1 */
.floating-support-widget {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

@media (max-width: 768px) {
    .floating-support-widget {
        bottom: 90px;
        right: 16px;
    }
}

.support-menu-items {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: bottom right;
}

.floating-support-widget.collapsed .support-menu-items {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.85);
}

.support-header-pill {
    background: #2563eb;
    color: #ffffff;
    border-radius: 30px;
    padding: 6px 6px 6px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    white-space: nowrap;
}

.support-pill-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
}

.support-item-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    padding: 6px;
}

.support-item-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.support-item-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.support-trigger-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    border: 0;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.25s ease;
}

.support-trigger-btn:hover {
    transform: scale(1.06);
    background: #1d4ed8;
}

.floating-support-widget.collapsed .icon-close {
    display: none;
}
.floating-support-widget.collapsed .icon-open {
    display: block;
}
.floating-support-widget:not(.collapsed) .icon-close {
    display: block;
}
.floating-support-widget:not(.collapsed) .icon-open {
    display: none;
}

/* HIGH-END UI & ANTI-SLOP VISUAL DESIGN POLISH */
.panel,
.panel-premium,
.welcome-card-premium,
.stat-card-premium,
.stat-card-6,
.detail-panel {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.dark-mode .panel,
body.dark-mode .panel-premium,
body.dark-mode .welcome-card-premium,
body.dark-mode .stat-card-premium,
body.dark-mode .stat-card-6,
body.dark-mode .detail-panel {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35) !important;
}

.panel:hover,
.panel-premium:hover,
.stat-card-premium:hover,
.stat-card-6:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px -4px rgba(15, 23, 42, 0.08) !important;
}

.btn-primary,
.btn-submit,
.btn-modal-submit,
.btn-rank-card-act.active,
.page-tab.active,
.affiliate-tab-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 0 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-primary:hover,
.btn-submit:hover,
.btn-modal-submit:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4) !important;
}

.form-control,
.form-input,
.input-control,
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    border-radius: 10px !important;
    border: 1.5px solid var(--border-color) !important;
    background: var(--bg-surface) !important;
    color: var(--text-main) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.form-control:focus,
.form-input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.14) !important;
    outline: none !important;
}

/* SVG NAVIGATION ICON STYLING MATCHING SCREENSHOT 1 */
.nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.nav-icon-svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
    stroke: currentColor !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.nav-link.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

.nav-link.active .nav-icon-svg {
    stroke: #ffffff !important;
}

.nav-submenu::before,
.platform-sub-menu::before {
    display: none !important;
    content: none !important;
}

.platform-sub-menu a,
.nav-submenu a,
.platform-sub-menu a.active,
.nav-submenu a.active,
.nav-submenu a:hover {
    border-left: 0 !important;
    border-left-color: transparent !important;
}

.nav-submenu {
    padding-left: 4px !important;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* COMPACT HEADER STYLING MATCHING SCREENSHOT 1 & 2 */
.topbar {
    height: 60px !important;
    width: 100%;
    align-content: space-between;
    min-height: 60px !important;
    padding: 10px 24px !important;
    background: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.sidebar-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0 !important;
    background: transparent !important;
    color: var(--text-main) !important;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.sidebar-toggle:hover {
    background: var(--bg-soft) !important;
}

.balance-pill-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.balance-pill-compact:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.icon-btn-clean {
    width: 36px;
    height: 36px;
    border: 0 !important;
    background: transparent !important;
    color: var(--text-main) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    position: relative;
    transition: background 0.2s ease;
}

.icon-btn-clean:hover {
    background: var(--bg-soft) !important;
}

.profile-trigger-compact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 8px 0 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    border-radius: 18px;
}

.avatar-circle-blue {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}

body.dark-mode .avatar-circle-blue {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

/* PROFILE PANEL DROPDOWN MATCHING SCREENSHOT 2 */
.profile-panel-clean {
    width: 240px !important;
    padding: 12px 0 !important;
    border-radius: 16px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    background: var(--bg-surface) !important;
}

.profile-panel-header {
    padding: 8px 20px 12px 20px !important;
}

.profile-panel-name {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--text-main) !important;
    line-height: 1.3 !important;
}

.profile-panel-balance {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #2563eb !important;
    margin-top: 4px !important;
}

.profile-panel-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.profile-panel-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 20px !important;
    color: var(--text-main) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.profile-panel-item:hover {
    background: var(--bg-soft) !important;
}

.profile-panel-item.danger-link {
    color: #ef4444 !important;
}

/* RESPONSIVE HEADERS ON MOBILE & TABLET */
@media (max-width: 768px) {
    .topbar {
        padding: 8px 12px !important;
    }
    .profile-username-text {
        display: none !important;
    }
    .balance-pill-compact span {
        font-size: 12.5px;
    }
}

/* DESKTOP SIDEBAR HIDDEN (COLLAPSE / HIDE COMPLETELY ON TOGGLE CLICK) */
.sidebar,
.main-wrapper {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.sidebar-hidden .sidebar {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.sidebar-hidden .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
}

/* MOBILE RESPONSIVE LOGO & HEADER REFINEMENTS */
.btn-text-short {
    display: none;
}

.logo {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.logo a {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.logo img {
    height: 38px !important;
    width: auto !important;
    max-width: 140px !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
}

.btn-login,
.btn-signup {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    line-height: 1.2 !important;
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 12px !important;
        gap: 8px !important;
    }

    .header-actions {
        gap: 6px !important;
        flex-shrink: 1 !important;
    }

    .btn-login,
    .btn-signup {
        padding: 7px 10px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }

    .btn-text-full {
        display: none !important;
    }

    .btn-text-short {
        display: inline !important;
    }
}

@media (max-width: 520px) {
    .header-container {
        padding: 0 8px !important;
    }

    .logo img {
        height: 30px !important;
        max-width: 100px !important;
    }

    .header-actions {
        gap: 4px !important;
    }

    .btn-login,
    .btn-signup {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }

    .btn-text-logout {
        display: none !important;
    }
}

/* STRICT NO-HORIZONTAL-SCROLL & FULL WIDTH LAYOUT FIX */
html, body {
    background-color: var(--bg-main) !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative;
}

.app-shell {
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 100vh;
    display: flex;
    background-color: var(--bg-main) !important;
    overflow-x: hidden !important;
}

.main-wrapper {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: calc(100% - var(--sidebar-width)) !important;
    background-color: var(--bg-main) !important;
    overflow-x: hidden !important;
}

body.sidebar-hidden .main-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
}

.content-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background-color: var(--bg-main) !important;
    overflow-x: hidden !important;
}

.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
}