* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f0f2f5; color: #1a1a2e; }
header { background: #075e54; color: white; padding: 16px 24px; display: flex; align-items: center; gap: 12px; }
header h1 { font-size: 1.2rem; font-weight: 600; }
nav { background: #128c7e; display: flex; gap: 4px; padding: 0 24px; }
nav button { background: none; border: none; color: rgba(255,255,255,0.8); padding: 12px 16px; cursor: pointer; font-size: 0.9rem; border-bottom: 3px solid transparent; }
nav button.active { color: white; border-bottom-color: #25d366; }
main { max-width: 1100px; margin: 0 auto; padding: 24px; }
.tab-panel { display: none; } .tab-panel.active { display: block; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.card .label { font-size: 0.8rem; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.card .value { font-size: 2rem; font-weight: 700; color: #075e54; margin-top: 4px; }
.card .sub { font-size: 0.85rem; color: #888; margin-top: 4px; }
.chart-box { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 24px; }
.chart-box h3 { margin-bottom: 16px; font-size: 1rem; color: #333; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
th { background: #f8f9fa; padding: 12px 16px; text-align: left; font-size: 0.85rem; color: #666; font-weight: 600; }
td { padding: 12px 16px; border-top: 1px solid #f0f0f0; font-size: 0.9rem; vertical-align: top; }
tr:hover td { background: #fafafa; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.badge.streaming { background: #e8f5e9; color: #2e7d32; }
.badge.proxy { background: #e3f2fd; color: #1565c0; }
.badge.escalonado { background: #fff3e0; color: #e65100; }
.btn { padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.btn-primary { background: #075e54; color: white; }
.btn-primary:hover { background: #128c7e; }
.btn-danger { background: #c62828; color: white; }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.btn-success { background: #2e7d32; color: white; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.toolbar h2 { font-size: 1.1rem; }
modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; align-items: center; justify-content: center; }
modal-overlay.open { display: flex; }
.modal { background: white; border-radius: 12px; padding: 24px; width: 500px; max-width: 90vw; }
.modal h3 { margin-bottom: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; color: #444; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 0.9rem; }
.form-group textarea { min-height: 80px; resize: vertical; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.empty { text-align: center; padding: 48px; color: #aaa; }
