@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,700;0,800;0,900;1,400&family=Oswald:wght@500;600;700&display=swap');

:root {
    --ink: #0d1e35;
    --wine: #2a528a;
    --red: #17345d;
    --gold: #3a7bd5;
    --paper: #f0f7ff;
    --border-color: rgba(23, 52, 93, .3);

    /* Cấu hình màu sắc phản hồi */
    --error: #e74c3c;
    --error-bg: rgba(231, 76, 60, 0.1);
    --error-border: rgba(231, 76, 60, 0.2);
    --success: #27ae60;
    --success-bg: rgba(46, 204, 113, 0.1);
    --success-border: rgba(46, 204, 113, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Be Vietnam Pro', sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f0f7ff, #e1ebfa) fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

/* Header / Topbar */
.id-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: 72px;
    background: #17345d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.topbar-inner {
    max-width: 1050px;
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-logo img {
    width: 86px;
    display: block;
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-title {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    position: relative;
}

.brand-title::after {
    content: "Kiếm Hiệp Truyền Kỳ";
    display: block;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: none;
    margin-top: -2px;
    opacity: 0.8;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.user-welcome i {
    color: var(--red);
    font-size: 14px;
}

.account-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wine);
    font-weight: 700;
    font-size: 15px;
    padding: 6px 16px;
    background: rgba(245, 252, 255, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(202, 145, 62, 0.2);
}

.account-balance i {
    color: #3498db;
}

.topbar-nav {
    display: flex;
    gap: 8px;
}

.topbar-nav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: #ffffff;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.topbar-nav a:hover {
    background: #ffffff;
    color: #17345d;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Main Layout */
.container {
    width: min(1050px, calc(100% - 32px));
    margin: 88px auto 40px;
    padding: 0;
    flex: 1;
}

.container.has-sidebar {
    background: rgba(245, 250, 255, .94);
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 42px rgba(23, 52, 93, .13);
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 600px;
    padding: 0;
}

/* Sidebar */
.sidebar {
    background: rgba(235, 245, 255, .55);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
}

.sidebar-user-section {
    padding: 24px 18px;
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-welcome {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 15px;
    font-size: 15px;
}

.sidebar-welcome i {
    font-size: 20px;
    color: var(--red);
}

.sidebar-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.sidebar-balance .label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--wine);
    text-transform: uppercase;
}

.sidebar-balance .amount {
    color: var(--red);
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.sidebar-menu-group {
    padding: 15px 0 5px;
}

.sidebar-menu-header {
    padding: 0 18px 8px;
    font-size: 11px;
    font-weight: 800;
    color: rgba(23, 52, 93, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    color: #1e447a;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid rgba(23, 52, 93, 0.05);
}

.sidebar-menu a i {
    width: 22px;
    margin-right: 12px;
    color: var(--wine);
    font-size: 14px;
    opacity: 0.8;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: var(--red);
    background: rgba(218, 154, 50, .1);
}

.sidebar-menu a.active {
    box-shadow: inset 3px 0 0 var(--red);
    background: rgba(218, 154, 50, .15);
}

.sidebar-logout {
    margin-top: auto;
    padding-top: 15px;
}

.sidebar-menu a.logout-item {
    color: var(--red);
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

/* Main Content */
.main-content {
    padding: 24px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.page-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-box.small {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid var(--gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    box-shadow: 0 4px 10px rgba(138, 43, 18, 0.1);
}

.page-header h1 {
    margin: 0;
    color: #17345d;
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}

.account-pill {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: #27ae60;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(39, 174, 96, .3);
    background: rgba(39, 174, 96, .1);
    border-radius: 4px;
}

.account-pill.online::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 6px #2ecc71;
}

/* Info Cards & Grids */
.account-content-inner, .account-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-grid {
    display: grid;
    gap: 20px;
    border: 1px solid var(--border-color);
    background: rgba(245, 250, 255, 0.4);
    padding: 24px;
}

.profile-rows {
    display: grid;
    border: 1px solid rgba(23, 52, 93, .2);
}

.profile-rows div {
    display: grid;
    grid-template-columns: 140px 1fr;
    min-height: 42px;
    align-items: center;
    border-bottom: 1px solid rgba(23, 52, 93, .1);
    font-size: 14px;
}

.profile-rows div:last-child {
    border-bottom: 0;
}

.profile-rows span {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: var(--wine);
    background: rgba(235, 245, 255, .5);
    font-weight: 600;
}

.profile-rows strong {
    padding: 0 12px;
    font-weight: 500;
}

.account-warning {
    margin-top: 20px;
    background: rgba(231, 76, 60, .05);
    border: 1px dashed #e74c3c;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    color: #e74c3c;
    font-size: 13px;
    font-weight: 600;
}

/* Forms */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #a0aec0;
    font-size: 16px;
    pointer-events: none;
    z-index: 5;
}

.form-control {
    width: 100%;
    height: 46px;
    padding: 0 12px 0 42px;
    border: 1px solid rgba(202, 145, 62, .4);
    background: #fff;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(155, 43, 18, 0.1);
}

.form-control:focus + .input-icon {
    color: var(--red);
}

/* Validation Styles */
.is-invalid {
    border-color: #c0392b !important;
    background-color: rgba(192, 57, 43, 0.05) !important;
}
.is-valid {
    border-color: #27ae60 !important;
    background-color: rgba(39, 174, 96, 0.05) !important;
}

.validation-msg {
    font-size: 11px;
    margin-top: 5px;
    font-weight: 600;
    display: none;
    color: #e74c3c !important;
}

.form-group:has(.is-invalid) .validation-msg {
    display: block;
}

.btn {
    width: 100%;
    height: 46px;
    border: none;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(180deg, #255496, #17345d);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 30, 12, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Login/Register Special Layout */
.login-page-body {
    background: #eef5ff !important;
    padding-top: 0 !important;
}

.login-page-body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 16% 18%, rgba(200, 225, 255, .45), transparent 28rem),
        linear-gradient(180deg, rgba(23, 52, 93, 0), rgba(23, 52, 93, .32));
    z-index: 0;
}

.login-page-container {
    position: relative;
    z-index: 1;
    width: min(420px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: center;
    padding: 50px 0 40px;
}

.login-card-side {
    width: 100%;
    padding: 32px;
    border: 1px solid var(--gold);
    background:
        linear-gradient(180deg, rgba(245, 252, 255, .96), rgba(235, 245, 255, .94)),
        var(--paper);
    box-shadow: 0 24px 60px rgba(23, 52, 93, .28);
}

.login-card-side h2 {
    margin: 0 0 16px;
    color: var(--wine);
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-card-side h2 i {
    width: 48px;
    height: 48px;
    background: #fff;
    border: 1px solid var(--gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--red);
    box-shadow: 0 4px 12px rgba(138, 43, 18, 0.15);
    flex-shrink: 0;
}

.login-card-side .note {
    margin: 0 0 24px;
    color: #254b85;
    font-size: 14px;
    line-height: 1.5;
}

.login-form-field {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.login-form-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.login-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    font-size: 13px;
    font-weight: 700;
}

.login-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.login-quick-actions a {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wine);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid rgba(23, 52, 93, 0.4);
    background: rgba(240, 247, 255, 0.6);
    transition: all 0.3s ease;
}

.login-quick-actions a:hover {
    background: #fff;
    border-color: var(--gold);
    color: var(--red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(202, 145, 62, 0.2);
}

.footer-note {
    width: 100%;
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--wine);
    border-top: 1px solid var(--border-color);
    background: rgba(240, 247, 255, .8);
    margin-top: auto;
    position: relative;
    z-index: 10;
}

/* Character Cards */
.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.char-card {
    background: rgba(240, 247, 255, 0.6);
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.char-card:hover {
    transform: translateY(-5px);
    background: rgba(240, 247, 255, 0.9);
    border-color: var(--gold);
}

.char-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.char-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
}

.char-avatar.male { color: #2980b9; }
.char-avatar.female { color: #c0392b; }

.char-name {
    margin: 0;
    font-size: 18px;
    color: var(--ink);
    font-weight: 800;
}

.char-title {
    font-size: 13px;
    color: #254b85;
    font-style: italic;
}

.char-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.char-stat {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.char-stat .label {
    color: #1e447a;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.char-stat .value {
    color: var(--ink);
    font-weight: 700;
}

.char-stat .value.level {
    color: var(--red);
}

.char-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-char-action {
    flex: 1;
    height: 36px;
    border: 1px solid var(--border-color);
    background: rgba(240, 247, 255, .8);
    color: var(--wine);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-char-action:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* Recharge / Donate */
.recharge-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    background: rgba(240, 247, 255, 0.6);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}

.qr-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.qr-image {
    width: 100%;
    display: block;
    aspect-ratio: 1;
}

.qr-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--red);
    opacity: 0.9;
    color: #fff;
    padding: 8px;
    text-align: center;
    font-size: 12px;
}

.bank-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(202, 145, 62, .15);
}

.bank-label {
    color: #1e447a;
    font-size: 14px;
    font-weight: 600;
}

.bank-value {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.content-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.4);
    padding: 12px;
    border: 1px solid rgba(202, 145, 62, .1);
}

.btn-copy-small {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.recharge-instructions {
    margin-top: 24px;
    background: rgba(240, 247, 255, .5);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--gold);
}

.recharge-instructions h4 {
    margin: 0 0 10px;
    font-size: 15px;
    color: var(--wine);
    font-weight: 800;
}

.recharge-instructions ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #254b85;
    line-height: 1.6;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(240, 247, 255, 0.4);
    border: 1px solid var(--border-color);
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--wine);
    font-size: 13px;
    font-weight: 700;
}

.pagination li.active a {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* History Table & Status Badges */
.history-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.4);
}

.history-table th {
    background: rgba(240, 247, 255, 0.8);
    padding: 12px 18px;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--wine);
    font-weight: 700;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.history-table td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(202, 145, 62, 0.15);
    font-size: 14px;
    color: var(--ink);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.status-badge.pending { background: rgba(241, 196, 15, 0.15); color: #b7950b; border: 1px solid rgba(241, 196, 15, 0.3); }
.status-badge.success { background: rgba(39, 174, 96, 0.15); color: #1e8449; border: 1px solid rgba(39, 174, 96, 0.3); }
.status-badge.error { background: rgba(192, 57, 43, 0.15); color: #922b21; border: 1px solid rgba(192, 57, 43, 0.3); }

/* Common Component Styles */
.alert {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border-color: var(--error-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}

.page-header-alt {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.page-header-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-sub-desc {
    margin: -5px 0 0 0;
    color: var(--wine);
    font-size: 13px;
    width: 100%;
}

.panel-title {
    margin: 0 0 14px;
    color: var(--red);
    font-size: 18px;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(240, 247, 255, 0.4);
    border: 1px dashed var(--border-color);
}

.empty-state i {
    font-size: 48px;
    color: var(--border-color);
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--wine);
    font-size: 16px;
}

.password-display-box {
    text-align: center;
    margin: 15px 0;
}

.password-badge {
    display: inline-block;
    padding: 10px 25px;
    border: 2px dashed var(--red);
    background: #fff;
    color: var(--red);
    font-size: 24px;
    font-weight: 800;
    border-radius: 8px;
    letter-spacing: 2px;
}

.history-summary {
    background: rgba(240, 247, 255, .8);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.summary-label {
    font-size: 11px;
    color: var(--wine);
    font-weight: 700;
    text-transform: uppercase;
}

.summary-value {
    font-size: 16px;
    color: var(--red);
    font-weight: 800;
    font-family: 'Oswald', sans-serif;
}

.panel-title-large {
    font-size: 18px;
    color: var(--wine);
    margin-bottom: 20px;
    font-weight: 800;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.bank-value.highlight {
    color: var(--red);
}

.bank-row-flex {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-text-strong {
    font-size: 18px;
    color: var(--wine);
    letter-spacing: 1px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--ink);
}

.remember-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--red);
}

.forgot-link {
    color: var(--red);
}

.login-quick-actions.solo {
    grid-template-columns: 1fr;
}

.btn-enter-game {
    max-width: 200px;
    margin: 20px auto 0;
    display: block;
    line-height: 46px;
    text-decoration: none;
}

.change-password-panel {
    max-width: 550px;
    margin: 0 auto;
    background: rgba(240, 247, 255, 0.6);
    padding: 30px;
    border-radius: 8px;
}

.security-note-box {
    margin-top: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.4);
    border-left: 3px solid var(--gold);
    font-size: 13px;
}

.security-note-title {
    margin: 0 0 8px;
    color: var(--wine);
}

.security-note-list {
    margin: 0;
    padding-left: 20px;
    color: var(--wine);
    line-height: 1.6;
}

/* Theme 2: Cam (Orange) */
body.theme-2 {
    --ink: #3e2723;
    --wine: #a04000;
    --red: #e67e22;
    --gold: #f39c12;
    --paper: #fffaf0;
    --border-color: rgba(230, 126, 34, 0.3);
}

body.theme-2 {
    background: linear-gradient(180deg, #fffaf0, #fff0e0) fixed;
}

body.theme-2 .id-topbar {
    background: #e67e22;
}

body.theme-2 .topbar-nav a:hover {
    color: #e67e22;
}

body.theme-2 .btn {
    background: linear-gradient(180deg, #f39c12, #e67e22);
}

body.theme-2 .login-page-body {
    background: #fffdfa !important;
}

body.theme-2 .login-page-body::after {
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 230, 180, .45), transparent 28rem),
        linear-gradient(180deg, rgba(230, 126, 34, 0), rgba(230, 126, 34, .32));
}

body.theme-2 .empty-state {
    background: rgba(255, 250, 240, 0.4);
}

body.theme-2 .history-summary {
    background: rgba(255, 250, 240, 0.8);
}

body.theme-2 .change-password-panel {
    background: rgba(255, 250, 240, 0.6);
}

body.theme-2 .sidebar {
    background: rgba(255, 240, 224, .55);
}

body.theme-2 .container.has-sidebar {
    background: rgba(255, 250, 240, .94);
    box-shadow: 0 18px 42px rgba(230, 126, 34, .13);
}

body.theme-2 .footer-note {
    background: rgba(255, 240, 224, .8);
}

body.theme-2 .sidebar-menu a {
    color: #a04000;
    border-bottom: 1px solid rgba(230, 126, 34, 0.05);
}

body.theme-2 .sidebar-menu a:hover,
body.theme-2 .sidebar-menu a.active {
    background: rgba(230, 126, 34, .1);
}

body.theme-2 .sidebar-menu a.active {
    background: rgba(230, 126, 34, .15);
}

body.theme-2 .profile-rows span {
    color: #a04000;
    background: rgba(255, 240, 224, .5);
}

body.theme-2 .history-table th {
    background: rgba(255, 240, 224, 0.8);
    color: var(--wine);
}

body.theme-2 .content-grid {
    background: rgba(255, 250, 240, 0.4);
}

body.theme-2 .char-card {
    background: rgba(255, 250, 240, 0.6);
}

body.theme-2 .char-card:hover {
    background: rgba(255, 250, 240, 0.9);
}

body.theme-2 .recharge-layout {
    background: rgba(255, 250, 240, 0.6);
}

body.theme-2 .recharge-instructions {
    background: rgba(255, 250, 240, 0.5);
}

body.theme-2 .account-pill {
    color: #d35400;
    border-color: rgba(211, 84, 0, 0.3);
    background: rgba(211, 84, 0, 0.1);
}

body.theme-2 .account-pill.online::before {
    background: #e67e22;
    box-shadow: 0 0 6px #e67e22;
}

/* Theme 3: Đỏ đậm (#84200e) */
body.theme-3 {
    --ink: #2a0a04;
    --wine: #63180a;
    --red: #84200e;
    --gold: #b52d14;
    --paper: #fff7f5;
    --border-color: rgba(132, 32, 14, 0.3);
}

body.theme-3 {
    background: linear-gradient(180deg, #fff7f5, #fcece8) fixed;
}

body.theme-3 .id-topbar {
    background: #84200e;
}

body.theme-3 .topbar-nav a:hover {
    color: #84200e;
}

body.theme-3 .btn {
    background: linear-gradient(180deg, #a62812, #84200e);
}

body.theme-3 .login-page-body {
    background: #fffafa !important;
}

body.theme-3 .login-page-body::after {
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 180, 170, .45), transparent 28rem),
        linear-gradient(180deg, rgba(132, 32, 14, 0), rgba(132, 32, 14, .32));
}

body.theme-3 .empty-state {
    background: rgba(255, 247, 245, 0.4);
}

body.theme-3 .history-summary {
    background: rgba(255, 247, 245, 0.8);
}

body.theme-3 .change-password-panel {
    background: rgba(255, 247, 245, 0.6);
}

body.theme-3 .sidebar {
    background: rgba(252, 236, 232, .55);
}

body.theme-3 .container.has-sidebar {
    background: rgba(255, 247, 245, .94);
    box-shadow: 0 18px 42px rgba(132, 32, 14, .13);
}

body.theme-3 .footer-note {
    background: rgba(252, 236, 232, .8);
}

body.theme-3 .sidebar-menu a {
    color: #63180a;
}

body.theme-3 .sidebar-menu a:hover,
body.theme-3 .sidebar-menu a.active {
    background: rgba(132, 32, 14, .1);
}

body.theme-3 .sidebar-menu a.active {
    background: rgba(132, 32, 14, .15);
}

body.theme-3 .profile-rows span {
    color: #63180a;
    background: rgba(252, 236, 232, .5);
}

body.theme-3 .history-table th {
    background: rgba(252, 236, 232, 0.8);
}

body.theme-3 .content-grid {
    background: rgba(255, 247, 245, 0.4);
}

body.theme-3 .char-card {
    background: rgba(255, 247, 245, 0.6);
}

body.theme-3 .char-card:hover {
    background: rgba(255, 247, 245, 0.9);
}

body.theme-3 .recharge-layout {
    background: rgba(255, 247, 245, 0.6);
}

body.theme-3 .recharge-instructions {
    background: rgba(255, 247, 245, 0.5);
}

/* Theme 4: Tím (Purple) */
body.theme-4 {
    --ink: #210435;
    --wine: #4a148c;
    --red: #6a1b9a;
    --gold: #8e24aa;
    --paper: #faf5ff;
    --border-color: rgba(106, 27, 154, 0.3);
}

body.theme-4 {
    background: linear-gradient(180deg, #faf5ff, #f3e8ff) fixed;
}

body.theme-4 .id-topbar {
    background: #6a1b9a;
}

body.theme-4 .topbar-nav a:hover {
    color: #6a1b9a;
}

body.theme-4 .btn {
    background: linear-gradient(180deg, #8e24aa, #6a1b9a);
}

body.theme-4 .login-page-body {
    background: #fdfaff !important;
}

body.theme-4 .login-page-body::after {
    background:
        radial-gradient(circle at 16% 18%, rgba(220, 180, 255, .45), transparent 28rem),
        linear-gradient(180deg, rgba(106, 27, 154, 0), rgba(106, 27, 154, .32));
}

body.theme-4 .empty-state {
    background: rgba(250, 245, 255, 0.4);
}

body.theme-4 .history-summary {
    background: rgba(250, 245, 255, 0.8);
}

body.theme-4 .change-password-panel {
    background: rgba(250, 245, 255, 0.6);
}

body.theme-4 .sidebar {
    background: rgba(243, 232, 255, .55);
}

body.theme-4 .container.has-sidebar {
    background: rgba(250, 245, 255, .94);
    box-shadow: 0 18px 42px rgba(106, 27, 154, .13);
}

body.theme-4 .footer-note {
    background: rgba(243, 232, 255, .8);
}

body.theme-4 .sidebar-menu a {
    color: #4a148c;
}

body.theme-4 .sidebar-menu a:hover,
body.theme-4 .sidebar-menu a.active {
    background: rgba(106, 27, 154, .1);
}

body.theme-4 .sidebar-menu a.active {
    background: rgba(106, 27, 154, .15);
}

body.theme-4 .profile-rows span {
    color: #4a148c;
    background: rgba(243, 232, 255, .5);
}

body.theme-4 .history-table th {
    background: rgba(243, 232, 255, 0.8);
}

body.theme-4 .content-grid {
    background: rgba(250, 245, 255, 0.4);
}

body.theme-4 .char-card {
    background: rgba(250, 245, 255, 0.6);
}

body.theme-4 .char-card:hover {
    background: rgba(250, 245, 255, 0.9);
}

body.theme-4 .recharge-layout {
    background: rgba(250, 245, 255, 0.6);
}

body.theme-4 .recharge-instructions {
    background: rgba(250, 245, 255, 0.5);
}

/* Theme 5: Xanh lá (Green) */
body.theme-5 {
    --ink: #042106;
    --wine: #1b5e20;
    --red: #2e7d32;
    --gold: #43a047;
    --paper: #f5fdf5;
    --border-color: rgba(46, 125, 50, 0.3);
}

body.theme-5 {
    background: linear-gradient(180deg, #f5fdf5, #e8f5e9) fixed;
}

body.theme-5 .id-topbar {
    background: #2e7d32;
}

body.theme-5 .topbar-nav a:hover {
    color: #2e7d32;
}

body.theme-5 .btn {
    background: linear-gradient(180deg, #43a047, #2e7d32);
}

body.theme-5 .login-page-body {
    background: #fafffa !important;
}

body.theme-5 .login-page-body::after {
    background:
        radial-gradient(circle at 16% 18%, rgba(180, 255, 180, .45), transparent 28rem),
        linear-gradient(180deg, rgba(46, 125, 50, 0), rgba(46, 125, 50, .32));
}

body.theme-5 .empty-state {
    background: rgba(245, 253, 245, 0.4);
}

body.theme-5 .history-summary {
    background: rgba(245, 253, 245, 0.8);
}

body.theme-5 .change-password-panel {
    background: rgba(245, 253, 245, 0.6);
}

body.theme-5 .sidebar {
    background: rgba(232, 245, 233, .55);
}

body.theme-5 .container.has-sidebar {
    background: rgba(245, 253, 245, .94);
    box-shadow: 0 18px 42px rgba(46, 125, 50, .13);
}

body.theme-5 .footer-note {
    background: rgba(232, 245, 233, .8);
}

body.theme-5 .sidebar-menu a {
    color: #1b5e20;
}

body.theme-5 .sidebar-menu a:hover,
body.theme-5 .sidebar-menu a.active {
    background: rgba(46, 125, 50, .1);
}

body.theme-5 .sidebar-menu a.active {
    background: rgba(46, 125, 50, .15);
}

body.theme-5 .profile-rows span {
    color: #1b5e20;
    background: rgba(232, 245, 233, .5);
}

body.theme-5 .history-table th {
    background: rgba(232, 245, 233, 0.8);
}

body.theme-5 .content-grid {
    background: rgba(245, 253, 245, 0.4);
}

body.theme-5 .char-card {
    background: rgba(245, 253, 245, 0.6);
}

body.theme-5 .char-card:hover {
    background: rgba(245, 253, 245, 0.9);
}

body.theme-5 .recharge-layout {
    background: rgba(245, 253, 245, 0.6);
}

body.theme-5 .recharge-instructions {
    background: rgba(245, 253, 245, 0.5);
}

/* Theme 6: Hoàng Kim (Gold) */
body.theme-6 {
    --ink: #4d3a14;
    --wine: #8c6d1f;
    --red: #b8860b;
    --gold: #d4af37;
    --paper: #fffcf0;
    --border-color: rgba(184, 134, 11, 0.3);
}

body.theme-6 {
    background: linear-gradient(180deg, #fffcf0, #fdf5e6) fixed;
}

body.theme-6 .id-topbar {
    background: #b8860b;
}

body.theme-6 .topbar-nav a:hover {
    color: #b8860b;
}

body.theme-6 .btn {
    background: linear-gradient(180deg, #d4af37, #b8860b);
}

body.theme-6 .login-page-body {
    background: #fffdf5 !important;
}

body.theme-6 .login-page-body::after {
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 230, 150, .45), transparent 28rem),
        linear-gradient(180deg, rgba(184, 134, 11, 0), rgba(184, 134, 11, .32));
}

body.theme-6 .sidebar {
    background: rgba(253, 245, 230, .55);
}

body.theme-6 .container.has-sidebar {
    background: rgba(255, 252, 240, .94);
    box-shadow: 0 18px 42px rgba(184, 134, 11, .13);
}

body.theme-6 .footer-note {
    background: rgba(253, 245, 230, .8);
}

body.theme-6 .sidebar-menu a {
    color: #8c6d1f;
}

body.theme-6 .sidebar-menu a:hover,
body.theme-6 .sidebar-menu a.active {
    background: rgba(184, 134, 11, .1);
}

body.theme-6 .sidebar-menu a.active {
    background: rgba(184, 134, 11, .15);
}

body.theme-6 .profile-rows span {
    color: #8c6d1f;
    background: rgba(253, 245, 230, .5);
}

body.theme-6 .history-table th {
    background: rgba(253, 245, 230, 0.8);
}

body.theme-6 .content-grid, body.theme-6 .char-card, body.theme-6 .recharge-layout {
    background: rgba(255, 252, 240, 0.6);
}

/* Theme 7: Hắc Ám (Dark/Ink) */
body.theme-7 {
    --ink: #1a252f;
    --wine: #2c3e50;
    --red: #34495e;
    --gold: #5d6d7e;
    --paper: #f4f6f7;
    --border-color: rgba(52, 73, 94, 0.3);
}

body.theme-7 {
    background: linear-gradient(180deg, #f4f6f7, #ebedef) fixed;
}

body.theme-7 .id-topbar {
    background: #2c3e50;
}

body.theme-7 .topbar-nav a:hover {
    color: #2c3e50;
}

body.theme-7 .btn {
    background: linear-gradient(180deg, #34495e, #1a252f);
}

body.theme-7 .login-page-body {
    background: #f8f9f9 !important;
}

body.theme-7 .login-page-body::after {
    background:
        radial-gradient(circle at 16% 18%, rgba(200, 210, 220, .45), transparent 28rem),
        linear-gradient(180deg, rgba(44, 62, 80, 0), rgba(44, 62, 80, .32));
}

body.theme-7 .sidebar {
    background: rgba(235, 237, 239, .55);
}

body.theme-7 .container.has-sidebar {
    background: rgba(244, 246, 247, .94);
    box-shadow: 0 18px 42px rgba(44, 62, 80, .13);
}

body.theme-7 .footer-note {
    background: rgba(235, 237, 239, .8);
}

body.theme-7 .sidebar-menu a {
    color: #2c3e50;
}

body.theme-7 .sidebar-menu a:hover,
body.theme-7 .sidebar-menu a.active {
    background: rgba(44, 62, 80, .1);
}

body.theme-7 .sidebar-menu a.active {
    background: rgba(44, 62, 80, .15);
}

body.theme-7 .profile-rows span {
    color: #2c3e50;
    background: rgba(235, 237, 239, .5);
}

body.theme-7 .history-table th {
    background: rgba(235, 237, 239, 0.8);
}

body.theme-7 .content-grid, body.theme-7 .char-card, body.theme-7 .recharge-layout {
    background: rgba(244, 246, 247, 0.6);
}

/* Theme 8: Ngọc Bích (Jade) */
body.theme-8 {
    --ink: #002b26;
    --wine: #004d40;
    --red: #00695c;
    --gold: #26a69a;
    --paper: #f0fdfc;
    --border-color: rgba(0, 105, 92, 0.3);
}

body.theme-8 {
    background: linear-gradient(180deg, #f0fdfc, #e0f2f1) fixed;
}

body.theme-8 .id-topbar {
    background: #00695c;
}

body.theme-8 .topbar-nav a:hover {
    color: #00695c;
}

body.theme-8 .btn {
    background: linear-gradient(180deg, #00897b, #00695c);
}

body.theme-8 .login-page-body {
    background: #fafffe !important;
}

body.theme-8 .login-page-body::after {
    background:
        radial-gradient(circle at 16% 18%, rgba(150, 255, 230, .45), transparent 28rem),
        linear-gradient(180deg, rgba(0, 105, 92, 0), rgba(0, 105, 92, .32));
}

body.theme-8 .sidebar {
    background: rgba(224, 242, 241, .55);
}

body.theme-8 .container.has-sidebar {
    background: rgba(240, 253, 252, .94);
    box-shadow: 0 18px 42px rgba(0, 105, 92, .13);
}

body.theme-8 .footer-note {
    background: rgba(224, 242, 241, .8);
}

body.theme-8 .sidebar-menu a {
    color: #fff;
}

body.theme-8 .sidebar-menu a:hover,
body.theme-8 .sidebar-menu a.active {
    color:#CCCC00;
}

body.theme-8 .sidebar-menu a.active {
    background: rgba(0, 105, 92, .15);
}

body.theme-8 .profile-rows span {
    color: #004d40;
    background: rgba(224, 242, 241, .5);
}

body.theme-8 .history-table th {
    background: rgba(224, 242, 241, 0.8);
}

body.theme-8 .content-grid, body.theme-8 .char-card, body.theme-8 .recharge-layout {
    background: rgba(240, 253, 252, 0.6);
}

@media (max-width: 900px) {
    .container.has-sidebar {
        grid-template-columns: 1fr;
    }
    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }
}

/* New visual skin: clean account dashboard */
:root {
    --surface: rgba(255, 255, 255, .86);
    --surface-strong: rgba(255, 255, 255, .96);
    --surface-soft: rgba(244, 248, 255, .76);
    --text-soft: rgba(13, 30, 53, .68);
    --shadow-soft: 0 18px 48px rgba(12, 28, 54, .12);
    --shadow-card: 0 12px 32px rgba(12, 28, 54, .09);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        linear-gradient(135deg, rgba(58, 123, 213, .14), transparent 30%),
        linear-gradient(225deg, rgba(39, 174, 96, .08), transparent 28%),
        #f5f8fc;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(23, 52, 93, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 52, 93, .035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.85), transparent 78%);
    z-index: -1;
}

.id-topbar {
    min-height: 76px;
    background: rgba(17, 35, 64, .88);
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 16px 40px rgba(12, 28, 54, .22);
    backdrop-filter: blur(18px);
}

.topbar-inner {
    max-width: 1180px;
    height: 76px;
    padding: 0 18px;
}

.topbar-logo img {
    width: 78px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .22));
}

.brand-title {
    font-size: 21px;
    letter-spacing: 0;
}

.brand-title::after {
    letter-spacing: 1.4px;
    color: rgba(255, 255, 255, .64);
}

.topbar-nav {
    gap: 10px;
}

.topbar-nav a {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, .92);
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.topbar-nav a:hover {
    color: #112340;
    background: #fff;
    border-color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

.container {
    width: min(1180px, calc(100% - 36px));
    margin: 100px auto 42px;
}

.container.has-sidebar {
    grid-template-columns: 268px 1fr;
    min-height: 650px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(17, 35, 64, .94), rgba(23, 52, 93, .9)),
        var(--red);
    border-right: 0;
    color: #fff;
}

.sidebar-user-section {
    padding: 26px 20px 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.sidebar-welcome {
    color: #fff;
    font-size: 14px;
}

.sidebar-welcome i {
    color: rgba(255, 255, 255, .9);
}

.sidebar-balance {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-md);
    box-shadow: none;
}

.sidebar-balance .label,
.sidebar-balance .label i {
    color: rgba(255, 255, 255, .72);
}

.sidebar-balance .amount {
    color: #fff;
    letter-spacing: 0;
}

.sidebar-menu-header {
    padding: 2px 20px 10px;
    color: rgba(255, 255, 255, .72);
    letter-spacing: 1.2px;
}

.sidebar-menu a {
    min-height: 46px;
    margin: 3px 12px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .94);
}

.sidebar-menu a i {
    color: rgba(255, 255, 255, .86);
    opacity: 1;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.sidebar-menu a.active {
    box-shadow: inset 3px 0 0 #fff, 0 10px 24px rgba(0, 0, 0, .08);
}

.sidebar-menu a.active i,
.sidebar-menu a:hover i {
    color: #fff;
    opacity: 1;
}

.sidebar-menu a.logout-item {
    color: #fff;
    border-top: 0;
    background: rgba(231, 76, 60, .22);
}

.main-content {
    padding: 30px;
}

.page-header {
    padding: 0 0 20px;
    border-bottom: 1px solid rgba(23, 52, 93, .1);
}

.page-header-row {
    gap: 18px;
}

.page-title-box {
    gap: 14px;
}

.header-icon-box.small {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), var(--red));
    box-shadow: 0 12px 24px rgba(23, 52, 93, .18);
}

.page-header h1 {
    color: var(--ink);
    font-size: 27px;
    letter-spacing: 0;
}

.page-sub-desc {
    color: var(--text-soft);
}

.account-pill,
.history-summary {
    border-radius: 999px;
    background: rgba(39, 174, 96, .1);
}

.content-grid,
.char-card,
.recharge-layout,
.recharge-instructions,
.history-container .table-responsive,
.pagination-wrapper,
.empty-state,
.change-password-panel,
.login-card-side {
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    box-shadow: var(--shadow-card);
}

.panel-lite {
    min-width: 0;
}

.panel-title,
.panel-title-large {
    color: var(--ink);
    letter-spacing: 0;
}

.profile-rows {
    overflow: hidden;
    border: 1px solid rgba(23, 52, 93, .1);
    border-radius: var(--radius-md);
}

.profile-rows div {
    min-height: 52px;
    border-bottom-color: rgba(23, 52, 93, .08);
}

.profile-rows span {
    color: var(--text-soft);
    background: rgba(244, 248, 255, .82);
}

.profile-rows strong {
    color: var(--ink);
    font-weight: 700;
}

.account-warning {
    border: 1px solid rgba(231, 76, 60, .18);
    border-radius: var(--radius-md);
    background: rgba(231, 76, 60, .07);
}

.input-wrapper {
    border-radius: var(--radius-md);
}

.form-control {
    height: 48px;
    border: 1px solid rgba(23, 52, 93, .14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 16%, transparent);
}

.input-icon {
    color: rgba(13, 30, 53, .36);
}

.form-control:focus + .input-icon {
    color: var(--red);
}

.btn,
.btn-char-action,
.btn-copy-small {
    border-radius: var(--radius-md);
}

.btn {
    height: 48px;
    background: linear-gradient(135deg, var(--red), var(--gold));
    box-shadow: 0 14px 26px color-mix(in srgb, var(--red) 24%, transparent);
    letter-spacing: .2px;
}

.btn:hover {
    filter: none;
    transform: translateY(-1px);
    box-shadow: 0 18px 32px color-mix(in srgb, var(--red) 28%, transparent);
}

.login-page-body {
    background:
        linear-gradient(140deg, rgba(23, 52, 93, .1), transparent 40%),
        linear-gradient(220deg, rgba(58, 123, 213, .12), transparent 42%),
        #f5f8fc !important;
}

.login-page-body::after {
    background:
        linear-gradient(180deg, rgba(255,255,255,.12), rgba(17,35,64,.06)),
        linear-gradient(90deg, rgba(255,255,255,.45), transparent 54%);
}

.login-page-container {
    width: min(460px, calc(100% - 36px));
    padding: 64px 0 48px;
}

.login-card-side {
    padding: 34px;
    backdrop-filter: blur(18px);
}

.login-card-side h2 {
    color: var(--ink);
    font-size: 30px;
    letter-spacing: 0;
}

.login-card-side h2 i {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), var(--red));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--red) 22%, transparent);
}

.login-card-side .note,
.char-title,
.char-stat .label,
.bank-label,
.recharge-instructions ul,
.empty-state p {
    color: var(--text-soft);
}

.login-quick-actions a {
    border-radius: var(--radius-md);
    border-color: rgba(23, 52, 93, .12);
    background: rgba(255, 255, 255, .72);
    color: var(--red);
}

.login-quick-actions a:hover {
    border-color: color-mix(in srgb, var(--gold) 36%, transparent);
    color: var(--ink);
}

.char-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.char-card {
    padding: 22px;
    overflow: hidden;
}

.char-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--gold) 34%, white);
    background: #fff;
}

.char-header {
    border-bottom-color: rgba(23, 52, 93, .09);
}

.char-avatar {
    border: 0;
    background: rgba(58, 123, 213, .1);
}

.char-name {
    color: var(--ink);
}

.char-stat {
    padding: 3px 0;
}

.char-actions {
    border-top-color: rgba(23, 52, 93, .09);
}

.btn-char-action {
    min-height: 38px;
    border-color: rgba(23, 52, 93, .12);
    background: rgba(244, 248, 255, .9);
}

.btn-char-action:hover {
    background: linear-gradient(135deg, var(--red), var(--gold));
    border-color: transparent;
}

.recharge-layout {
    grid-template-columns: minmax(240px, 310px) 1fr;
    padding: 26px;
}

.qr-wrapper {
    border: 1px solid rgba(23, 52, 93, .1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.qr-overlay {
    background: rgba(17, 35, 64, .82);
    backdrop-filter: blur(10px);
}

.bank-item {
    min-height: 54px;
    border-bottom-color: rgba(23, 52, 93, .08);
}

.content-row {
    border-radius: var(--radius-md);
    border: 1px solid rgba(23, 52, 93, .1);
    background: rgba(244, 248, 255, .74);
}

.btn-copy-small {
    min-height: 32px;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--red), var(--gold));
}

.recharge-instructions {
    border-left: 0;
}

.pagination-wrapper {
    padding: 14px 16px;
}

.pagination li a {
    border-radius: 10px;
    border-color: rgba(23, 52, 93, .12);
}

.pagination li.active a {
    background: linear-gradient(135deg, var(--red), var(--gold));
    border-color: transparent;
}

.history-container .table-responsive {
    overflow: hidden;
}

.history-table {
    background: transparent;
}

.history-table th {
    background: rgba(244, 248, 255, .92);
    border-bottom: 1px solid rgba(23, 52, 93, .1);
}

.history-table td {
    border-bottom-color: rgba(23, 52, 93, .07);
}

.history-table tbody tr {
    transition: background .18s ease;
}

.history-table tbody tr:hover {
    background: rgba(244, 248, 255, .72);
}

.status-badge {
    border-radius: 999px;
    padding: 5px 11px;
}

.alert {
    border-radius: var(--radius-md);
}

.empty-state {
    border-style: solid;
}

.password-badge {
    border-radius: var(--radius-md);
}

.change-password-panel {
    max-width: 600px;
}

.security-note-box {
    border-left: 0;
    border-radius: var(--radius-md);
    background: rgba(244, 248, 255, .82);
}

.footer-note {
    border-top: 1px solid rgba(23, 52, 93, .08);
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(14px);
}

body.theme-2,
body.theme-3,
body.theme-4,
body.theme-5,
body.theme-6,
body.theme-7,
body.theme-8 {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--gold) 16%, transparent), transparent 30%),
        linear-gradient(225deg, color-mix(in srgb, var(--red) 10%, transparent), transparent 28%),
        #f8fafc;
}

body.theme-2 .id-topbar,
body.theme-3 .id-topbar,
body.theme-4 .id-topbar,
body.theme-5 .id-topbar,
body.theme-6 .id-topbar,
body.theme-7 .id-topbar,
body.theme-8 .id-topbar,
body.theme-2 .sidebar,
body.theme-3 .sidebar,
body.theme-4 .sidebar,
body.theme-5 .sidebar,
body.theme-6 .sidebar,
body.theme-7 .sidebar,
body.theme-8 .sidebar {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--red) 88%, #101828), color-mix(in srgb, var(--wine) 88%, #101828));
}

@media (max-width: 900px) {
    .topbar-inner {
        height: auto;
        min-height: 76px;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 16px;
    }

    .topbar-logo img {
        width: 66px;
    }

    .topbar-nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .topbar-nav a {
        flex: 0 0 auto;
    }

    .container {
        width: min(100% - 24px, 760px);
        margin-top: 118px;
    }

    .container.has-sidebar {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .sidebar {
        border-bottom: 0;
    }

    .sidebar-menu-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
        padding: 14px 10px 8px;
    }

    .sidebar-menu-header {
        grid-column: 1 / -1;
        padding-left: 10px;
    }

    .sidebar-menu a {
        margin: 0;
    }

    .sidebar-logout {
        padding: 4px 10px 14px;
    }

    .main-content {
        padding: 22px;
    }

    .page-header-row,
    .bank-row-flex,
    .pagination-wrapper {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .profile-rows div {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 10px 12px;
    }

    .profile-rows span,
    .profile-rows strong {
        padding: 0;
        background: transparent;
    }
}

@media (max-width: 560px) {
    .brand-title {
        font-size: 18px;
    }

    .brand-title::after {
        font-size: 9px;
    }

    .login-card-side {
        padding: 24px;
    }

    .login-card-side h2 {
        font-size: 24px;
    }

    .sidebar-menu-group {
        grid-template-columns: 1fr;
    }

    .char-actions form {
        flex-direction: column;
    }
}
