* { box-sizing: border-box; }
body { background: #f0f2f5; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* Login */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.login-header i {
    font-size: 48px;
    color: #0f3460;
}
.login-header h2 {
    margin: 10px 0 5px;
    color: #1a1a2e;
}
.login-header p {
    color: #888;
    margin: 0;
}

/* Stats Cards */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.stat-primary .stat-icon { background: #e8eaf6; color: #3f51b5; }
.stat-success .stat-icon { background: #e8f5e9; color: #4caf50; }
.stat-warning .stat-icon { background: #fff3e0; color: #ff9800; }
.stat-danger .stat-icon  { background: #ffebee; color: #f44336; }
.stat-info .stat-icon    { background: #e0f7fa; color: #00bcd4; }
.stat-value { font-size: 24px; font-weight: 700; color: #1a1a2e; }
.stat-label { font-size: 13px; color: #888; }

/* Device avatar */
.device-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.device-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

/* Table */
.table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
    border-bottom: 2px solid #dee2e6;
}
.table td { vertical-align: middle; }
.msg-preview { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Worker cards */
.worker-card { transition: transform 0.2s; }
.worker-card:hover { transform: translateY(-2px); }

/* Logs */
.logs-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    background: #fafafa;
}
.log-entry {
    padding: 4px 8px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.log-entry:last-child { border-bottom: none; }

/* QR Image */
.qr-img { max-width: 200px; border: 1px solid #ddd; border-radius: 8px; }

/* Nav tabs */
.nav-tabs .nav-link { color: #555; }
.nav-tabs .nav-link.active { font-weight: 600; }
.nav-tabs .nav-link i { margin-right: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .stat-card { padding: 14px; gap: 10px; }
    .stat-value { font-size: 18px; }
    .stat-icon { width: 40px; height: 40px; font-size: 18px; }
}
