/* ASKReports Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* ── Full-screen processing overlay ─────────────────────────────────────── */
#reportOverlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 9999;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	gap: 1.25rem;
}
#reportOverlay.active {
	display: flex;
}
.overlay-spinner {
	width: 56px;
	height: 56px;
	border: 6px solid rgba(255,255,255,0.25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.overlay-message {
	color: #fff;
	font-size: 1.1rem;
	font-weight: 500;
	text-align: center;
	max-width: 340px;
	line-height: 1.5;
}
.overlay-sub {
	color: rgba(255,255,255,0.72);
	font-size: 0.85rem;
	text-align: center;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	line-height: 1.6;
	color: #333;
	background-color: #f5f5f5;
}

.navbar {
    background-color: #4CAF50;
	padding: 1rem 0;
	box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.nav-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.nav-brand {
	font-size: 1.5rem;
	font-weight: bold;
	color: white;
	text-decoration: none;
}

.nav-menu {
	list-style: none;
	display: flex;
	gap: 2rem;
}

.nav-link {
	color: white;
	text-decoration: none;
	transition: opacity 0.3s;
}

.nav-link:hover {
	opacity: 0.8;
}

.container {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 0 2rem;
	min-height: calc(100vh - 200px);
}

.dashboard h1, .reports-page h1, .charts-page h1 {
	margin-bottom: 2rem;
	color: #333;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.stat-card {
	background: white;
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-card h3 {
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 0.5rem;
}

.stat-value {
	font-size: 2rem;
	font-weight: bold;
    color: #4CAF50;
	background: white;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-container h2 {
	margin-bottom: 1.5rem;
	color: #333;
}

#revenueChart {
	width: 100%;
	height: 400px;
}

.reports-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.report-card {
	background: white;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.import-card {
	margin-bottom: 2rem;
}

.import-form {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	margin-bottom: 1rem;
}

.import-form input[type="file"] {
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
}

.import-message {
	margin-top: 0.5rem;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	font-size: 0.95rem;
}

.import-message.success {
	background: #e8f5e9;
	color: #1b5e20;
	border: 1px solid #c8e6c9;
}

.import-message.error {
	background: #ffebee;
	color: #b71c1c;
	border: 1px solid #ffcdd2;
}

.import-table {
	margin-top: 1rem;
	overflow: auto;
	max-height: 600px;
	border: 1px solid #eee;
	border-radius: 6px;
}

.import-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.import-table th,
.import-table td {
	border: 1px solid #eee;
	padding: 0.5rem 0.75rem;
	text-align: left;
	white-space: nowrap;
}

.import-table thead th {
	position: sticky;
	top: 0;
	background: #f7f7f7;
	z-index: 1;
}

.report-card h3 {
	margin-bottom: 1rem;
	color: #333;
}

.report-card p {
	color: #666;
	margin-bottom: 1.5rem;
}

.btn {
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1rem;
	transition: background-color 0.3s;
	text-decoration: none;
	display: inline-block;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #43a047;
}

/* ── Index hero: compact on mobile ──────────────────────────────────────── */
@media (max-width: 768px) {
    .site-header { padding-top: 0.75rem !important; padding-bottom: 0.5rem !important; }
    main.container { margin-top: 0 !important; }
}

/* ── Card base ────────────────────────────────────────────────────────────── */
.card {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* ── Contact form ─────────────────────────────────────────────────────────── */
.contact-form label {
    display: block;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    color: #444;
}

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.contact-form button {
    margin-top: 1.25rem;
}

.contact-hint {
    margin-top: 0.75rem;
    font-size: 0.86rem;
    color: #777;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Navbar brand */
    .navbar-brand-main  { font-size: 1.5rem !important; }
    .navbar-brand-ask   { font-size: 1.8rem !important; }
    .navbar-brand-sub   { font-size: 0.82rem !important; }

    /* Cards */
    .card {
        padding: 1rem !important;
    }

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Diagrams on index */
    .diagram-pair {
        flex-direction: column !important;
    }
    .diagram-pair a {
        flex: 1 1 100% !important;
    }

    /* Report demo: hide step-flow & before/after arrows */
    div[style*="font-size:1.8rem;padding:0 0.5rem;color:#4CAF50"],
    div[style*="align-self:center;font-size:2rem;color:#4CAF50"] {
        display: none !important;
    }

    /* Tables: smaller font on narrow screens */
    .import-table table,
    .demo-table {
        font-size: 0.78rem;
    }

    /* Site header */
    .site-header h1 {
        font-size: 1.5rem;
    }

    .stats-grid, .reports-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar-brand-ask  { font-size: 1.5rem !important; }
    .navbar-brand-main { font-size: 1.3rem !important; }
    .navbar-brand-sub  { display: none !important; }

    .site-header { padding: 1.5rem 0 !important; }
    .site-header h1 { font-size: 1.25rem; }
    .site-header .lead { font-size: 0.95rem; }
}

.chart-section {
	background: white;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-placeholder {
	margin-top: 2rem;
}

#analyticsChart {
	max-width: 100%;
	height: auto;
}

.error-page {
	text-align: center;
	padding: 4rem 0;
}

.error-page h1 {
	font-size: 3rem;
	margin-bottom: 1rem;
	color: #dc3545;
}

.footer {
	background-color: #333;
	color: white;
	text-align: center;
	padding: 2rem 0;
	margin-top: 4rem;
}

.footer p {
	margin: 0;
}
