body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;background:#f0f2f5;min-height:100vh;color:#1e293b}.loading-screen{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:100vh;background:linear-gradient(135deg,#0d47a1,#1976d2);color:#fff;padding:2rem}.loading-container{max-width:700px;width:100%;text-align:center}.loading-container>p{font-size:1.5rem;font-weight:700;margin:1rem 0}.error-text{color:#ffcdd2;background:#d32f2f4d;padding:.75rem 1rem;border-radius:8px;margin:1rem 0;font-size:.9rem;text-align:left;word-break:break-all}.log-panel{margin-top:2rem;text-align:left;background:#0006;border-radius:12px;padding:1.5rem}.log-panel h3{font-size:1rem;margin-bottom:.75rem;color:#ffffffe6}.log-content{max-height:300px;overflow-y:auto;font-family:Courier New,monospace;font-size:.75rem;line-height:1.6}.log-entry{padding:.2rem .5rem;border-radius:4px;color:#ffffffd9}.log-entry.log-error{background:#d32f2f4d;color:#ffcdd2}.log-panel details{margin-top:1rem}.log-panel summary{cursor:pointer;font-size:.85rem;color:#ffffffb3}.debug-info{background:#0000004d;padding:1rem;border-radius:8px;margin-top:.5rem;font-size:.75rem;overflow-x:auto;color:#fffc;white-space:pre-wrap;word-break:break-all}.loading-spinner{width:48px;height:48px;border:4px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:1rem}@keyframes spin{to{transform:rotate(360deg)}}.header{background:linear-gradient(135deg,#0d47a1,#1976d2);color:#fff;padding:1rem 2rem;box-shadow:0 2px 8px #00000026;position:sticky;top:0;z-index:100}.header-content{max-width:1400px;margin:0 auto;display:flex;justify-content:space-between;align-items:center}.header-left{display:flex;align-items:center;gap:1rem}.header-logo{width:40px;height:40px}.header-text h1{font-size:1.5rem;font-weight:700}.header-text p{font-size:.85rem;opacity:.9}.header-right{display:flex;align-items:center;gap:1.5rem}.user-info{text-align:right}.user-name{display:block;font-weight:500;font-size:.9rem}.user-role{display:block;font-size:.75rem;opacity:.8;text-transform:capitalize}.btn-logout{background:#ffffff26;border:1px solid rgba(255,255,255,.3);color:#fff;padding:.5rem 1rem;border-radius:8px;cursor:pointer;font-size:.85rem;transition:all .2s}.btn-logout:hover{background:#ffffff40}.main-content{max-width:1400px;margin:0 auto;padding:2rem}.dashboard-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2rem}.dashboard-header h1{font-size:1.75rem;color:#fff;font-weight:800}.dashboard-actions{display:flex;align-items:center;gap:1rem}.last-update{font-size:.9rem;color:#fff;font-weight:500}.btn-refresh{background:#1976d2;color:#fff;border:none;padding:.6rem 1.2rem;border-radius:8px;cursor:pointer;font-weight:500;transition:all .2s}.btn-refresh:hover:not(:disabled){background:#1565c0;transform:translateY(-1px)}.btn-refresh:disabled{opacity:.6;cursor:not-allowed}.metrics-panel{margin-bottom:2rem}.metrics-panel h2{font-size:1.25rem;color:#fff;margin-bottom:1rem;font-weight:700;background:#1976d2;padding:.6rem 1rem;border-radius:8px}.metrics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}.metric-card{background:#fff;border-radius:12px;padding:1.25rem;display:flex;align-items:center;gap:1rem;box-shadow:0 1px 3px #00000014;transition:transform .2s,box-shadow .2s}.metric-card:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001f}.metric-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.5rem}.gateway-icon{background:#e3f2fd}.device-icon{background:#e8f5e9}.latency-icon{background:#fff3e0}.status-icon{background:#f3e5f5}.metric-content{display:flex;flex-direction:column}.metric-value{font-size:1.5rem;font-weight:700;color:#0f172a}.metric-label{font-size:.8rem;color:#475569;text-transform:uppercase;letter-spacing:.5px;font-weight:600}.dashboard-grid{display:grid;grid-template-columns:1fr 320px;gap:2rem}@media (max-width: 1024px){.dashboard-grid{grid-template-columns:1fr}}.gateways-section h2{font-size:1.25rem;color:#fff;margin-bottom:1rem;font-weight:700;background:#1976d2;padding:.6rem 1rem;border-radius:8px}.gateways-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:1.5rem}@media (max-width: 480px){.gateways-grid{grid-template-columns:1fr}}.gateway-card{background:#fff;border-radius:12px;padding:1.5rem;border-left:5px solid #cbd5e1;box-shadow:0 1px 3px #00000014;transition:transform .2s,box-shadow .2s}.gateway-card:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001f}.gateway-card.online{border-left-color:#22c55e;background:linear-gradient(to right,#f0fdf4,#fff 15%)}.gateway-card.offline{border-left-color:#ef4444;background:linear-gradient(to right,#fef2f2,#fff 15%)}.gateway-header{margin-bottom:1rem}.gateway-title{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.5rem}.gateway-title h3{font-size:1.1rem;font-weight:700;color:#1e293b}.status-badge{font-size:.7rem;font-weight:700;padding:.25rem .6rem;border-radius:9999px;text-transform:uppercase}.status-badge.online{background:#dcfce7;color:#15803d}.status-badge.offline{background:#fee2e2;color:#b91c1c}.gateway-meta{display:flex;gap:1rem;font-size:.8rem;color:#64748b}.gateway-ip{font-family:Courier New,monospace;background:#f1f5f9;padding:.15rem .4rem;border-radius:4px}.gateway-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem;margin-bottom:1rem;padding:.75rem;background:#f8fafc;border-radius:8px}.stat{text-align:center}.stat-label{display:block;font-size:.7rem;color:#94a3b8;text-transform:uppercase;margin-bottom:.25rem}.stat-value{display:block;font-size:.85rem;font-weight:600;color:#1e293b}.stat-value.traffic{font-size:.75rem;word-break:break-all}.gateway-devices{margin-bottom:1rem}.gateway-devices h4{font-size:.85rem;color:#475569;margin-bottom:.5rem}.devices-list{display:flex;flex-direction:column;gap:.5rem}.device-item{display:flex;align-items:center;gap:.5rem;padding:.4rem .6rem;background:#f8fafc;border-radius:6px;font-size:.8rem}.device-item.online{background:#f0fdf4}.device-item.offline{background:#fef2f2}.device-name{flex:1;font-weight:500}.device-status{font-size:.7rem;font-weight:600;padding:.1rem .4rem;border-radius:4px}.device-status.online{background:#dcfce7;color:#15803d}.device-status.offline{background:#fee2e2;color:#b91c1c}.device-status.unknown{background:#f1f5f9;color:#64748b}.ro1-status{font-size:.7rem;font-weight:600;padding:.1rem .4rem;border-radius:4px}.ro1-status.on{background:#dcfce7;color:#15803d}.ro1-status.off{background:#fee2e2;color:#b91c1c}.more-devices{font-size:.8rem;color:#64748b;text-align:center;padding:.5rem}.gateway-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem}.action-btn{display:flex;align-items:center;justify-content:center;padding:.5rem;background:#f1f5f9;border-radius:6px;text-decoration:none;color:#475569;font-size:.75rem;font-weight:500;transition:all .2s}.action-btn:hover{background:#e2e8f0;color:#1e293b}.action-btn.ssh{cursor:default;color:#64748b;font-family:Courier New,monospace;font-size:.65rem}.alerts-panel{background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 1px 3px #00000014;margin-bottom:1.5rem}.alerts-panel h2{font-size:1.1rem;color:#334155;margin-bottom:1rem}.alerts-list{display:flex;flex-direction:column;gap:.75rem}.alert-item{display:flex;align-items:center;gap:.75rem;padding:.75rem;border-radius:8px;font-size:.85rem}.alert-item.error{background:#fef2f2;border:1px solid #fecaca}.alert-item.warning{background:#fffbeb;border:1px solid #fed7aa}.alert-item.info{background:#f0fdf4;border:1px solid #bbf7d0}.alert-icon{font-size:1rem}.alert-message{flex:1;color:#1e293b}.more-alerts{font-size:.8rem;color:#64748b;text-align:center;padding:.5rem}.quick-links{background:#fff;border-radius:12px;padding:1.25rem;box-shadow:0 1px 3px #00000014}.quick-links h2{font-size:1.1rem;color:#334155;margin-bottom:1rem}.links-grid{display:flex;flex-direction:column;gap:.75rem}.link-card{display:flex;align-items:center;gap:1rem;padding:.75rem;background:#f8fafc;border-radius:8px;text-decoration:none;transition:all .2s}.link-card:hover{background:#e3f2fd;transform:translate(4px)}.link-icon{font-size:1.5rem}.link-info{display:flex;flex-direction:column}.link-name{font-weight:600;color:#1e293b;font-size:.9rem}.link-description{font-size:.75rem;color:#64748b}.footer{text-align:center;padding:2rem;color:#64748b;font-size:.85rem}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0d47a1,#1976d2);padding:2rem}.login-container{max-width:400px;width:100%}.login-header{text-align:center;margin-bottom:2rem;color:#fff}.login-logo{width:80px;height:80px;margin-bottom:1rem}.login-header h1{font-size:2rem;font-weight:700;margin-bottom:.5rem}.login-header p{font-size:1rem;opacity:.9}.login-card{background:#fff;border-radius:16px;padding:2.5rem;box-shadow:0 10px 40px #0003}.login-card h2{font-size:1.5rem;color:#1e293b;text-align:center;margin-bottom:.5rem}.login-card>p{text-align:center;color:#64748b;margin-bottom:2rem}.btn-login{width:100%;background:linear-gradient(135deg,#1976d2,#1565c0);color:#fff;border:none;padding:1rem;border-radius:8px;font-size:1rem;font-weight:600;cursor:pointer;transition:all .3s}.btn-login:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 12px #1976d266}.btn-login:disabled{opacity:.6;cursor:not-allowed}.login-info{text-align:center;margin-top:1.5rem}.login-info p{font-size:.85rem;color:#94a3b8}.login-footer{text-align:center;margin-top:2rem;color:#fffc}.login-footer strong{color:#fff}.loading{text-align:center;padding:3rem;color:#64748b}.error{text-align:center;padding:2rem;background:#fef2f2;border-radius:8px;color:#b91c1c}.metrics-loading,.metrics-error{padding:1rem;text-align:center;border-radius:8px;margin-bottom:1rem}.metrics-loading{background:#f1f5f9;color:#64748b}.metrics-error{background:#fef2f2;color:#b91c1c}@media (max-width: 768px){.header-content{flex-direction:column;gap:1rem;text-align:center}.header-right{flex-direction:column;gap:.75rem}.main-content{padding:1rem}.dashboard-header{flex-direction:column;gap:1rem;text-align:center}.dashboard-actions{flex-direction:column}.gateway-actions{grid-template-columns:repeat(2,1fr)}}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;background:linear-gradient(135deg,#0d47a1,#1565c0,#1976d2);min-height:100vh;color:#fff}.app{min-height:100vh;display:flex;flex-direction:column}.app-header{text-align:center;padding:3rem 1rem}.app-header h1{font-size:2.5rem;margin-bottom:.5rem;text-shadow:0 2px 4px rgba(0,0,0,.3)}.app-header p{font-size:1.1rem;opacity:.9}.app-main{flex:1;display:flex;justify-content:center;align-items:center;padding:2rem}.app-main p{font-size:1.2rem;background:#ffffff1a;padding:1rem 2rem;border-radius:8px}
