* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f0f2f5; color: #1a1a1a; }
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.login-box { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); width: 360px; }
.login-box h1 { text-align: center; margin-bottom: 24px; color: #075e54; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.login-box button { width: 100%; padding: 12px; background: #075e54; color: white; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; }
.login-box button:hover { background: #064e46; }
.login-error { color: #e74c3c; text-align: center; margin-bottom: 12px; font-size: 14px; }

nav { background: #075e54; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; }
nav .logo { color: white; font-size: 20px; font-weight: bold; }
nav .nav-links a { color: rgba(255,255,255,0.85); text-decoration: none; margin-left: 20px; font-size: 14px; }
nav .nav-links a:hover { color: white; }
nav .nav-links a.active { color: white; border-bottom: 2px solid #25d366; padding-bottom: 4px; }

.container { max-width: 1200px; margin: 20px auto; padding: 0 20px; }
.page-title { font-size: 24px; margin-bottom: 20px; color: #1a1a1a; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-card .number { font-size: 32px; font-weight: bold; color: #075e54; }
.stat-card .label { font-size: 13px; color: #666; margin-top: 4px; }

table { width: 100%; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border-collapse: collapse; }
th { background: #f8f9fa; padding: 12px 16px; text-align: left; font-size: 13px; color: #666; border-bottom: 1px solid #eee; }
td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
tr:hover { background: #f8fffe; }

.badge { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-abierto { background: #fff3cd; color: #856404; }
.badge-en_proceso { background: #cce5ff; color: #004085; }
.badge-resuelto { background: #d4edda; color: #155724; }
.badge-cerrado { background: #e2e3e5; color: #383d41; }
.badge-alta { background: #f8d7da; color: #721c24; }
.badge-urgente { background: #721c24; color: white; }
.badge-media { background: #fff3cd; color: #856404; }
.badge-baja { background: #d4edda; color: #155724; }
.badge-entrada { background: #cce5ff; color: #004085; }
.badge-salida { background: #d4edda; color: #155724; }

.btn { padding: 6px 14px; border-radius: 6px; font-size: 13px; text-decoration: none; cursor: pointer; border: none; }
.btn-primary { background: #075e54; color: white; }
.btn-primary:hover { background: #064e46; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.chat-container { background: #e5ddd5; border-radius: 10px; padding: 20px; max-height: 500px; overflow-y: auto; }
.chat-msg { max-width: 70%; padding: 8px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; line-height: 1.4; }
.chat-msg.entrada { background: white; align-self: flex-start; margin-right: auto; }
.chat-msg.salida { background: #dcf8c6; align-self: flex-end; margin-left: auto; }
.chat-msg .time { font-size: 11px; color: #999; margin-top: 4px; }
.chat-flex { display: flex; flex-direction: column; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.detail-card { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.detail-card h3 { margin-bottom: 12px; color: #075e54; }
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.detail-row .label { color: #666; }

.empty { text-align: center; padding: 40px; color: #999; }
.back-link { display: inline-block; margin-bottom: 16px; color: #075e54; text-decoration: none; font-size: 14px; }