:root {
    --bg-dark: #080b14;
    --bg-card: #0e1424;
    --bg-card-hover: #151d33;
    --border-color: #1a233d;
    --primary-purple: #8b5cf6;
    --primary-cyan: #06b6d4;
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-pink: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius: 12px;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 14.5px;
    line-height: 1.5;
    min-height: 100vh;
}

.app-header {
    background: rgba(14, 20, 36, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-area { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-logo {
    width: 38px; height: 38px; background: var(--primary-gradient);
    border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.brand-title { font-size: 19px; font-weight: 900; letter-spacing: -0.5px; display: block; }
.text-purple { color: var(--primary-purple); }
.text-cyan { color: var(--primary-cyan); }
.text-green { color: var(--accent-green); }
.text-yellow { color: var(--accent-yellow); }
.brand-tag { font-size: 11px; color: var(--text-muted); font-weight: 600; }

.main-nav { display: flex; gap: 6px; }
.nav-link {
    background: transparent; border: none; color: var(--text-muted);
    padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.nav-link:hover { color: var(--text-main); background: #151d33; }
.nav-link.active { color: #fff; background: #1e294b; }
.admin-nav-btn { border: 1px solid rgba(139, 92, 246, 0.4); color: #c4b5fd; }
.admin-nav-btn.active { background: rgba(139, 92, 246, 0.2); border-color: var(--primary-purple); }

.btn-primary {
    background: var(--primary-gradient); color: white; border: none;
    padding: 9px 18px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.btn-primary.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-primary.btn-block { width: 100%; padding: 12px; }

.main-container { max-width: 1320px; margin: 24px auto 60px auto; padding: 0 24px; }
.view-pane { display: none; }
.view-pane.active { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.hero-section { text-align: center; max-width: 820px; margin: 20px auto 36px auto; }
.hero-badge {
    font-family: var(--font-mono); font-size: 11px; font-weight: 700;
    background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 4px 12px; border-radius: 20px; display: inline-block; margin-bottom: 14px;
}
.hero-title { font-size: 32px; font-weight: 900; letter-spacing: -0.8px; line-height: 1.25; margin-bottom: 12px; }
.hero-sub { font-size: 15px; color: var(--text-muted); }

.card-box {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 22px 26px; margin-bottom: 24px;
}
.step-badge-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-num {
    width: 28px; height: 28px; background: var(--primary-purple); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}

.platforms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.platform-card {
    background: #121a30; border: 1.5px solid var(--border-color); border-radius: 10px;
    padding: 16px; text-align: center; cursor: pointer; transition: all 0.15s; user-select: none;
}
.platform-card:hover { border-color: var(--primary-cyan); transform: translateY(-2px); }
.platform-card.active {
    border-color: var(--primary-purple); background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}
.p-icon { font-size: 26px; display: block; margin-bottom: 6px; }
.p-name { font-size: 13.5px; font-weight: 700; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.service-card {
    background: #121a30; border: 1.5px solid var(--border-color); border-radius: 10px;
    padding: 18px; cursor: pointer; transition: all 0.15s; display: flex; flex-direction: column; justify-content: space-between;
}
.service-card:hover { border-color: var(--primary-cyan); }
.service-card.active {
    border-color: var(--primary-purple); background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}
.s-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.s-icon { font-size: 24px; }
.s-title { font-size: 14px; font-weight: 700; }
.s-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #1a233d; padding-top: 10px; }
.s-price { font-family: var(--font-mono); font-weight: 800; color: var(--primary-cyan); }
.s-unit { font-size: 11.5px; color: var(--text-muted); }

.checkout-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 700; }
.form-group input, .form-group select {
    background: #090d16; border: 1px solid #2d3748; color: white;
    padding: 12px 14px; border-radius: 8px; font-size: 14px; outline: none; font-family: var(--font-main);
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary-purple); }

.qty-row { display: flex; flex-direction: column; gap: 8px; }
.quick-qty { display: flex; gap: 8px; }
.quick-qty button {
    background: #1a233d; border: 1px solid #2d3748; color: var(--text-main);
    padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.quick-qty button:hover { background: #2d3748; }

.dripfeed-box {
    background: #121a30; border: 1px solid #1a233d; border-radius: 10px;
    padding: 16px; display: flex; justify-content: space-between; align-items: center; margin-top: 10px;
}
.dripfeed-info strong { font-size: 13.5px; color: var(--primary-cyan); }
.dripfeed-info p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #2d3748; transition: .3s; border-radius: 24px;
}
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; transition: .3s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-purple); }
input:checked + .slider:before { transform: translateX(20px); }

.summary-card {
    background: #121a30; border: 1px solid #2d3748; border-radius: var(--radius);
    padding: 20px; display: flex; flex-direction: column; justify-content: space-between;
}
.summary-header { font-size: 11px; font-weight: 800; color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 8px; color: var(--text-muted); }
.summary-row strong { color: var(--text-main); }
.summary-divider { height: 1px; background: #2d3748; margin: 12px 0; }
.summary-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.summary-total { font-size: 24px; font-weight: 900; color: var(--primary-cyan); font-family: var(--font-mono); }

.payment-methods-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.pay-option {
    background: #090d16; border: 1px solid #2d3748; border-radius: 6px;
    padding: 8px; font-size: 12px; font-weight: 700; text-align: center; cursor: pointer;
}
.pay-option.active { border-color: var(--primary-purple); background: rgba(139, 92, 246, 0.15); }
.pay-option input { display: none; }

.btn-checkout-submit {
    background: var(--primary-gradient); color: white; border: none; padding: 14px;
    border-radius: 8px; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.track-header { text-align: center; margin: 20px 0 28px 0; }
.track-search-box { max-width: 650px; margin: 0 auto 30px auto; display: flex; gap: 10px; }
.track-search-box input {
    flex: 1; background: #0e1424; border: 1px solid #2d3748; color: white;
    padding: 12px 16px; border-radius: 8px; font-size: 14px; font-family: var(--font-mono);
}
.track-result-card {
    max-width: 750px; margin: 0 auto; background: #0e1424; border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 24px;
}
.track-result-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.track-order-num { font-family: var(--font-mono); color: var(--primary-cyan); font-weight: 800; font-size: 13px; }
.track-meta-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: #121a30;
    padding: 16px; border-radius: 8px; margin-bottom: 20px;
}
.meta-label { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 2px; }

.progress-track-lg { width: 100%; height: 10px; background: #1a233d; border-radius: 5px; overflow: hidden; }
.progress-fill-lg { height: 100%; background: var(--primary-gradient); transition: width 0.4s ease; }
.prog-percent-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: block; text-align: right; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius);
    padding: 28px 24px; display: flex; flex-direction: column; justify-content: space-between; position: relative;
}
.pricing-card.featured { border-color: var(--primary-purple); background: #12182e; box-shadow: 0 0 30px rgba(139, 92, 246, 0.2); }
.popular-tag {
    position: absolute; top: -12px; right: 20px; background: var(--primary-purple);
    color: white; font-size: 10.5px; font-weight: 800; padding: 3px 10px; border-radius: 12px;
}
.plan-price { font-size: 34px; font-weight: 900; margin: 16px 0; font-family: var(--font-mono); }
.plan-price span { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.plan-features { list-style: none; margin-bottom: 24px; font-size: 13.5px; display: flex; flex-direction: column; gap: 12px; }
.btn-plan {
    background: #1e294b; border: 1px solid #2d3748; color: white;
    padding: 12px; border-radius: 8px; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.btn-plan.primary { background: var(--primary-gradient); border: none; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }

.subscriber-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.sub-wallet-pill {
    background: #121a30; border: 1px solid var(--border-color); padding: 10px 18px;
    border-radius: 30px; display: flex; align-items: center; gap: 10px;
}
.sub-wallet-pill strong { font-size: 18px; font-family: var(--font-mono); color: var(--primary-cyan); }
.sub-plan-badge { font-size: 11px; background: rgba(139, 92, 246, 0.2); color: #c4b5fd; padding: 2px 8px; border-radius: 10px; font-weight: 800; }

.channels-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.channel-card {
    background: #121a30; border: 1px solid var(--border-color); border-radius: 10px;
    padding: 16px; display: flex; justify-content: space-between; align-items: center;
}

.admin-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-security-badge {
    font-family: var(--font-mono); font-size: 11px; color: #34d399;
    background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); padding: 4px 10px; border-radius: 6px;
}
.admin-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius);
    padding: 18px 20px; display: flex; flex-direction: column;
}
.m-label { font-size: 11px; font-weight: 800; color: var(--text-muted); letter-spacing: 0.5px; }
.m-val { font-size: 28px; font-weight: 900; font-family: var(--font-mono); margin: 6px 0 2px 0; }
.m-sub { font-size: 12px; color: var(--text-muted); }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.data-table th {
    background: #121a30; color: var(--text-muted); text-align: left; padding: 12px 16px;
    font-weight: 700; border-bottom: 1px solid var(--border-color);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid #1a233d; }
.status-badge { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 12px; }
.status-badge.PROCESSING { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.status-badge.COMPLETED { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center; z-index: 200;
}
.modal-backdrop.active { display: flex; }
.modal-card {
    background: #0e1424; border: 1px solid var(--primary-purple); box-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
    border-radius: var(--radius); width: 90%; max-width: 480px; padding: 24px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-close { background: transparent; border: none; font-size: 22px; color: var(--text-muted); cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-auth-box {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 20px;
}
.auth-card {
    background: #0e1424;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 36px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.auth-icon {
    font-size: 36px;
    margin-bottom: 12px;
}
.auth-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
}
.auth-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 22px;
}
.auth-card form {
    text-align: left;
}
.auth-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 14px;
    font-weight: 700;
}
