/* ==================== RESET & ROOT ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #00ff88;
    --primary-dark: #00cc6f;
    --discord: #5865F2;
    --telegram: #0088cc;
    --facebook: #1877f2;
    --zalo: #0068ff;
    --bg-dark: #0a0a0a;
    --bg-card: #151515;
    --bg-input: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --border: #2a2a2a;
    --error: #ff4444;
    --success: #00ff88;
    --warning: #ffa500;
}

/* ==================== BODY & BACKGROUND ==================== */
body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0,255,136,.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0,255,136,.03) 0%, transparent 50%);
    animation: moveBackground 20s ease-in-out infinite;
    pointer-events: none; z-index: 0;
}
body::after {
    content: '';
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(0,255,136,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,136,.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none; z-index: 0;
}
@keyframes moveBackground {
    0%,100% { transform: translate(0,0); }
    50% { transform: translate(-5%,-5%); }
}

/* ==================== HEADER & NAV ==================== */
header {
    background: rgba(0,0,0,.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 20px rgba(0,255,136,.1);
    position: fixed; width: 100%; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(0,255,136,.1);
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem; font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 2px; text-transform: uppercase;
}
.logo span {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0,255,136,.5);
}

/* ==================== HAMBURGER ==================== */
.hamburger { display: flex; flex-direction: column; cursor: pointer; gap: 5px; }
.hamburger span { width: 25px; height: 3px; background: var(--primary); border-radius: 3px; transition: all .3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(8px,8px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px,-6px); }

/* ==================== NAV LINKS (MOBILE DRAWER) ==================== */
.nav-links {
    position: fixed; top: 80px; right: -100%;
    width: 280px; max-height: calc(100vh - 80px);
    background: rgba(0,0,0,.95); backdrop-filter: blur(10px);
    display: flex; flex-direction: column;
    padding: 2rem; transition: right .3s;
    border-left: 2px solid var(--primary);
    z-index: 999; overflow-y: auto;
}
.nav-links.active { right: 0; }
.nav-link {
    color: var(--text-secondary); text-decoration: none;
    font-weight: 600; transition: all .3s;
    padding: 1rem; border-radius: 5px;
    width: 100%; text-align: left;
    border-bottom: 1px solid var(--border);
}
.nav-link:hover { color: var(--primary); background: rgba(0,255,136,.05); }

/* ==================== BUTTONS ==================== */
.btn-logout {
    background: #ff4444; color: white;
    border: none; padding: 1rem 1.2rem;
    border-radius: 5px; font-weight: 600;
    cursor: pointer; transition: all .3s;
    width: 100%; margin-top: 1rem;
    font-family: 'Rajdhani', sans-serif; font-size: 1rem;
}
.btn-logout:hover { background: #cc0000; transform: translateY(-2px); }

.btn-submit {
    width: 100%; padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none; border-radius: 10px;
    color: #000; font-size: 1.2rem; font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer; transition: all .3s;
    text-transform: uppercase; letter-spacing: 2px;
}
.btn-submit:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,255,136,.4); }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }

.copy-btn {
    background: var(--primary); color: #000;
    border: none; padding: .6rem 1.2rem;
    border-radius: 8px; cursor: pointer;
    font-weight: 700; transition: all .3s; font-size: .9rem;
    margin-left: 1rem;
}
.copy-btn:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(0,255,136,.3); }

/* ==================== MAIN LAYOUT ==================== */
main {
    margin-top: 100px; padding: 2rem;
    max-width: 1400px;
    margin-left: auto; margin-right: auto;
    min-height: calc(100vh - 180px);
    position: relative; z-index: 1;
}
main.narrow { max-width: 900px; }

/* ==================== PAGE HEADER ==================== */
.page-header { text-align: center; margin-bottom: 3rem; animation: slideUp .6s ease; }
.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem; margin-bottom: .5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase; letter-spacing: 2px;
}
.page-subtitle { color: var(--text-secondary); font-size: 1.1rem; }

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 15px; padding: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative; overflow: hidden;
}
.card-glow::before {
    content: ''; position: absolute; inset: -2px; border-radius: 15px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    opacity: .2; animation: rotateBorder 3s linear infinite; z-index: -1;
}
@keyframes rotateBorder {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== STATS GRID ==================== */
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.stat-item {
    background: var(--bg-input); padding: 1.5rem;
    border-radius: 10px; border: 1px solid var(--border); text-align: center;
}
.stat-label { color: var(--text-secondary); font-size: .95rem; margin-bottom: .8rem; text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--primary); font-family: 'Orbitron', sans-serif; }

/* ==================== FORM ==================== */
.form-group { margin-bottom: 1.8rem; }
.form-group label {
    display: block; margin-bottom: .8rem;
    color: var(--text-primary); font-weight: 600;
    font-size: 1rem; text-transform: uppercase; letter-spacing: 1px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 1rem 1.2rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 10px; color: var(--text-primary);
    font-size: 1rem; font-family: 'Rajdhani', sans-serif; transition: all .3s;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,255,136,.1);
}
/* Ẩn spinner trên input[type=number] */
.form-group input[type=number]::-webkit-inner-spin-button,
.form-group input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.form-group input[type=number] { -moz-appearance: textfield; }
.form-hint { font-size: .9rem; color: var(--text-secondary); margin-top: .5rem; }

/* ==================== ALERT ==================== */
.alert {
    padding: 1.2rem 1.5rem; border-radius: 10px;
    margin-bottom: 1.5rem; font-weight: 600;
    display: none; font-size: 1.05rem;
}
.alert.success { background: rgba(0,255,136,.15); border: 2px solid var(--primary); color: var(--primary); }
.alert.error   { background: rgba(255,68,68,.15);  border: 2px solid #ff4444; color: #ff4444; }
.alert.show    { display: block; animation: slideDown .3s ease; }

/* ==================== SECTION TITLE ==================== */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem; color: var(--primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase; letter-spacing: 1px;
}

/* ==================== LOADING ==================== */
.loading { text-align: center; padding: 2rem; font-size: 1.1rem; color: var(--primary); }
.loading::after { content: '...'; animation: dots 1.5s infinite; }
@keyframes dots {
    0%,20% { content: '.'; }
    40%     { content: '..'; }
    60%,100%{ content: '...'; }
}

/* ==================== EMPTY STATE ==================== */
.empty-state { text-align: center; padding: 5rem 2rem; color: var(--text-secondary); }
.empty-icon  { font-size: 5rem; margin-bottom: 1.5rem; opacity: .5; }
.empty-text  { font-size: 1.4rem; margin-bottom: .8rem; }

/* ==================== FOOTER ==================== */
footer {
    background: rgba(0,0,0,.8); backdrop-filter: blur(10px);
    padding: 2rem; text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(0,255,136,.1);
    position: relative; z-index: 1; margin-top: 3rem;
}

/* ==================== ANIMATIONS ==================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==================== PROFILE (account.html) ==================== */
.profile-header {
    display: flex; align-items: center; gap: 2rem;
    margin-bottom: 2rem; padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}
.profile-avatar {
    width: 100px; height: 100px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; font-weight: 700; color: #000;
    font-family: 'Orbitron', sans-serif;
}
.profile-info h2 { font-family: 'Orbitron', sans-serif; font-size: 2rem; margin-bottom: .5rem; }
.profile-email   { color: var(--text-secondary); font-size: 1.1rem; }

/* ==================== HISTORY (history.html) ==================== */
.stats-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 1.5rem; margin-bottom: 3rem;
}
.stat-box {
    background: var(--bg-card); border: 2px solid var(--border);
    border-radius: 15px; padding: 2rem; text-align: center;
    transition: all .3s; position: relative; overflow: hidden;
}
.stat-box::before {
    content: ''; position: absolute; inset: -2px; border-radius: 15px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity .3s; z-index: -1;
}
.stat-box:hover::before { opacity: .3; }
.stat-box:hover { border-color: var(--primary); transform: translateY(-5px); }

.history-list { display: flex; flex-direction: column; gap: 1.5rem; }
.history-item {
    background: var(--bg-card); border: 2px solid var(--border);
    border-radius: 15px; overflow: hidden; transition: all .3s;
}
.history-item.expanded { border-color: var(--primary); box-shadow: 0 10px 30px rgba(0,255,136,.2); }
.history-header {
    padding: 1.5rem 2rem; display: flex;
    justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none; transition: background .3s;
}
.history-header:hover { background: var(--bg-input); }
.history-main-info {
    flex: 1; display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 2rem; align-items: center;
}
.order-id { font-size: .95rem; color: var(--text-secondary); font-weight: 700; font-family: 'Orbitron', sans-serif; }
.product-name { font-weight: 700; color: var(--text-primary); font-size: 1.2rem; }
.product-meta { font-size: .9rem; color: var(--text-secondary); }
.order-price { font-size: 1.5rem; font-weight: 700; color: var(--primary); font-family: 'Orbitron', sans-serif; }
.expand-btn {
    background: var(--bg-input); border: 2px solid var(--border);
    width: 45px; height: 45px; border-radius: 50%;
    color: var(--primary); font-size: 1.2rem;
    cursor: pointer; transition: all .3s;
    display: flex; align-items: center; justify-content: center;
}
.expand-btn:hover { background: var(--primary); color: #000; border-color: var(--primary); }
.expand-btn.active { transform: rotate(180deg); }
.history-details { max-height: 0; overflow: hidden; transition: max-height .4s ease-out; background: var(--bg-input); }
.history-details.active { max-height: 1500px; border-top: 2px solid var(--border); }
.details-content { padding: 2rem; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.detail-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.detail-title {
    color: var(--primary); font-weight: 700; margin-bottom: 1.2rem;
    font-size: 1.2rem; display: flex; align-items: center; gap: .5rem;
    font-family: 'Orbitron', sans-serif;
}
.detail-row { display: flex; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-secondary); font-size: 1rem; }
.detail-value { color: var(--text-primary); font-weight: 600; text-align: right; }
.account-box { background: var(--bg-input); border: 2px solid var(--primary); border-radius: 10px; padding: 1.5rem; margin-top: 1rem; }
.credential-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.credential-value {
    flex: 1; background: var(--bg-dark); padding: 1rem;
    border-radius: 8px; color: var(--primary);
    font-family: 'Courier New', monospace; font-weight: 700;
    word-break: break-all; border: 1px solid var(--border);
}
.status-badge { padding: .5rem 1.2rem; border-radius: 20px; font-size: .9rem; font-weight: 700; background: var(--primary); color: #000; }

/* ==================== PRODUCT / HOME (index.html) ==================== */
.hero { text-align: center; padding: 3rem 1rem; margin-bottom: 3rem; animation: slideUp .6s ease; }
.hero h1 {
    font-family: 'Orbitron', sans-serif; font-size: 3.5rem; margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { font-size: 1.3rem; color: var(--text-secondary); }

.breadcrumb {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: 2rem; padding: 1rem 1.5rem;
    background: var(--bg-card); border-radius: 10px; border: 1px solid var(--border);
}
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 600; transition: opacity .3s; }
.breadcrumb a:hover { opacity: .7; }
.breadcrumb span { color: var(--text-secondary); }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 2rem; margin-bottom: 3rem; }
.category-card {
    background: var(--bg-card); border-radius: 15px; overflow: hidden;
    border: 2px solid var(--border);
    transition: all .4s cubic-bezier(.175,.885,.32,1.275);
    cursor: pointer; position: relative;
}
.category-card::before {
    content: ''; position: absolute; inset: -2px; border-radius: 15px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity .3s; z-index: -1;
}
.category-card:hover::before { opacity: .5; }
.category-card:hover { transform: translateY(-10px) scale(1.02); border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,255,136,.2); }
.category-image { width: 100%; height: 200px; object-fit: cover; background: var(--bg-input); }
.category-info { padding: 1.5rem; text-align: center; }
.category-name { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); margin-bottom: .5rem; font-family: 'Orbitron', sans-serif; }
.category-count { color: var(--primary); font-size: 1rem; font-weight: 600; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 2rem; margin-bottom: 3rem; }
.product-card {
    background: var(--bg-card); border-radius: 15px; padding: 2rem;
    border: 2px solid var(--border); transition: all .3s; position: relative;
}
.product-card::before {
    content: ''; position: absolute; inset: -2px; border-radius: 15px;
    background: linear-gradient(135deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity .3s; z-index: -1;
}
.product-card:hover::before { opacity: .3; }
.product-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 15px 35px rgba(0,255,136,.2); }
.product-header { margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: 1rem; }
.product-price { font-size: 1.8rem; color: var(--primary); font-weight: 700; font-family: 'Orbitron', sans-serif; }
.product-desc { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.7; font-size: 1rem; }
.product-stock { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.5rem; font-size: 1rem; }
.stock-badge { background: var(--primary); color: #000; padding: .4rem 1rem; border-radius: 20px; font-size: .9rem; font-weight: 700; }
.stock-badge.out-of-stock { background: #ff4444; color: white; }
.btn-buy {
    width: 100%; padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none; border-radius: 10px; color: #000;
    font-size: 1.1rem; font-weight: 700; font-family: 'Orbitron', sans-serif;
    cursor: pointer; transition: all .3s; text-transform: uppercase; letter-spacing: 1px;
}
.btn-buy:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,255,136,.4); }
.btn-buy:disabled { opacity: .5; cursor: not-allowed; background: #666; }
.btn-back {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: 1rem 1.8rem; background: var(--bg-card);
    border: 2px solid var(--border); border-radius: 10px;
    color: var(--text-primary); text-decoration: none;
    font-weight: 700; transition: all .3s; margin-bottom: 2rem;
}
.btn-back:hover { border-color: var(--primary); background: var(--bg-input); transform: translateX(-5px); }
.user-info { display: flex; align-items: center; gap: 1.5rem; }
.balance {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: .5rem 1.2rem; border-radius: 20px;
    font-weight: 700; color: #000; font-size: 1rem;
}
.section-title-lg {
    font-family: 'Orbitron', sans-serif; font-size: 2.2rem;
    margin-bottom: 2.5rem; color: var(--text-primary);
    text-align: center; text-transform: uppercase; letter-spacing: 2px;
}
.hidden { display: none; }

/* ==================== MODAL ==================== */
.modal-overlay {
    display: none; position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.85); backdrop-filter: blur(5px);
    z-index: 2000; animation: fadeIn .3s ease;
}
.modal-overlay.active { display: flex; justify-content: center; align-items: center; padding: 1rem; }
.modal {
    background: var(--bg-card); border: 2px solid var(--primary);
    border-radius: 20px; max-width: 500px; width: 100%;
    max-height: 90vh; overflow-y: auto; position: relative;
    animation: slideDown .3s ease; box-shadow: 0 20px 60px rgba(0,255,136,.3);
}
@keyframes slideDown {
    from { opacity:0; transform: translateY(-50px) scale(.9); }
    to   { opacity:1; transform: translateY(0) scale(1); }
}
.modal-header { padding: 2rem; border-bottom: 2px solid var(--border); position: relative; }
.modal-title { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; color: var(--primary); text-align: center; text-transform: uppercase; }
.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: transparent; border: none; color: var(--text-secondary);
    font-size: 2rem; cursor: pointer; transition: all .3s;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.modal-close:hover { color: var(--primary); background: rgba(0,255,136,.1); transform: rotate(90deg); }
.modal-body { padding: 2rem; }
.modal-product-info { background: var(--bg-input); border: 2px solid var(--border); border-radius: 10px; padding: 1.5rem; margin-bottom: 2rem; }
.modal-product-name { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; }
.modal-info-row { display: flex; justify-content: space-between; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.modal-info-row:last-child { border-bottom: none; }
.modal-info-label { color: var(--text-secondary); font-weight: 600; }
.modal-info-value { color: var(--text-primary); font-weight: 700; font-family: 'Orbitron', sans-serif; }
.modal-info-value.price { color: var(--primary); font-size: 1.2rem; }
.quantity-selector { margin-bottom: 2rem; }
.quantity-label { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.quantity-controls { display: flex; align-items: center; gap: 1rem; }
.quantity-btn {
    width: 50px; height: 50px; background: var(--bg-input);
    border: 2px solid var(--border); border-radius: 10px;
    color: var(--primary); font-size: 1.5rem; font-weight: 700;
    cursor: pointer; transition: all .3s; display: flex; align-items: center; justify-content: center;
}
.quantity-btn:hover:not(:disabled) { border-color: var(--primary); background: var(--primary); color: #000; transform: scale(1.1); }
.quantity-btn:disabled { opacity: .3; cursor: not-allowed; }
.quantity-input {
    flex: 1; text-align: center; font-size: 2rem; font-weight: 700;
    color: var(--primary); background: var(--bg-input);
    border: 2px solid var(--border); border-radius: 10px; padding: .8rem;
    font-family: 'Orbitron', sans-serif;
}
.quantity-input:focus { outline: none; border-color: var(--primary); }
.total-section {
    background: linear-gradient(135deg, rgba(0,255,136,.1) 0%, rgba(0,255,136,.05) 100%);
    border: 2px solid var(--primary); border-radius: 10px; padding: 1.5rem; margin-bottom: 2rem;
}
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.total-row:last-child { margin-bottom: 0; padding-top: 1rem; border-top: 2px solid var(--primary); }
.total-label { font-size: 1.1rem; color: var(--text-secondary); font-weight: 600; }
.total-value { font-size: 1.2rem; color: var(--text-primary); font-weight: 700; font-family: 'Orbitron', sans-serif; }
.total-final { font-size: 1.8rem; color: var(--primary); }
.balance-after { font-size: 1.1rem; color: var(--text-secondary); text-align: center; margin-bottom: 1.5rem; }
.balance-after strong { color: var(--text-primary); font-family: 'Orbitron', sans-serif; }
.insufficient-balance { color: #ff4444; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.modal-btn { padding: 1.2rem; border: none; border-radius: 10px; font-size: 1.1rem; font-weight: 700; font-family: 'Orbitron', sans-serif; cursor: pointer; transition: all .3s; text-transform: uppercase; }
.modal-btn-cancel { background: var(--bg-input); border: 2px solid var(--border); color: var(--text-primary); }
.modal-btn-cancel:hover { border-color: #ff4444; color: #ff4444; }
.modal-btn-confirm { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #000; }
.modal-btn-confirm:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,255,136,.4); }
.modal-btn-confirm:disabled { opacity: .5; cursor: not-allowed; }

/* SUCCESS MODAL */
.success-modal { max-width: 700px; }
.success-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 2rem; text-align: center; border-radius: 20px 20px 0 0; }
.success-title { font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #000; text-transform: uppercase; margin: 0; }
.success-subtitle { color: rgba(0,0,0,.7); font-size: 1.1rem; margin-top: .5rem; }
.success-body { padding: 2rem; max-height: 60vh; overflow-y: auto; }
.account-list { display: flex; flex-direction: column; gap: 1.5rem; }
.account-item {
    background: var(--bg-input); border: 2px solid var(--border);
    border-radius: 15px; padding: 1.5rem;
    transition: all .3s; animation: slideInAccount .4s ease forwards; opacity: 0;
}
.account-item:nth-child(1){animation-delay:.1s} .account-item:nth-child(2){animation-delay:.2s}
.account-item:nth-child(3){animation-delay:.3s} .account-item:nth-child(4){animation-delay:.4s}
.account-item:nth-child(5){animation-delay:.5s}
@keyframes slideInAccount {
    from { opacity:0; transform: translateX(-30px); }
    to   { opacity:1; transform: translateX(0); }
}
.account-item:hover { border-color: var(--primary); transform: translateX(5px); }
.account-number { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; background: var(--primary); color: #000; border-radius: 50%; font-weight: 700; font-family: 'Orbitron', sans-serif; margin-bottom: 1rem; }
.account-field { display: flex; justify-content: space-between; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.account-field:last-child { border-bottom: none; }
.account-field-label { color: var(--text-secondary); font-weight: 600; font-size: .95rem; }
.account-field-value { color: var(--primary); font-weight: 700; font-family: 'Courier New', monospace; font-size: 1rem; display: flex; align-items: center; gap: .8rem; }
.copy-icon { cursor: pointer; padding: .4rem .8rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 5px; transition: all .3s; font-size: .85rem; }
.copy-icon:hover, .copy-icon.copied { background: var(--primary); color: #000; border-color: var(--primary); }
.success-actions { padding: 0 2rem 2rem 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-view-history {
    padding: 1.2rem; background: var(--bg-input); border: 2px solid var(--primary);
    border-radius: 10px; color: var(--primary); font-size: 1rem; font-weight: 700;
    font-family: 'Orbitron', sans-serif; cursor: pointer; transition: all .3s;
    text-transform: uppercase; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
}
.btn-view-history:hover { background: var(--primary); color: #000; }
.btn-continue {
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none; border-radius: 10px; color: #000;
    font-size: 1rem; font-weight: 700; font-family: 'Orbitron', sans-serif;
    cursor: pointer; transition: all .3s; text-transform: uppercase;
}
.btn-continue:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,255,136,.4); }

/* ==================== LOGIN (login.html) ==================== */
body.center-layout { display: flex; flex-direction: column; }
.login-container {
    background: var(--bg-card); padding: 3rem; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(0,255,136,.1);
    width: 100%; max-width: 480px; position: relative; animation: slideUp .6s ease;
}
.login-container::before {
    content: ''; position: absolute; inset: -2px; border-radius: 20px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity .3s; z-index: -1;
}
.login-container:hover::before { opacity: .3; }
.tabs { display: flex; gap: 1rem; margin-bottom: 2.5rem; }
.tab-btn {
    flex: 1; padding: 1rem; background: var(--bg-input);
    border: 2px solid var(--border); border-radius: 10px;
    color: var(--text-secondary); font-size: 1.1rem; font-weight: 700;
    font-family: 'Orbitron', sans-serif; cursor: pointer; transition: all .3s;
    text-transform: uppercase; letter-spacing: 1px;
}
.tab-btn.active { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #000; border-color: var(--primary); box-shadow: 0 5px 20px rgba(0,255,136,.3); transform: translateY(-2px); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .4s ease; }
.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; font-size: .95rem; }
.remember-me { display: flex; align-items: center; gap: .5rem; color: var(--text-secondary); cursor: pointer; user-select: none; }
.remember-me input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); }
.forgot-password { color: var(--primary); text-decoration: none; font-weight: 600; transition: all .3s; }
.forgot-password:hover { text-shadow: 0 0 10px rgba(0,255,136,.5); }
.alert-error   { background: rgba(255,68,68,.1);  border: 1px solid var(--error); color: var(--error); }
.alert-success { background: rgba(0,255,136,.1);  border: 1px solid var(--success); color: var(--success); }
.alert { padding: 1rem 1.2rem; border-radius: 10px; margin-bottom: 1.5rem; font-weight: 600; animation: slideDown .3s ease; display: flex; align-items: center; gap: .8rem; }
.alert::before { content: '⚠'; font-size: 1.4rem; }
.alert-success::before { content: '✓'; }

/* ==================== TOP-UP (top-up.html) ==================== */
.balance-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-input) 100%);
    border: 2px solid var(--primary); border-radius: 15px;
    padding: 2.5rem; text-align: center; margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0,255,136,.2); position: relative; overflow: hidden;
}
.balance-card::before {
    content: ''; position: absolute; inset: -2px; border-radius: 15px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    opacity: .3; animation: rotateBorder 3s linear infinite; z-index: -1;
}
.balance-label { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: .8rem; text-transform: uppercase; letter-spacing: 1px; }
.balance-amount { font-size: 3.5rem; font-weight: 700; color: var(--primary); font-family: 'Orbitron', sans-serif; }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.method-card {
    background: var(--bg-card); border: 2px solid var(--border);
    border-radius: 15px; padding: 2.5rem;
    cursor: pointer; transition: all .3s; position: relative;
}
.method-card::before {
    content: ''; position: absolute; inset: -2px; border-radius: 15px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity .3s; z-index: -1;
}
.method-card:hover::before { opacity: .5; }
.method-card:hover, .method-card.active { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,255,136,.2); }
.method-card.active { background: var(--bg-input); box-shadow: 0 10px 30px rgba(0,255,136,.3); }
.method-icon { font-size: 4rem; text-align: center; margin-bottom: 1.2rem; }
.method-name { font-size: 1.8rem; font-weight: 700; text-align: center; color: var(--text-primary); margin-bottom: .8rem; font-family: 'Orbitron', sans-serif; }
.method-desc { text-align: center; color: var(--text-secondary); font-size: 1rem; }
.form-container { background: var(--bg-card); border: 2px solid var(--border); border-radius: 15px; padding: 2.5rem; display: none; margin-bottom: 3rem; }
.form-container.active { display: block; animation: slideUp .4s ease; }
.form-title { font-family: 'Orbitron', sans-serif; font-size: 2rem; color: var(--primary); margin-bottom: 2rem; text-align: center; text-transform: uppercase; }
.amount-buttons { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.amount-btn { padding: 1.2rem; background: var(--bg-input); border: 2px solid var(--border); border-radius: 10px; color: var(--text-primary); font-size: 1rem; font-weight: 700; cursor: pointer; transition: all .3s; font-family: 'Orbitron', sans-serif; }
.amount-btn:hover { border-color: var(--primary); background: var(--bg-card); }
.amount-btn.active { border-color: var(--primary); background: var(--primary); color: #000; box-shadow: 0 5px 15px rgba(0,255,136,.3); }
.bank-info { background: var(--bg-input); border: 2px solid var(--border); border-radius: 10px; padding: 2rem; margin-bottom: 2rem; }
.bank-row { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.bank-row:last-child { border-bottom: none; }
.bank-label { color: var(--text-secondary); font-size: 1rem; font-weight: 600; }
.bank-value { color: var(--text-primary); font-weight: 700; font-size: 1.1rem; font-family: 'Courier New', monospace; }
.qr-section { background: var(--bg-input); border: 2px solid var(--border); border-radius: 15px; padding: 2rem; margin-bottom: 2rem; text-align: center; }
.qr-title { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; color: var(--primary); margin-bottom: 1.5rem; text-transform: uppercase; }
.qr-container { background: white; padding: 1.5rem; border-radius: 10px; display: inline-block; margin-bottom: 1.5rem; }
.qr-container img { display: block; max-width: 300px; width: 100%; height: auto; }
.qr-instructions { background: rgba(0,255,136,.1); border: 1px solid var(--primary); border-radius: 10px; padding: 1.5rem; margin-top: 1.5rem; }
.qr-instructions h4 { color: var(--primary); font-family: 'Orbitron', sans-serif; margin-bottom: 1rem; font-size: 1.2rem; }
.qr-instructions ol { text-align: left; color: var(--text-secondary); padding-left: 2rem; line-height: 1.8; }
.qr-instructions li { margin-bottom: .5rem; }
.qr-instructions strong { color: var(--primary); }

/* TOAST */
.toast-container { position: fixed; top: 100px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 1rem; max-width: 400px; }
.toast { background: var(--bg-card); border: 2px solid var(--border); border-radius: 15px; padding: 1.5rem; box-shadow: 0 10px 40px rgba(0,0,0,.5); animation: slideInRight .3s ease; position: relative; overflow: hidden; }
@keyframes slideInRight { from { opacity:0; transform: translateX(100px); } to { opacity:1; transform: translateX(0); } }
.toast.success { border-color: var(--primary); }
.toast.success::before, .toast.error::before, .toast.warning::before { content: ''; position: absolute; left:0; top:0; bottom:0; width:5px; }
.toast.success::before { background: var(--primary); }
.toast.error { border-color: #ff4444; }
.toast.error::before { background: #ff4444; }
.toast.warning { border-color: #ffa500; }
.toast.warning::before { background: #ffa500; }
.toast-header { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.toast-icon { font-size: 2rem; flex-shrink: 0; }
.toast-title { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--text-primary); text-transform: uppercase; }
.toast-close { margin-left: auto; background: transparent; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; transition: all .3s; padding:0; width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:50%; }
.toast-close:hover { color: var(--text-primary); background: rgba(255,255,255,.1); }
.toast-message { color: var(--text-secondary); line-height: 1.6; margin-left: 3rem; white-space: pre-line; }
.toast-actions { margin-top: 1rem; margin-left: 3rem; display: flex; gap: .8rem; }
.toast-btn { padding: .7rem 1.2rem; border: none; border-radius: 8px; font-weight: 700; font-family: 'Rajdhani', sans-serif; cursor: pointer; transition: all .3s; font-size: .95rem; }
.toast-btn-primary { background: var(--primary); color: #000; }
.toast-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,255,136,.3); }
.toast-btn-secondary { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); }
.toast-btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ==================== CONTACT (contact.html) ==================== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 2rem; margin-bottom: 3rem; }
.contact-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: 20px; padding: 2.5rem; position: relative; overflow: hidden; transition: all .3s; text-align: center; }
.contact-card::before { content: ''; position: absolute; inset: -2px; border-radius: 20px; opacity: 0; transition: opacity .3s; z-index: -1; }
.contact-card:hover { transform: translateY(-5px); }
.discord-card  { border-color: rgba(88,101,242,.3); }
.telegram-card { border-color: rgba(0,136,204,.3); }
.facebook-card { border-color: rgba(24,119,242,.3); }
.zalo-card     { border-color: rgba(0,104,255,.3); }
.discord-card::before  { background: linear-gradient(45deg, transparent, var(--discord), transparent); }
.telegram-card::before { background: linear-gradient(45deg, transparent, var(--telegram), transparent); }
.facebook-card::before { background: linear-gradient(45deg, transparent, var(--facebook), transparent); }
.zalo-card::before     { background: linear-gradient(45deg, transparent, var(--zalo), transparent); }
.discord-card:hover  { box-shadow: 0 10px 40px rgba(88,101,242,.3); }
.telegram-card:hover { box-shadow: 0 10px 40px rgba(0,136,204,.3); }
.facebook-card:hover { box-shadow: 0 10px 40px rgba(24,119,242,.3); }
.zalo-card:hover     { box-shadow: 0 10px 40px rgba(0,104,255,.3); }
.discord-card:hover::before, .telegram-card:hover::before,
.facebook-card:hover::before, .zalo-card:hover::before { opacity: .2; }
.card-icon  { font-size: 4rem; margin-bottom: 1.5rem; display: block; }
.card-title { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-primary); }
.card-value { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 1.5rem; word-break: break-word; }
.btn-contact { display: inline-block; padding: 1rem 2rem; border-radius: 10px; text-decoration: none; font-weight: 700; font-family: 'Orbitron', sans-serif; transition: all .3s; color: white; }
.btn-discord  { background: var(--discord); }
.btn-telegram { background: var(--telegram); }
.btn-facebook { background: var(--facebook); }
.btn-zalo     { background: var(--zalo); }
.btn-discord:hover  { background: #4752C4; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(88,101,242,.4); }
.btn-telegram:hover { background: #006ba3; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,136,204,.4); }
.btn-facebook:hover { background: #0f5fc2; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(24,119,242,.4); }
.btn-zalo:hover     { background: #0054cc; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,104,255,.4); }

/* ==================== TRANSACTION HISTORY ==================== */
.filters { background: var(--bg-card); border: 2px solid var(--border); border-radius: 15px; padding: 1.5rem; margin-bottom: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.filter-btn { padding: .8rem 1.5rem; background: var(--bg-input); border: 2px solid var(--border); border-radius: 10px; color: var(--text-secondary); cursor: pointer; font-weight: 600; transition: all .3s; font-family: 'Rajdhani', sans-serif; }
.filter-btn.active { background: var(--primary); color: #000; border-color: var(--primary); }
.filter-btn:hover { border-color: var(--primary); }
.auto-refresh { margin-left: auto; display: flex; align-items: center; gap: .5rem; color: var(--text-secondary); }
.auto-refresh input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
.transaction-list { display: flex; flex-direction: column; gap: 1rem; }
.transaction-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: 15px; padding: 1.5rem; transition: all .3s; }
.transaction-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.transaction-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.transaction-id { font-family: 'Orbitron', sans-serif; font-weight: 700; color: var(--primary); }
.transaction-status { padding: .5rem 1rem; border-radius: 8px; font-weight: 700; font-size: .9rem; }
.status-success { background: rgba(0,255,136,.2); color: var(--success); border: 1px solid var(--success); }
.status-pending { background: rgba(255,165,0,.2); color: var(--warning); border: 1px solid var(--warning); animation: blink 2s infinite; }
.status-failed  { background: rgba(255,68,68,.2); color: var(--error); border: 1px solid var(--error); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.6} }
.transaction-details { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 1rem; }
.detail-item { display: flex; flex-direction: column; gap: .3rem; }
.amount-value { font-family: 'Orbitron', sans-serif; color: var(--primary); font-size: 1.3rem; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 968px) {
    .payment-methods { grid-template-columns: 1fr; }
    .history-main-info { grid-template-columns: 1fr; gap: 1rem; }
    .details-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .page-title    { font-size: 2rem; }
    .hero h1       { font-size: 2rem; }
    .balance-amount{ font-size: 2.5rem; }
    .profile-header{ flex-direction: column; text-align: center; }
    .stats-grid    { grid-template-columns: 1fr; }
    .modal, .login-container { margin: 1rem; }
    .modal-actions, .success-actions, .tabs { grid-template-columns: 1fr; }
    .tabs { flex-direction: column; gap: .8rem; }
    .form-options  { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .category-grid, .product-grid { grid-template-columns: 1fr; }
    .amount-buttons{ grid-template-columns: repeat(2,1fr); }
    .filters       { flex-direction: column; align-items: stretch; }
    .auto-refresh  { margin-left: 0; }
    .transaction-details { grid-template-columns: 1fr; }
    .toast-container { right:10px; left:10px; max-width: none; }
    .toast-message, .toast-actions { margin-left: 0; }
    .toast-actions { flex-direction: column; }
    .contact-grid  { grid-template-columns: 1fr; }
    .qr-container img { max-width: 250px; }
}

/* ==================== ADMIN - SHARED ==================== */

/* Hamburger luôn hiện */
.admin-hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    flex-shrink: 0;
}
.admin-hamburger span { width: 25px; height: 3px; background: var(--primary); border-radius: 3px; transition: all .3s; }
.admin-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(8px,8px); }
.admin-hamburger.active span:nth-child(2) { opacity: 0; }
.admin-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px,-6px); }

/* Nav admin: logo sát trái, hamburger sát phải */
header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1600px;
}

/* Nav luôn là drawer dọc từ phải */
.admin-nav-links {
    position: fixed; top: 80px; right: -100%;
    width: 280px; max-height: calc(100vh - 80px);
    background: rgba(0,0,0,.95); backdrop-filter: blur(10px);
    display: flex; flex-direction: column; align-items: stretch;
    padding: 2rem; transition: right .3s;
    border-left: 2px solid var(--primary);
    z-index: 999; overflow-y: auto; gap: 0;
    flex-wrap: nowrap;
}
.admin-nav-links.active { right: 0; }
.admin-nav-links .nav-link {
    border-bottom: 1px solid var(--border);
    padding: 1rem; width: 100%; text-align: left;
    font-size: 1rem; white-space: normal;
}
.admin-nav-links .btn-logout { width: 100%; margin-top: 1rem; padding: 1rem 1.2rem; font-size: 1rem; }

/* Admin main layout */
.admin-main {
    margin-top: 100px; padding: 2rem;
    max-width: 1600px;
    margin-left: auto; margin-right: auto;
    position: relative; z-index: 1;
}
.admin-title {
    font-family: 'Orbitron', sans-serif;
    text-align: center; font-size: 2.5rem;
    margin-bottom: 2rem; color: var(--primary);
    text-transform: uppercase; letter-spacing: 2px;
}
.admin-title-grad {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Admin stat cards */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--bg-card); border: 2px solid var(--border);
    border-radius: 15px; padding: 1.5rem; transition: all .3s;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; inset: -2px; border-radius: 15px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity .3s; z-index: -1;
}
.stat-card:hover::before { opacity: .2; }
.stat-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.stat-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.stat-card .stat-value { font-size: 2rem; }
.stat-card .stat-label { color: var(--text-secondary); font-size: 1rem; margin-bottom: .5rem; text-transform: uppercase; letter-spacing: 1px; }

/* Admin panel box */
.panel { background: var(--bg-card); padding: 2rem; border-radius: 15px; border: 2px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.5); margin-bottom: 2rem; }
.panel-title { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--primary); border-bottom: 2px solid var(--border); padding-bottom: .8rem; text-transform: uppercase; letter-spacing: 1px; }

/* Admin setting section */
.setting-section { background: var(--bg-card); border: 2px solid var(--border); border-radius: 15px; padding: 2rem; margin-bottom: 2rem; }
.setting-section .section-title { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; color: var(--primary); margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: .8rem; }

/* Admin table */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-input); }
th { padding: 1rem; text-align: left; color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: .9rem; border-bottom: 2px solid var(--border); }
td { padding: 1rem; border-bottom: 1px solid var(--border); }
tbody tr { transition: all .3s; }
tbody tr:hover { background: rgba(0,255,136,.05); }

/* Admin table wrapped in card */
.table-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: 15px; overflow: hidden; }
.table-card table th { background: var(--bg-input); }
.table-card table td { border-top: 1px solid var(--border); border-bottom: none; }
.table-card table tr:hover td { background: var(--bg-input); }

/* Admin buttons */
.btn { padding: .8rem 1.5rem; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; transition: all .3s; text-transform: uppercase; font-family: 'Orbitron', sans-serif; }
.btn-admin-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #000; }
.btn-admin-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0,255,136,.4); }
.btn-admin-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-admin-full { width: 100%; padding: 1rem 2rem; font-size: 1.1rem; }
.btn-admin-small { padding: .5rem 1rem; font-size: .85rem; }
.btn-admin-pw { background: #5865F2; color: white; }
.btn-admin-pw:hover:not(:disabled) { background: #4752C4; }
.btn-admin-danger { background: #ff4444; color: white; }
.btn-admin-danger:hover { background: #cc0000; }
.btn-admin-info { background: var(--primary); color: #000; }
.btn-admin-info:hover { transform: translateY(-2px); }

/* Admin modal */
.admin-modal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,.9); z-index: 2000; justify-content: center; align-items: center; }
.admin-modal.active { display: flex; }
.admin-modal-content { background: var(--bg-card); border: 2px solid var(--primary); border-radius: 15px; padding: 2rem; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.admin-modal-title { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; color: var(--primary); margin-bottom: 1.5rem; }

/* Admin filters */
.admin-filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.filter-group { display: flex; flex-direction: column; gap: .5rem; }
.filter-group label { color: var(--text-secondary); font-weight: 600; font-size: .9rem; text-transform: uppercase; }
.filter-group input, .filter-group select { padding: .8rem; background: var(--bg-input); border: 2px solid var(--border); border-radius: 8px; color: var(--text-primary); font-family: 'Rajdhani', sans-serif; transition: all .3s; }
.filter-group input:focus, .filter-group select:focus { outline: none; border-color: var(--primary); }

/* Admin search section */
.search-section { background: var(--bg-card); border: 2px solid var(--border); border-radius: 15px; padding: 1.5rem; margin-bottom: 2rem; }
.search-box { display: flex; gap: 1rem; }
.search-box input { flex: 1; padding: 1rem; background: var(--bg-input); border: 2px solid var(--border); border-radius: 10px; color: var(--text-primary); font-family: 'Rajdhani', sans-serif; }
.search-box input:focus { outline: none; border-color: var(--primary); }

/* User avatar */
.user-info { display: flex; align-items: center; gap: .8rem; }
.user-avatar { width: 40px; height: 40px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #000; flex-shrink: 0; }

/* Quick amount grid */
.quick-amount { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; margin-bottom: 1rem; }
.quick-btn { padding: .8rem; background: var(--bg-input); border: 2px solid var(--border); border-radius: 8px; color: var(--text-primary); cursor: pointer; font-weight: 600; font-family: 'Rajdhani', sans-serif; transition: border-color .3s; }
.quick-btn:hover { border-color: var(--primary); }

/* Warning box */
.warning-box { background: rgba(255,68,68,.1); border: 2px solid #ff4444; border-radius: 10px; padding: 1rem; margin-bottom: 1.5rem; color: #ff4444; }
.warning-box strong { display: block; margin-bottom: .5rem; }

/* Badges */
.badge { padding: .3rem .8rem; border-radius: 12px; font-size: .85rem; font-weight: 700; display: inline-block; }
.badge-success { background: var(--primary); color: #000; }
.badge-pending { background: #ffa500; color: #000; animation: blink 2s infinite; }
.badge-failed  { background: #ff4444; color: white; }
.type-badge { padding: .3rem .8rem; border-radius: 12px; font-size: .85rem; font-weight: 700; display: inline-block; }
.type-bank  { background: rgba(0,123,255,.2); color: #4da3ff; border: 1px solid #4da3ff; }
.type-card  { background: rgba(255,165,0,.2); color: #ffa500; border: 1px solid #ffa500; }
.type-admin { background: rgba(138,43,226,.2); color: #b870ff; border: 1px solid #b870ff; }

/* Payment grid */
.payment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* API note */
.api-note { background: rgba(0,255,136,.1); border: 1px solid var(--primary); border-radius: 10px; padding: 1rem; margin-top: 1rem; font-size: .95rem; line-height: 1.6; }
.api-note strong { color: var(--primary); }

/* Shop list */
.shop-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.shop-item { background: var(--bg-input); padding: 1.5rem; border-radius: 10px; border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; transition: all .3s; }
.shop-item:hover { border-color: var(--primary); }
.shop-info h4 { color: var(--primary); margin-bottom: .5rem; font-size: 1.2rem; }
.shop-info p { color: var(--text-secondary); font-size: .9rem; margin-bottom: .3rem; }
.shop-actions { display: flex; gap: .5rem; }

@media (max-width: 968px) {
    .payment-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .admin-filters { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
    table { font-size: .85rem; }
    th, td { padding: .5rem; }
    .admin-title { font-size: 1.8rem; }
}

/* ==================== ADMIN - PRODUCT PAGE ==================== */
.admin-container { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 1200px) { .admin-container { grid-template-columns: 1fr; } }

/* Admin panel tabs */
.panel .tabs { display: flex; gap: 0; margin-bottom: 2rem; border-bottom: 2px solid var(--border); overflow-x: auto; background: transparent; scrollbar-width: none; }
.panel .tabs::-webkit-scrollbar { display: none; }
.panel .tab-btn { padding: .9rem 1.5rem; background: transparent; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px; color: var(--text-secondary); font-weight: 600; cursor: pointer; transition: all .3s; white-space: nowrap; font-size: .95rem; font-family: 'Rajdhani', sans-serif; border-radius: 0; text-transform: none; letter-spacing: 0; box-shadow: none; transform: none; }
.panel .tab-btn:hover { color: var(--primary); background: rgba(0,255,136,.04); }
.panel .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(0,255,136,.05); transform: none; box-shadow: none; }
.panel .tab-content { display: none; }
.panel .tab-content.active { display: block; }

/* Button variants */
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #000; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0,255,136,.4); }
.btn-warning { background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%); color: #000; }
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(255,165,0,.4); }
.btn-danger { background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%); color: #fff; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(255,68,68,.4); }
.btn-small { padding: .4rem .9rem; font-size: .8rem; border-radius: 6px; }
.product-list-admin { display: flex; flex-direction: column; gap: 1rem; }

/* Partner products */
.partner-select-box { background: var(--bg-input); padding: 1.5rem; border-radius: 10px; border: 2px solid var(--border); margin-bottom: 1.5rem; }
.partner-products-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 1rem; max-height: 500px; overflow-y: auto; padding: .5rem; }
.partner-products-grid::-webkit-scrollbar { width: 8px; }
.partner-products-grid::-webkit-scrollbar-track { background: var(--bg-input); border-radius: 4px; }
.partner-products-grid::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
.partner-product-card { background: var(--bg-input); border: 2px solid var(--border); border-radius: 10px; padding: 1.2rem; transition: all .3s; cursor: pointer; position: relative; }
.partner-product-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.partner-product-card.selected { border-color: var(--primary); background: rgba(0,255,136,.1); }
.partner-product-card.selected::before { content: '\2713'; position: absolute; top: .5rem; right: .5rem; width: 24px; height: 24px; background: var(--primary); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.partner-product-name { font-weight: 700; color: var(--text-primary); margin-bottom: .5rem; font-size: 1rem; padding-right: 30px; }
.partner-product-price { color: var(--primary); font-weight: 700; font-size: 1.2rem; margin-bottom: .5rem; }
.partner-product-stock { font-size: .85rem; color: var(--text-secondary); margin-bottom: .5rem; }
.partner-product-desc { font-size: .85rem; color: var(--text-secondary); line-height: 1.4; max-height: 60px; overflow: hidden; text-overflow: ellipsis; }
.import-controls { background: var(--bg-input); padding: 1.5rem; border-radius: 10px; border: 2px solid var(--primary); margin-top: 1.5rem; display: none; }
.import-controls.active { display: block; }
.selected-count { color: var(--primary); font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }

/* Category list — không giới hạn chiều cao, scroll tự nhiên */
.category-list {
    display: flex; flex-direction: column; gap: 1rem;
    max-height: none;
    overflow-y: visible;
    padding-right: .5rem;
}
.product-list-admin {
    display: flex; flex-direction: column; gap: 1rem;
    max-height: 500px; overflow-y: auto; padding-right: .5rem;
}
.category-list::-webkit-scrollbar, .product-list-admin::-webkit-scrollbar { width: 8px; }
.category-list::-webkit-scrollbar-track, .product-list-admin::-webkit-scrollbar-track { background: var(--bg-input); border-radius: 4px; }
.category-list::-webkit-scrollbar-thumb, .product-list-admin::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

.category-item { background: var(--bg-input); padding: 1rem 1.2rem; border-radius: 10px; border: 1px solid var(--border); transition: all .3s; display: flex; align-items: center; gap: .8rem; min-height: 80px; }
.category-item:hover { border-color: var(--primary); }
.category-item.draggable { cursor: grab; user-select: none; }
.category-item.draggable:active { cursor: grabbing; }
.category-item.dragging { opacity: .4; border-color: var(--primary); background: rgba(0,255,136,.05); }
.category-item.drag-over { border-color: var(--primary); border-width: 2px; box-shadow: 0 0 15px rgba(0,255,136,.3); transform: scale(1.02); }
.drag-handle { display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; cursor: grab; opacity: .4; transition: opacity .3s; flex-shrink: 0; }
.drag-handle:hover { opacity: 1; }
.drag-handle:active { cursor: grabbing; }
.drag-handle span { display: block; width: 18px; height: 2px; background: var(--primary); border-radius: 1px; }
.sort-order-badge { background: rgba(0,255,136,.15); color: var(--primary); font-weight: 700; font-size: .8rem; padding: 2px 8px; border-radius: 5px; margin-left: .5rem; font-family: 'Orbitron', sans-serif; }
.save-order-bar { display: none; background: rgba(0,255,136,.1); border: 2px solid var(--primary); border-radius: 10px; padding: 1rem 1.5rem; margin-bottom: 1rem; align-items: center; justify-content: space-between; gap: 1rem; animation: fadeIn .3s ease; }
.save-order-bar.active { display: flex; }
.save-order-bar .info { color: var(--primary); font-weight: 600; font-size: .95rem; }
.save-order-bar .btns { display: flex; gap: .5rem; }
.category-icon { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; background: var(--border); flex-shrink: 0; }
.category-info { flex: 1; min-width: 0; }
.category-name { font-weight: 700; color: var(--text-primary); font-size: 1rem; margin-bottom: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-count { font-size: .85rem; color: var(--text-secondary); }
.category-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* Product items */
.product-item-admin { background: var(--bg-input); padding: 1.5rem; border-radius: 10px; border: 1px solid var(--border); transition: all .3s; }
.product-item-admin:hover { border-color: var(--primary); }
.product-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.product-item-name { font-weight: 700; color: var(--text-primary); font-size: 1.2rem; }
.product-item-price { color: var(--primary); font-weight: 700; font-size: 1.3rem; font-family: 'Orbitron', sans-serif; }
.product-item-desc { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.6; }
.product-item-info { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1rem; font-size: .95rem; }
.product-item-info span { color: var(--text-secondary); }

/* Account input */
.account-input-section { background: var(--bg-input); padding: 1.5rem; border-radius: 10px; margin-top: 1rem; border: 1px solid var(--border); }
.account-hint { font-size: .9rem; color: var(--text-secondary); margin-bottom: .8rem; line-height: 1.6; }

/* Modal for admin pages */
.modal-overlay { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,.85); backdrop-filter: blur(5px); z-index: 2000; animation: fadeIn .3s ease; justify-content: center; align-items: center; padding: 1rem; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-card); border: 2px solid var(--primary); border-radius: 20px; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; animation: slideDown .3s ease; box-shadow: 0 20px 60px rgba(0,255,136,.3); }
.modal-header { padding: 2rem; border-bottom: 2px solid var(--border); position: relative; }
.modal-title { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; color: var(--primary); text-align: center; text-transform: uppercase; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--text-secondary); font-size: 2rem; cursor: pointer; transition: all .3s; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.modal-close:hover { color: var(--primary); background: rgba(0,255,136,.1); transform: rotate(90deg); }
.modal-body { padding: 2rem; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.modal-btn { padding: 1.2rem; border: none; border-radius: 10px; font-size: 1.1rem; font-weight: 700; font-family: 'Orbitron', sans-serif; cursor: pointer; transition: all .3s; text-transform: uppercase; }
.modal-btn-cancel { background: var(--bg-input); border: 2px solid var(--border); color: var(--text-primary); }
.modal-btn-cancel:hover { border-color: #ff4444; color: #ff4444; }
.modal-btn-confirm { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #000; }
.modal-btn-confirm:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,255,136,.4); }
.modal-btn-confirm:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 768px) {
    .modal-actions { grid-template-columns: 1fr; }
    .partner-products-grid { grid-template-columns: 1fr; }
    .save-order-bar { flex-direction: column; text-align: center; }
}

/* ==================== ADMIN-ODER (order management) ==================== */
.order-card { background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; transition: all .3s; }
.order-card:hover { border-color: var(--primary); }
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: .5rem; }
.order-code { font-family: 'Orbitron', sans-serif; font-weight: 700; color: var(--primary); font-size: 1rem; }
.order-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .95rem; color: var(--text-secondary); margin-bottom: 1rem; }
.order-meta span strong { color: var(--text-primary); }
.order-amount { font-family: 'Orbitron', sans-serif; font-weight: 700; color: var(--primary); font-size: 1.2rem; }
.order-account { background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; font-family: 'Courier New', monospace; font-size: .9rem; color: var(--primary); word-break: break-all; white-space: pre-wrap; }
.order-list { display: flex; flex-direction: column; gap: 1rem; }

/* Order stats bar */
.order-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 1rem; margin-bottom: 2rem; }
