/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #2d3748; min-height: 100vh; }
a { color: #667eea; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAVBAR ===== */
.navbar { background: #1a1a2e; padding: 0 24px; height: 56px; display: flex; align-items: center; }
.nav-inner { max-width: 1200px; width: 100%; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.nav-brand { color: white; font-size: 20px; font-weight: 700; letter-spacing: 3px; text-decoration: none; display: flex; align-items: center; }
.nav-logo { height: 42px; width: auto; }
.nav-links a { color: #a0aec0; margin-left: 24px; font-size: 14px; text-decoration: none; }
.nav-links a:hover { color: white; }
.nav-admin { color: #fbd38d !important; }

/* ===== PROCESSING PAGE ===== */
.processing-page { min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center; background: #f0f2f5; padding: 20px; }
.processing-card { background: white; border-radius: 16px; padding: 48px 40px; max-width: 520px; width: 100%; text-align: center; box-shadow: 0 8px 40px rgba(0,0,0,0.1); }
.processing-logo { height: 48px; width: auto; margin-bottom: 24px; }
.processing-spinner { width: 48px; height: 48px; border: 4px solid #e2e8f0; border-top-color: #667eea; border-radius: 50%; margin: 0 auto 24px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-card h2 { font-size: 22px; color: #2d3748; margin-bottom: 12px; }
.processing-msg { font-size: 15px; color: #4a5568; margin-bottom: 12px; line-height: 1.5; }
.processing-sub { font-size: 13px; color: #a0aec0; margin-bottom: 20px; line-height: 1.5; }
.processing-timer { font-size: 14px; color: #718096; font-family: 'SF Mono', 'Consolas', monospace; }

/* ===== FLASH MESSAGES ===== */
.flash-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.flash { padding: 12px 20px; border-radius: 6px; margin-top: 16px; font-size: 14px; }
.flash-success { background: #c6f6d5; color: #22543d; }
.flash-error { background: #fed7d7; color: #742a2a; }
.flash-info { background: #bee3f8; color: #2a4365; }

/* ===== BUTTONS ===== */
.btn { display: inline-block; padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; text-align: center; transition: all 0.2s; }
.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102,126,234,0.4); text-decoration: none; color: white; }
.btn-outline { border: 2px solid #667eea; color: #667eea; background: transparent; }
.btn-outline:hover { background: #667eea; color: white; text-decoration: none; }
.btn-full { width: 100%; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #4a5568; }
.form-group input, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; background: white; }
.form-group input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.form-group input[type="file"] { padding: 10px; border: 2px dashed #cbd5e0; background: #f7fafc; cursor: pointer; }
.form-group input[type="file"]:hover { border-color: #667eea; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.file-hint { font-size: 12px; color: #a0aec0; margin-top: 4px; display: block; }

/* ===== CARDS ===== */
.card { background: white; border-radius: 10px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea, #764ba2); padding: 20px; }
.auth-card { background: white; border-radius: 12px; padding: 40px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.auth-card h1 { text-align: center; font-size: 36px; color: #1a1a2e; letter-spacing: 4px; margin-bottom: 4px; }
.auth-card h2 { text-align: center; font-size: 18px; color: #718096; margin-bottom: 24px; font-weight: 400; }
.auth-trial { text-align: center; color: #667eea; font-size: 13px; margin-bottom: 20px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: #718096; }

/* ===== LANDING PAGE ===== */
.landing { min-height: 100vh; }
.landing-hero { background: linear-gradient(160deg, #f7f8fc 0%, #e8ecf4 50%, #dce3ef 100%); color: #1a1a2e; padding: 60px 24px 80px; }
.hero-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.hero-left { }
.hero-logo { width: 100%; max-width: 540px; height: auto; margin-bottom: 20px; }
.hero-tagline { font-size: 32px; font-weight: 700; margin-bottom: 12px; line-height: 1.2; color: #1a1a2e; }
.hero-sub { font-size: 16px; color: #4a5568; margin-bottom: 16px; line-height: 1.6; max-width: 520px; }
.hero-value { font-size: 15px; color: #1a1a2e; font-weight: 600; font-style: italic; margin-bottom: 28px; line-height: 1.5; max-width: 520px; border-left: 3px solid #e53e3e; padding-left: 14px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 12px; }
.hero-note { font-size: 13px; color: #718096; }
.hero-right { }
.hero-checklist { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 28px 32px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.check-item { padding: 7px 0; font-size: 15px; color: #2d3748; }
.check-item::first-letter { color: #48bb78; }

.landing-how { max-width: 900px; margin: 0 auto; padding: 60px 24px; text-align: center; }
.landing-how h2 { margin-bottom: 32px; font-size: 28px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-step { background: white; border-radius: 10px; padding: 28px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.step-num { width: 40px; height: 40px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; margin: 0 auto 14px; }
.how-step h3 { margin-bottom: 8px; }
.how-step p { font-size: 14px; color: #718096; line-height: 1.5; }

.landing-pricing { background: #f7fafc; padding: 60px 24px; text-align: center; }
.landing-pricing h2 { margin-bottom: 8px; font-size: 28px; }
.pricing-sub { color: #718096; margin-bottom: 32px; font-size: 16px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 720px; margin: 0 auto; }
.price-card { background: white; border-radius: 12px; padding: 36px 32px; box-shadow: 0 2px 16px rgba(0,0,0,0.06); text-align: center; position: relative; border: 2px solid transparent; }
.price-card.featured { border-color: #667eea; }
.price-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #667eea, #764ba2); color: white; font-size: 12px; font-weight: 700; padding: 4px 16px; border-radius: 12px; letter-spacing: 0.5px; }
.price-tier { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: #718096; margin-bottom: 8px; font-weight: 600; }
.price-amount { font-size: 48px; font-weight: 700; color: #1a1a2e; margin-bottom: 20px; }
.price-amount span { font-size: 18px; color: #718096; font-weight: 400; }
.price-card ul { list-style: none; margin-bottom: 24px; text-align: left; }
.price-card li { padding: 8px 0; font-size: 15px; color: #4a5568; border-bottom: 1px solid #f0f0f0; }
.price-per { font-size: 13px; color: #a0aec0; margin-top: 12px; }
.landing-footer { text-align: center; padding: 40px; color: #a0aec0; font-size: 13px; }

/* ===== DASHBOARD ===== */
.dashboard { max-width: 1000px; margin: 24px auto; padding: 0 24px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.usage-badge { display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.usage-badge.trial { background: #bee3f8; color: #2a4365; }
.usage-badge.active { background: #c6f6d5; color: #22543d; }
.usage-badge.overage { background: #fefcbf; color: #744210; }
.usage-badge.inactive { background: #fed7d7; color: #742a2a; }
.upload-card { background: white; border-radius: 10px; padding: 28px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.upload-card h3 { margin-bottom: 16px; }
.upload-card.blocked { text-align: center; padding: 40px; }
.upload-card.blocked p { margin-bottom: 16px; color: #718096; }
.overage-note { font-size: 13px; color: #b7791f; margin-top: 8px; text-align: center; }
.progress-bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-top: 16px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); animation: progress 3s ease-in-out infinite; }
@keyframes progress { 0%{width:0} 50%{width:70%} 100%{width:100%} }
.progress-text { text-align: center; font-size: 13px; color: #718096; margin-top: 8px; }
.history { margin-top: 8px; }
.history h3 { margin-bottom: 16px; }
.history-table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.history-table th { background: #f7fafc; padding: 12px 16px; text-align: left; font-size: 12px; text-transform: uppercase; color: #718096; letter-spacing: 0.5px; }
.history-table td { padding: 12px 16px; border-top: 1px solid #f0f2f5; font-size: 14px; }
.project-cell strong { display: block; }
.project-cell small { color: #a0aec0; }
.empty-state { text-align: center; padding: 40px; color: #a0aec0; }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-success { background: #c6f6d5; color: #22543d; }
.badge-warn { background: #fefcbf; color: #744210; }
.badge-error { background: #fed7d7; color: #742a2a; }
.usage-badge.tester { background: #e9d8fd; color: #553c9a; }

/* ===== FEEDBACK MODAL ===== */
.btn-feedback { background: #edf2f7; color: #4a5568; border: 1px solid #cbd5e0; }
.btn-feedback:hover { background: #e2e8f0; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-card { background: white; border-radius: 12px; padding: 32px; max-width: 480px; width: 90%; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-card h3 { margin-bottom: 8px; font-size: 16px; }
.modal-card p { color: #718096; margin-bottom: 16px; font-size: 15px; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 24px; color: #a0aec0; cursor: pointer; }
.modal-close:hover { color: #2d3748; }
.fb-buttons { display: flex; gap: 12px; margin-bottom: 16px; }
.btn-yes { background: #c6f6d5; color: #22543d; border: 2px solid #48bb78; padding: 10px 32px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 15px; }
.btn-yes:hover { background: #9ae6b4; }
.btn-no { background: #fed7d7; color: #742a2a; border: 2px solid #fc8181; padding: 10px 32px; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 15px; }
.btn-no:hover { background: #feb2b2; }
#fbReasonBox label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #4a5568; }
#fbReasonBox textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 14px; font-family: inherit; resize: vertical; margin-bottom: 12px; }
#fbReasonBox textarea:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.fb-no { background: #fff5f5; }

/* ===== ACCOUNT PAGE ===== */
.account-page { max-width: 700px; margin: 24px auto; padding: 0 24px; }
.account-page h2 { margin-bottom: 20px; }
.sub-status p { margin-bottom: 8px; }
.plan-info { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.plan-info h4 { margin-bottom: 12px; color: #2d3748; }
.plan-info ul { list-style: none; margin-bottom: 16px; }
.plan-info li { padding: 4px 0; font-size: 14px; color: #4a5568; }
.plan-info li::before { content: "\2713 "; color: #48bb78; }

/* ===== ADMIN ===== */
.admin-page { max-width: 1200px; margin: 24px auto; padding: 0 24px; }
.admin-page h2 { margin-bottom: 20px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: 10px; padding: 24px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-num { font-size: 36px; font-weight: 700; color: #667eea; }
.stat-label { font-size: 13px; color: #718096; margin-top: 4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: #f7fafc; padding: 10px 12px; text-align: left; font-size: 11px; text-transform: uppercase; color: #718096; }
.admin-table td { padding: 10px 12px; border-top: 1px solid #f0f2f5; }
.admin-table select { padding: 4px 8px; border: 1px solid #cbd5e0; border-radius: 4px; font-size: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero-logo { max-width: 320px; }
    .hero-tagline { font-size: 24px; }
    .how-grid { grid-template-columns: 1fr; }
    .price-grid { grid-template-columns: 1fr; max-width: 380px; }
    .admin-stats { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .nav-links a { margin-left: 12px; font-size: 13px; }
    .dash-header { flex-direction: column; gap: 12px; }
}
