* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #000; }

.auth-gate { display: flex; align-items: center; justify-content: center; height: 100vh; background: #003366; }
.auth-box { background: #fff; padding: 40px; border-radius: 8px; text-align: center; max-width: 360px; width: 90%; }
.auth-box h1 { color: #003366; font-size: 20px; margin-bottom: 8px; }
.auth-box p { color: #666; font-size: 14px; margin-bottom: 20px; }
.auth-box input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; margin-bottom: 12px; }
.auth-box button { width: 100%; padding: 12px; background: #003366; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; }

header { background: #003366; color: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 100; }
header h1 { font-size: 18px; margin-bottom: 8px; }
nav { display: flex; gap: 4px; overflow-x: auto; }
.nav-link { color: rgba(255,255,255,0.7); text-decoration: none; padding: 6px 12px; border-radius: 4px; font-size: 14px; white-space: nowrap; }
.nav-link.active { background: rgba(255,255,255,0.2); color: #fff; }

main { padding: 16px; max-width: 800px; margin: 0 auto; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; padding: 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); cursor: pointer; }
.stat-label { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 32px; font-weight: 700; color: #000; margin-top: 4px; }

.actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.btn-primary { background: #003366; color: #fff; border: none; padding: 10px 20px; border-radius: 4px; font-size: 14px; cursor: pointer; }
.btn-secondary { background: #fff; color: #003366; border: 1px solid #003366; padding: 10px 20px; border-radius: 4px; font-size: 14px; cursor: pointer; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-approve { background: #28a745; color: #fff; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.btn-reject { background: #dc3545; color: #fff; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; }

.agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.agent-card { background: #fff; padding: 12px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.agent-name { font-size: 13px; font-weight: 600; color: #000; }
.agent-state { font-size: 12px; margin-top: 4px; }
.state-CLOSED { color: #28a745; }
.state-OPEN { color: #dc3545; }
.state-HALF_OPEN { color: #ffc107; }

.page { display: none; }
.page.active { display: block; }

.queue-list { display: flex; flex-direction: column; gap: 8px; }
.queue-item { background: #fff; padding: 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.queue-item-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.queue-title { font-size: 15px; font-weight: 600; color: #000; flex: 1; }
.queue-score { font-size: 14px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.score-high { background: #d4edda; color: #155724; }
.score-mid { background: #fff3cd; color: #856404; }
.score-low { background: #f8d7da; color: #721c24; }
.queue-meta { font-size: 12px; color: #666; margin-bottom: 8px; }
.queue-body { font-size: 13px; color: #333; line-height: 1.5; max-height: 0; overflow: hidden; transition: max-height 0.3s; }
.queue-body.expanded { max-height: 2000px; }
.queue-actions { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }
.queue-actions select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; }
.queue-item-actions { display: flex; gap: 8px; margin-top: 8px; }

.agent-details .agent-card { margin-bottom: 8px; }
.agent-detail-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }

.retro-content { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); white-space: pre-wrap; font-size: 14px; line-height: 1.6; }

.loading { text-align: center; padding: 40px; color: #666; }
.error { background: #f8d7da; color: #721c24; padding: 12px; border-radius: 4px; margin: 8px 0; }

@media (min-width: 600px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .agent-grid { grid-template-columns: repeat(3, 1fr); }
}
