:root {
    --primary: #2b1848;
    --sidebar: #2f4052;
    --sidebar-muted: #aeb8c5;
    --blue: #3b78bf;
    --cyan: #29f1ef;
    --green: #2ecc71;
    --gold: #ffb32b;
    --neutral: #f3f6fa;
    --surface: #ffffff;
    --line: #dfe5ee;
    --text: #2e2143;
    --muted: #748094;
    --danger: #d92d55;
    --success: #167a4a;
    --shadow: 0 2px 8px rgba(28, 43, 64, 0.08);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

img,
svg {
    max-width: 100%;
}

body {
    margin: 0;
    background: var(--neutral);
    color: var(--text);
    font-family: Manrope, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
}

.page-load-modal {
    align-items: center;
    background: rgba(238, 243, 246, 0.96);
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 320ms ease, visibility 320ms ease;
    visibility: hidden;
    z-index: 1000;
}

.page-is-loading .page-load-modal,
.page-is-leaving .page-load-modal {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.loader-card {
    animation: loader-arrive 450ms ease both;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(15, 34, 51, 0.16);
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 28px;
    width: min(84vw, 280px);
}

.skeleton-line {
    animation: skeleton-shimmer 1.2s linear infinite;
    background: linear-gradient(90deg, #e9eef3 20%, #f8fafc 45%, #e9eef3 70%);
    background-size: 220% 100%;
    border-radius: 999px;
    height: 10px;
    width: 65%;
}

.skeleton-line.is-wide {
    height: 14px;
    width: 90%;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

.guest-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.guest-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    width: 100%;
}

.guest-topbar-inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1320px;
    min-height: 82px;
    padding: 14px 28px;
    width: 100%;
}

.brand,
.topnav,
.topnav form,
.sidebar-brand {
    align-items: center;
    display: flex;
}

.brand {
    color: var(--surface);
    font-size: 1.35rem;
    font-weight: 800;
    gap: 10px;
}

.guest-topbar .brand {
    color: var(--text);
}

.brand-mark {
    align-items: center;
    background: var(--cyan);
    border-radius: var(--radius-sm);
    color: var(--primary);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.topnav {
    color: var(--muted);
    gap: 14px;
    font-size: 0.9rem;
    font-weight: 700;
}

.nav-action,
.button-primary {
    background: var(--blue);
    border: 0;
    border-radius: 999px;
    color: var(--surface);
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    padding: 11px 20px;
}

.button-secondary {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 800;
    padding: 10px 16px;
}

.button-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.button-primary:disabled {
    cursor: not-allowed;
    opacity: 0.92;
}

.auth-page {
    display: grid;
    gap: 22px;
    margin: 18px auto;
    max-width: 1120px;
    padding: 0 16px 48px;
}

.auth-experience {
    align-items: stretch;
    display: grid;
    gap: 22px;
    margin: 26px auto 60px;
    max-width: 1180px;
    padding: 0 16px;
}

.auth-visual {
    background: linear-gradient(145deg, #0f2233, #244a63);
    border-radius: 28px;
    color: var(--surface);
    min-height: 380px;
    overflow: hidden;
    padding: 34px;
    position: relative;
    order: 2;
}

.auth-visual::after {
    background: var(--cyan);
    border-radius: 50%;
    content: "";
    filter: blur(5px);
    height: 220px;
    opacity: 0.14;
    position: absolute;
    right: -70px;
    top: -65px;
    width: 220px;
}

.auth-visual .section-label,
.auth-visual p {
    color: rgba(255, 255, 255, 0.72);
}

.auth-visual h1 {
    font-size: clamp(2.3rem, 6vw, 4.7rem);
    letter-spacing: -0.045em;
    line-height: 1.02;
    margin: 16px 0;
    max-width: 760px;
}

.auth-features {
    display: grid;
    gap: 12px;
    margin-top: 34px;
}

.auth-features span {
    align-items: center;
    display: flex;
    gap: 10px;
    font-weight: 700;
}

.auth-card-advanced {
    align-content: start;
    border: 1px solid var(--line);
    order: 1;
    padding: 28px;
}

.auth-card-advanced h2 {
    color: var(--primary);
    font-size: 2rem;
    margin: 6px 0;
}

.auth-muted {
    color: var(--muted);
    margin: 0;
}

.auth-submit {
    min-height: 50px;
}

.password-field {
    align-items: center;
    display: flex;
    position: relative;
}

.password-field input {
    padding-right: 52px;
}

.password-field button {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    position: absolute;
    right: 6px;
}

.auth-copy h1,
.empty-state h1 {
    color: var(--primary);
    font-size: 2.2rem;
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0 0 12px;
}

.auth-copy p,
.empty-state p,
.status-card p,
.promo-card p {
    color: var(--muted);
    margin: 0;
}

.auth-card,
.admin-card,
.balance-card,
.promo-card,
.status-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-card {
    display: grid;
    gap: 14px;
    padding: 22px;
}

label {
    display: grid;
    gap: 7px;
}

label span,
.section-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

input,
select,
textarea {
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--text);
    min-height: 46px;
    outline: none;
    padding: 10px 12px;
    width: 100%;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 120, 191, 0.16);
}

small {
    color: var(--danger);
    min-height: 16px;
}

.form-status {
    border-radius: var(--radius-md);
    padding: 12px;
}

.form-status.is-error {
    background: #fff1f0;
    color: var(--danger);
}

.form-status.is-success {
    background: #edf9f3;
    color: var(--success);
}

.auth-switch {
    color: var(--muted);
    margin: 0;
    text-align: center;
}

.auth-switch a {
    color: var(--primary);
    font-weight: 800;
}

.app-frame {
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar);
    color: var(--surface);
    height: 100vh;
    left: 0;
    overflow-y: auto;
    padding: 28px 18px;
    position: fixed;
    top: 0;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    width: min(82vw, 300px);
    z-index: 30;
}

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

.sidebar-backdrop {
    background: rgba(15, 23, 42, 0.45);
    border: 0;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 180ms ease;
    z-index: 20;
}

.sidebar-is-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-brand {
    justify-content: space-between;
    margin-bottom: 28px;
}

.icon-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: currentColor;
    cursor: pointer;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    padding: 0;
    width: 42px;
}

.icon-button span,
.icon-button span::before,
.icon-button span::after {
    background: currentColor;
    border-radius: 999px;
    content: "";
    display: block;
    height: 2px;
    position: relative;
    width: 22px;
}

.icon-button span::before {
    position: absolute;
    top: -7px;
}

.icon-button span::after {
    position: absolute;
    top: 7px;
}

.side-nav {
    display: grid;
    gap: 2px;
}

.nav-group {
    display: grid;
}

.nav-group-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--radius-md);
    color: var(--sidebar-muted);
    cursor: pointer;
    display: flex;
    gap: 14px;
    min-height: 48px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.nav-group-toggle:hover,
.nav-group.is-open .nav-group-toggle {
    background: rgba(255, 255, 255, 0.08);
    color: var(--surface);
}

.nav-chevron {
    display: inline-flex;
    margin-left: auto;
    transition: transform 180ms ease;
}

.nav-chevron .ui-icon {
    height: 16px;
    width: 16px;
}

.nav-group.is-open .nav-chevron {
    transform: rotate(180deg);
}

.nav-submenu {
    display: grid;
    gap: 2px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 220ms ease, opacity 180ms ease;
}

.nav-group.is-open .nav-submenu {
    max-height: 600px;
    opacity: 1;
}

.nav-sublink {
    align-items: center;
    border-radius: 8px;
    color: var(--sidebar-muted);
    display: flex;
    margin-left: 50px;
    min-height: 40px;
    padding: 7px 10px;
}

.nav-sublink:hover,
.nav-sublink.is-active {
    color: var(--surface);
}

.side-link {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--radius-md);
    color: var(--surface);
    cursor: pointer;
    display: flex;
    gap: 14px;
    min-height: 48px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.side-link.is-muted {
    color: var(--sidebar-muted);
}

.side-link.is-active,
.side-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--surface);
}

.nav-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 42px;
    font-weight: 900;
    justify-content: center;
}

.ui-icon {
    display: block;
    height: 22px;
    width: 22px;
}

.side-group {
    color: #93a1b3;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 22px 10px 6px;
    text-transform: uppercase;
}

.count-pill {
    align-items: center;
    background: var(--green);
    border-radius: 999px;
    color: var(--surface);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    height: 26px;
    justify-content: center;
    margin-left: auto;
    min-width: 26px;
}

.logout-link {
    color: var(--danger);
}

.main-area {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.app-topbar {
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    height: 72px;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.menu-button {
    color: var(--sidebar);
}

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

.notification-button {
    align-items: center;
    background: #f7f5fb;
    border: 0;
    border-radius: 999px;
    color: #abb2c4;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    position: relative;
    width: 38px;
}

.notification-badge {
    align-items: center;
    background: var(--danger);
    border: 2px solid var(--surface);
    border-radius: 999px;
    color: var(--surface);
    display: inline-flex;
    font-size: 0.65rem;
    font-weight: 900;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 4px;
    position: absolute;
    right: -6px;
    top: -7px;
}

.avatar {
    align-items: center;
    background: var(--cyan);
    border: 0;
    border-radius: 999px;
    color: #071f2c;
    cursor: pointer;
    display: inline-flex;
    font-weight: 900;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.profile-menu {
    position: relative;
}

.profile-dropdown {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 50px rgba(15, 34, 51, 0.18);
    min-width: 230px;
    opacity: 0;
    padding: 8px;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    transform: translateY(-8px) scale(0.98);
    transition: opacity 170ms ease, transform 170ms ease;
    z-index: 50;
}

.profile-menu:hover .profile-dropdown,
.profile-menu.is-open .profile-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.profile-dropdown-head {
    border-bottom: 1px solid var(--line);
    display: grid;
    padding: 10px;
}

.profile-dropdown-head small {
    color: var(--muted);
    min-height: 0;
}

.profile-dropdown a,
.profile-dropdown button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 10px;
    text-align: left;
    width: 100%;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
    background: var(--neutral);
}

.app-content {
    flex: 1;
    padding: 16px;
}

.app-footer,
.guest-footer {
    align-items: center;
    background: var(--surface);
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.76rem;
    gap: 6px 18px;
    justify-content: center;
    letter-spacing: 0.01em;
    min-height: 46px;
    padding: 10px 28px;
    text-align: center;
}

.guest-footer {
    margin-top: auto;
    width: 100%;
}

.dashboard {
    display: grid;
    gap: 18px;
    margin: 0 auto;
    max-width: 1220px;
    min-width: 0;
    width: 100%;
}

.balance-card {
    border: 1px solid var(--line);
    overflow: hidden;
}

.balance-head {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.balance-head p {
    color: var(--primary);
    font-weight: 800;
    margin: 0 0 8px;
}

.balance-head h1 {
    align-items: center;
    color: var(--primary);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 2.2rem;
    line-height: 1;
    margin: 0;
}

.balance-head strong {
    color: var(--green);
    display: block;
    font-size: 1rem;
    margin-top: 12px;
}

.balance-toggle {
    align-items: center;
    background: #edf9f9;
    border: 1px solid rgba(41, 175, 180, 0.28);
    border-radius: 999px;
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 8px 12px;
}

.balance-toggle .ui-icon {
    height: 20px;
    width: 20px;
}

.quick-grid {
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-link {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    justify-items: center;
    min-height: 132px;
    padding: 20px 10px;
    text-align: center;
}

.quick-link strong {
    color: var(--primary);
}

.quick-link em {
    align-items: center;
    background: var(--green);
    border-radius: 999px;
    color: var(--surface);
    display: inline-flex;
    font-size: 0.82rem;
    font-style: normal;
    height: 28px;
    justify-content: center;
    min-width: 28px;
}

.quick-icon {
    align-items: center;
    border-radius: 14px;
    color: var(--surface);
    display: inline-flex;
    height: 66px;
    justify-content: center;
    width: 66px;
}

.quick-icon .ui-icon {
    height: 34px;
    width: 34px;
}

.quick-icon.blue {
    background: var(--blue);
}

.quick-icon.dark {
    background: var(--primary);
}

.quick-icon.gold {
    background: var(--gold);
}

.promo-card {
    align-items: center;
    background: var(--blue);
    color: var(--surface);
    display: grid;
    gap: 18px;
    min-height: 190px;
    overflow: hidden;
    padding: 24px;
    position: relative;
    background-position: center;
    background-size: cover;
}

.promo-card .section-label,
.promo-card p {
    color: rgba(255, 255, 255, 0.78);
}

.promo-card h2 {
    color: var(--surface);
    font-size: 2rem;
    line-height: 1.05;
    margin: 6px 0 10px;
}

.promo-mark {
    align-items: center;
    background: var(--gold);
    border-radius: 24px;
    color: var(--primary);
    display: inline-flex;
    font-size: 4rem;
    font-weight: 900;
    height: 120px;
    justify-content: center;
    justify-self: end;
    transform: rotate(-10deg);
    width: 120px;
}

.status-grid {
    display: grid;
    gap: 16px;
}

.status-card {
    padding: 20px;
}

.status-card h3 {
    color: var(--primary);
    margin: 8px 0;
}

.transaction-filters {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(140px, 180px)) auto;
    margin: 20px 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    min-width: 36px;
}

.pagination a.is-active {
    background: var(--blue);
    color: var(--surface);
}

.auth-options {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.smtp-test-form {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding-top: 20px;
}

.service-page {
    margin: 0 auto;
    max-width: 980px;
    width: 100%;
}

.social-order-card {
    display: grid;
    gap: 20px;
}

.social-service-summary {
    background: var(--sidebar);
    border-radius: var(--radius-md);
    color: var(--surface);
    display: grid;
    gap: 8px;
    padding: 20px;
}

.social-service-summary small {
    color: #c9d3df;
}

.social-service-summary p {
    background: var(--surface);
    border-radius: 8px;
    color: var(--muted);
    margin: 8px -8px -8px;
    padding: 16px;
}

.admin-card {
    min-width: 0;
    padding: 22px;
}

.admin-card h1,
.admin-card h2 {
    color: var(--primary);
    margin: 6px 0 10px;
}

.admin-card h1 {
    font-size: 2rem;
    line-height: 1.1;
}

.admin-form {
    display: grid;
    gap: 16px;
}

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

.toggle-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.toggle-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 14px;
}

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

.toggle-row small {
    color: var(--muted);
    display: block;
    min-height: 0;
}

.toggle-row input {
    min-height: auto;
    width: auto;
}

.priority-field {
    align-items: center;
    display: flex;
    gap: 8px;
}

.priority-field input {
    min-height: 38px;
    width: 76px;
}

.account-summary {
    align-items: center;
    display: flex;
    gap: 16px;
    margin-top: 22px;
}

.avatar-large {
    height: 72px;
    width: 72px;
}

.user-role-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.user-role-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    padding: 14px;
}

.user-role-row:last-child {
    border-bottom: 0;
}

.user-role-identity {
    display: grid;
}

.user-role-identity small {
    color: var(--muted);
    min-height: 0;
}

.page-card {
    padding: 24px;
}

.page-heading {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.compact-form {
    margin-top: 24px;
    max-width: 520px;
}

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

.data-table {
    border-collapse: collapse;
    min-width: 720px;
    width: 100%;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.data-table td small {
    color: var(--muted);
    display: block;
    min-height: 0;
}

.table-actions,
.table-actions form {
    align-items: center;
    display: flex;
    gap: 8px;
}

.table-actions {
    flex-wrap: wrap;
}

.table-actions select {
    min-height: 40px;
    width: auto;
}

.table-search {
    margin: 12px 0 18px;
    max-width: 480px;
}

.datatable-controls {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-top: 14px;
}

.datatable-controls > div {
    display: flex;
    gap: 8px;
}

.priority-input {
    min-height: 40px;
    width: 92px;
}

.status-badge {
    background: #eef3f6;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 10px;
}

.status-badge.is-active,
.status-badge.is-successful {
    background: #edf9f3;
    color: var(--success);
}

.status-badge.is-inactive,
.status-badge.is-failed,
.status-badge.is-cancelled {
    background: #fff1f0;
    color: var(--danger);
}

.status-badge.is-pending {
    background: #fff7e6;
    color: #9a6200;
}

.notification-list,
.announcement-admin-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.notification-item,
.announcement-admin-row {
    align-items: start;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    display: flex;
    gap: 14px;
    padding: 14px;
}

.notification-item p {
    color: var(--muted);
    margin: 4px 0;
}

.notification-item small,
.announcement-admin-row small {
    color: var(--muted);
    display: block;
    min-height: 0;
}

.notification-kind {
    color: var(--blue);
}

.announcement-admin-row {
    align-items: center;
    justify-content: space-between;
}

.checkbox-line {
    align-items: center;
    display: flex;
    gap: 10px;
}

.checkbox-line input {
    min-height: auto;
    width: auto;
}

.funding-page {
    display: grid;
    justify-items: center;
    padding: 24px 0 54px;
}

.funding-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-width: 794px;
    overflow: hidden;
    width: min(100%, 794px);
}

.funding-head {
    border-bottom: 1px solid var(--line);
    padding: 16px 20px 12px;
}

.funding-head h1 {
    color: var(--primary);
    font-size: 1.35rem;
    margin: 0 0 4px;
}

.funding-head p,
.funding-option small,
.transfer-method p {
    color: var(--muted);
    margin: 0;
}

.funding-body {
    display: grid;
    gap: 16px;
    padding: 20px;
}

[data-funding-panel] {
    display: grid;
    gap: 16px;
}

[data-funding-panel][hidden] {
    display: none;
}

.funding-options {
    display: grid;
    gap: 12px;
}

.funding-option {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 10px rgba(15, 34, 51, 0.04);
    color: var(--primary);
    display: grid;
    gap: 2px 14px;
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 74px;
    padding: 14px 18px;
    text-align: left;
}

.funding-option.is-active {
    background: #f5f8fc;
    border-color: var(--primary);
}

.funding-option > span,
.funding-option .ui-icon {
    align-items: center;
    color: var(--primary);
    display: inline-flex;
    font-weight: 900;
    grid-row: span 2;
    justify-content: center;
}

.funding-tabs {
    background: #ececf2;
    border-radius: var(--radius-md);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 4px;
}

.funding-tabs button {
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: #8a849c;
    cursor: pointer;
    font-weight: 800;
    min-height: 36px;
}

.funding-tabs button.is-active {
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(15, 34, 51, 0.14);
    color: var(--primary);
}

.transfer-method {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    display: flex;
    gap: 16px;
    min-height: 90px;
    padding: 16px 20px;
}

.transfer-method-icon {
    align-items: center;
    background: #eef4ff;
    border-radius: 999px;
    color: var(--sidebar);
    display: inline-flex;
    flex: 0 0 58px;
    height: 58px;
    justify-content: center;
}

.bank-account-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px;
}

.bank-account-card {
    background: var(--sidebar);
    border-radius: var(--radius-md);
    color: var(--surface);
    padding: 28px;
}

.bank-account-card p {
    color: rgba(255, 255, 255, 0.74);
    margin: 0;
    text-transform: uppercase;
}

.bank-account-card > span {
    display: block;
    font-weight: 700;
    margin-top: 12px;
}

.account-number-row {
    align-items: center;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.26);
    display: flex;
    gap: 16px;
    padding: 4px 0 24px;
}

.account-number-row strong {
    font-size: clamp(2rem, 5vw, 2.75rem);
    letter-spacing: 0.02em;
}

.copy-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 0;
    border-radius: 12px;
    color: var(--surface);
    cursor: pointer;
    display: inline-flex;
    font-weight: 900;
    height: 52px;
    justify-content: center;
    min-width: 52px;
    padding: 0 14px;
}

.bank-account-grid {
    display: grid;
    gap: 18px;
    margin: 24px 0;
}

.bank-account-grid strong {
    display: block;
    margin-top: 4px;
}

.funding-notice {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    display: flex;
    gap: 16px;
    padding: 14px 16px;
}

.funding-notice .ui-icon {
    background: #315b95;
    border-radius: 10px;
    box-sizing: content-box;
    flex: 0 0 auto;
    padding: 12px;
}

.deposit-confirm-form {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 14px;
    padding-top: 4px;
}

.referral-page {
    display: grid;
    gap: 22px;
    margin: 0 auto;
    max-width: 980px;
}

.referral-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 24px;
}

.referral-card header {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    margin: -24px -24px 24px;
    padding: 20px 24px;
}

.referral-card h1,
.referral-list-card h2 {
    color: var(--primary);
    margin: 4px 0 0;
}

.referral-rate {
    background: #edf9f3;
    border-radius: 999px;
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 900;
    padding: 7px 12px;
}

.referral-link-row {
    display: flex;
}

.referral-link-row input {
    background: #f5f6f8;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--muted);
}

.referral-link-row .button-primary {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    min-width: 90px;
}

.referral-note {
    color: var(--danger);
    margin: 20px 0 0;
}

.referral-stats {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.referral-stats div {
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    display: grid;
    gap: 4px;
    padding: 14px;
}

.referral-stats span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.referral-stats strong {
    color: var(--primary);
}

.referral-list-card .page-heading .table-search {
    margin: 0;
}

.empty-state {
    margin: 48px auto;
    max-width: 720px;
    padding: 0 16px;
    text-align: center;
}

@media (min-width: 700px) {
    .auth-page {
        align-items: start;
        gap: 48px;
        grid-template-columns: minmax(0, 1fr) 420px;
        margin-top: 48px;
    }

    .auth-experience {
        grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
    }

    .auth-visual {
        order: 1;
        padding: 54px;
    }

    .auth-card-advanced {
        order: 2;
    }

    .auth-copy {
        padding-top: 56px;
    }

    .auth-copy h1,
    .empty-state h1 {
        font-size: 3.2rem;
    }

    .balance-head {
        align-items: center;
        display: flex;
        justify-content: space-between;
    }

    .quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .quick-link {
        border-bottom: 0;
    }

    .promo-card {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 34px 48px;
    }

    .promo-card h2 {
        font-size: 3.4rem;
        max-width: 680px;
    }

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

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

    .funding-options,
    .bank-account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .bank-account-grid > div + div {
        border-left: 1px dashed rgba(255, 255, 255, 0.26);
        padding-left: 30px;
    }

    .admin-card-wide {
        grid-column: 1 / -1;
    }

    .user-role-row {
        grid-template-columns: minmax(220px, 1fr) 180px auto;
    }
}

@media (max-width: 699px) {
    .guest-topbar {
        width: 100%;
    }

    .guest-topbar-inner {
        gap: 14px;
        min-height: 72px;
        padding: 12px 16px;
    }

    .topnav {
        gap: 10px;
    }

    .auth-visual {
        min-height: auto;
        padding: 26px;
    }

    .auth-visual h1 {
        font-size: 2.35rem;
    }

    .auth-card-advanced {
        padding: 22px;
    }

    .app-topbar {
        padding: 0 12px;
    }

    .topbar-actions {
        gap: 10px;
    }

    .profile-dropdown {
        max-height: calc(100vh - 90px);
        max-width: calc(100vw - 24px);
        min-width: 220px;
        overflow-y: auto;
        right: 0;
    }

    .admin-card,
    .page-card {
        padding: 18px;
    }

    .toggle-row,
    .announcement-admin-row,
    .notification-item,
    .account-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-wrap {
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
    }

    .data-table {
        min-width: 680px;
    }

    .table-actions,
    .table-actions form {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-actions select,
    .table-actions .button-secondary {
        width: 100%;
    }

    .datatable-controls {
        align-items: flex-start;
        flex-direction: column;
    }

    .funding-page {
        padding: 10px 0 36px;
    }

    .funding-body {
        padding: 14px;
    }

    .funding-card,
    .referral-card {
        border-radius: var(--radius-md);
    }

    .funding-tabs {
        grid-template-columns: 1fr;
    }

    .transaction-filters {
        grid-template-columns: 1fr;
    }

    .service-page {
        min-width: 0;
    }

    .referral-link-row {
        display: grid;
        gap: 10px;
    }

    .referral-link-row input,
    .referral-link-row .button-primary {
        border-radius: var(--radius-sm);
        width: 100%;
    }

    .transfer-method,
    .funding-notice,
    .account-number-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .bank-account-card {
        padding: 22px;
    }
}

@keyframes skeleton-shimmer {
    to {
        background-position: -220% 0;
    }
}

@keyframes loader-arrive {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (min-width: 980px) {
    .sidebar {
        transform: none;
        width: 292px;
    }

    .sidebar-close,
    .sidebar-backdrop,
    .menu-button {
        display: none;
    }

    .main-area {
        margin-left: 292px;
    }

    .app-topbar {
        height: 92px;
        justify-content: flex-end;
        padding: 0 30px;
    }

    .app-content {
        padding: 26px 28px 42px;
    }

    .balance-head {
        padding: 28px;
    }

    .quick-link {
        min-height: 154px;
    }
}
