/* =====================================================
   DASHBOARD STYLES - Consistent with Landing Page
   ===================================================== */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-sidebar: #0d0d14;
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00aa;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7a;
    --sidebar-width: 260px;
    --topnav-height: 70px;
    --font-display: 'Orbitron', monospace;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Dashboard Body */
.dashboard-body {
    background: var(--bg-dark);
    min-height: 100vh;
    font-family: var(--font-body);
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay.hidden {
    display: none;
}

.login-box {
    background: linear-gradient(135deg, rgba(18, 18, 26, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 24px;
    padding: 50px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.1), 0 0 120px rgba(255, 0, 170, 0.05);
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-magenta) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--bg-dark);
    margin: 0 auto 30px;
}

.login-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 0.95rem;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.login-input::placeholder {
    color: var(--text-muted);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-magenta) 100%);
    border: none;
    border-radius: 12px;
    color: var(--bg-dark);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.login-error {
    color: #ff4757;
    font-size: 0.9rem;
    margin-top: 15px;
    display: none;
}

.login-error.show {
    display: block;
}

.login-home {
    margin-top: 30px;
}

.login-home a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-home a:hover {
    color: var(--neon-cyan);
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topnav-height);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-magenta) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--bg-dark);
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.nav-title {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-logout svg {
    width: 18px;
    height: 18px;
}

.nav-logout:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--topnav-height);
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--topnav-height);
    z-index: 20;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topnav-height));
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 25px 0;
    overflow-y: auto;
}

.sidebar-section {
    padding: 0 20px;
    margin-bottom: 30px;
}

.sidebar-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 15px;
    padding-left: 15px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(255, 0, 170, 0.1) 100%);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.sidebar-link.active svg {
    stroke: var(--neon-cyan);
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.sidebar-back svg {
    width: 18px;
    height: 18px;
}

.sidebar-back:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--neon-cyan);
}

/* Sidebar Subnav */
.sidebar-subnav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
}

.sidebar-subnav.hidden {
    display: none;
}

.sidebar-menu-chevron {
    width: 16px !important;
    height: 16px !important;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.sidebar-link[aria-expanded="false"] .sidebar-menu-chevron {
    transform: rotate(-90deg);
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-sublink svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-sublink:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.sidebar-sublink.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
}

.sidebar-sublink.active svg {
    stroke: var(--neon-cyan);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    min-height: calc(100vh - var(--topnav-height));
    background: var(--bg-dark);
    overflow-x: hidden;
}

.main-content .container {
    max-width: 1400px;
    min-width: 0;
    margin: 0 auto;
    padding: 30px 40px;
    overflow-x: hidden;
}

/* Override default header in dashboard */
.dashboard-body header {
    display: none;
}

/* Override data-tabs - use sidebar instead */
.dashboard-body .data-tabs {
    display: none;
}

/* DB Status in top nav */
.top-nav .db-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.85rem;
}

.top-nav .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffc107;
    animation: pulse 2s infinite;
}

.top-nav .db-status.connected .status-dot {
    background: #48bb78;
    animation: none;
}

.top-nav .db-status.error .status-dot {
    background: #ff4757;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Complaints module */
.inventory-page { max-width: 1380px; margin: 0 auto; }
.inventory-hero { display: flex; align-items: center; gap: 24px; padding: 34px; border: 1px solid rgba(72,187,120,.2); border-radius: 22px; background: linear-gradient(135deg, rgba(13,35,31,.94), rgba(19,22,40,.94)); }
.inventory-icon { flex: 0 0 72px; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 18px; color: #68d391; background: rgba(72,187,120,.1); border: 1px solid rgba(72,187,120,.24); }
.inventory-icon svg { width: 36px; height: 36px; }
.inventory-kicker { color: #68d391; font-family: var(--font-display); font-size: .72rem; letter-spacing: .16em; }
.inventory-hero h2 { margin: 7px 0 8px; color: #fff; font-size: 1.8rem; }
.inventory-hero p { margin: 0; color: #a0aec0; line-height: 1.7; }
.inventory-status { margin-left: auto; flex: 0 0 auto; padding: 9px 13px; border-radius: 999px; color: #68d391; background: rgba(72,187,120,.1); border: 1px solid rgba(72,187,120,.24); font-size: .8rem; }
.inventory-placeholder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.inventory-placeholder-grid article { min-height: 155px; padding: 25px; border: 1px solid rgba(255,255,255,.07); border-radius: 17px; background: rgba(255,255,255,.025); }
.inventory-placeholder-grid article > span { color: rgba(104,211,145,.55); font-family: var(--font-display); font-size: .75rem; }
.inventory-placeholder-grid h3 { margin: 13px 0 8px; color: #fff; }
.inventory-placeholder-grid p { margin: 0; color: #718096; font-size: .86rem; line-height: 1.65; }
.inventory-coming-soon { margin-top: 18px; padding: 22px 25px; border-radius: 15px; background: rgba(72,187,120,.07); border-left: 3px solid #48bb78; }
.inventory-coming-soon strong, .inventory-coming-soon span { display: block; }
.inventory-coming-soon strong { color: #fff; margin-bottom: 7px; }
.inventory-coming-soon span { color: #a0aec0; font-size: .84rem; }

.complaints-page { max-width: 1380px; margin: 0 auto; }
.cp-row-actions { display: flex; gap: 8px; align-items: center; min-width: auto !important; }
.cp-list button.danger { border-color: rgba(255,92,112,.45); background: rgba(255,92,112,.1); color: #ff8495; }
.cp-head,.cp-tools,.cp-list article,.cp-head>div{display:flex;align-items:center}.cp-head{justify-content:space-between;margin-bottom:18px}.cp-head span{color:#00f0ff;font-size:.72rem;letter-spacing:.15em}.cp-head h2{margin:5px 0;color:#fff}.cp-head button,.cp-form-grid+label+footer button:last-child{border:0;border-radius:10px;padding:12px 18px;background:linear-gradient(135deg,#00d4ff,#667eea);color:#071017;font-weight:800;cursor:pointer}.cp-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.cp-stats b{padding:18px;border:1px solid rgba(255,255,255,.08);border-radius:14px;color:#a0aec0;background:rgba(255,255,255,.025)}.cp-stats strong{display:block;margin-top:8px;color:#fff;font-size:1.7rem}.cp-tools{gap:10px;margin-bottom:14px}.cp-tools input,.cp-tools select,.cp-form-grid input,.cp-form-grid select,.cp-form-grid textarea,#cpForm>label textarea{box-sizing:border-box;width:100%;padding:11px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:#121722;color:#fff}.cp-tools input{flex:1}.cp-list{display:grid;gap:10px}.cp-list article{gap:18px;padding:18px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.025)}.cp-list article>div{min-width:260px}.cp-list b,.cp-list small{display:block;margin-top:5px;color:#fff}.cp-list small{color:#718096}.cp-list p{flex:1;color:#a0aec0}.cp-list button{border:1px solid rgba(0,240,255,.25);border-radius:8px;padding:9px 12px;background:rgba(0,240,255,.08);color:#00f0ff}.lv{padding:3px 7px;border-radius:6px;color:#f6ad55;background:rgba(246,173,85,.12)}#cpDialog{width:min(1050px,94vw);max-height:90vh;padding:0;border:1px solid #334155;border-radius:16px;background:#0d111b;color:#fff}#cpDialog::backdrop{background:rgba(0,0,0,.75)}#cpForm{padding:22px;overflow:auto}#cpForm header,#cpForm footer{display:flex;justify-content:space-between;align-items:center}#cpForm header button{border:0;background:none;color:#fff;font-size:1.8rem}.cp-form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.cp-form-grid label,#cpForm>label{color:#a0aec0;font-size:.8rem}.cp-form-grid textarea,#cpForm>label textarea{min-height:78px;margin-top:5px}.cp-form-grid input,.cp-form-grid select{margin-top:5px}#cpForm>label{display:block;margin-top:12px}#cpForm footer{justify-content:flex-end;gap:10px;margin-top:16px}#cpForm footer button{padding:10px 16px;border-radius:8px}.cp-empty{padding:50px;text-align:center;color:#718096}
.complaints-hero { display: flex; align-items: center; gap: 24px; padding: 34px; border: 1px solid rgba(0,240,255,.16); border-radius: 22px; background: linear-gradient(135deg, rgba(13,29,40,.94), rgba(30,16,42,.94)); }
.complaints-icon { flex: 0 0 72px; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 18px; color: var(--neon-cyan); background: rgba(0,240,255,.09); border: 1px solid rgba(0,240,255,.22); }
.complaints-icon svg { width: 36px; height: 36px; }
.complaints-kicker { color: var(--neon-cyan); font-family: var(--font-display); font-size: .72rem; letter-spacing: .16em; }
.complaints-hero h2 { margin: 7px 0 8px; color: #fff; font-size: 1.8rem; }
.complaints-hero p { margin: 0; color: #a0aec0; line-height: 1.7; }
.complaints-status { margin-left: auto; flex: 0 0 auto; padding: 9px 13px; border-radius: 999px; color: #f6ad55; background: rgba(246,173,85,.1); border: 1px solid rgba(246,173,85,.25); font-size: .8rem; }
.complaints-placeholder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.complaints-placeholder-grid article { min-height: 155px; padding: 25px; border: 1px solid rgba(255,255,255,.07); border-radius: 17px; background: rgba(255,255,255,.025); }
.complaints-placeholder-grid article > span { color: rgba(0,240,255,.45); font-family: var(--font-display); font-size: .75rem; }
.complaints-placeholder-grid h3 { margin: 13px 0 8px; color: #fff; }
.complaints-placeholder-grid p { margin: 0; color: #718096; font-size: .86rem; line-height: 1.65; }
.complaints-coming-soon { margin-top: 18px; padding: 22px 25px; border-radius: 15px; background: rgba(102,126,234,.07); border-left: 3px solid #667eea; }
.complaints-coming-soon strong, .complaints-coming-soon span { display: block; }
.complaints-coming-soon strong { color: #fff; margin-bottom: 7px; }
.complaints-coming-soon span { color: #a0aec0; font-size: .84rem; }

/* Responsive */
@media (max-width: 1024px) {
    .inventory-placeholder-grid { grid-template-columns: 1fr; }
    .complaints-placeholder-grid { grid-template-columns: 1fr; }
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }

    .sidebar-label {
        display: none;
    }

    .sidebar-link span,
    .sidebar-back span {
        display: none;
    }

    .sidebar-link,
    .sidebar-back {
        justify-content: center;
        padding: 14px;
    }

    .sidebar-link svg,
    .sidebar-back svg {
        width: 22px;
        height: 22px;
    }

    .main-content {
        margin-left: 80px;
    }

    .main-content .container {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .cp-stats,.cp-form-grid{grid-template-columns:1fr}.cp-list article{align-items:flex-start;flex-direction:column}
    .inventory-hero { align-items: flex-start; flex-direction: column; padding: 25px; }
    .inventory-status { margin-left: 0; }
    .complaints-hero { align-items: flex-start; flex-direction: column; padding: 25px; }
    .complaints-status { margin-left: 0; }
    .top-nav {
        padding: 0 15px;
    }

    .brand-text,
    .nav-divider,
    .nav-title {
        display: none;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    /* Show mobile tabs when sidebar is hidden */
    .dashboard-body .data-tabs {
        display: flex;
    }
}

/* Live status */
.live-status-page {
    padding-bottom: 40px;
}

.live-status-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.live-status-header h2,
.live-section-title h3,
.live-machine-group h3 {
    margin: 0;
}

.live-status-header p,
.live-section-title p {
    margin: 6px 0 0;
    color: #718096;
    font-size: 13px;
}

.live-status-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.live-status-actions > div {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #718096;
    font-size: 12px;
    line-height: 1.7;
}

.live-status-error,
.live-mapping-notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.live-status-error {
    color: #feb2b2;
    background: rgba(229, 62, 62, 0.12);
    border: 1px solid rgba(229, 62, 62, 0.35);
}

.live-mapping-notice {
    color: #fbd38d;
    background: rgba(237, 137, 54, 0.12);
    border: 1px solid rgba(237, 137, 54, 0.35);
}

.live-overview-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}

.live-overview-card {
    min-height: 96px;
    padding: 18px;
    border: 1px solid rgba(74, 158, 255, 0.18);
    border-radius: 12px;
    background: rgba(26, 39, 68, 0.62);
}

.live-overview-card.featured {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.2), rgba(56, 178, 172, 0.08));
    border-color: rgba(72, 187, 120, 0.5);
}

.live-overview-card span {
    display: block;
    margin-bottom: 10px;
    color: #a0aec0;
    font-size: 12px;
}

.live-overview-card strong {
    color: #fff;
    font-family: Orbitron, sans-serif;
    font-size: 27px;
}

.live-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 24px 0 12px;
}

.live-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.live-area-card {
    padding: 15px;
    border: 1px solid rgba(74, 158, 255, 0.18);
    border-radius: 10px;
    background: rgba(26, 39, 68, 0.48);
}

.live-area-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.live-area-header span,
.live-area-rate {
    color: #a0aec0;
    font-size: 12px;
}

.live-progress {
    height: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    border-radius: 99px;
    background: #16213b;
}

.live-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #48bb78, #38b2ac);
}

.live-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #a0aec0;
    font-size: 11px;
}

.live-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.live-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
}

.live-legend .free {
    background: #2d3748;
}

.live-legend .occupied {
    background: #48bb78;
}

.live-legend .ending-soon {
    background: #ed8936;
}

.live-machine-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.live-machine-group {
    padding: 16px;
    border: 1px solid rgba(74, 158, 255, 0.16);
    border-radius: 12px;
    background: rgba(13, 24, 48, 0.55);
}

.live-machine-group-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 13px;
}

.live-machine-group-header span {
    display: block;
    margin-top: 4px;
    color: #718096;
    font-size: 11px;
}

.live-machine-group-header > strong {
    color: #4a9eff;
    font-family: Orbitron, sans-serif;
}

.live-machine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 7px;
}

.live-machine {
    min-height: 52px;
    padding: 8px 5px;
    border: 1px solid #2d3748;
    border-radius: 8px;
    text-align: center;
    background: rgba(45, 55, 72, 0.45);
}

.live-machine strong,
.live-machine span {
    display: block;
}

.live-machine strong {
    margin-bottom: 5px;
    font-size: 12px;
}

.live-machine span {
    color: #a0aec0;
    font-size: 9px;
}

.live-machine.occupied {
    border-color: rgba(72, 187, 120, 0.75);
    background: rgba(72, 187, 120, 0.14);
}

.live-machine.ending-soon {
    border-color: rgba(237, 137, 54, 0.85);
    background: rgba(237, 137, 54, 0.18);
}

.live-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(74, 158, 255, 0.16);
    border-radius: 12px;
}

.live-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(13, 24, 48, 0.48);
}

.live-table th,
.live-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
    text-align: left;
    font-size: 12px;
}

.live-table th {
    color: #a0aec0;
    background: rgba(26, 39, 68, 0.7);
}

.live-end-time.package {
    color: #68d391;
}

.live-end-time.estimate {
    color: #f6ad55;
}

.live-end-time.unknown {
    color: #718096;
}

@media (max-width: 1200px) {
    .live-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 768px) {
    .live-status-header,
    .live-section-title {
        align-items: stretch;
        flex-direction: column;
    }

    .live-status-actions {
        justify-content: space-between;
    }

    .live-status-actions > div {
        align-items: flex-start;
    }

    .live-overview-grid,
    .live-category-grid,
    .live-machine-groups {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   SYNC PAGE STYLES
   ===================================================== */
.sync-page {
    max-width: 700px;
    margin: 0 auto;
}

.sync-header {
    text-align: center;
    margin-bottom: 40px;
}

.sync-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.sync-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.sync-page .date-picker-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.sync-page .date-picker-section label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.date-range-inputs input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-range-inputs input:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.date-range-inputs input::placeholder {
    color: var(--text-muted);
}

.date-separator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sync-page .hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.sync-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.sync-actions .btn {
    padding: 16px 40px;
    font-size: 1rem;
}

.sync-actions .btn svg {
    margin-right: 8px;
}

.sync-progress {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
}

.sync-progress .progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.sync-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-magenta) 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.sync-progress .progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Sync Step Styles */
.sync-step {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sync-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sync-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sync-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.sync-step-icon svg {
    stroke: var(--text-muted);
}

.sync-step.active .sync-step-icon {
    background: rgba(0, 240, 255, 0.1);
}

.sync-step.active .sync-step-icon svg {
    stroke: var(--neon-cyan);
}

.sync-step.completed .sync-step-icon {
    background: rgba(72, 187, 120, 0.1);
}

.sync-step.completed .sync-step-icon svg {
    stroke: #48bb78;
}

.sync-step-title {
    flex: 1;
    font-weight: 500;
    color: var(--text-secondary);
}

.sync-step.active .sync-step-title {
    color: var(--text-primary);
}

.sync-step-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.sync-step.active .sync-step-status {
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
}

.sync-step.completed .sync-step-status {
    background: rgba(72, 187, 120, 0.1);
    color: #48bb78;
}

.sync-step.error .sync-step-status {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

.sync-step .progress-bar {
    height: 6px;
    margin-bottom: 8px;
}

.sync-step .progress-text {
    font-size: 0.8rem;
    text-align: left;
    min-height: 18px;
}

/* Data Type Section */
.data-type-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.data-type-section:last-child {
    margin-bottom: 0;
}

.data-type-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-type-section h4 svg {
    stroke: var(--neon-cyan);
}

.data-type-section .delete-options {
    gap: 15px;
}

.data-type-section .delete-option {
    padding: 15px;
    border-radius: 12px;
}

.data-type-section .delete-option label {
    font-size: 0.85rem;
}

.data-type-section .date-range-inputs {
    margin: 10px 0;
}

.data-type-section .date-range-inputs input {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Small button variant */
.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

.sync-result {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
}

.sync-result.success {
    border-color: rgba(72, 187, 120, 0.3);
    background: rgba(72, 187, 120, 0.05);
}

.sync-result.error {
    border-color: rgba(255, 71, 87, 0.3);
    background: rgba(255, 71, 87, 0.05);
}

.sync-result h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.sync-result p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 5px 0;
}

.sync-result .stat-highlight {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neon-cyan);
    margin: 15px 0;
}

/* Data Management Section */
.data-management-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.data-management-section h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.data-management-section > .hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.delete-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.delete-option {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
}

.delete-option label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.delete-option .date-range-inputs {
    margin-bottom: 20px;
}

.delete-option.delete-all {
    background: rgba(255, 71, 87, 0.05);
    border-color: rgba(255, 71, 87, 0.2);
}

.delete-option.delete-all label {
    color: #ff4757;
}

/* Danger Button Styles */
.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff4757 0%, #c0392b 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger svg {
    width: 16px;
    height: 16px;
}

.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid rgba(255, 71, 87, 0.5);
    border-radius: 10px;
    color: #ff4757;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger-outline:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: #ff4757;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.2);
}

.btn-danger-outline svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .date-range-inputs {
        flex-direction: column;
    }

    .date-separator {
        display: none;
    }

    .sync-actions .btn {
        width: 100%;
    }
}

/* =====================================================
   ANALYSIS SUBTABS STYLES
   ===================================================== */
.analysis-subtabs-section {
    margin-bottom: 30px;
}

.analysis-subtabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    background: var(--bg-card);
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.analysis-subtab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analysis-subtab svg {
    width: 18px;
    height: 18px;
}

.analysis-subtab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.analysis-subtab.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(255, 0, 170, 0.1) 100%);
    color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.analysis-subtab.active svg {
    stroke: var(--neon-cyan);
}

/* Analysis subcontent visibility */
.analysis-subcontent {
    display: none;
}

.analysis-subcontent.active {
    display: block;
}

/* Hotel data module placeholder */
.machine-layout-warning {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(246, 173, 85, 0.35);
    border-radius: 8px;
    background: rgba(246, 173, 85, 0.1);
    color: #f6ad55;
    font-size: 12px;
    line-height: 1.55;
}

.hotel-data-page {
    max-width: 1680px;
    margin: 0 auto;
}

.hotel-module-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 180px;
    padding: 34px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
}

.hotel-module-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0, 240, 255, 0.1), transparent 38%),
        linear-gradient(315deg, rgba(255, 0, 170, 0.08), transparent 42%);
    pointer-events: none;
}

.hotel-module-icon,
.hotel-module-shell > div,
.hotel-module-status {
    position: relative;
    z-index: 1;
}

.hotel-module-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.22);
}

.hotel-module-icon svg {
    width: 32px;
    height: 32px;
}

.hotel-module-kicker {
    margin: 0 0 8px;
    color: var(--neon-cyan);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hotel-module-shell h2 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
}

.hotel-module-desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.hotel-module-status {
    margin-left: auto;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    white-space: nowrap;
}

.hotel-revenue-panel {
    padding: 24px;
    margin-bottom: 24px;
    background: rgba(18, 18, 26, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.hotel-revenue-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.hotel-revenue-header h2 {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.45rem;
}

.hotel-revenue-header p {
    margin: 0;
    color: var(--text-secondary);
}

.hotel-revenue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.hotel-revenue-card {
    min-width: 0;
    padding: 18px;
    border-left: 4px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hotel-revenue-card.total {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.16), rgba(237, 100, 166, 0.13));
    border-left-color: var(--neon-cyan);
}

.hotel-revenue-card.douyin { border-left-color: #ed64a6; }
.hotel-revenue-card.meituan { border-left-color: #48bb78; }
.hotel-revenue-card.store { border-left-color: #f6ad55; }
.hotel-revenue-card.pms-total { border-left-color: #63b3ed; }
.hotel-revenue-card.variance { border-left-color: #fc8181; }
.hotel-revenue-card.nights { border-left-color: #63b3ed; }
.hotel-revenue-card.occupancy { border-left-color: #68d391; }
.hotel-revenue-card.adr { border-left-color: #fbd38d; }
.hotel-revenue-card.revpar { border-left-color: #b794f4; }
.hotel-revenue-card.best-day { border-left-color: #fc8181; }

.hotel-revenue-card span {
    display: block;
    color: #a0aec0;
    font-weight: 700;
}

.hotel-revenue-card strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: clamp(1.1rem, 1.2vw, 1.45rem);
    word-break: break-word;
}

.hotel-revenue-card.total strong {
    font-size: clamp(1.7rem, 2vw, 2.25rem);
}

.hotel-revenue-card strong.positive {
    color: #68d391;
}

.hotel-revenue-card strong.negative {
    color: #fc8181;
}

.hotel-revenue-card small {
    display: block;
    margin-top: 8px;
    color: #718096;
}

.hotel-channel-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.hotel-channel-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 13px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.hotel-channel-pill::before {
    content: '';
    flex: 0 0 auto;
    width: 9px;
    height: 36px;
    border-radius: 99px;
    background: #718096;
}

.hotel-channel-pill.douyin::before { background: #ed64a6; }
.hotel-channel-pill.meituan::before { background: #48bb78; }
.hotel-channel-pill.store::before { background: #f6ad55; }
.hotel-channel-pill.adjustment::before { background: #b794f4; }

.hotel-channel-pill span {
    color: #a0aec0;
    font-weight: 700;
}

.hotel-channel-pill strong {
    margin-left: auto;
    color: #fff;
    font-size: 1.1rem;
    text-align: right;
}

.hotel-revenue-table-wrap {
    min-height: 0;
    max-height: 520px;
    overflow: auto;
}

.hotel-chart-description {
    margin: -4px 0 12px;
    color: #718096;
    font-size: 0.82rem;
    line-height: 1.6;
}

#hotelRoomTypeTable.hotel-revenue-table-wrap {
    min-height: 300px;
}

#hotelRevenueTable.hotel-revenue-table-wrap {
    min-height: 0;
}

.hotel-revenue-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: 0.84rem;
    line-height: 1.25;
    table-layout: auto;
}

.hotel-revenue-table tr {
    height: 38px;
}

.hotel-revenue-table th,
.hotel-revenue-table td {
    height: 38px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
}

.hotel-revenue-table th:first-child,
.hotel-revenue-table td:first-child {
    text-align: left;
}

.hotel-revenue-table td.positive {
    color: #68d391;
}

.hotel-revenue-table td.negative {
    color: #fc8181;
}

.hotel-revenue-table td.muted {
    color: #718096;
}

.hotel-revenue-table .hotel-note-cell {
    max-width: 220px;
    color: #a0aec0;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hotel-revenue-table th {
    color: #a0aec0;
    font-size: 0.78rem;
    font-weight: 800;
}

.hotel-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.8;
}

/* Unified calendar section */
.unified-calendar-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .analysis-subtabs {
        flex-direction: column;
        gap: 5px;
    }

    .analysis-subtab {
        width: 100%;
        justify-content: center;
    }

    .hotel-module-shell {
        flex-direction: column;
        align-items: flex-start;
        padding: 26px;
    }

    .hotel-module-status {
        margin-left: 0;
    }

    .hotel-revenue-header,
    .hotel-revenue-grid,
    .hotel-channel-strip {
        grid-template-columns: 1fr;
    }

    .hotel-revenue-header {
        flex-direction: column;
    }
}

/* =====================================================
   SEAT MAP PAGE STYLES
   ===================================================== */
.seat-map-page {
    max-width: 1680px;
    margin: 0 auto;
}

.seat-map-header {
    text-align: center;
    margin-bottom: 40px;
}

.seat-map-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.seat-map-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.seat-map-date-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.seat-map-date-section label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.seat-map-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.seat-map-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.seat-map-actions .btn svg {
    width: 16px;
    height: 16px;
}

/* Mode Switch */
.seat-map-mode-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mode-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.mode-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 4px;
}

.mode-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mode-tab:hover {
    color: var(--text-primary);
}

.mode-tab.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(255, 0, 170, 0.15) 100%);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Seat Map Stats */
.seat-map-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

@media (max-width: 1024px) {
    .seat-map-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .seat-map-stats {
        grid-template-columns: 1fr;
    }
}

/* Seat Map Container */
.seat-map-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

@media (max-width: 1024px) {
    .seat-map-container {
        grid-template-columns: 1fr;
    }
}

/* Layout Container in Dashboard */
#seatMapSubcontent .layout-container {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 18px;
    position: relative;
    overflow: visible;
}

/* Floor plan structure from landing.css */
#seatMapSubcontent .floor-plan {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 8px;
}

#seatMapSubcontent .floor-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

#seatMapSubcontent .floor-row.top-row {
    gap: 18px;
    margin-bottom: 10px;
    margin-left: 50px;
}

#seatMapSubcontent .floor-row.bottom-row {
    margin-top: 15px;
    gap: 30px;
}

#seatMapSubcontent .floor-main {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: flex-start;
}

#seatMapSubcontent .floor-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

#seatMapSubcontent .floor-center {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#seatMapSubcontent .hall-area {
    display: flex;
    gap: 50px;
    justify-content: center;
    margin-left: 40px;
}

#seatMapSubcontent .hall-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

#seatMapSubcontent .hall-group.single-col {
    grid-template-columns: 1fr;
}

#seatMapSubcontent .gaming-area {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

#seatMapSubcontent .col-57-61 {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: 20px;
}

#seatMapSubcontent .seat-row-52-53 {
    display: flex;
    gap: 5px;
    margin-top: 124px;
    align-self: flex-start;
}

#seatMapSubcontent .gaming-grid {
    display: flex;
    gap: 3px;
    margin-top: 35px;
}

#seatMapSubcontent .gaming-col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#seatMapSubcontent .gaming-col.center-col {
    margin: 0 12px;
}

#seatMapSubcontent .gaming-row {
    display: flex;
    gap: 3px;
}

/* Base seat styling in dashboard */
#seatMapSubcontent .seat {
    width: 24px;
    height: 19px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

#seatMapSubcontent .seat:hover {
    transform: scale(1.12);
    z-index: 10;
}

#seatMapSubcontent .floor-plan {
    gap: 10px;
    padding-top: 4px;
}

#seatMapSubcontent .latest-floor {
    border: 1px solid rgba(74, 158, 255, 0.22);
    border-radius: 8px;
    background: rgba(5, 10, 24, 0.72);
    overflow: visible;
}

#seatMapSubcontent .latest-floor-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
    background: linear-gradient(90deg, rgba(74, 158, 255, 0.15), transparent);
}

#seatMapSubcontent .latest-floor-title strong {
    color: #4a9eff;
    font-family: var(--font-display);
    letter-spacing: 0.12em;
}

#seatMapSubcontent .latest-floor-title span {
    color: var(--text-muted);
    font-size: 0.62rem;
}

#seatMapSubcontent .latest-floor-rooms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
    gap: 8px;
    padding: 10px;
    align-items: start;
}

#seatMapSubcontent .latest-seat-room {
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    min-height: 100px;
}

#seatMapSubcontent .latest-seat-room.is-hall {
    grid-row: span 2;
    grid-column: span 1;
}

#seatMapSubcontent .latest-seat-room.is-single {
    grid-column: span 2;
}

#seatMapSubcontent .latest-seat-room header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 5px;
}

#seatMapSubcontent .latest-seat-room header strong {
    color: #dce8ff;
    font-size: 0.72rem;
}

#seatMapSubcontent .latest-seat-room header span {
    color: var(--neon-cyan);
    font-size: 0.62rem;
}

#seatMapSubcontent .latest-seat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(26px, 1fr));
    gap: 4px;
}

#seatMapSubcontent .latest-seat-room.is-hall .latest-seat-grid {
    grid-template-columns: repeat(2, minmax(28px, 1fr));
}

#seatMapSubcontent .latest-seat-room.is-single .latest-seat-grid {
    grid-template-columns: repeat(6, minmax(28px, 1fr));
}

#seatMapSubcontent .latest-seat-grid .seat {
    width: auto;
    min-width: 28px;
    height: 24px;
}

#seatMapSubcontent .latest-seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 9px;
    padding: 2px 4px 0;
}

#seatMapSubcontent .latest-seat-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.55rem;
}

#seatMapSubcontent .latest-seat-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: rgba(74, 158, 255, 0.45);
}

#seatMapSubcontent .seat.zhuwei240,
#seatMapSubcontent .seat.san540 {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.32);
}

#seatMapSubcontent .seat.mayi2k,
#seatMapSubcontent .seat.shuangmayi,
#seatMapSubcontent .seat.sanmayi {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.32);
}

#seatMapSubcontent .seat.danren600 {
    background: rgba(237, 100, 166, 0.1);
    border: 1px solid rgba(237, 100, 166, 0.32);
}

#seatMapSubcontent .seat.shuang400,
#seatMapSubcontent .seat.shuang600,
#seatMapSubcontent .seat.san400 {
    background: rgba(56, 178, 172, 0.1);
    border: 1px solid rgba(56, 178, 172, 0.32);
}

#seatMapSubcontent .seat.shuang540 {
    background: rgba(159, 122, 234, 0.1);
    border: 1px solid rgba(159, 122, 234, 0.32);
}

#seatMapSubcontent .seat.wu240 {
    background: rgba(237, 137, 54, 0.1);
    border: 1px solid rgba(237, 137, 54, 0.32);
}

#seatMapSubcontent .latest-seat-legend i.danren600 {
    background: #ed64a6;
}

#seatMapSubcontent .latest-seat-legend i.mayi2k,
#seatMapSubcontent .latest-seat-legend i.shuangmayi,
#seatMapSubcontent .latest-seat-legend i.sanmayi {
    background: #48bb78;
}

#seatMapSubcontent .latest-seat-legend i.shuang400,
#seatMapSubcontent .latest-seat-legend i.shuang600,
#seatMapSubcontent .latest-seat-legend i.san400 {
    background: #38b2ac;
}

#seatMapSubcontent .latest-seat-legend i.shuang540 {
    background: #9f7aea;
}

#seatMapSubcontent .latest-seat-legend i.wu240 {
    background: #ed8936;
}

#seatMapSubcontent .home-floor {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(0, 240, 255, 0.14);
    border-radius: 18px;
    background:
        linear-gradient(rgba(0, 240, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.025) 1px, transparent 1px),
        linear-gradient(145deg, rgba(20, 24, 39, 0.96), rgba(9, 12, 24, 0.96));
    background-size: 24px 24px, 24px 24px, auto;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.35);
}

#seatMapSubcontent .home-floor-label {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
}

#seatMapSubcontent .home-floor-label strong {
    color: var(--neon-cyan);
    font-family: var(--font-display);
    font-size: 1.25rem;
}

#seatMapSubcontent .home-floor-label span {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

#seatMapSubcontent .home-floor-plan {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
}

#seatMapSubcontent .home-floor-plan-2 {
    grid-template-columns: 1.35fr repeat(4, minmax(108px, 0.75fr)) 1.35fr;
    grid-template-areas:
        "office five five double85 triple82 brand"
        "office five five double72 triple74 brand"
        "office five five double80 triple77 brand";
}

#seatMapSubcontent .home-map-office,
#seatMapSubcontent .home-map-brand,
#seatMapSubcontent .home-map-service {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    border: 1px dashed rgba(160, 160, 176, 0.22);
    border-radius: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.018);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

#seatMapSubcontent .home-map-office { grid-area: office; }
#seatMapSubcontent .room-five-2f { grid-area: five; }
#seatMapSubcontent .room-double-85 { grid-area: double85; }
#seatMapSubcontent .room-triple-82 { grid-area: triple82; }
#seatMapSubcontent .room-double-80 { grid-area: double80; }
#seatMapSubcontent .room-triple-74 { grid-area: triple74; }
#seatMapSubcontent .room-triple-77 { grid-area: triple77; }
#seatMapSubcontent .room-double-72 { grid-area: double72; }

#seatMapSubcontent .home-map-brand {
    grid-area: brand;
    flex-direction: column;
    color: #fff;
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.09), rgba(255, 0, 170, 0.08));
}

#seatMapSubcontent .home-map-brand span {
    margin-top: 4px;
    color: var(--neon-cyan);
    font-size: 0.62rem;
    letter-spacing: 0.35em;
}

#seatMapSubcontent .home-floor-plan-1 {
    grid-template-columns: 0.95fr 2.4fr 0.85fr;
    grid-template-areas:
        "left hall service"
        "bottom bottom service"
        "single single service";
}

#seatMapSubcontent .home-map-left-rooms {
    grid-area: left;
    display: grid;
    gap: 7px;
}

#seatMapSubcontent .home-map-hall {
    grid-area: hall;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

#seatMapSubcontent .home-map-service {
    grid-area: service;
    flex-direction: column;
    min-height: 100%;
    border-style: solid;
    border-color: rgba(0, 240, 255, 0.14);
    background: linear-gradient(180deg, rgba(0, 240, 255, 0.06), rgba(139, 92, 246, 0.05));
}

#seatMapSubcontent .home-map-service strong {
    color: #fff;
    font-size: 1rem;
}

#seatMapSubcontent .home-map-service span {
    margin-top: 8px;
    text-align: center;
    line-height: 1.8;
}

#seatMapSubcontent .home-map-bottom-rooms {
    grid-area: bottom;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

#seatMapSubcontent .home-map-single-rooms {
    grid-area: single;
}

#seatMapSubcontent .home-map-room {
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 11px;
    background: rgba(18, 18, 26, 0.82);
}

#seatMapSubcontent .home-map-room header {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

#seatMapSubcontent .home-map-room header strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#seatMapSubcontent .home-map-room header span {
    color: var(--neon-cyan);
}

#seatMapSubcontent .home-map-seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 4px;
}

#seatMapSubcontent .home-map-room.layout-hall .home-map-seat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#seatMapSubcontent .home-map-room.layout-five .home-map-seat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

#seatMapSubcontent .home-map-room.layout-double .home-map-seat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#seatMapSubcontent .home-map-room.layout-triple .home-map-seat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#seatMapSubcontent .home-map-room.layout-single .home-map-seat-grid {
    grid-template-columns: repeat(11, minmax(42px, 1fr));
}

#seatMapSubcontent .home-map-seat {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 44px;
    padding: 6px 2px;
    border: 1px solid rgba(160, 160, 176, 0.2);
    border-radius: 6px;
    text-align: center;
    background: rgba(52, 52, 66, 0.28);
}

#seatMapSubcontent .home-map-seat b,
#seatMapSubcontent .home-map-seat span:not(.usage-badge) {
    display: block;
}

#seatMapSubcontent .home-map-seat b {
    color: #e8e8ef;
    font-family: var(--font-display);
    font-size: 0.68rem;
}

#seatMapSubcontent .home-map-seat span:not(.usage-badge) {
    overflow: hidden;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#seatMapSubcontent .home-map-seat.usage-low,
#seatMapSubcontent .home-map-seat.usage-medium,
#seatMapSubcontent .home-map-seat.usage-high,
#seatMapSubcontent .home-map-seat.usage-very-high {
    border-color: rgba(0, 240, 255, 0.58);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.16), rgba(59, 130, 246, 0.08));
}

#seatMapSubcontent .home-map-seat.usage-low b,
#seatMapSubcontent .home-map-seat.usage-medium b,
#seatMapSubcontent .home-map-seat.usage-high b,
#seatMapSubcontent .home-map-seat.usage-very-high b {
    color: var(--neon-cyan);
}

@media (max-width: 1180px) {
    #seatMapSubcontent .home-floor {
        overflow-x: auto;
    }

    #seatMapSubcontent .home-floor-plan {
        min-width: 880px;
    }
}

@media (max-width: 760px) {
    #seatMapSubcontent .latest-floor-rooms {
        grid-template-columns: repeat(2, minmax(135px, 1fr));
    }

    #seatMapSubcontent .latest-seat-room.is-single {
        grid-column: span 2;
    }
}

/* Seat zone colors - base state (no data) */
#seatMapSubcontent .seat.dating {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

#seatMapSubcontent .seat.danren {
    background: rgba(255, 0, 170, 0.08);
    border: 1px solid rgba(255, 0, 170, 0.2);
}

#seatMapSubcontent .seat.mayi {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

#seatMapSubcontent .seat.zhuwei2 {
    background: rgba(255, 165, 0, 0.08);
    border: 1px solid rgba(255, 165, 0, 0.2);
}

#seatMapSubcontent .seat.zhuwei3 {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

#seatMapSubcontent .seat.zhuwei5 {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* Usage intensity levels - applies glow based on usage */
#seatMapSubcontent .seat.usage-low {
    box-shadow: inset 0 0 8px rgba(72, 187, 120, 0.4);
}

#seatMapSubcontent .seat.usage-medium {
    box-shadow: inset 0 0 12px rgba(255, 193, 7, 0.5);
}

#seatMapSubcontent .seat.usage-high {
    box-shadow: inset 0 0 15px rgba(255, 107, 53, 0.6);
}

#seatMapSubcontent .seat.usage-very-high {
    box-shadow:
        inset 0 0 15px rgba(255, 71, 87, 0.7),
        0 0 10px rgba(255, 71, 87, 0.4);
    animation: pulse-hot 1.5s ease-in-out infinite;
}

@keyframes pulse-hot {
    0%, 100% {
        box-shadow:
            inset 0 0 15px rgba(255, 71, 87, 0.7),
            0 0 10px rgba(255, 71, 87, 0.4);
    }
    50% {
        box-shadow:
            inset 0 0 20px rgba(255, 71, 87, 0.9),
            0 0 20px rgba(255, 71, 87, 0.6);
    }
}

/* Usage count badge */
#seatMapSubcontent .seat .usage-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-magenta) 100%);
    color: #000;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 6px;
    min-width: 16px;
    text-align: center;
}

/* Layout legend */
#seatMapSubcontent .layout-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

#seatMapSubcontent .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

#seatMapSubcontent .legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

#seatMapSubcontent .legend-color.dating {
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.5);
}

#seatMapSubcontent .legend-color.danren {
    background: rgba(255, 0, 170, 0.2);
    border: 1px solid rgba(255, 0, 170, 0.5);
}

#seatMapSubcontent .legend-color.mayi {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.5);
}

#seatMapSubcontent .legend-color.zhuwei2 {
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.5);
}

#seatMapSubcontent .legend-color.zhuwei3 {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid rgba(0, 255, 136, 0.5);
}

#seatMapSubcontent .legend-color.zhuwei5 {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.5);
}

/* Entrance and restroom markers */
#seatMapSubcontent .entrance-marker {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

#seatMapSubcontent .entrance-marker svg {
    width: 14px;
    height: 14px;
    stroke: var(--neon-cyan);
}

#seatMapSubcontent .restroom-marker {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

/* Usage Legend */
.usage-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.usage-legend-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 10px;
}

.usage-scale {
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-level {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.usage-level.low {
    background: rgba(72, 187, 120, 0.5);
    box-shadow: inset 0 0 8px rgba(72, 187, 120, 0.6);
}

.usage-level.medium {
    background: rgba(255, 193, 7, 0.5);
    box-shadow: inset 0 0 8px rgba(255, 193, 7, 0.6);
}

.usage-level.high {
    background: rgba(255, 107, 53, 0.5);
    box-shadow: inset 0 0 8px rgba(255, 107, 53, 0.6);
}

.usage-level.very-high {
    background: rgba(255, 71, 87, 0.6);
    box-shadow: inset 0 0 10px rgba(255, 71, 87, 0.8);
}

.usage-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Seat Detail Panel */
.seat-detail-panel {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
}

.seat-detail-panel h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.seat-detail-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.seat-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.seat-detail-item:last-child {
    border-bottom: none;
}

.seat-detail-label {
    color: var(--text-muted);
}

.seat-detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.seat-detail-value.highlight {
    color: var(--neon-cyan);
}

/* Seat Ranking */
.seat-ranking {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
}

.seat-ranking h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ranking-list {
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    transition: background 0.2s ease;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ranking-position {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ranking-position.gold {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #000;
}

.ranking-position.silver {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #000;
}

.ranking-position.bronze {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #000;
}

.ranking-position.normal {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.ranking-seat {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 0;
}

.ranking-seat span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-count {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--neon-cyan);
}

#seatMapSubcontent #hotRoomRanking {
    margin: 0 0 12px 0 !important;
    border-radius: 12px !important;
    background: rgba(10, 16, 32, 0.72) !important;
}

/* Tooltip for seat */
#seatMapSubcontent .seat-tooltip {
    position: fixed;
    background: rgba(18, 18, 26, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.seat-tooltip-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--neon-cyan);
}

.seat-tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 4px 0;
    font-size: 0.8rem;
}

.seat-tooltip-label {
    color: var(--text-muted);
}

.seat-tooltip-value {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    #seatMapSubcontent .layout-container {
        padding: 20px 10px;
    }

    #seatMapSubcontent .floor-plan {
        transform: scale(0.75);
        transform-origin: top center;
    }

    #seatMapSubcontent .layout-legend {
        gap: 8px;
    }

    #seatMapSubcontent .legend-item {
        font-size: 0.6rem;
    }

    .usage-legend {
        flex-wrap: wrap;
    }
}

/* =====================================================
   USER PROFILE PAGE STYLES
   ===================================================== */
.user-profile-page {
    max-width: 1200px;
    margin: 0 auto;
}

.user-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .user-profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .user-profile-stats {
        grid-template-columns: 1fr;
    }
}

/* Responsive sidebar subnav */
@media (max-width: 1024px) {
    .sidebar-subnav {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar-subnav {
        display: none;
    }
}

/* =====================================================
   USER LIST MODAL STYLES
   ===================================================== */
.user-list-modal,
.user-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.user-list-modal.hidden,
.user-detail-modal.hidden {
    display: none;
}

.user-list-modal-content,
.user-detail-modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.1);
}

.user-list-modal-header,
.user-detail-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-list-modal-header h3,
.user-detail-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.user-list-modal-body,
.user-detail-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
}

/* User List Items */
.user-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-list-item:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.2);
    transform: translateX(5px);
}

.user-list-item-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.user-list-item-info {
    flex: 1;
}

.user-list-item-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-list-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-list-item-value {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--neon-cyan);
}

/* User Detail Sections */
.user-detail-section {
    margin-bottom: 25px;
}

.user-detail-section h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neon-cyan);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.user-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.user-detail-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.user-detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.user-detail-value.highlight {
    color: var(--neon-cyan);
}

/* User Stats Cards */
.user-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.user-stat-card {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05) 0%, rgba(255, 0, 170, 0.03) 100%);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.user-stat-value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--neon-cyan);
    margin-bottom: 5px;
}

.user-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* User Records Table */
.user-detail-records {
    max-height: 300px;
    overflow-y: auto;
}

.user-record-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 80px;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.user-record-item:first-child {
    background: rgba(0, 240, 255, 0.05);
    font-weight: 500;
    color: var(--text-secondary);
}

.user-record-item span {
    color: var(--text-secondary);
}

.user-record-item span:last-child {
    text-align: right;
    color: var(--neon-cyan);
}

/* RFM Segment Colors */
.segment-high-value { color: #ffd700; }
.segment-potential { color: #48bb78; }
.segment-new { color: #00f0ff; }
.segment-at-risk { color: #ff4757; }
.segment-normal { color: #667eea; }

/* RFM Row Layout */
.rfm-row {
    display: flex;
    gap: 20px;
}

.rfm-chart-container {
    flex: 0 0 45%;
    max-width: 45%;
}

.rfm-chart-container .chart {
    height: 350px;
}

.chart-extra-tall {
    height: 560px;
}

.product-detail-container {
    padding-bottom: 24px;
}

.product-category-detail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.product-detail-major {
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.025);
    min-width: 0;
}

.product-detail-major-header,
.product-detail-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.product-detail-major-header {
    padding: 13px 14px;
    background: rgba(0, 240, 255, 0.08);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.product-detail-major-header strong {
    color: var(--neon-cyan);
    font-size: 1rem;
}

.product-detail-major-header span,
.product-detail-subheader span:last-child {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-align: right;
}

.product-detail-subcategory {
    padding: 12px 14px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.product-detail-subcategory:last-child {
    border-bottom: 0;
}

.product-detail-subheader {
    margin-bottom: 10px;
}

.product-detail-subheader span:first-child {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.product-detail-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 10px;
}

.product-detail-controls label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.product-detail-controls select {
    min-width: 88px;
    height: 30px;
    border: 1px solid rgba(0, 240, 255, 0.16);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text-primary);
    padding: 0 8px;
    font-size: 0.78rem;
    outline: none;
}

.product-detail-controls select:focus {
    border-color: rgba(0, 240, 255, 0.45);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.08);
}

.product-detail-chart {
    width: 100%;
    height: 240px;
    margin: 0 0 12px;
}

.product-detail-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.78rem;
}

.product-detail-table th,
.product-detail-table td {
    padding: 7px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.product-detail-table th {
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
}

.product-detail-table th:first-child,
.product-detail-table td:first-child {
    width: 38%;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-detail-table td {
    color: var(--text-secondary);
    text-align: right;
}

.product-detail-table td:nth-child(2) {
    color: var(--neon-cyan);
}

.product-detail-table td:nth-child(3),
.product-detail-table td:nth-child(4) {
    color: #48bb78;
}

.product-detail-table .low-sale-row td {
    background: rgba(237, 137, 54, 0.06);
}

.product-detail-table tbody tr:hover td {
    background: rgba(0, 240, 255, 0.06);
    color: #fff;
}

.product-detail-empty {
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 1280px) {
    .product-category-detail {
        grid-template-columns: 1fr;
    }
}

.rfm-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.rfm-user-list-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rfm-user-list-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rfm-user-list-header h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.rfm-user-count {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.rfm-user-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    max-height: 380px;
}

.rfm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: var(--text-muted);
    text-align: center;
}

.rfm-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.rfm-empty-state p {
    font-size: 0.85rem;
    line-height: 1.6;
}

.rfm-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rfm-user-item:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.2);
}

.rfm-user-item-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.rfm-user-item-info {
    flex: 1;
    min-width: 0;
}

.rfm-user-item-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rfm-user-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.rfm-user-item-value {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--neon-cyan);
    white-space: nowrap;
}

/* User Detail Modal - Enhanced Layout */
.user-detail-modal-content {
    max-width: 900px;
}

.user-detail-top-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.user-detail-info-section {
    flex: 1;
}

.user-detail-stats-section {
    flex: 1;
}

.user-detail-stats-section .user-detail-stats {
    grid-template-columns: repeat(2, 1fr);
}

.user-detail-charts-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.user-detail-chart-section {
    flex: 1;
}

.user-detail-chart {
    height: 180px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.recharge-access-gate {
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.recharge-access-gate.hidden,
.recharge-protected-content.hidden {
    display: none;
}

.recharge-access-card {
    width: min(560px, 100%);
    padding: 44px;
    border-radius: 8px;
    background: rgba(18, 18, 26, 0.96);
    border: 1px solid rgba(0, 240, 255, 0.22);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.recharge-access-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.16), rgba(237, 100, 166, 0.14));
}

.recharge-access-card h3 {
    margin: 0;
    color: #fff;
    font-size: 1.7rem;
}

.recharge-access-card p {
    margin: 12px 0 0;
    color: #a0aec0;
}

.recharge-access-form {
    margin-top: 28px;
}

.recharge-access-input {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    font-size: 1rem;
    padding: 0 18px;
    outline: none;
}

.recharge-access-input:focus {
    border-color: rgba(0, 240, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.08);
}

.recharge-access-btn {
    width: 100%;
    height: 60px;
    margin-top: 16px;
    border: 0;
    border-radius: 8px;
    color: #070712;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
}

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

.recharge-access-error {
    display: none;
    color: #ff4d6d !important;
    font-weight: 700;
}

.recharge-access-error.show {
    display: block;
}

.recharge-revenue-panel {
    background: rgba(18, 18, 26, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    min-width: 0;
    overflow: hidden;
}

.recharge-revenue-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.recharge-revenue-header h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.35rem;
}

.recharge-revenue-header p {
    margin: 0;
    color: #a0aec0;
    font-size: 0.92rem;
}

.recharge-source-tag {
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(72, 187, 120, 0.14);
    color: #68d391;
    font-weight: 700;
    padding: 8px 14px;
}

.recharge-revenue-body {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 20px;
    align-items: stretch;
    min-width: 0;
}

.recharge-pie-wrap,
.recharge-revenue-summary {
    background: rgba(10, 10, 16, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    min-width: 0;
    overflow: hidden;
}

.recharge-pie-wrap {
    min-height: 420px;
    padding: 8px 8px 12px;
}

.recharge-pie-chart {
    width: 100%;
    max-width: 100%;
    height: 400px;
    overflow: hidden;
}

.recharge-pie-chart > div,
.recharge-pie-chart canvas {
    max-width: 100% !important;
}

.recharge-revenue-summary {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recharge-total-box {
    padding: 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.16), rgba(237, 100, 166, 0.13));
    border: 1px solid rgba(0, 212, 255, 0.18);
}

.recharge-total-box span,
.recharge-income-row span,
.recharge-split-item span {
    display: block;
    color: #a0aec0;
    font-weight: 700;
}

.recharge-total-box strong {
    display: block;
    color: #fff;
    font-size: 2.25rem;
    margin-top: 8px;
}

.recharge-income-row,
.recharge-split-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.recharge-income-row > div,
.recharge-split-item {
    min-width: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 14px;
}

.recharge-income-row strong,
.recharge-split-item strong {
    display: block;
    color: #fff;
    font-size: 1.35rem;
    margin-top: 8px;
    word-break: break-word;
}

.recharge-income-row small {
    display: block;
    color: #718096;
    margin-top: 6px;
    line-height: 1.45;
}

.recharge-split-item {
    border-left: 4px solid transparent;
}

.recharge-split-item.webfee { border-left-color: #00d4ff; }
.recharge-split-item.product { border-left-color: #f6ad55; }
.recharge-split-item.meituan { border-left-color: #48bb78; }
.recharge-split-item.douyin { border-left-color: #ed64a6; }

.recharge-pie-row {
    align-items: stretch;
}

.recharge-pie-card .chart {
    height: 340px;
}

.recharge-flow-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.recharge-flow-item {
    min-width: 0;
    padding: 10px 0 0 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    border-left: 4px solid transparent;
}

.recharge-flow-item.consume { border-left-color: #667eea; }
.recharge-flow-item.recharge { border-left-color: #48bb78; }
.recharge-flow-item.gift { border-left-color: #f6ad55; }
.recharge-flow-item.reward { border-left-color: #ed8936; }

.recharge-flow-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.recharge-flow-head span {
    color: #d7dee9;
    font-size: 0.95rem;
    font-weight: 700;
}

.recharge-flow-head strong {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
}

.recharge-flow-detail {
    color: #a0aec0;
    font-size: 0.78rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.recharge-area-breakdown-table {
    margin-top: 18px;
    overflow-x: auto;
}

.recharge-area-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0;
    color: #d7dee9;
    font-size: 0.86rem;
}

.recharge-area-table th,
.recharge-area-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    vertical-align: top;
}

.recharge-area-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(23, 32, 47, 0.98);
    color: #fff;
    text-align: left;
    font-weight: 800;
}

.recharge-area-table th:first-child,
.recharge-area-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: rgba(18, 18, 26, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 800;
    color: #fff;
}

.recharge-area-table th:first-child {
    z-index: 3;
    background: rgba(23, 32, 47, 0.98);
}

.recharge-area-cell-main {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    color: #fff;
    font-weight: 800;
}

.recharge-area-cell-main strong {
    font-size: 1rem;
}

.recharge-area-cell-main span {
    color: #a0aec0;
    font-size: 0.78rem;
    white-space: nowrap;
}

.recharge-area-cell-parts {
    display: grid;
    gap: 3px;
    margin-top: 8px;
    color: #718096;
    font-size: 0.76rem;
    line-height: 1.35;
}

.recharge-area-cell-empty {
    color: #4a5568;
}

.recharge-area-row-total {
    color: #48bb78;
    font-weight: 900;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .rfm-row {
        flex-direction: column;
    }

    .rfm-chart-container {
        flex: none;
        max-width: 100%;
    }

    .rfm-user-list {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .user-detail-grid {
        grid-template-columns: 1fr;
    }

    .user-detail-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .user-detail-top-row {
        flex-direction: column;
    }

    .user-detail-charts-row {
        flex-direction: column;
    }

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

    .recharge-pie-row {
        flex-direction: column;
    }

    .recharge-income-row,
    .recharge-split-list {
        grid-template-columns: 1fr;
    }

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