*{box-sizing:border-box;margin:0;padding:0}html{width:100%;height:100%}body{-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;color:#1e293b;background-image:url(/bg.jpg);background-position:50%;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;width:100%;min-height:100%;margin:0;padding:0;font-family:Kanit,sans-serif}#root{flex-direction:column;min-height:100vh;display:flex}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#f1f5f9}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#94a3b8}.app-container{flex-direction:column;min-height:100vh;display:flex}.navbar{z-index:100;background:#fff;border-bottom:1px solid #e2e8f0;position:sticky;top:0;box-shadow:0 2px 8px #0000000a}.nav-content{justify-content:space-between;align-items:center;max-width:1280px;margin:0 auto;padding:12px 24px;display:flex}.brand{color:#1e293b;align-items:center;gap:12px;font-size:1.25rem;font-weight:700;text-decoration:none;display:flex}.brand-icon{color:#fff;background:linear-gradient(135deg,#2563eb,#3b82f6);border-radius:10px;justify-content:center;align-items:center;width:40px;height:40px;display:flex;box-shadow:0 4px 10px #2563eb4d}.nav-links{align-items:center;gap:12px;display:flex}.nav-btn{cursor:pointer;border:none;border-radius:8px;align-items:center;gap:8px;padding:8px 16px;font-family:inherit;font-size:.95rem;font-weight:500;transition:all .2s;display:inline-flex}.nav-btn.active{color:#2563eb;background:#eff6ff;font-weight:600}.nav-btn.secondary{color:#475569;background:#f8fafc;border:1px solid #e2e8f0}.nav-btn.secondary:hover{color:#1e293b;background:#f1f5f9}.nav-btn.primary{color:#fff;background:#2563eb}.nav-btn.primary:hover{background:#1d4ed8}.nav-btn.sync{color:#fff;background:#10b981}.nav-btn.sync:hover{background:#059669}.nav-btn.logout{color:#b91c1c;background:#fee2e2}.nav-btn.logout:hover{background:#fecaca}.user-badge{color:#334155;background:#f1f5f9;border-radius:20px;align-items:center;gap:6px;padding:6px 14px;font-size:.9rem;font-weight:500;display:inline-flex}.dashboard-main{flex:1;width:100%;max-width:1280px;margin:0 auto;padding:24px}.dashboard-header{-webkit-backdrop-filter:blur(12px);background:#ffffffeb;border:1px solid #fffc;border-radius:16px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px;padding:18px 24px;display:flex;box-shadow:0 8px 30px #00000014}.header-title h1{color:#0f172a;font-size:1.75rem;font-weight:700}.header-title p{color:#475569;margin-top:4px;font-size:.95rem;font-weight:500}.sensor-cards-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px;margin-bottom:24px;display:grid}.sensor-card{color:#fff;border-radius:16px;flex-direction:column;justify-content:space-between;min-height:190px;padding:22px;transition:transform .25s,box-shadow .25s;display:flex;box-shadow:0 10px 25px #0000001f}.sensor-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px #0000002e}.card-1{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%)}.card-2{background:linear-gradient(135deg,#f093fb 0%,#f5576c 100%)}.card-3{background:linear-gradient(135deg,#4facfe 0%,#00f2fe 100%)}.card-4{background:linear-gradient(135deg,#43e97b 0%,#38f9d7 100%)}.sensor-card-top{justify-content:space-between;align-items:center;display:flex}.sensor-name{text-shadow:0 1px 3px #0003;font-size:1.1rem;font-weight:600}.status-badge{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#ffffff47;border-radius:20px;padding:4px 12px;font-size:.85rem;font-weight:600}.sensor-card-middle{margin:12px 0}.sensor-value{text-shadow:2px 2px 4px #0003;font-size:2.75rem;font-weight:800;line-height:1}.sensor-unit{opacity:.9;margin-left:6px;font-size:1.3rem;font-weight:500}.sensor-card-bottom{opacity:.95;border-top:1px solid #fff3;justify-content:space-between;align-items:center;padding-top:12px;font-size:.85rem;display:flex}.connection-pill{background:#ffffff38;border-radius:12px;align-items:center;gap:6px;padding:4px 10px;font-size:.8rem;font-weight:500;display:inline-flex}.pulse-dot{border-radius:50%;width:8px;height:8px;animation:1.8s infinite pulse;display:inline-block}.pulse-dot.online{background:#22c55e;box-shadow:0 0 8px #22c55e}.pulse-dot.offline{background:#ef4444;box-shadow:0 0 8px #ef4444}@keyframes pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.85)}}.chart-box-large{background:#fff;border:1px solid #e2e8f0;border-radius:16px;margin-bottom:24px;padding:24px;box-shadow:0 4px 16px #0000000a}.charts-grid{grid-template-columns:repeat(auto-fit,minmax(480px,1fr));gap:20px;margin-bottom:24px;display:grid}@media (width<=768px){.charts-grid{grid-template-columns:1fr}}.chart-box{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;box-shadow:0 4px 16px #0000000a}.chart-header{justify-content:space-between;align-items:center;margin-bottom:18px;display:flex}.chart-title{color:#1e293b;align-items:center;gap:8px;font-size:1.1rem;font-weight:600;display:flex}.chart-time{color:#94a3b8;font-size:.85rem}.modal-backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:1000;background:#0f172aa6;justify-content:center;align-items:center;padding:20px;display:flex;position:fixed;inset:0}.modal-content{background:#fff;border-radius:16px;width:100%;max-width:650px;animation:.2s ease-out modalIn;overflow:hidden;box-shadow:0 20px 40px #0003}@keyframes modalIn{0%{opacity:0;transform:scale(.95)translateY(10px)}to{opacity:1;transform:scale(1)translateY(0)}}.modal-header{color:#fff;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);justify-content:space-between;align-items:center;padding:18px 24px;display:flex}.modal-header h3{align-items:center;gap:8px;font-size:1.25rem;font-weight:600;display:flex}.modal-close-btn{color:#fff;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;padding:4px;display:flex}.modal-close-btn:hover{background:#fff3}.modal-body{padding:24px}.form-group{margin-bottom:18px}.form-group label{color:#334155;margin-bottom:8px;font-size:.95rem;font-weight:600;display:block}.form-control{color:#1e293b;border:1px solid #cbd5e1;border-radius:8px;outline:none;width:100%;padding:10px 14px;font-family:inherit;font-size:.95rem;transition:border-color .2s}.form-control:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb26}.form-row{grid-template-columns:1fr 1fr;gap:16px;display:grid}.sensor-checkboxes-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;max-height:180px;padding:14px;overflow-y:auto}.checkbox-item{cursor:pointer;-webkit-user-select:none;user-select:none;color:#334155;align-items:center;gap:10px;padding:6px 0;font-size:.95rem;display:flex}.checkbox-item input[type=checkbox]{cursor:pointer;width:18px;height:18px}.checkbox-divider{background:#e2e8f0;height:1px;margin:8px 0}.modal-footer{background:#f8fafc;border-top:1px solid #e2e8f0;justify-content:flex-end;align-items:center;gap:12px;padding:16px 24px;display:flex}.login-wrapper{background:linear-gradient(135deg,#1e293b 0%,#0f172a 100%);justify-content:center;align-items:center;min-height:100vh;padding:24px;display:flex}.login-card{text-align:center;background:#fff;border-radius:20px;width:100%;max-width:440px;padding:40px;box-shadow:0 25px 50px -12px #00000059}.login-icon{color:#fff;background:linear-gradient(135deg,#2563eb,#3b82f6);border-radius:18px;justify-content:center;align-items:center;width:64px;height:64px;margin-bottom:20px;display:inline-flex;box-shadow:0 10px 20px #2563eb4d}.login-card h2{color:#0f172a;margin-bottom:8px;font-size:1.6rem;font-weight:700}.login-card p{color:#64748b;margin-bottom:24px;font-size:.95rem}.login-btn{color:#fff;cursor:pointer;background:#2563eb;border:none;border-radius:10px;width:100%;margin-top:12px;padding:12px;font-family:inherit;font-size:1rem;font-weight:600;transition:background .2s}.login-btn:hover{background:#1d4ed8}.login-btn:disabled{cursor:not-allowed;background:#94a3b8}.login-tip{color:#94a3b8;margin-top:18px;font-size:.85rem}.app-footer{text-align:center;color:#64748b;background:#fff;border-top:1px solid #e2e8f0;padding:16px 24px;font-size:.9rem}
