@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root { 
    --bg-main: linear-gradient(180deg, #ffffff 0%, #fee2e2 100%);
    --card-bg: #ffffff; 
    --text-main: #0f172a; 
    --text-muted: #475569; 
    --border-color: #e2e8f0; 
    --dash-bg: #f8fafc;
    --stat-card-bg: #f1f5f9;
}
.dark-mode { 
    --bg-main: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: #1e293b; 
    --text-main: #f8fafc; 
    --text-muted: #cbd5e1; 
    --border-color: #334155; 
    --dash-bg: #1e293b;
    --stat-card-bg: #334155;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--bg-main); background-attachment: fixed; color: var(--text-main); min-height: 100vh; transition: 0.3s; overflow-x: hidden; width: 100%; }

.navbar { position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-color); box-shadow: 0 4px 20px rgba(0,0,0,0.03); transition: 0.3s; }
.dark-mode .navbar { background: rgba(15, 23, 42, 0.85); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.logo-area { display: flex; align-items: center; gap: 8px; }
.logo-icon { width: 35px; height: 35px; background: #fff; border: 1px solid #e2e8f0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: #dc2626; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
@media (min-width: 768px){ .logo-icon { width: 38px; height: 38px; font-size: 18px; } }
.brand-name { font-weight: 800; font-size: 16px; color: var(--text-main); letter-spacing: -0.5px; }
.text-red { color: #dc2626; }

.nav-actions { display: flex; gap: 10px; align-items: center; }
.action-btn { background: #b91c1c; color: white; border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; font-weight: 700; font-size: 12px; }
@media (min-width: 768px){ .action-btn { width: 42px; height: 42px; font-size: 14px; } }
.dark-mode .action-btn { background: #334155; }
#langToggle { background: #0f172a; color: #fff; }
.dark-mode #langToggle { background: #cbd5e1; color: #0f172a; }

.hero-section { text-align: center; margin-top: 50px; padding: 0 20px; }
.hero-section h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; color: #0f2137; letter-spacing: -1px; }
.dark-mode .hero-section h1 { color: #f8fafc; }
.hero-section .subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 35px; }

.search-box { display: flex; gap: 12px; justify-content: center; max-width: 650px; margin: 0 auto; flex-direction: column; }
@media (min-width: 640px) { .search-box { flex-direction: row; align-items: stretch; } }
.input-wrapper { flex: 1; position: relative; }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #94a3b8; width: 20px; }
input { width: 100%; height: 52px; padding: 0 20px 0 50px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-main); font-size: 15px; outline: none; transition: 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
input:focus { border-color: #0f2137; box-shadow: 0 0 0 3px rgba(15,33,55,0.1); }
#searchBtn { height: 52px; padding: 0 35px; border-radius: 12px; border: none; background: #0f2137; color: white; font-weight: 600; font-size: 15px; cursor: pointer; transition: 0.3s; white-space: nowrap; box-shadow: 0 4px 6px rgba(15,33,55,0.2); }
#searchBtn:hover { background: #1e293b; transform: translateY(-2px); }

.main-container { max-width: 1150px; margin: 40px auto; padding: 0 15px; }
.hidden { display: none !important; }

.action-bar.bottom-action { display: flex; justify-content: center; margin-top: 25px; margin-bottom: 50px; }
.download-btn { display: flex; align-items: center; gap: 8px; background: #0f2137; color: white; border: none; padding: 14px 30px; border-radius: 12px; font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: 0 4px 10px rgba(15, 33, 55, 0.2); }
.download-btn:hover { background: #1e293b; transform: translateY(-3px); }
.dark-mode .download-btn { background: #3b82f6; }

.overview-container { background: var(--dash-bg); border-radius: 16px; padding: 25px 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid var(--border-color); animation: fade 0.4s; }
@media (min-width: 768px){ .overview-container { padding: 40px; } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* EXPORT MODE */
.export-watermark { display: none; }
.export-mode { background-color: #ffffff !important; border: none !important; box-shadow: none !important; border-radius: 0 !important; padding: 50px !important; }
.dark-mode .export-mode { background-color: #0f172a !important; }

.export-mode .export-watermark { display: flex !important; align-items: center; justify-content: space-between; padding-bottom: 25px; border-bottom: 2px solid #e2e8f0; margin-bottom: 30px; }
.dark-mode .export-mode .export-watermark { border-bottom-color: #334155 !important; }
.export-mode .export-watermark .logo-icon { width: 45px; height: 45px; font-size: 22px; }
.export-mode .export-watermark .brand-name { font-size: 22px; color: #0f172a !important; }
.dark-mode .export-mode .export-watermark .brand-name { color: #f8fafc !important; }
.export-mode .export-watermark .badge { display: flex; align-items: center; gap: 8px; background: #eff6ff !important; color: #3b82f6 !important; padding: 8px 18px; border-radius: 30px; font-size: 14px; font-weight: 800; text-transform: uppercase; }

.export-mode * { opacity: 1 !important; }
.export-mode .stat-card { background: #f8fafc !important; border: 1px solid #cbd5e1 !important; box-shadow: none !important; }
.dark-mode .export-mode .stat-card { background: #1e293b !important; border: 1px solid #334155 !important; }
.export-mode .stat-card h2 { color: #0f172a !important; }
.dark-mode .export-mode .stat-card h2 { color: #f8fafc !important; }
.export-mode .stat-card span { color: #475569 !important; }
.dark-mode .export-mode .stat-card span { color: #94a3b8 !important; }
.export-mode .ai-summary-box { background: #f1f5f9 !important; border: 1px solid #cbd5e1 !important; border-left: 5px solid #3b82f6 !important; }
.dark-mode .export-mode .ai-summary-box { background: #0f172a !important; border: 1px solid #334155 !important; border-left: 5px solid #3b82f6 !important; }
.export-mode .ai-header, .export-mode .ai-summary-box p { color: #0f172a !important; }
.dark-mode .export-mode .ai-header, .dark-mode .export-mode .ai-summary-box p { color: #f8fafc !important; }
.export-mode .header-title { color: #0f172a !important; }
.dark-mode .export-mode .header-title { color: #f8fafc !important; }

/* TIME SELECTOR */
.time-selector { text-align: center; margin-bottom: 25px; width: 100%; overflow: hidden; }
.time-selector p { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; margin-bottom: 15px; }
.filter-wrapper { display: inline-flex; background: #e2e8f0; padding: 6px; border-radius: 40px; gap: 6px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-wrapper::-webkit-scrollbar { display: none; }
.dark-mode .filter-wrapper { background: #0f172a; border: 1px solid #334155; }
.preset-btn { background: transparent; border: none; color: #475569; padding: 10px 18px; font-size: 13px; cursor: pointer; border-radius: 30px; font-weight: 600; flex-shrink: 0; white-space: nowrap; transition: 0.3s; }
@media (min-width: 768px){ .preset-btn { padding: 12px 26px; font-size: 14px; } }
.dark-mode .preset-btn { color: #94a3b8; }
.preset-btn.active { background: #ffffff; color: #0f172a; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.dark-mode .preset-btn.active { background: #1e293b; color: #f8fafc; }

.header-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 20px; font-weight: 800; margin-bottom: 25px; color: var(--text-main); }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card { background: var(--stat-card-bg); padding: 16px 8px; border-radius: 12px; text-align: center; border: 1px solid transparent; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.stat-card span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11px; color: var(--text-muted); font-weight: 800; margin-bottom: 8px; text-align: center; text-transform: uppercase; }
.stat-card span i { width: 15px; height: 15px; stroke-width: 2.5px; }
.stat-card h2 { margin: 0; font-size: 15px; color: var(--text-main); font-weight: 800; overflow-wrap: break-word; word-wrap: break-word; hyphens: auto; }
.small-txt { font-size: 13px !important; word-break: break-all; }

.status-active { color: #10b981 !important; font-size: 14px !important; text-transform: uppercase; }
.status-inactive { color: #ef4444 !important; font-size: 14px !important; text-transform: uppercase; }

@media (min-width: 640px) { 
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } 
}
@media (min-width: 1024px) { 
    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } 
    .stat-card { padding: 22px 16px; border-radius: 16px; }
    .stat-card span { flex-direction: row; font-size: 13px; margin-bottom: 12px; }
    .stat-card h2 { font-size: 22px; }
    .small-txt { font-size: 16px !important; }
    .status-active, .status-inactive { font-size: 18px !important; }
}

.tint-blue { background: #eff6ff; border-color: #dbeafe; }
.tint-orange { background: #fffbeb; border-color: #fef3c7; }
.tint-green { background: #f0fdf4; border-color: #dcfce7; }
.dark-mode .tint-blue { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); }
.dark-mode .tint-orange { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); }
.dark-mode .tint-green { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }

/* AI REVIEW BOX */
.ai-summary-box { margin-top: 30px; padding: 25px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; border-left: 5px solid #3b82f6; text-align: left; }
.dark-mode .ai-summary-box { background: #0f172a; border: 1px solid #334155; border-left: 5px solid #3b82f6; }
.ai-header { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--text-main); margin-bottom: 12px; }
.ai-header i { width: 22px; height: 22px; color: #3b82f6; fill: #eff6ff; }
.ai-summary-box p { font-size: 15px; color: var(--text-muted); line-height: 1.8; margin: 0; font-weight: 500; }

/* =======================================================
   SERVICES SECTION - MOBILE 2 COLUMNS & FIXED SIZING
======================================================== */
.services { margin-top: 60px; text-align: center; }
.section-title h2 { font-size: 24px; font-weight: 800; color: var(--text-main); }
.section-title p { color: var(--text-muted); font-size: 14px; margin-top: 8px; margin-bottom: 35px; }

@media (min-width: 768px){ 
    .section-title h2 { font-size: 30px; } 
    .section-title p { font-size: 16px; margin-bottom: 45px; }
}

/* STRICTLY 2 Columns on Mobile */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* Well-proportioned card paddings */
.service-card { background: var(--card-bg); padding: 22px 12px; border-radius: 14px; border: 1px solid var(--border-color); text-align: center; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.02); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.06); border-color: #cbd5e1; }

.icon-box { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; }
.icon-box i { width: 20px; height: 20px; }

.bg-blue { background: #eff6ff; color: #3b82f6; }
.bg-red { background: #fef2f2; color: #ef4444; }
.dark-mode .bg-blue { background: #1e3a8a; color: #93c5fd; }
.dark-mode .bg-red { background: #7f1d1d; color: #fca5a5; }

/* Font size balanced for 2-column mobile layout */
.service-card h3 { font-size: 13px; font-weight: 800; margin-bottom: 8px; color: var(--text-main); line-height: 1.4; }
.service-card p { font-size: 11px; color: var(--text-muted); line-height: 1.5; margin: 0; }

@media (min-width: 768px){
    .service-card { padding: 35px 20px; border-radius: 16px; }
    .icon-box { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 20px; }
    .icon-box i { width: 26px; height: 26px; }
    .service-card h3 { font-size: 17px; margin-bottom: 12px; }
    .service-card p { font-size: 14px; line-height: 1.6; }
}

/* =======================================================
   FOOTER SECTION
======================================================== */
.footer { text-align: center; margin-top: 70px; padding-bottom: 40px; }
.footer p { color: var(--text-muted); font-size: 14px; margin-bottom: 15px; font-weight: 500; }

.btn-link { display: inline-flex; align-items: center; gap: 8px; background: #0f2137; color: white; padding: 14px 28px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 600; box-shadow: 0 4px 10px rgba(15, 33, 55, 0.2); transition: 0.3s; }
.btn-link:hover { background: #1e293b; transform: translateY(-3px); }

.copyright { margin-top: 40px; font-size: 12px; color: var(--text-muted); font-weight: 500;}
.footer-id { text-align: center; margin-top: 30px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border-color); padding-top: 15px; }

.custom-toast { position: fixed; bottom: 30px; right: 30px; left: auto; transform: translateX(150%); background: #1e293b; color: #ffffff; padding: 14px 24px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); max-width: 350px;}
.custom-toast.show { transform: translateX(0); opacity: 1; visibility: visible; }
@media (max-width: 640px) { .custom-toast { right: 5%; left: 5%; width: 90%; max-width: none; bottom: 20px; transform: translateY(100px); border-radius: 30px; } .custom-toast.show { transform: translateY(0); } }
.toast-content { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.toast-error { background: #ef4444; }
.toast-success { background: #10b981; }