/* Reset básico + tema escuro limpo */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0a0a0a; color: #e0e0e0; min-height: 100vh; }
a { color: #3b82f6; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Helpers */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.text-center { text-align: center; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-muted { color: #888; }
.hidden { display: none !important; }

/* Header */
.header { background: #111; border-bottom: 1px solid #222; padding: 12px 20px; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 18px; font-weight: 700; color: #fff; }
.logo span { color: #3b82f6; }
.user-badge { display: flex; align-items: center; gap: 12px; background: #1a1a1a; padding: 8px 16px; border-radius: 8px; font-size: 14px; }
.btn-logout { background: #ef4444; color: white; border: none; padding: 6px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-logout:hover { background: #dc2626; }

/* Confirmação de Email */
.email-display { text-align: center; font-size: 14px; color: #3b82f6; padding: 8px; margin-bottom: 16px; background: #3b82f610; border-radius: 8px; word-break: break-all; }

/* Login */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%); }
.login-box { background: #111; border: 1px solid #222; border-radius: 12px; padding: 40px; width: 100%; max-width: 400px; }
.login-box h1 { font-size: 24px; margin-bottom: 8px; text-align: center; }
.login-box p { color: #888; text-align: center; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #aaa; }
.form-group input { width: 100%; padding: 12px 16px; background: #1a1a1a; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 14px; }
.form-group input:focus { outline: none; border-color: #3b82f6; }
.btn-primary { width: 100%; padding: 12px; background: #3b82f6; color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-primary:hover { background: #2563eb; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.error-msg { background: #ef444420; border: 1px solid #ef444440; color: #ef4444; padding: 10px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.success-msg { background: #10b98120; border: 1px solid #10b98140; color: #10b981; padding: 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; line-height: 1.5; }
.switch-text { text-align: center; margin-top: 20px; font-size: 14px; color: #888; }
.switch-text a { color: #3b82f6; }

/* Dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: #111; border: 1px solid #222; border-radius: 12px; padding: 24px; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: #fff; }
.stat-card .stat-label { font-size: 13px; color: #888; margin-top: 4px; }
.stat-card.blue { border-left: 3px solid #3b82f6; }
.stat-card.green { border-left: 3px solid #10b981; }
.stat-card.red { border-left: 3px solid #ef4444; }
.stat-card.yellow { border-left: 3px solid #f59e0b; }

/* Users table */
.users-section { background: #111; border: 1px solid #222; border-radius: 12px; padding: 24px; }
.users-section h2 { font-size: 18px; margin-bottom: 20px; }
.search-box { width: 100%; padding: 10px 16px; background: #1a1a1a; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 14px; margin-bottom: 16px; }
.search-box:focus { outline: none; border-color: #3b82f6; }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #1a1a1a; }
th { color: #888; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
td { font-size: 14px; }
tr:hover { background: #1a1a1a; }
.status-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-active { background: #10b98120; color: #10b981; }
.status-inactive { background: #ef444420; color: #ef4444; }
.action-btn { background: transparent; border: 1px solid #333; color: #aaa; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.action-btn:hover { border-color: #3b82f6; color: #3b82f6; }
.action-btn.danger:hover { border-color: #ef4444; color: #ef4444; }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: #888; }
.spinner { width: 24px; height: 24px; border: 2px solid #333; border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
