/* TRACKINGGURU SAAS ENTERPRISE SYSTEM STYLESHEET */

:root {
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --bg-soft: #f1f5f9;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    
    --primary-blue: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-emerald: #059669;
    --accent-purple: #7c3aed;
    --danger-red: #dc2626;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px -15px rgba(37, 99, 235, 0.12);
    
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-main); color: var(--text-dark); font-family: var(--font-body); font-size: 15px; line-height: 1.6; overflow-x: hidden; }

.mesh-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.04) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.04) 0%, transparent 40%);
    z-index: -1; pointer-events: none;
}

.accent { color: var(--primary-blue); }
.accent-text { color: var(--primary-blue); }
.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.text-blue { color: var(--primary-blue); }
.text-emerald { color: var(--accent-emerald); }
.text-purple { color: var(--accent-purple); }
.text-danger { color: var(--danger-red); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }

.modern-nav, .dash-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-light);
    position: sticky; top: 0; z-index: 1000; padding: 16px 0;
}
.nav-container { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; }
.brand-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-heading); font-size: 22px; font-weight: 800; color: var(--text-dark); }
.logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple)); color: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.admin-icon { background: linear-gradient(135deg, var(--danger-red), #991b1b); }

.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 15px; margin: 0 16px; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary-blue); }

.role-badge { font-size: 10px; background: #eff6ff; color: var(--primary-blue); padding: 2px 8px; border-radius: 12px; margin-left: 6px; font-weight: 700; }
.admin-badge { background: #fef2f2; color: var(--danger-red); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 10px; font-family: var(--font-heading); font-weight: 600; font-size: 14px; text-decoration: none; transition: all 0.2s ease; cursor: pointer; border: none; }
.btn-primary-glow { background: var(--primary-blue); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35); }
.btn-primary-glow:hover { background: var(--primary-hover); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-white); color: var(--text-dark); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg-soft); }
.btn-danger { background: #fee2e2; color: var(--danger-red); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fca5a5; }
.btn-success { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.btn-success:hover { background: #6ee7b7; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

.hero-section { padding: 120px 24px 70px; text-align: center; }
.hero-container { max-width: 860px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: #eff6ff; border: 1px solid #bfdbfe; color: var(--primary-blue); border-radius: 30px; font-size: 14px; font-weight: 600; margin-bottom: 24px; }
.badge-dot { width: 8px; height: 8px; background: var(--primary-blue); border-radius: 50%; }
.hero-title { font-family: var(--font-heading); font-size: 48px; font-weight: 800; line-height: 1.18; color: var(--text-dark); margin-bottom: 20px; }
.hero-subtitle { font-size: 18px; color: var(--text-muted); max-width: 680px; margin: 0 auto 36px; }
.hero-cta-group { display: flex; justify-content: center; gap: 16px; margin-bottom: 60px; }

.glass-hero-preview { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(20px); border: 1px solid rgba(226, 232, 240, 0.8); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; text-align: left; }
.preview-header { background: #f8fafc; padding: 12px 20px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: 15px; }
.preview-dots span { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.preview-dots span:nth-child(1) { background: #ff5f56; }
.preview-dots span:nth-child(2) { background: #ffbd2e; }
.preview-dots span:nth-child(3) { background: #27c93f; }
.preview-title { font-family: monospace; font-size: 13px; color: var(--text-muted); }
.preview-body { padding: 24px; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.p-stat-card { background: var(--bg-white); border: 1px solid var(--border-light); padding: 16px; border-radius: 12px; display: flex; align-items: center; gap: 15px; }
.p-stat-card i { font-size: 24px; }
.p-stat-card small { color: var(--text-muted); font-size: 12px; display: block; }
.p-stat-card h4 { font-family: var(--font-heading); font-size: 16px; }

.section-wrapper { max-width: 1200px; margin: 0 auto; padding: 80px 24px; }
.bg-soft { background: var(--bg-soft); }
.section-heading { text-align: center; max-width: 600px; margin: 0 auto 50px; }
.sub-heading { font-family: var(--font-heading); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--primary-blue); display: block; margin-bottom: 8px; }
.section-heading h2 { font-family: var(--font-heading); font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.section-heading p { color: var(--text-muted); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.modern-card { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 16px; padding: 36px 28px; box-shadow: var(--shadow-sm); position: relative; }
.featured-card { border-color: #bfdbfe; box-shadow: var(--shadow-md); }
.card-badge { position: absolute; top: 20px; right: 20px; background: #eff6ff; color: var(--primary-blue); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px; }
.icon-wrapper { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; margin-bottom: 24px; }
.blue-gradient { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.emerald-gradient { background: linear-gradient(135deg, #10b981, #047857); }
.purple-gradient { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.modern-card h3 { font-family: var(--font-heading); font-size: 20px; margin-bottom: 12px; }
.modern-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.clean-list { list-style: none; }
.clean-list li { font-size: 14px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.clean-list li i { color: var(--accent-emerald); }

.glass-calculator { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 20px; padding: 40px; box-shadow: var(--shadow-md); }
.calc-slider-box { margin-bottom: 30px; }
.slider-header { display: flex; justify-content: space-between; font-family: var(--font-heading); font-size: 18px; margin-bottom: 15px; }
input[type=range] { width: 100%; accent-color: var(--primary-blue); height: 8px; background: var(--bg-soft); border-radius: 4px; cursor: pointer; }
.slider-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.pricing-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.p-metric { background: var(--bg-soft); padding: 20px; border-radius: 12px; text-align: center; }
.highlight-metric { background: #eff6ff; border: 1px solid #bfdbfe; }
.m-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.m-value { font-family: var(--font-heading); font-size: 22px; font-weight: 700; }

.dashboard-bg { background: #f1f5f9; }
.dashboard-wrapper { max-width: 1240px; margin: 30px auto; padding: 0 24px; }
.balance-card-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 25px; }
.balance-card { background: linear-gradient(135deg, #1e293b, #0f172a); color: #fff; padding: 28px; border-radius: 16px; display: flex; justify-content: space-between; align-items: center; }
.b-title { font-size: 11px; letter-spacing: 1px; color: #94a3b8; font-family: var(--font-heading); }
.b-amount { font-size: 38px; font-family: var(--font-heading); margin: 4px 0; }
.b-sub { font-size: 13px; color: #cbd5e1; }
.api-key-box { background: var(--bg-white); border: 1px solid var(--border-light); padding: 24px; border-radius: 16px; }
.key-display { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.key-display code { background: var(--bg-soft); padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--primary-blue); font-weight: 600; flex: 1; overflow-x: auto; }

.dash-main-grid { display: grid; grid-template-columns: 1.8fr 1.2fr; gap: 20px; }
.dash-card { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-md); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-header h3 { font-family: var(--font-heading); font-size: 18px; display: flex; align-items: center; gap: 10px; }
.time-filter { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.chart-container { height: 280px; position: relative; display: flex; align-items: center; justify-content: center; }
.empty-chart-notice { text-align: center; }

.table-responsive { overflow-x: auto; }
.clean-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.clean-table th { background: var(--bg-soft); padding: 12px 14px; color: var(--text-muted); font-weight: 600; }
.clean-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
.badge-emerald { background: #d1fae5; color: #047857; padding: 4px 8px; border-radius: 6px; font-weight: 600; font-size: 12px; }

.auth-bg { background: linear-gradient(135deg, #eff6ff, #f3e8ff); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: var(--bg-white); width: 100%; max-width: 440px; padding: 36px; border-radius: 20px; box-shadow: var(--shadow-md); }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h2 { font-family: var(--font-heading); font-size: 24px; margin-top: 15px; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger-red); }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: var(--accent-emerald); }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon i { position: absolute; left: 14px; color: var(--text-muted); font-size: 14px; }
.input-with-icon input { width: 100%; padding: 12px 14px 12px 40px; border: 1px solid var(--border-light); border-radius: 10px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.input-with-icon input:focus { border-color: var(--primary-blue); }

.auth-demo-notice { background: var(--bg-soft); padding: 12px 16px; border-radius: 10px; margin-top: 20px; font-size: 12px; color: var(--text-muted); }
.auth-footer-links { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-footer-links a { color: var(--primary-blue); text-decoration: none; font-weight: 600; }

.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.stat-box { background: var(--bg-white); padding: 20px; border-radius: 14px; border: 1px solid var(--border-light); }
.stat-box small { color: var(--text-muted); font-size: 13px; }
.stat-box h3 { font-family: var(--font-heading); font-size: 24px; margin-top: 4px; }

.status-pill { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.status-active { background: #d1fae5; color: #047857; }
.status-suspended { background: #fee2e2; color: var(--danger-red); }
.margin-top-20 { margin-top: 20px; }

.admin-form-grid { display: grid; grid-template-columns: 1.5fr 1.5fr 1fr 1fr auto; gap: 12px; align-items: center; }
.admin-form-grid input { padding: 10px 14px; border: 1px solid var(--border-light); border-radius: 8px; font-size: 14px; outline: none; }
.inline-token-form { display: flex; gap: 6px; align-items: center; }
.admin-input-sm { padding: 6px 8px; border: 1px solid var(--border-light); border-radius: 6px; font-size: 13px; outline: none; }

/* Modal Styling */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 2000;
}
.modal-content {
    background: var(--bg-white); border-radius: 18px; width: 100%; max-width: 480px;
    padding: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-family: var(--font-heading); font-size: 20px; }
.close-btn { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--text-muted); }
.modal-body .form-group input {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border-light); border-radius: 8px; font-size: 14px; outline: none;
}
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.modern-footer { background: var(--bg-white); border-top: 1px solid var(--border-light); padding: 30px 24px; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; font-size: 14px; color: var(--text-muted); }

@media (max-width: 992px) {
    .admin-form-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 34px; }
    .dash-main-grid, .balance-card-grid { grid-template-columns: 1fr; }
}
