﻿:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --line: #e6e8ef;
    --text: #1a1f2e;
    --muted: #667085;
    --primary: #9013fe;
    --secondary: #7c05d6;
    --icon-color: #9013fe;
    --danger: #c62828;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Kanit", "Prompt", "Noto Sans Thai", "Sarabun", "Segoe UI", sans-serif;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.topbar {
    border-bottom: 1px solid var(--line);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
}


.topbar-static {
    position: static;
}

.topbar-style-2 {
    background: linear-gradient(90deg, rgba(144, 19, 254, 0.06), rgba(124, 5, 214, 0.06));
}


.topbar-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    min-height: 74px;
}

.topbar-brand-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.row {
    display: flex;
}

.center {
    align-items: center;
}

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

.gap {
    gap: 16px;
}

.brand {
    text-decoration: none;
    font-weight: 700;
    color: var(--text);
    padding: 10px 0;
}

.brand-with-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 130px;
    height: 52px;
    object-fit: contain;
    border-radius: 4px;
}

.brand-fallback {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

.brand-text {
    display: none;
}

nav a,
.btn-link {
    background: none;
    border: none;
    text-decoration: none;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    padding: 0;
}

nav {
    align-items: center;
}

.top-menu {
    display: flex;
    gap: 18px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.top-menu-link {
    color: #111827;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    gap: 8px;
}

.top-contact-trigger {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.top-menu-link:hover {
    color: #000;
}

.menu-icon {
    color: #111827;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.menu-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
    white-space: nowrap;
}

.top-balance-chip {
    display: inline-flex;
    align-items: center;
    height: 42px;
    border-radius: 999px;
    border: 1px solid #f2b5b5;
    color: #b91c1c;
    background: #fff2f2;
    padding: 0 14px;
    font-weight: 700;
}

.top-search-form {
    position: relative;
}

.top-search-form input {
    width: 210px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 0 16px 0 36px;
    background: #f8fafc;
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.top-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    color: #111827;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    background: #fff;
}

.top-action-btn-primary {
    background: #ef1010;
    color: #fff;
}

.user-dropdown {
    position: relative;
}

.user-trigger {
    min-width: 106px;
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 230px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    display: none;
    z-index: 60;
}

.user-dropdown.open .user-dropdown-menu {
    display: block;
}

.user-dropdown-head {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 800;
    color: #111827;
    font-size: 18px;
    background: #fafafa;
}

.user-dropdown-menu a,
.user-dropdown-logout button {
    width: 100%;
    display: block;
    text-align: left;
    border: 0;
    border-top: 1px solid #f3f4f6;
    background: #fff;
    color: #111827;
    text-decoration: none;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.user-dropdown-menu a:hover,
.user-dropdown-logout button:hover {
    background: #f8fafc;
}

.user-dropdown-logout {
    margin: 0;
}

main {
    padding: 20px 0 40px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.section {
    margin-top: 16px;
}

.home-section-title {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0b1220;
}

.home-section-subtitle {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

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

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

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

.thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
}

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

.category-banner {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

.category-banner-media {
    width: 100%;
    border-bottom: 1px solid var(--line);
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-category {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.category-empty {
    height: 100%;
    display: grid;
    place-items: center;
    color: #fff;
}

.category-banner-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text);
}

.category-banner-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.category-go-btn {
    background: #ef1010;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.card form,
.form-wrap form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topbar form {
    display: inline;
    margin: 0;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

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

input,
textarea,
select {
    border: 1px solid #cbd3e1;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

button {
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    padding: 10px 12px;
    cursor: pointer;
}

button.danger {
    background: var(--danger);
}

.form-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.login-captcha {
    margin: 8px 0 2px;
}

.login-captcha-shell {
    min-height: 78px;
    display: flex;
    align-items: center;
}

.login-captcha-shell.is-error {
    border: 1px dashed #ef4444;
    border-radius: 8px;
    padding: 10px;
    background: #fff5f5;
}

.login-captcha-hint {
    margin: 8px 0 2px;
    font-size: 13px;
    color: #6b7280;
    display: none;
}

.login-captcha-hint.is-error {
    display: block;
    color: #b91c1c;
    font-weight: 700;
}

.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 14px;
    border: 1px solid var(--line);
    background: #fff;
}

.alert.success {
    border-color: #87d8b5;
    background: #ebfff4;
}

.alert.danger {
    border-color: #ef9a9a;
    background: #ffefef;
}

.alert.warning {
    border-color: #ffd67a;
    background: #fff8e4;
}

.alert.info {
    border-color: #9ec5fe;
    background: #ecf4ff;
}

.flash-toast-wrap {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2500;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 24px));
}

.flash-toast {
    border-radius: 12px;
    border: 1px solid #d9e2ef;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
    background: #fff;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.26s ease, transform 0.26s ease;
}

.flash-toast.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.flash-toast.is-closing {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
}

.flash-toast-body {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.flash-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    font-weight: 900;
}

.flash-toast-text {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.flash-toast-close {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.flash-success {
    border-color: #86efac;
    background: #f0fdf4;
}

.flash-success .flash-toast-icon {
    background: #dcfce7;
    color: #15803d;
}

.flash-danger,
.flash-error {
    border-color: #fca5a5;
    background: #fef2f2;
}

.flash-danger .flash-toast-icon,
.flash-error .flash-toast-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.flash-warning {
    border-color: #fcd34d;
    background: #fffbeb;
}

.flash-warning .flash-toast-icon {
    background: #fef3c7;
    color: #b45309;
}

.flash-info {
    border-color: #93c5fd;
    background: #eff6ff;
}

.flash-info .flash-toast-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.flash-modal {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.26s ease;
}

.flash-modal.is-open {
    opacity: 1;
}

.flash-modal.is-closing {
    opacity: 0;
}

.flash-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.42);
}

.flash-modal-card {
    position: relative;
    width: min(540px, calc(100vw - 26px));
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.28);
    padding: 26px 22px 24px;
    text-align: center;
    transform: translateY(10px) scale(0.98);
    opacity: 0;
    transition: transform 0.26s ease, opacity 0.26s ease;
}

.flash-modal.is-open .flash-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.flash-modal-icon {
    width: 108px;
    height: 108px;
    border-radius: 999px;
    margin: 4px auto 10px;
    display: grid;
    place-items: center;
    font-size: 52px;
    font-weight: 300;
    border: 5px solid #9ca3af;
    color: #6b7280;
    line-height: 1;
}

.flash-modal-title {
    margin: 0;
    font-size: 40px;
    color: #4b5563;
    font-weight: 800;
}

.flash-modal-text {
    margin: 12px 0 20px;
    color: #6b7280;
    font-size: 24px;
    font-weight: 600;
}

.flash-modal-ok {
    min-width: 80px;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    background: #6466d9;
    color: #fff;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.flash-success .flash-modal-icon {
    border-color: #4ade80;
    color: #16a34a;
}

.flash-success .flash-modal-title {
    color: #166534;
}

.flash-danger .flash-modal-icon,
.flash-error .flash-modal-icon {
    border-color: #f28383;
    color: #e86f76;
}

.flash-danger .flash-modal-title,
.flash-error .flash-modal-title {
    color: #4b5563;
}

.flash-warning .flash-modal-icon {
    border-color: #facc15;
    color: #d97706;
}

.flash-info .flash-modal-icon {
    border-color: #93c5fd;
    color: #2563eb;
}

.list-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.user-actions {
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

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

.price {
    font-weight: 700;
}

.product-card {
    border-radius: 16px;
    background: #f8fafc;
    max-width: 360px;
    margin: 0 auto;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    border: 1px solid #e6ebf4;
    padding: 14px;
}

.home-hero {
    padding: 0;
    overflow: hidden;
    background: #0b1220;
}

.home-slider {
    position: relative;
    height: clamp(240px, 31vw, 430px);
    background: #0b1220;
}

.home-banner {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    position: absolute;
    inset: 0;
}

.home-banner.active {
    opacity: 1;
    position: absolute;
}

.home-banner-placeholder {
    position: static;
    opacity: 1;
    min-height: 240px;
    display: grid;
    place-items: center;
    color: #64748b;
    background: linear-gradient(120deg, #ddd6fe, #c4b5fd, #93c5fd);
}

.announce-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e7ebf3;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.announce-badge {
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    font-size: 20px;
}

.announce-text {
    font-weight: 600;
    color: #111827;
    font-size: 16px;
    white-space: nowrap;
    display: inline-block;
    padding-right: 80px;
    animation: announce-scroll 14s linear infinite;
}

.announce-marquee {
    overflow: hidden;
    position: relative;
}

@keyframes announce-scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

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

.stats-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 112px;
}

.stats-copy {
    text-align: left;
}

.stats-card h3 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.15;
}

.stats-card p {
    margin: 0;
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
}

.stats-icon {
    color: var(--icon-color);
    line-height: 1;
    flex: 0 0 auto;
}

.stats-icon-svg {
    width: 56px;
    height: 56px;
    display: block;
    fill: currentColor;
}

.product-thumb {
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
    background: #2b1147;
    border-radius: 14px;
}

.product-title {
    text-align: center;
    font-size: 20px;
    margin: 12px 0 8px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #0b1220;
}

.buy-btn {
    display: inline-block;
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    text-align: center;
    color: #111827;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    font-weight: 700;
}

.buy-btn.full {
    width: 100%;
}

.buy-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

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

.topup-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 42px;
    font-weight: 800;
}

.topup-ico {
    color: var(--primary);
    font-size: 30px;
}

.topup-channel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.topup-channel-card {
    text-align: center;
    padding: 18px;
}

.topup-channel-card.active {
    border: 2px solid #f97316;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.18);
}

.topup-channel-logo {
    display: inline-block;
    color: #ef4444;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
}

.topup-channel-logo small {
    color: #374151;
    font-size: 16px;
    font-weight: 700;
}

.topup-channel-card h2 {
    margin: 8px 0 6px;
    font-size: 36px;
}

.topup-channel-card p {
    margin: 0;
    color: #4b5563;
    font-size: 22px;
}

.topup-form-card {
    max-width: 760px;
    margin: 20px auto 0;
    text-align: center;
    padding: 30px 34px;
}

.topup-form-card h2 {
    margin: 0;
    font-size: 48px;
    line-height: 1;
}

.topup-form-card h3 {
    margin: 12px 0 10px;
    font-size: 30px;
}

.topup-phone-art {
    font-size: 88px;
    line-height: 1;
    margin-top: 2px;
}

.topup-fee {
    margin: 14px 0 16px;
    font-size: 20px;
    font-weight: 700;
}

.topup-form {
    max-width: 520px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.topup-form input {
    text-align: center;
    font-size: 14px;
    border-radius: 12px;
    padding: 13px 14px;
    background: #f8fafc;
    border: 1px solid #d7deea;
}

.topup-form button {
    border-radius: 10px;
    font-size: 17px;
    font-weight: 800;
    padding: 11px 16px;
}

.topup-hero-card {
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.topup-v2-wrap {
    max-width: 780px;
    margin: 12px auto 0;
}

.topup-v2-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.topup-v2-head h2 {
    margin: 0;
    font-size: 24px;
}

.topup-v2-head strong {
    color: #ef1010;
    font-size: 22px;
}

.topup-v2-note {
    border: 1px solid #d7dee9;
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    color: #6b7280;
    margin-bottom: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topup-v2-note-icon {
    color: #111827;
}

.topup-v2-panel {
    border: 1px solid #d7dee9;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.topup-v2-form {
    display: grid;
    gap: 10px;
}

.topup-v2-form label {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.topup-v2-form input[type="url"] {
    height: 42px;
    font-size: 13px;
    border: 1px solid #d2d8e3;
    border-radius: 8px;
    padding: 0 12px;
}

.topup-v2-form small {
    color: #6b7280;
    font-size: 11px;
}

.topup-v2-submit {
    height: 40px;
    border-radius: 8px;
    background: #ef1010;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    margin-top: 4px;
}

.topup-v2-foot {
    text-align: center;
    margin: 12px 0 4px;
    color: #6b7280;
    font-size: 12px;
}

.finance-hub {
    display: grid;
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
}

.finance-card {
    padding: 24px 18px;
}

.finance-logo {
    display: inline-block;
    color: #ef4444;
    font-weight: 800;
    line-height: 1.1;
    font-size: 34px;
}

.finance-logo small {
    color: #4b5563;
    font-size: 20px;
    font-weight: 700;
}

.finance-card h2 {
    margin: 10px 0 6px;
    font-size: 52px;
}

.finance-card p {
    margin: 0;
    color: #4b5563;
    font-size: 22px;
}

.finance-form-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.buy-btn-card {
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 800;
}

.product-card .price {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}

.product-card .muted {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.product-breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 22px;
    align-items: start;
}

.detail-image {
    width: 100%;
    max-width: 360px;
    border-radius: 8px;
    display: block;
}

.detail-placeholder {
    min-height: 360px;
    border: 1px dashed #cbd5e1;
    display: grid;
    place-items: center;
}

.product-info-col h1 {
    margin-top: 0;
}

.buy-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-box {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-box input {
    border: 0;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    text-align: center;
    border-radius: 0;
}

.qty-btn {
    border-radius: 0;
    background: #e2e8f0;
    color: #111827;
    font-weight: 700;
}

.btn-outline {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #111827;
    background: #fff;
}

.account-head h1 {
    margin: 0;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.account-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    padding: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
    border-color: #d8deea;
}

.account-card h2 {
    margin: 10px 0 4px;
}

.account-card p {
    margin: 0;
}

.account-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 20%, #bc6cff, #7e22ce 60%, #5b11a8 100%);
    box-shadow: 0 10px 22px rgba(126, 34, 206, 0.32);
    color: #fff;
}

.account-icon-svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.account-action button {
    margin-top: 12px;
}

.admin-tabs {
    padding: 8px 10px;
}

.admin-tab-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-tab {
    text-decoration: none;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    font-size: 14px;
}

.history-panel {
    overflow: hidden;
}

.history-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.history-inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-inline-form input,
.history-inline-form select {
    padding: 8px 10px;
}

.history-copy-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.received-cell {
    white-space: pre-wrap;
    word-break: break-word;
}

.table-wrap {
    overflow-x: auto;
}

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

.history-table thead th {
    background: #111827;
    color: #fff;
    text-align: left;
    padding: 10px 8px;
}

.history-table tbody td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 8px;
    vertical-align: top;
}

.user-title {
    margin: 0 0 4px;
}

.users-table td form {
    display: block;
    margin: 0;
}

.btn-warning {
    display: inline-block;
    text-decoration: none;
    background: #facc15;
    color: #111827;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    text-align: center;
}

.btn-success {
    display: inline-block;
    background: #1f8b4c;
    color: #fff;
    border-radius: 6px;
    padding: 10px 14px;
    text-decoration: none;
}

.danger-outline {
    border-color: #ef4444;
    color: #991b1b;
}

.shop-title {
    text-align: center;
    margin-top: 0;
}

.shop-toolbar-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.thumb-mini {
    width: 98px;
    height: 98px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #d1d5db;
}

.shop-table td form {
    display: block;
    margin: 0;
}

.category-table th,
.category-table td {
    font-size: 14px;
}

.category-table td:nth-child(3) {
    font-weight: 700;
}

.category-table td:nth-child(4) {
    color: #475569;
}

.shop-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.shop-hub-card {
    display: block;
    text-decoration: none;
    color: #111827;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    padding: 20px 16px;
    text-align: center;
}

.shop-hub-icon {
    font-size: 56px;
    line-height: 1;
}

.shop-hub-card h3 {
    margin: 12px 0 6px;
}

.shop-hub-card p {
    margin: 0 0 8px;
}

.shop-hub-card small {
    color: #64748b;
}

.preview-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 8px;
    display: block;
}

.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.pager-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pager-links a {
    text-decoration: none;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
    background: #fff;
}

.pager-links a.active {
    background: #e5e7eb;
}

.user-dialog {
    border: 0;
    border-radius: 12px;
    width: min(520px, 95%);
    padding: 0;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.user-dialog::backdrop {
    background: rgba(17, 24, 39, 0);
    transition: background 0.2s ease;
}

.user-dialog.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.user-dialog.is-open::backdrop {
    background: rgba(17, 24, 39, 0.55);
}

.contact-dialog {
    width: min(560px, calc(100vw - 24px));
    border: 0;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.contact-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid #edf1f7;
}

.contact-modal-head h3 {
    margin: 0;
    font-size: 30px;
}

.contact-modal-head p {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 15px;
}

.contact-list {
    display: grid;
    gap: 10px;
    padding: 14px 18px 18px;
}

.contact-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.contact-item:hover {
    background: #f8fafc;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 24px;
    color: #fff;
}

.contact-icon.discord {
    background: #5865f2;
}

.contact-icon.facebook {
    background: #1877f2;
}

.contact-copy strong {
    display: block;
    font-size: 16px;
}

.contact-copy span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-top: 2px;
    word-break: break-all;
}

.user-dialog form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.dialog-head h3 {
    margin: 0;
}

.login-error-dialog {
    width: min(500px, 94%);
}

.login-error-content {
    padding: 28px 22px 24px !important;
    gap: 10px;
    text-align: center;
}

.login-error-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #ea6f76;
    color: #ea6f76;
    font-size: 92px;
    line-height: 1;
    display: grid;
    place-items: center;
    margin: 0 auto 8px;
}

.login-error-content h2 {
    margin: 0;
    color: #4b5563;
    font-size: 48px;
}

.login-error-content p {
    margin: 4px 0 12px;
    color: #5b5f66;
    font-size: 32px;
    font-weight: 600;
}

.login-error-ok {
    background: #6964d8;
    color: #fff;
    border-radius: 8px;
    min-width: 96px;
    height: 44px;
    font-weight: 700;
}

.login-error-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dialog-actions {
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.buy-confirm-dialog {
    width: min(520px, 95%);
}

.buy-confirm-content {
    padding: 26px 24px;
    text-align: center;
}

.buy-confirm-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid #f0b37a;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    font-size: 54px;
    font-weight: 700;
    line-height: 1;
}

.buy-confirm-content h2 {
    margin: 0 0 10px;
    font-size: 44px;
}

.buy-confirm-content p {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 30px;
}

.buy-confirm-actions {
    justify-content: center;
    gap: 10px;
}

.buy-confirm-actions .btn-outline {
    background: #2f8de4;
    color: #fff;
    border-color: #2f8de4;
}

.theme-dark {
    --bg: #0f172a;
    --line: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
}

.theme-dark .topbar,
.theme-dark .card,
.theme-dark .stats-card,
.theme-dark .shop-hub-card,
.theme-dark .announce-row {
    background: rgba(15, 23, 42, 0.88);
    border-color: #334155;
}

.theme-dark .top-menu a,
.theme-dark .brand,
.theme-dark .announce-text {
    color: #e2e8f0;
}

.anim-zoom .card {
    animation: zoom-in 0.32s ease;
}

.anim-fade .card {
    animation: fade-in 0.4s ease;
}

.icon-outline .nav-ico {
    font-weight: 400;
}

.icon-fill .nav-ico {
    font-weight: 800;
}

@keyframes zoom-in {
    from { transform: scale(0.98); opacity: 0.75; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (max-width: 900px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .user-actions {
        grid-template-columns: 1fr;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }

    .history-inline-form {
        width: 100%;
        justify-content: flex-start;
    }

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

    .product-title {
        font-size: 26px;
    }

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

    .detail-image {
        max-width: 100%;
    }

    .shop-hub-grid {
        grid-template-columns: 1fr;
    }

    .category-table th,
    .category-table td {
        font-size: 13px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-banner-body h3 {
        font-size: 22px;
    }

    .category-go-btn {
        font-size: 14px;
        padding: 7px 12px;
    }

    .home-section-title {
        font-size: 30px;
    }

    .home-section-subtitle {
        font-size: 16px;
    }

    .buy-btn-card {
        font-size: 18px;
    }

    .product-card .price {
        font-size: 18px;
    }

    .product-card .muted {
        font-size: 15px;
    }

    .announce-row {
        grid-template-columns: 1fr;
    }

    .announce-badge {
        font-size: 24px;
    }

    .announce-text {
        font-size: 22px;
        animation-duration: 12s;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-card h3 {
        font-size: 24px;
    }

    .stats-card p {
        font-size: 28px;
    }

    .stats-card {
        min-height: 0;
    }

    .stats-icon-svg {
        width: 46px;
        height: 46px;
    }

    .topbar-main {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 8px 0;
    }

    .topbar-brand-menu {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        flex-wrap: wrap;
    }

    .brand-logo {
        width: 96px;
        height: 40px;
    }

    .top-menu {
        width: 100%;
        gap: 12px;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .top-menu-link {
        font-size: 14px;
        flex: 0 0 auto;
    }

    .top-actions {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .top-search-form {
        flex: 1;
        min-width: 0;
    }

    .top-search-form input {
        width: 100%;
        height: 38px;
        font-size: 14px;
    }

    .top-balance-chip {
        height: 36px;
        font-size: 13px;
        padding: 0 10px;
    }

    .top-action-btn {
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

    .user-dropdown-menu {
        right: auto;
        left: 0;
    }

    .buy-confirm-content h2 {
        font-size: 30px;
    }

    .buy-confirm-content p {
        font-size: 22px;
    }

    .topup-title {
        font-size: 30px;
    }

    .topup-channel-card h2 {
        font-size: 26px;
    }

    .topup-channel-card p {
        font-size: 18px;
    }

    .topup-form-card h2 {
        font-size: 34px;
    }

    .topup-form-card h3 {
        font-size: 22px;
    }

    .topup-phone-art {
        font-size: 60px;
    }

    .topup-fee {
        font-size: 16px;
    }

    .topup-form input {
        font-size: 13px;
    }

    .topup-form button {
        font-size: 15px;
    }

    .finance-card h2 {
        font-size: 34px;
    }

    .finance-card p {
        font-size: 18px;
    }

    .flash-modal-icon {
        width: 86px;
        height: 86px;
        font-size: 52px;
        border-width: 4px;
    }

    .flash-modal-title {
        font-size: 30px;
    }

    .flash-modal-text {
        font-size: 18px;
    }

    .flash-modal-ok {
        font-size: 16px;
    }

    .topup-v2-head h2,
    .topup-v2-head strong {
        font-size: 22px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(1100px, 96%);
    }

    main {
        padding: 12px 0 24px;
    }

    .card {
        border-radius: 12px;
        padding: 12px;
    }

    .home-banner {
        height: 100%;
    }

    .home-slider {
        height: clamp(190px, 46vw, 280px);
    }

    .announce-row {
        gap: 10px;
        padding: 10px 12px;
    }

    .announce-badge {
        font-size: 16px;
        padding: 8px 10px;
    }

    .announce-text {
        font-size: 13px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stats-card {
        padding: 10px 12px;
        min-height: 84px;
    }

    .stats-icon-svg {
        width: 36px;
        height: 36px;
    }

    .stats-card h3 {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .stats-card p {
        font-size: 16px;
    }

    .category-banner-body {
        padding: 10px 12px;
    }

    .category-banner-body h3 {
        font-size: 15px;
    }

    .category-go-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .product-card {
        max-width: 100%;
        padding: 10px;
    }

    .product-title {
        font-size: 18px;
    }

    .product-card .price {
        font-size: 13px;
    }

    .buy-btn-card {
        font-size: 14px;
    }

    .product-card .muted {
        font-size: 12px;
    }

    .user-dropdown-menu {
        min-width: 210px;
    }

    .contact-dialog {
        width: calc(100vw - 14px);
    }

    .contact-modal-head h3 {
        font-size: 24px;
    }

    .flash-modal-card {
        width: calc(100vw - 14px);
        padding: 18px 12px;
    }
}






