* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f5f5f5; color: #333; }
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }
nav { background: #2c3e50; padding: 12px 20px; display: flex; gap: 16px; align-items: center; }
nav a { color: #ecf0f1; text-decoration: none; font-size: 14px; }
nav a:hover { color: #fff; text-decoration: underline; }
nav .brand { font-weight: bold; font-size: 16px; margin-right: 20px; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #f8f9fa; font-weight: 600; }
.badge { padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; display: inline-block; }
.badge-pending { background: #ffeaa7; color: #6c5200; }
.badge-pulled { background: #74b9ff; color: #003366; }
.badge-sent { background: #55efc4; color: #004d33; }
.badge-delivered { background: #00b894; color: #fff; }
.badge-failed { background: #ff7675; color: #fff; }
.device-online { color: #00b894; font-weight: bold; }
.device-offline { color: #ff7675; font-weight: bold; }
input[type="text"], input[type="password"], textarea, select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; width: 100%; }
button, .btn { padding: 8px 16px; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-primary { background: #0984e3; color: #fff; }
.btn-danger { background: #d63031; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.stats { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.stat { text-align: center; padding: 16px; flex: 1; min-width: 120px; }
.stat .number { font-size: 28px; font-weight: bold; }
.stat .label { font-size: 13px; color: #666; }
form.inline { display: inline; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.filters { display: flex; gap: 12px; margin-bottom: 16px; align-items: end; flex-wrap: wrap; }
.filters .form-group { margin-bottom: 0; }
.flash { padding: 10px 16px; border-radius: 4px; margin-bottom: 16px; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }
.pagination { display: flex; gap: 8px; margin-top: 16px; justify-content: center; }
.pagination a { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; color: #333; }
.pagination a.active { background: #0984e3; color: #fff; border-color: #0984e3; }
code { font-size: 11px; background: #f8f9fa; padding: 2px 4px; border-radius: 3px; }
