/* ============================================
   CAPTCHA Oculto - Main Styles
   Traffic sign palette: orange, yellow, white
   ============================================ */

:root {
	--orange: #F97316;
	--orange-hover: #EA580C;
	--orange-light: #FFF7ED;
	--yellow: #EAB308;
	--yellow-light: #FEF9C3;
	--amber-light: #FEF3C7;
	--white: #FFFFFF;
	--gray-50: #F9FAFB;
	--gray-100: #F3F4F6;
	--gray-200: #E5E7EB;
	--gray-300: #D1D5DB;
	--gray-400: #9CA3AF;
	--gray-500: #6B7280;
	--gray-600: #4B5563;
	--gray-700: #374151;
	--gray-800: #1F2937;
	--gray-900: #111827;
	--green: #22C55E;
	--red: #EF4444;
	--radius: 8px;
	--radius-lg: 12px;
	--shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
	--shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
	--shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

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

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: var(--gray-800);
	background: var(--white);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange-hover); }

/* ---- Navbar ---- */
.navbar {
	position: fixed; top: 0; left: 0; right: 0; z-index: 100;
	background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--gray-200);
	padding: 0 24px; height: 64px;
	display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--gray-900); }
.navbar-brand img { height: 32px; }
.navbar-links { display: flex; align-items: center; gap: 24px; }
.navbar-links a { color: var(--gray-600); font-size: 14px; font-weight: 500; }
.navbar-links a:hover { color: var(--orange); }
.navbar-cta { display: flex; align-items: center; gap: 12px; }

.lang-switch {
	background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 6px;
	padding: 4px 10px; font-size: 13px; font-weight: 600; cursor: pointer;
	color: var(--gray-600); transition: all 0.2s;
}
.lang-switch:hover { background: var(--gray-200); }

/* Mobile menu */
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu-btn svg { width: 24px; height: 24px; stroke: var(--gray-700); }
.mobile-menu { display: none; }

@media (max-width: 768px) {
	.navbar-links, .navbar-cta .btn-secondary { display: none; }
	.mobile-menu-btn { display: block; }
	.mobile-menu.active {
		display: flex; flex-direction: column; gap: 16px;
		position: absolute; top: 64px; left: 0; right: 0;
		background: var(--white); padding: 24px;
		border-bottom: 1px solid var(--gray-200);
		box-shadow: var(--shadow-md);
	}
	.mobile-menu a { font-size: 16px; color: var(--gray-700); }
}

/* ---- Buttons ---- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
	cursor: pointer; border: none; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-hover); color: white; }
.btn-secondary { background: var(--white); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); color: var(--gray-800); }
.btn-ghost { background: transparent; color: var(--orange); }
.btn-ghost:hover { background: var(--orange-light); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ---- Sections ---- */
.section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-alt { background: var(--orange-light); }
.section-title { font-size: 32px; font-weight: 800; text-align: center; margin-bottom: 16px; color: var(--gray-900); }
.section-subtitle { font-size: 18px; text-align: center; color: var(--gray-500); max-width: 640px; margin: 0 auto 48px; }

/* ---- Hero ---- */
.hero {
	padding-top: 140px; padding-bottom: 80px; text-align: center;
	background: linear-gradient(180deg, var(--orange-light) 0%, var(--white) 100%);
}
.hero-badge {
	display: inline-block; padding: 6px 16px; border-radius: 100px;
	background: var(--amber-light); color: var(--orange); font-size: 13px; font-weight: 600;
	margin-bottom: 24px; border: 1px solid #FDE68A;
}
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; color: var(--gray-900); }
.hero h1 span { color: var(--orange); }
.hero p { font-size: 20px; color: var(--gray-500); max-width: 600px; margin: 0 auto 32px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
	.hero h1 { font-size: 32px; }
	.hero p { font-size: 16px; }
}

/* ---- Traffic Sign Decoration ---- */
.traffic-sign {
	display: inline-flex; align-items: center; justify-content: center;
	width: 80px; height: 80px; background: var(--yellow);
	border: 4px solid var(--gray-900); border-radius: var(--radius);
	transform: rotate(45deg); margin-bottom: 24px;
}
.traffic-sign-inner { transform: rotate(-45deg); font-size: 28px; font-weight: 800; color: var(--gray-900); }

/* ---- Features Grid ---- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
	background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
	padding: 32px; transition: all 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--orange); }
.feature-icon {
	width: 48px; height: 48px; border-radius: var(--radius);
	background: var(--amber-light); display: flex; align-items: center; justify-content: center;
	margin-bottom: 16px; font-size: 24px;
}
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--gray-500); line-height: 1.6; }

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

/* ---- Steps / How It Works ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { text-align: center; position: relative; }
.step::before {
	counter-increment: step; content: counter(step);
	display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border-radius: 50%;
	background: var(--orange); color: white; font-weight: 800; font-size: 20px;
	margin: 0 auto 16px;
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--gray-500); }

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

/* ---- Pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pricing-card {
	background: var(--white); border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
	padding: 32px 24px; text-align: center; transition: all 0.2s; position: relative;
}
.pricing-card.featured { border-color: var(--orange); box-shadow: var(--shadow-lg); }
.pricing-badge {
	position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
	background: var(--orange); color: white; padding: 4px 16px; border-radius: 100px;
	font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.pricing-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-size: 40px; font-weight: 800; color: var(--gray-900); margin-bottom: 4px; }
.pricing-price span { font-size: 16px; font-weight: 400; color: var(--gray-400); }
.pricing-desc { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 24px; }
.pricing-features li {
	padding: 8px 0; font-size: 14px; color: var(--gray-600);
	border-bottom: 1px solid var(--gray-100);
	display: flex; align-items: center; gap: 8px;
}
.pricing-features li::before { content: '\2713'; color: var(--green); font-weight: 700; }
.pricing-features li.disabled { color: var(--gray-400); }
.pricing-features li.disabled::before { content: '\2013'; color: var(--gray-300); }

@media (max-width: 900px) {
	.pricing-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
	.pricing-grid { grid-template-columns: 1fr; }
}

/* ---- Code Snippet ---- */
.code-block {
	background: var(--gray-900); color: #E5E7EB; border-radius: var(--radius-lg);
	padding: 24px; overflow-x: auto; font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
	font-size: 13px; line-height: 1.7; position: relative;
}
.code-block .copy-btn {
	position: absolute; top: 12px; right: 12px;
	background: var(--gray-700); color: var(--gray-300); border: none;
	padding: 4px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.code-block .copy-btn:hover { background: var(--gray-600); }
.code-tabs { display: flex; gap: 0; margin-bottom: 0; }
.code-tab {
	padding: 8px 20px; font-size: 13px; font-weight: 600; cursor: pointer;
	background: var(--gray-800); color: var(--gray-400); border: none;
	border-radius: var(--radius) var(--radius) 0 0;
}
.code-tab.active { background: var(--gray-900); color: var(--white); }
.code-panel { display: none; }
.code-panel.active { display: block; }

/* ---- Trust Bar ---- */
.trust-bar {
	display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
	padding: 32px 24px;
}
.trust-item { text-align: center; }
.trust-item .trust-number { font-size: 32px; font-weight: 800; color: var(--orange); }
.trust-item .trust-label { font-size: 14px; color: var(--gray-500); }

/* ---- Footer ---- */
.footer {
	background: var(--gray-900); color: var(--gray-400); padding: 48px 24px 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-brand p { font-size: 14px; line-height: 1.6; margin-top: 12px; }
.footer h4 { color: var(--white); font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--gray-400); font-size: 14px; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
	border-top: 1px solid var(--gray-700); padding-top: 24px;
	display: flex; justify-content: space-between; align-items: center;
	font-size: 13px;
}

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

/* ---- Auth Pages ---- */
.auth-page {
	min-height: 100vh; display: flex; align-items: center; justify-content: center;
	background: var(--orange-light); padding: 24px;
}
.auth-card {
	background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
	padding: 40px; width: 100%; max-width: 420px;
}
.auth-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; text-align: center; }
.auth-card .auth-subtitle { font-size: 14px; color: var(--gray-500); text-align: center; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.form-group input {
	width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius);
	font-size: 14px; transition: border-color 0.2s; outline: none;
}
.form-group input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.form-error { color: var(--red); font-size: 13px; margin-top: 4px; display: none; }
.form-error.visible { display: block; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--gray-500); }

/* ---- Portal / Dashboard ---- */
.portal-layout { display: flex; min-height: 100vh; }
.portal-sidebar {
	width: 240px; background: var(--gray-800); color: var(--white); padding: 0;
	display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0;
	z-index: 50;
}
.portal-sidebar-brand {
	padding: 20px 20px; border-bottom: 1px solid var(--gray-700);
	display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px;
}
.portal-sidebar-brand img { height: 28px; }
.portal-nav { flex: 1; padding: 16px 0; }
.portal-nav a {
	display: flex; align-items: center; gap: 12px; padding: 10px 20px;
	color: var(--gray-400); font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.portal-nav a:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.portal-nav a.active { color: var(--orange); background: rgba(249,115,22,0.1); border-right: 3px solid var(--orange); }
.portal-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.portal-sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--gray-700); }
.portal-sidebar-user { font-size: 13px; color: var(--gray-400); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; }

.portal-main { flex: 1; margin-left: 240px; background: var(--gray-50); min-height: 100vh; }
.portal-topbar {
	background: var(--white); border-bottom: 1px solid var(--gray-200);
	padding: 16px 32px; display: flex; align-items: center; justify-content: space-between;
}
.portal-topbar h1 { font-size: 20px; font-weight: 700; }
.portal-content { padding: 32px; }

/* Portal Cards */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
	background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
	padding: 20px; transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card-label { font-size: 13px; color: var(--gray-500); font-weight: 500; margin-bottom: 4px; }
.stat-card-value { font-size: 28px; font-weight: 800; color: var(--gray-900); }
.stat-card-change { font-size: 12px; margin-top: 4px; }
.stat-card-change.positive { color: var(--green); }
.stat-card-change.negative { color: var(--red); }

/* Portal Tables */
.table-container { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.table-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.table-header h3 { font-size: 16px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
table th { text-align: left; padding: 12px 20px; font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--gray-200); }
table td { padding: 12px 20px; font-size: 14px; border-bottom: 1px solid var(--gray-100); }
table tr:hover td { background: var(--gray-50); }

/* Badge */
.badge {
	display: inline-block; padding: 2px 10px; border-radius: 100px;
	font-size: 12px; font-weight: 600;
}
.badge-human { background: #DCFCE7; color: #166534; }
.badge-suspicious { background: var(--yellow-light); color: #854D0E; }
.badge-bot { background: #FEE2E2; color: #991B1B; }
.badge-active { background: #DCFCE7; color: #166534; }
.badge-inactive { background: var(--gray-100); color: var(--gray-500); }

/* Charts */
.chart-container {
	background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
	padding: 20px; margin-bottom: 24px;
}
.chart-container h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

/* Copy Button / API Key */
.key-display {
	display: flex; align-items: center; gap: 8px;
	background: var(--gray-100); padding: 8px 14px; border-radius: var(--radius);
	font-family: monospace; font-size: 13px;
}
.key-display .key-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-display button {
	background: var(--white); border: 1px solid var(--gray-300); padding: 4px 10px;
	border-radius: 6px; font-size: 12px; cursor: pointer; white-space: nowrap;
}

/* Toast Notifications */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
	padding: 12px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
	box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease;
	min-width: 280px;
}
.toast-success { background: #166534; color: white; }
.toast-error { background: #991B1B; color: white; }
.toast-info { background: var(--gray-800); color: white; }

@keyframes slideIn {
	from { transform: translateX(100%); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

/* Loading Skeleton */
.skeleton {
	background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
	background-size: 200% 100%;
	animation: shimmer 1.5s infinite;
	border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Empty States */
.empty-state {
	text-align: center; padding: 60px 24px;
}
.empty-state svg { width: 64px; height: 64px; color: var(--gray-300); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }

/* Responsive Portal */
@media (max-width: 768px) {
	.portal-sidebar { display: none; }
	.portal-main { margin-left: 0; }
	.portal-content { padding: 16px; }
	.stat-cards { grid-template-columns: 1fr 1fr; }
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.hidden { display: none !important; }
