* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: #f5f7fb; color: #1a202c; line-height: 1.5; }

.navbar { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); flex-wrap: wrap; gap: 0.5rem; }
.nav-brand a { color: white; text-decoration: none; font-size: 1.3rem; font-weight: bold; }
.nav-links a { color: white; text-decoration: none; margin-left: 1.5rem; opacity: 0.9; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-links .logout { color: #ffe0e0; }

.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

h1 { font-size: 2rem; margin-bottom: 1.5rem; color: #2d3748; }
h2 { font-size: 1.4rem; margin: 1.5rem 0 1rem; color: #2d3748; }
h3 { font-size: 1.1rem; margin: 1rem 0 0.5rem; color: #2d3748; }

.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: white; padding: 1.5rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: center; }
.stat-num { font-size: 2.5rem; font-weight: bold; color: #667eea; line-height: 1; }
.stat-label { color: #718096; margin-top: 0.5rem; font-size: 0.9rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

section { background: white; padding: 1.5rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 0.6rem; text-align: left; border-bottom: 1px solid #edf2f7; font-size: 0.88rem; vertical-align: top; }
table th { background: #f7fafc; font-weight: 600; color: #4a5568; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }

.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 6px; text-decoration: none; cursor: pointer; border: none; font-size: 0.9rem; background: #edf2f7; color: #2d3748; transition: all 0.15s; font-family: inherit; }
.btn:hover { background: #cbd5e0; }
.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5a67d8; }
.btn-danger { background: #fc8181; color: white; }
.btn-danger:hover { background: #f56565; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

.form { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); max-width: 800px; }
.form label { display: block; margin-bottom: 1rem; font-weight: 500; color: #2d3748; }
.form input[type=text], .form input[type=password], .form input[type=url], .form input[type=datetime-local],
.form textarea, .form select { width: 100%; padding: 0.6rem; border: 1px solid #cbd5e0; border-radius: 6px; font-family: inherit; font-size: 0.95rem; margin-top: 0.3rem; background: white; }
.form textarea { resize: vertical; font-family: ui-monospace, "Cascadia Code", monospace; font-size: 0.85rem; }
.form input[type=file] { margin-top: 0.3rem; font-size: 0.85rem; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 2px rgba(102,126,234,0.2); }

.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.offer-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); display: flex; flex-direction: column; transition: transform 0.15s; }
.offer-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.offer-card img { width: 100%; height: 180px; object-fit: cover; }
.offer-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.offer-body h3 { margin: 0.5rem 0; }
.offer-body p { color: #718096; font-size: 0.88rem; flex: 1; }
.offer-actions { margin-top: 1rem; display: flex; gap: 0.5rem; }

.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-smm24x7 { background: #fef3c7; color: #92400e; }
.badge-ott24x7 { background: #ddd6fe; color: #5b21b6; }

.status { padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-posted { background: #d1fae5; color: #065f46; }
.status-failed { background: #fee2e2; color: #991b1b; }
.status-cancelled { background: #e2e8f0; color: #4a5568; }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.5rem; margin-top: 0.5rem; }
.checkbox { display: flex !important; align-items: center; gap: 0.5rem; font-weight: normal !important; cursor: pointer; padding: 0.5rem; border-radius: 4px; margin-bottom: 0 !important; background: #f7fafc; }
.checkbox:hover { background: #edf2f7; }
.checkbox input { width: auto !important; margin: 0 !important; }

.ai-section { background: #f7fafc; padding: 1rem; border-radius: 8px; margin: 1rem 0; }
.ai-section select, .ai-section button { font-size: 0.9rem; }
.ai-section select { padding: 0.4rem; border: 1px solid #cbd5e0; border-radius: 6px; }
.ai-output { background: #1a202c; color: #e2e8f0; padding: 1rem; border-radius: 6px; margin-top: 0.5rem; white-space: pre-wrap; font-family: ui-monospace, "Cascadia Code", monospace; font-size: 0.85rem; max-height: 400px; overflow: auto; }

.muted { color: #a0aec0; }
.error { background: #fee2e2; color: #991b1b; padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem; }

.help { background: #ebf8ff; border-radius: 8px; padding: 1rem 1.5rem; margin-bottom: 2rem; }
.help summary { cursor: pointer; font-weight: 600; color: #2b6cb0; padding: 0.3rem 0; }
.help h3 { color: #2b6cb0; margin-top: 1.2rem; }
.help ol { margin-left: 1.5rem; font-size: 0.88rem; line-height: 1.6; }
.help code { display: inline-block; word-break: break-all; }

.login-body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-box { background: white; padding: 3rem 2.5rem; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 100%; max-width: 400px; text-align: center; }
.login-box h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.login-box .subtitle { color: #718096; margin-bottom: 2rem; }
.login-box input { width: 100%; padding: 0.8rem; margin-bottom: 1rem; border: 1px solid #cbd5e0; border-radius: 8px; font-size: 1rem; }
.login-box button { width: 100%; padding: 0.8rem; background: #667eea; color: white; border: none; border-radius: 8px; font-size: 1rem; cursor: pointer; font-weight: 600; }
.login-box button:hover { background: #5a67d8; }

hr { border: none; border-top: 1px solid #e2e8f0; margin: 2rem 0; }

code { background: #edf2f7; padding: 0.1rem 0.4rem; border-radius: 4px; font-family: ui-monospace, "Cascadia Code", monospace; font-size: 0.82rem; color: #2d3748; }
