/* 发卡平台样式 - 参考币卡风格 */
:root {
    --bg: #eef0f7;
    --white: #ffffff;
    --text: #2d3748;
    --text-muted: #718096;
    --primary: #4c3d99;
    --primary-hover: #3d317d;
    --accent: #e67e22;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --sidebar-width: 240px;
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}
.auth-wrapper { width: 100%; max-width: 420px; padding: 20px; }
.auth-logo {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-bottom: 24px;
}
.logo-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: #fff; font-weight: 800; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
}
.logo-text { font-size: 28px; font-weight: 700; color: #1a202c; }
.site-brand {
    display: flex; align-items: center; gap: 10px;
}
.site-brand-auth { justify-content: center; }
.logo-img {
    width: 42px; height: 42px; object-fit: contain; border-radius: 8px;
    flex-shrink: 0;
}
.sidebar-brand .logo-img { width: 36px; height: 36px; }
.sidebar-brand .logo-text { font-size: 22px; }
.auth-card {
    background: var(--white); border-radius: var(--radius);
    padding: 32px 28px; box-shadow: var(--shadow);
}
.auth-title {
    font-size: 24px; font-weight: 700; text-align: center;
    margin-bottom: 24px;
}
.auth-form .form-group { margin-bottom: 18px; }
.auth-form label {
    display: block; font-size: 13px; color: var(--text-muted);
    margin-bottom: 6px;
}
.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="number"],
.auth-form input[type="url"],
.auth-form textarea,
.auth-form select {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; outline: none;
    transition: border-color .2s;
}
.auth-form input:focus, .auth-form textarea:focus { border-color: var(--primary); }
.form-hint { display: block; font-size: 12px; color: #a0aec0; margin-bottom: 8px; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row input { flex: 1; }
.captcha-img {
    height: 38px; border-radius: 6px; cursor: pointer;
    border: 1px solid var(--border);
}
.captcha-refresh {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
    background: #fff; cursor: pointer; font-size: 18px; color: var(--text-muted);
}
.checkbox-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-muted); margin-bottom: 18px;
}
.auth-footer-link { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 20px; border-radius: 8px; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .2s, transform .1s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; color: #fff; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: #f7fafc; }
.btn-block { width: 100%; }
.btn-service {
    background: #2563eb; color: #fff; padding: 10px 24px;
    border-radius: 8px; margin-right: 12px; margin-top: 8px;
}
.btn-service:hover { background: #1d4ed8; color: #fff; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Alerts */
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Landing page */
.landing-page {
    min-height: 100vh;
    margin: 0;
    background: #523d8a;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.landing-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.landing-waves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.landing-dot,
.landing-star,
.landing-ring {
    position: absolute;
    display: block;
}
.landing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f97316;
    box-shadow:
        14px 8px 0 #f97316,
        28px -4px 0 #f97316,
        42px 10px 0 #f97316,
        8px 22px 0 #f97316,
        24px 28px 0 #f97316;
}
.landing-dot-a { top: 18%; left: 52%; opacity: .85; }
.landing-dot-b { top: 42%; left: 8%; opacity: .7; transform: scale(.85); }
.landing-dot-c { top: 68%; right: 18%; opacity: .55; transform: scale(.7); }
.landing-star {
    width: 14px;
    height: 14px;
    background:
        linear-gradient(#f97316, #f97316) center/2px 100% no-repeat,
        linear-gradient(#f97316, #f97316) center/100% 2px no-repeat;
    transform: rotate(45deg);
    opacity: .75;
}
.landing-star-a { top: 14%; right: 28%; }
.landing-star-b { top: 36%; right: 12%; width: 10px; height: 10px; opacity: .55; }
.landing-star-c { bottom: 22%; left: 18%; width: 12px; height: 12px; opacity: .6; }
.landing-ring {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(249, 115, 22, 0.75);
    border-radius: 50%;
}
.landing-ring-a { top: 24%; right: 42%; }
.landing-ring-b { bottom: 30%; right: 8%; width: 14px; height: 14px; opacity: .65; }
.landing-circle-pattern {
    position: absolute;
    right: -2%;
    top: 50%;
    width: min(42vw, 360px);
    height: min(42vw, 360px);
    transform: translateY(-50%);
    opacity: .55;
}
.landing-hero {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 48px clamp(24px, 8vw, 120px);
}
.landing-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 28px;
    letter-spacing: .02em;
}
.landing-desc {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.92);
}
.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 36px;
}
.landing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 12px 36px;
    border-radius: 6px;
    background: #fff;
    color: #523d8a;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.landing-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    text-decoration: none;
    color: #523d8a;
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 56px 24px;
        text-align: left;
    }
    .landing-circle-pattern {
        right: -18%;
        opacity: .35;
    }
    .landing-dot-a { left: 68%; }
}

/* User layout */
.user-page { min-height: 100vh; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width); background: var(--white);
    border-right: 1px solid var(--border); display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    transition: transform .3s;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 18px; border-bottom: 1px solid var(--border);
}
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-item, .nav-toggle {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 8px; color: var(--text);
    font-size: 14px; text-decoration: none; border: none; background: none;
    width: 100%; cursor: pointer; margin-bottom: 4px;
}
.nav-item:hover, .nav-toggle:hover { background: #f7fafc; text-decoration: none; color: var(--text); }
.nav-item.active, .nav-sub-item.active { background: #edf2ff; color: var(--primary); font-weight: 600; }
.nav-icon {
    display: inline-block;
    width: 20px; height: 20px; opacity: .7; flex-shrink: 0;
    background: currentColor;
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
}
.icon-home { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E"); }
.icon-chart { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13h2v8H3v-8zm4-6h2v14H7V7zm4 4h2v10h-2V11zm4-8h2v18h-2V3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13h2v8H3v-8zm4-6h2v14H7V7zm4 4h2v10h-2V11zm4-8h2v18h-2V3z'/%3E%3C/svg%3E"); }
.icon-list { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z'/%3E%3C/svg%3E"); }
.icon-cart { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1 1 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1 1 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E"); }
.icon-link { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z'/%3E%3C/svg%3E"); }
.icon-wallet { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 7h-3V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-1h3v-2H21V7zm-2 10H5V8h14v9z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 7h-3V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-1h3v-2H21V7zm-2 10H5V8h14v9z'/%3E%3C/svg%3E"); }
.icon-agent { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E"); }
.nav-label { flex: 1; text-align: left; }
.nav-arrow::after { content: '›'; color: #a0aec0; transition: transform .2s; display: inline-block; }
.nav-group.open .nav-arrow::after { transform: rotate(90deg); }
.nav-sub { display: none; padding-left: 46px; margin-bottom: 8px; }
.nav-group.open .nav-sub { display: block; }
.nav-sub-item {
    display: block; padding: 8px 12px; font-size: 13px;
    color: var(--text-muted); border-radius: 6px; text-decoration: none;
}
.nav-sub-item:hover { background: #f7fafc; color: var(--text); text-decoration: none; }
.sidebar-footer {
    padding: 16px; text-align: center; color: var(--text-muted); font-size: 12px;
    border-top: 1px solid var(--border);
}
.sidebar-brand-img {
    display: block;
    width: 100%;
    max-width: 168px;
    height: auto;
    margin: 0 auto 10px;
    object-fit: contain;
}

.main-area {
    flex: 1; margin-left: var(--sidebar-width);
    display: flex; flex-direction: column; min-height: 100vh;
}
.topbar {
    height: 64px; background: var(--white); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; position: sticky; top: 0; z-index: 50;
}
.sidebar-toggle {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.sidebar-toggle span {
    display: block; width: 20px; height: 2px; background: var(--text);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
    width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
    background: #fff; color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.user-dropdown { position: relative; }
.user-info {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 6px 10px; border-radius: 8px;
}
.user-info:hover { background: #f7fafc; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; text-transform: uppercase;
}
.user-info strong { display: block; font-size: 14px; }
.user-info small { color: var(--text-muted); font-size: 12px; }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: 100%;
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow); min-width: 140px; padding: 6px 0; margin-top: 4px;
}
.user-dropdown.open .dropdown-menu,
.user-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block; padding: 10px 16px; color: var(--text); font-size: 14px;
    text-decoration: none;
}
.dropdown-menu a:hover { background: #f7fafc; text-decoration: none; }

.page-content { flex: 1; padding: 24px; }
.page-footer {
    padding: 16px 24px; color: var(--text-muted); font-size: 13px;
    display: flex; justify-content: space-between; align-items: center;
}
.heart { color: #e53e3e; }

/* Cards & stats */
.card {
    background: var(--white); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
}
.card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 16px; font-weight: 700; }
.card-meta { font-size: 13px; color: var(--text-muted); }
.stats-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 20px; margin-bottom: 20px;
}
.stat-card {
    background: var(--white); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 16px;
}
.stat-icon {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; color: #fff;
}
.stat-orange { background: #f59e0b; }
.stat-green { background: #10b981; }
.stat-purple { background: #8b5cf6; }
.stat-red { background: #ef4444; }
.stat-label { font-size: 13px; color: var(--text-muted); display: block; }
.stat-value { font-size: 28px; font-weight: 700; color: #1a202c; }
.announcement-body p { margin-bottom: 8px; font-size: 14px; color: #4a5568; }
.service-buttons { margin-top: 20px; }
.placeholder-card h2 { margin-bottom: 10px; }
.placeholder-card p { color: var(--text-muted); }

/* Channel list */
.channel-notice {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fff; border: 1px solid #dbeafe; border-radius: var(--radius);
    padding: 14px 18px; margin-bottom: 20px; font-size: 14px; color: #475569;
    box-shadow: var(--shadow);
}
.channel-notice-icon {
    width: 22px; height: 22px; border-radius: 50%;
    background: #eff6ff; color: #2563eb;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.channel-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.channel-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.channel-card-head {
    display: flex; align-items: center; gap: 16px;
    padding: 24px 22px 20px;
}
.channel-icon {
    width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.channel-icon::after {
    content: ''; width: 28px; height: 28px; background: #fff;
    mask-size: contain; mask-repeat: no-repeat; mask-position: center;
}
.channel-icon-green { background: #22c55e; }
.channel-icon-blue { background: #3b82f6; }
.channel-icon-sms::after {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}
.channel-icon-tower::after {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2zm0 3.99L17.53 19 12 16.01 6.47 19 12 5.99z'/%3E%3C/svg%3E");
}
.channel-icon-voice::after {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.91-3c-.49 0-.9.36-.98.85C16.52 14.2 14.47 16 12 16s-4.52-1.8-4.93-4.15c-.08-.49-.49-.85-.98-.85-.61 0-1.09.54-1 1.14.49 3 2.89 5.35 5.91 5.78V20c0 .55.45 1 1 1s1-.45 1-1v-2.08c3.02-.43 5.42-2.78 5.91-5.78.1-.6-.39-1.14-1-1.14z'/%3E%3C/svg%3E");
}
.channel-card-head h3 {
    font-size: 16px; font-weight: 700; color: #1e293b; margin-bottom: 6px;
}
.channel-card-head p { font-size: 13px; color: var(--text-muted); }
.channel-card-foot {
    display: flex; align-items: stretch; border-top: 1px solid var(--border);
}
.channel-meta {
    flex: 1; padding: 16px 22px; text-align: center;
}
.channel-meta-label {
    display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px;
}
.channel-meta-value {
    display: block; font-size: 15px; color: #2563eb; font-weight: 600;
}
.channel-meta-divider {
    width: 1px; background: var(--border); margin: 12px 0;
}

@media (max-width: 1100px) {
    .channel-grid { grid-template-columns: 1fr; }
}

/* Tables */
.table-card { padding: 0; overflow: hidden; }
.table-card h2, .table-card h3 { padding: 20px 20px 0; }
.table-toolbar { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.search-form { display: flex; gap: 8px; max-width: 320px; }
.search-form input {
    flex: 1; padding: 9px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px;
}
.search-form button {
    padding: 9px 16px; background: var(--primary); color: #fff;
    border: none; border-radius: 8px; cursor: pointer;
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td {
    padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table th { background: #f8fafc; color: var(--text-muted); font-weight: 600; font-size: 13px; }
.empty-cell { text-align: center !important; color: var(--text-muted); padding: 40px !important; }
.responsive-table-wrap { width: 100%; }

/* Recharge page */
.recharge-card h2 { margin-bottom: 12px; font-size: 20px; }
.recharge-card .text-muted { margin-bottom: 6px; word-break: break-word; }
.recharge-records-card h3 { padding: 20px 20px 0; margin: 0; font-size: 16px; }
.recharge-records-card .pagination-bar { justify-content: center; }

.status-tag {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    background: #edf2f7; font-size: 12px;
}
.text-green { color: #15803d; }
.text-red { color: #b91c1c; }
.text-muted { color: var(--text-muted); font-size: 14px; }

.pagination-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; border-top: 1px solid var(--border); font-size: 13px;
}
.pagination-bar select { margin-left: 6px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); }
.pagination-nav { display: flex; align-items: center; gap: 8px; }
.page-btn {
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 6px; color: var(--text); text-decoration: none;
}
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* Recharge */
.recharge-form { max-width: 400px; margin-top: 16px; }
.recharge-form .form-group { margin-bottom: 16px; }
.recharge-form label { display: block; margin-bottom: 6px; font-size: 14px; }
.recharge-form input {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px;
}
.amount-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.preset-btn {
    padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; cursor: pointer; font-size: 13px;
}
.preset-btn:hover { border-color: var(--primary); color: var(--primary); }

.recharge-methods {
    max-width: 480px; margin-top: 20px;
}
.recharge-method-box {
    border: 1px solid var(--border); border-radius: 14px; padding: 22px;
    background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.recharge-method-usdt {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}
.recharge-method-head {
    display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.recharge-coin-badge {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; font-size: 22px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}
.recharge-method-box h3 { margin: 0; font-size: 17px; font-weight: 700; color: #1e293b; }

.usdt-input-label {
    display: block; font-size: 13px; font-weight: 600; color: #475569;
    margin-bottom: 8px;
}
.usdt-input-wrap {
    display: flex; align-items: stretch;
    border: 2px solid #d1fae5; border-radius: 12px;
    background: #fff; overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    margin-bottom: 16px;
}
.usdt-input-wrap:focus-within {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}
.usdt-input-suffix {
    display: flex; align-items: center; padding: 0 16px;
    background: #ecfdf5; color: #15803d;
    font-size: 14px; font-weight: 700;
    border-left: 1px solid #d1fae5;
    flex-shrink: 0;
}
.usdt-input-wrap input {
    flex: 1; border: none; outline: none; padding: 14px 16px;
    font-size: 22px; font-weight: 600; color: #0f172a;
    background: transparent; min-width: 0;
}
.usdt-input-wrap input::placeholder {
    color: #cbd5e1; font-weight: 500;
}
.usdt-preview-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-radius: 10px;
    background: #fff; border: 1px dashed #a7f3d0;
    margin-bottom: 18px;
}
.usdt-preview-label { font-size: 13px; color: #64748b; }
.usdt-preview-value {
    display: flex; align-items: baseline; gap: 6px;
}
.usdt-preview-value strong {
    font-size: 24px; font-weight: 700; color: #16a34a;
    line-height: 1;
}
.usdt-preview-value span {
    font-size: 13px; font-weight: 600; color: #86efac;
}
.btn-usdt {
    width: 100%; padding: 13px 20px; border: none; border-radius: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    transition: transform .15s, box-shadow .15s;
}
.btn-usdt:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.4);
}
.btn-usdt:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.recharge-modal {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
.recharge-modal .modal-header,
.recharge-modal .modal-footer {
    flex-shrink: 0;
}
.recharge-modal-body {
    text-align: left;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 18px;
    padding-bottom: 12px;
}
.recharge-countdown {
    text-align: center; font-size: 15px; margin-bottom: 12px;
    padding: 8px; background: #fef3c7; border-radius: 8px; color: #92400e;
}
.recharge-countdown strong { font-size: 20px; }
.recharge-pay-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.recharge-address-row { flex-wrap: wrap; }
.recharge-address-row code {
    flex: 1; word-break: break-all; font-size: 13px;
    background: #f8fafc; padding: 8px; border-radius: 6px;
}
.recharge-pay-highlight {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.recharge-pay-highlight strong {
    font-size: 24px;
    color: #b45309;
    display: block;
    margin: 6px 0;
}
.recharge-tip-warn {
    color: #b45309;
    background: #fffbeb;
    border-radius: 8px;
    padding: 10px 12px;
}
.recharge-paid-tip {
    color: #15803d;
    font-weight: 600;
}
.recharge-qrcode-wrap {
    margin-top: 12px;
    text-align: center;
}
.recharge-qrcode-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #64748b;
}
.recharge-qrcode-img {
    display: block;
    width: min(100%, 200px);
    height: auto;
    max-height: min(200px, 28vh);
    max-height: min(200px, 28dvh);
    margin: 0 auto;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 8px;
}
.recharge-paid-toast {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 9999;
    background: #15803d;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 14px;
    font-weight: 600;
}
.recharge-paid-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.tx-hash {
    font-size: 11px;
    word-break: break-all;
    max-width: 120px;
    display: inline-block;
}

@media (max-width: 768px) {
    .recharge-methods { grid-template-columns: 1fr; }
}
.pay-info p {
    display: flex; justify-content: space-between; padding: 12px 0;
    border-bottom: 1px solid var(--border); font-size: 14px;
}
.pay-info span { color: var(--text-muted); }
.pay-amount { color: var(--primary); font-size: 20px; }
.pay-actions { margin-top: 20px; display: flex; gap: 12px; }

/* Online open card */
.open-card-page { max-width: 1200px; }
.page-tag {
    display: inline-block; background: var(--primary); color: #fff;
    padding: 6px 16px; border-radius: 6px; font-size: 14px; font-weight: 600;
    margin-bottom: 16px;
}
.open-card-search-card { margin-bottom: 16px; padding: 20px 24px; }
.open-card-search-label {
    display: block; font-size: 14px; color: var(--text); margin-bottom: 10px; font-weight: 600;
}
.open-card-search-row {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.open-card-search-row input[type="text"] {
    flex: 1; min-width: 240px; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px;
}
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; text-decoration: none; }
.open-card-hint { margin-top: 12px; font-size: 13px; color: var(--text-muted); }
.open-card-products-card { margin-bottom: 16px; padding: 20px 24px 24px; }
.open-card-section-label {
    font-size: 14px; font-weight: 600; margin-bottom: 16px;
}
.product-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.product-card {
    text-align: left; background: #fff; border: 1px solid var(--border);
    border-radius: 10px; padding: 18px 16px 14px; cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.product-card:hover, .product-card.active {
    border-color: #93c5fd; box-shadow: 0 0 0 2px rgba(59, 130, 246, .15);
}
.product-name {
    font-size: 15px; font-weight: 700; color: #2563eb; margin-bottom: 8px;
    line-height: 1.4;
}
.product-intro { font-size: 12px; color: #ef4444; min-height: 34px; margin-bottom: 14px; }
.product-price { font-size: 22px; font-weight: 700; color: #2563eb; }
.open-card-form-card { padding: 24px; }
.open-card-form-row {
    display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.open-card-form-row label {
    width: 90px; flex-shrink: 0; font-size: 14px; color: var(--text);
}
.open-card-form-row input {
    flex: 1; max-width: 100%; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: 999px; font-size: 14px; background: #fff;
}
.open-card-form-row input[readonly] { background: #f8fafc; color: #64748b; }
.deduct-input { color: #dc2626 !important; font-weight: 700; font-size: 16px !important; }
.open-card-submit-wrap { text-align: center; margin-top: 24px; }
.btn-open-submit {
    min-width: 200px; padding: 12px 40px; border-radius: 999px;
    background: #fff; border: 2px solid #1e293b; color: #1e293b;
    font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-open-submit:hover { background: #f8fafc; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
    display: flex; align-items: flex-start; justify-content: center;
    z-index: 1000; padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
    width: 100%; max-width: 420px; background: #fff; border-radius: 10px;
    overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.2);
    margin-block: auto;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: #f8fafc; border-bottom: 1px solid var(--border);
    font-weight: 700; font-size: 15px;
}
.modal-header-purple { background: var(--primary); color: #fff; border-bottom: none; }
.modal-header-purple .modal-close { color: #fff; }
.modal-close {
    background: none; border: none; font-size: 22px; line-height: 1;
    cursor: pointer; color: var(--text-muted); padding: 0 4px;
}
.modal-body { padding: 28px 24px; text-align: center; }
.modal-body p { font-size: 15px; color: #334155; line-height: 1.7; }
.modal-warning { padding-top: 20px; }
.modal-warning-icon {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
    background: #fef3c7; color: #d97706; font-size: 28px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid #fde68a;
}
.modal-footer { padding: 0 24px 24px; text-align: center; }
.modal-footer .btn { min-width: 120px; border-radius: 999px; }

@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .product-grid { grid-template-columns: 1fr; }
    .open-card-form-row { flex-direction: column; align-items: stretch; }
    .open-card-form-row label { width: auto; }
}

@media (max-width: 600px) {
    .product-grid { grid-template-columns: 1fr; }
    .open-card-form-row { flex-direction: column; align-items: stretch; }
    .open-card-form-row label { width: auto; }
}

/* SMS query */
.sms-page { max-width: 1200px; }
.sms-card { padding: 24px; }
.sms-title {
    font-size: 15px; font-weight: 600; color: var(--text);
    margin-bottom: 16px;
}
.sms-select-bar {
    background: #f1f5f9; border-radius: 10px;
    padding: 12px 16px; margin-bottom: 16px;
}
.sms-select-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sms-pill-btn {
    padding: 6px 18px; border: none; border-radius: 999px;
    background: var(--primary); color: #fff; font-size: 13px;
    cursor: pointer; font-weight: 600;
}
.sms-pill-btn:hover { opacity: .92; }
.sms-pill-dark { background: #3730a3; }
.sms-number-list {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 18px; padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.sms-number-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border: 1px solid var(--border);
    border-radius: 8px; background: #fff; font-size: 14px;
    cursor: pointer; user-select: none;
}
.sms-number-item input { accent-color: var(--primary); }
.sms-action-row {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin-bottom: 20px;
}
.sms-action-btn {
    padding: 10px 22px; border: none; border-radius: 8px;
    color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.sms-btn-green { background: #16a34a; }
.sms-btn-orange { background: #ea580c; }
.sms-btn-purple { background: #4c3d99; }
.sms-btn-red { background: #dc2626; }
.sms-action-btn:hover { opacity: .92; }
.sms-table-wrap {
    overflow-x: auto; border: 1px solid var(--border);
    border-radius: 8px; margin-bottom: 0;
}
.sms-table { margin: 0; }
.sms-table th.sortable { white-space: nowrap; }
.sort-icon { color: #94a3b8; font-size: 12px; margin-left: 4px; }
.sms-empty {
    text-align: center !important; color: #64748b !important;
    padding: 48px 16px !important; font-size: 14px;
}
.sms-table-footer {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px; padding: 14px 4px 0;
    font-size: 13px; color: var(--text-muted);
}
.sms-page-size { display: flex; align-items: center; gap: 8px; }
.sms-page-size select {
    padding: 4px 8px; border: 1px solid var(--border);
    border-radius: 6px; background: #fff;
}
.sms-pagination { display: flex; align-items: center; gap: 4px; }
.sms-pagination .page-num {
    min-width: 32px; height: 32px; display: inline-flex;
    align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 6px;
    font-size: 13px; color: var(--text); cursor: default;
}
.sms-pagination .page-num.active {
    background: #2563eb; border-color: #2563eb; color: #fff;
}
.sms-pagination .page-ellipsis {
    padding: 0 4px; color: var(--text-muted);
}

/* SMS form modals */
.sms-form-overlay .modal-box { max-width: 520px; }
.sms-form-body { text-align: left; padding: 20px 24px 24px; }
.sms-form-group { margin-bottom: 16px; }
.sms-form-group label {
    display: block; font-size: 14px; color: var(--text);
    margin-bottom: 8px; font-weight: 500;
}
.sms-form-group input,
.sms-form-group select,
.sms-form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; font-family: inherit;
    background: #fff;
}
.sms-form-group textarea { resize: vertical; min-height: 120px; }
.sms-form-group select { appearance: auto; }
.sms-form-actions {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px; gap: 12px;
}
.sms-form-actions .btn-primary { min-width: 100px; border-radius: 8px; }
.btn-close {
    background: #f4a698; color: #fff; border: none;
    padding: 11px 28px; border-radius: 8px; font-size: 14px;
    font-weight: 600; cursor: pointer;
}
.btn-close:hover { background: #e89588; }

.btn-close:hover { background: #e89588; }

/* Agent login */
.agent-page { max-width: 900px; display: flex; flex-direction: column; gap: 20px; }
.agent-card {
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: var(--shadow);
}
.agent-card-header {
    background: #5a527e; color: #fff; padding: 14px 20px;
    font-size: 15px; font-weight: 600;
}
.agent-card-body { padding: 24px 20px; }
.agent-row {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px; flex-wrap: wrap;
}
.agent-row:last-child { margin-bottom: 0; }
.agent-row label {
    width: 90px; flex-shrink: 0; font-size: 14px; color: var(--text);
}
.agent-row input {
    flex: 1; min-width: 200px; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: 8px;
    background: #e9ecef; color: #495057; font-size: 14px;
}
.agent-row input::placeholder { color: #adb5bd; }
.agent-btn-copy,
.agent-btn-create {
    padding: 9px 20px; border-radius: 8px; background: #fff;
    font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.agent-btn-copy {
    border: 2px solid #1e293b; color: #1e293b;
}
.agent-btn-copy:hover { background: #f8fafc; }
.agent-btn-create {
    border: 2px solid #72b020; color: #72b020;
}
.agent-btn-create:hover { background: #f0fdf4; }
.agent-partner-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 20px;
}
.agent-partner-btn {
    padding: 12px 48px; border: none; border-radius: 8px;
    background: #72b020; color: #fff; font-size: 15px;
    font-weight: 600; cursor: pointer;
}
.agent-partner-btn:hover { background: #629a1c; }
.agent-partner-note {
    width: 100%;
    max-width: 720px;
    margin-top: 4px;
    padding: 20px 24px;
    color: #475569;
    font-size: 14px;
    line-height: 1.9;
    text-align: left;
    overflow-wrap: break-word;
    word-break: normal;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 10px;
}
.agent-partner-note p {
    margin: 0 0 12px;
    text-align: justify;
    text-justify: inter-ideograph;
}
.agent-partner-note p:last-child { margin-bottom: 0; }
.agent-partner-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: partner-item;
}
.agent-partner-list li {
    position: relative;
    margin: 0 0 14px;
    padding-left: 2em;
    text-align: justify;
    text-justify: inter-ideograph;
    counter-increment: partner-item;
}
.agent-partner-list li:last-child { margin-bottom: 0; }
.agent-partner-list li::before {
    content: counter(partner-item) ".";
    position: absolute;
    left: 0;
    top: 0;
    width: 1.6em;
    font-weight: 600;
    color: #334155;
    text-align: right;
}

@media (max-width: 600px) {
    .agent-row label { width: 100%; }
    .agent-row input { min-width: 100%; }
}

html.theme-dark .account-field input,
html.theme-dark .account-log-per { background: #1e293b; color: var(--text); }

/* Responsive - shared */
.sidebar-backdrop,
.admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 99;
}
.sidebar-backdrop[hidden],
.admin-sidebar-backdrop[hidden] { display: none !important; }
body.sidebar-open { overflow: hidden; }

@media (max-width: 900px) {
    .page-content { padding: 16px; }
    .page-footer {
        padding: 14px 16px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    .topbar { padding: 0 12px; height: 56px; }
    .topbar-right { gap: 8px; }
    .user-info strong { font-size: 13px; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .card { padding: 18px 16px; }
    .card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .table-toolbar { padding: 12px 16px; }
    .search-form { max-width: none !important; width: 100%; }
    .pagination-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 16px;
    }
    .pagination-nav { justify-content: center; }
    .modal-overlay { padding: 12px; align-items: flex-end; }
    .modal-box {
        max-width: none;
        width: 100%;
        margin-block: 0;
        max-height: min(90vh, calc(100dvh - 24px));
        overflow-y: auto;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .recharge-modal {
        max-height: min(92vh, calc(100dvh - 24px));
        overflow: hidden;
    }
    .recharge-modal-body { overflow-y: auto; }
    .modal-body { padding: 20px 16px; }
    .modal-footer { padding: 0 16px 16px; }
    .channel-notice { padding: 12px 14px; font-size: 13px; }
    .sms-action-row { gap: 8px; }
    .sms-action-btn { flex: 1 1 calc(50% - 8px); min-width: 0; padding: 10px 12px; }
    .sms-table-footer { flex-direction: column; align-items: stretch; }
    .account-profile { padding: 20px 16px 8px; }
    .account-form { padding: 12px 16px 24px; }
    .account-log-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .account-log-summary { order: -1; }
    .account-log-pagination { justify-content: center; }
    .open-card-search-row input[type="text"] { min-width: 0; width: 100%; }
    .open-card-search-row .btn-success { width: 100%; }
    .agent-row { flex-direction: column; align-items: stretch; }
    .agent-row label { width: 100%; }
    .agent-row input { min-width: 0; width: 100%; }
    .agent-btn-copy,
    .agent-btn-create { width: 100%; }
    .agent-partner-btn { width: 100%; max-width: 280px; }
    .pay-actions { flex-direction: column; }
    .pay-actions .btn { width: 100%; }
    .sidebar { transform: translateX(-100%); box-shadow: none; }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15); }
    .main-area { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .stats-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }
    .recharge-methods { grid-template-columns: 1fr; }
    .channel-grid { grid-template-columns: 1fr; }
    .table-card h2,
    .table-card h3,
    .recharge-records-card h3 { padding: 16px 16px 0; }
    .table-card.card { padding: 0; }
    .recharge-card { padding: 18px 16px; }
    .recharge-method-box { padding: 18px 16px; }
    .recharge-method-head { gap: 12px; }
    .recharge-pay-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .recharge-address-row .btn { width: 100%; margin-top: 8px; }
    .recharge-address-row code { width: 100%; font-size: 12px; }
    .pagination-bar label { text-align: center; }
    .pagination-bar select { width: 100%; max-width: 120px; margin: 0 auto; display: block; }
}

@media (max-width: 768px) {
    .responsive-table-wrap { overflow-x: visible; padding: 0 12px 12px; }
    .table-card .responsive-table-wrap { padding: 0 12px 12px; }
    .responsive-table thead { display: none; }
    .responsive-table tbody tr {
        display: block;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 2px 14px;
        box-shadow: var(--shadow);
    }
    .responsive-table tbody tr:last-child { margin-bottom: 0; }
    .responsive-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 11px 0;
        border-bottom: 1px solid var(--border);
        white-space: normal;
        word-break: break-word;
        text-align: right;
    }
    .responsive-table td:last-child { border-bottom: none; }
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 13px;
        text-align: left;
        flex: 0 0 88px;
        line-height: 1.5;
    }
    .responsive-table td.empty-cell {
        display: block;
        text-align: center;
        padding: 32px 16px !important;
        border-bottom: none;
    }
    .responsive-table td.empty-cell::before { display: none; }
    .responsive-table .status-tag { margin-left: auto; }
    .search-form { flex-direction: column; align-items: stretch; }
    .search-form button { width: 100%; }
}

@media (max-width: 600px) {
    .auth-wrapper { padding: 16px; }
    .auth-card { padding: 24px 18px; }
    .auth-title { font-size: 20px; }
    .logo-text { font-size: 22px; }
    .stat-value { font-size: 22px; }
    .stat-card { padding: 16px; }
    .service-buttons .btn-service { width: 100%; margin-right: 0; text-align: center; }
    .captcha-row { flex-wrap: wrap; }
    .captcha-row input { width: 100%; flex: none; }
    .recharge-countdown strong { font-size: 18px; }
    .usdt-input-wrap input { font-size: 18px; }
    .usdt-preview-value strong { font-size: 20px; }
    .sms-action-btn { flex: 1 1 100%; }
    .account-avatar { width: 60px; height: 60px; font-size: 24px; }
    .recharge-card h2 { font-size: 18px; }
}

.theme-icon-sun { display: none; }
html.theme-dark .theme-icon-moon { display: none; }
html.theme-dark .theme-icon-sun { display: block; }

/* Night mode */
html.theme-dark {
    --bg: #0b1220;
    --white: #151f32;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #9d8df1;
    --primary-hover: #b4a8f5;
    --border: #2d3a4f;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

html.theme-dark .logo-text { color: #f8fafc; }
html.theme-dark .nav-item:hover,
html.theme-dark .nav-toggle:hover,
html.theme-dark .nav-sub-item:hover,
html.theme-dark .user-info:hover,
html.theme-dark .dropdown-menu a:hover { background: #1e293b; }
html.theme-dark .nav-item.active,
html.theme-dark .nav-sub-item.active { background: #243044; color: #c4b5fd; }
html.theme-dark .icon-btn,
html.theme-dark .btn-outline,
html.theme-dark .preset-btn,
html.theme-dark .dropdown-menu,
html.theme-dark .search-form input,
html.theme-dark .pagination-bar select,
html.theme-dark .page-btn { background: #1e293b; color: var(--text); }
html.theme-dark .icon-btn { color: #cbd5e1; }
html.theme-dark .stat-value { color: #f8fafc; }
html.theme-dark .announcement-body p { color: #cbd5e1; }
html.theme-dark .channel-notice { background: #1e293b; border-color: #334155; color: #cbd5e1; }
html.theme-dark .channel-notice-icon { background: #243044; color: #93c5fd; }
html.theme-dark .channel-card-head h3,
html.theme-dark .recharge-method-box h3 { color: #f1f5f9; }
html.theme-dark .data-table th { background: #1a2438; }
html.theme-dark .responsive-table tbody tr { background: var(--white); border-color: var(--border); }
html.theme-dark .status-tag { background: #243044; color: #cbd5e1; }
html.theme-dark .product-card,
html.theme-dark .modal-box,
html.theme-dark .agent-card,
html.theme-dark .sms-number-item { background: var(--white); }
html.theme-dark .product-card { border-color: var(--border); }
html.theme-dark .open-card-form-row input,
html.theme-dark .sms-form-group input,
html.theme-dark .sms-form-group select,
html.theme-dark .sms-form-group textarea,
html.theme-dark .sms-page-size select { background: #1e293b; color: var(--text); }
html.theme-dark .open-card-form-row input[readonly],
html.theme-dark .agent-row input { background: #111827; color: #cbd5e1; }
html.theme-dark .btn-open-submit { background: #1e293b; border-color: #64748b; color: #f8fafc; }
html.theme-dark .btn-open-submit:hover { background: #243044; }
html.theme-dark .modal-header { background: #1a2438; }
html.theme-dark .modal-body p { color: #cbd5e1; }
html.theme-dark .modal-warning-icon { background: #3f2f14; border-color: #854d0e; color: #fbbf24; }
html.theme-dark .recharge-method-box,
html.theme-dark .recharge-method-usdt { background: linear-gradient(180deg, #151f32 0%, #111827 100%); }
html.theme-dark .recharge-method-usdt { border-color: #166534; }
html.theme-dark .usdt-input-wrap { background: #1e293b; border-color: #166534; }
html.theme-dark .usdt-input-suffix { background: #14532d; color: #86efac; border-color: #166534; }
html.theme-dark .usdt-input-wrap input { color: #f8fafc; }
html.theme-dark .usdt-preview-card { background: #1e293b; border-color: #166534; }
html.theme-dark .recharge-countdown { background: #3f2f14; color: #fcd34d; }
html.theme-dark .recharge-address-row code { background: #111827; color: #cbd5e1; }
html.theme-dark .recharge-pay-highlight { background: #3f2f14; border-color: #ca8a04; }
html.theme-dark .recharge-pay-highlight strong { color: #fcd34d; }
html.theme-dark .recharge-tip-warn { background: #3f2f14; color: #fcd34d; }
html.theme-dark .recharge-paid-tip { color: #86efac; }
html.theme-dark .recharge-qrcode-img { background: #111827; border-color: #334155; }
html.theme-dark .sms-select-bar { background: #1a2438; }
html.theme-dark .agent-btn-copy,
html.theme-dark .agent-btn-create { background: #1e293b; }
html.theme-dark .agent-btn-copy { border-color: #64748b; color: #e2e8f0; }
html.theme-dark .agent-btn-create { border-color: #84cc16; color: #a3e635; }
html.theme-dark .agent-partner-note {
    color: #94a3b8;
    background: #111827;
    border-color: #1e293b;
}
html.theme-dark .agent-partner-list li::before { color: #cbd5e1; }
html.theme-dark .alert-error { background: #3f1d1d; color: #fecaca; border-color: #7f1d1d; }
html.theme-dark .alert-success { background: #14532d; color: #bbf7d0; border-color: #166534; }

/* Personal center */
.account-page { max-width: 1280px; }
.account-grid {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.account-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.account-card-head {
    background: var(--primary);
    color: #fff;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
}
.account-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 24px 8px;
}
.account-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}
.account-profile-meta strong {
    display: block;
    font-size: 18px;
    color: var(--text);
    margin-bottom: 6px;
}
.account-profile-meta span {
    font-size: 13px;
    color: var(--text-muted);
}
.account-form { padding: 12px 24px 28px; }
.account-field { margin-bottom: 18px; }
.account-field label {
    display: block;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
}
.account-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    outline: none;
}
.account-field input:focus { border-color: var(--primary); }
.account-save-wrap { text-align: center; margin-top: 28px; }
.account-save-btn {
    min-width: 140px;
    border-radius: 999px;
    padding: 11px 36px;
}
.account-log-card { min-width: 0; }
.account-log-table-wrap { border-top: 1px solid var(--border); }
.account-log-table th,
.account-log-table td { white-space: normal; }
.account-log-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}
.account-log-per {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
}
.account-log-summary { flex: 1; text-align: center; }
.account-log-pagination .page-num {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
}
.account-log-pagination .page-num.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

@media (max-width: 1100px) {
    .account-grid { grid-template-columns: 1fr; }
}

html.theme-dark .account-field input,
html.theme-dark .account-log-per { background: #1e293b; color: var(--text); }
