* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; background:#f5f6fa; color:#333; min-height:100vh; }

/* Login */
.page { width:100%; }
#login-page { display:flex; justify-content:center; align-items:center; min-height:100vh; }
.login-card { background:#fff; padding:48px 40px; border-radius:16px; box-shadow:0 4px 24px rgba(0,0,0,.08); text-align:center; width:360px; max-width:90vw; }
.login-card h1 { font-size:28px; margin-bottom:8px; }
.login-card p { color:#888; margin-bottom:24px; }
.login-card input { width:100%; padding:12px 16px; border:1px solid #ddd; border-radius:8px; font-size:15px; margin-bottom:16px; outline:none; transition:border .2s; }
.login-card input:focus { border-color:#4361ee; }
.login-card button { width:100%; padding:12px; background:#4361ee; color:#fff; border:none; border-radius:8px; font-size:16px; cursor:pointer; transition:background .2s; }
.login-card button:hover { background:#3a56d4; }
.error { color:#e74c3c; margin-top:12px; font-size:14px; }

/* Header */
header { background:#fff; padding:16px 24px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #eee; }
header h1 { font-size:20px; }
.header-right { display:flex; gap:12px; align-items:center; }
.btn-secondary { padding:8px 16px; background:#eee; border:none; border-radius:6px; cursor:pointer; font-size:14px; }
.btn-secondary:hover { background:#ddd; }

/* Stats */
.stats { display:flex; gap:16px; padding:20px 24px; flex-wrap:wrap; }
.stat-card { background:#fff; border-radius:12px; padding:20px 28px; box-shadow:0 2px 8px rgba(0,0,0,.04); min-width:120px; }
.stat-num { font-size:32px; font-weight:700; color:#4361ee; }
.stat-label { color:#888; font-size:14px; margin-top:4px; }

/* Install banner */
.install-banner { margin:0 24px 16px; background:#fff; border-radius:10px; padding:14px 20px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; box-shadow:0 2px 8px rgba(0,0,0,.04); }
.install-banner code { background:#f0f0f0; padding:6px 12px; border-radius:6px; font-size:13px; word-break:break-all; }
.btn-sm { padding:6px 14px; background:#4361ee; color:#fff; border:none; border-radius:6px; cursor:pointer; font-size:13px; white-space:nowrap; }
.btn-sm:hover { background:#3a56d4; }

/* Table */
.table-wrap { margin:0 24px 24px; background:#fff; border-radius:12px; overflow-x:auto; box-shadow:0 2px 8px rgba(0,0,0,.04); }
table { width:100%; border-collapse:collapse; font-size:14px; }
th { background:#fafafa; text-align:left; padding:12px 16px; font-weight:600; white-space:nowrap; border-bottom:1px solid #eee; }
td { padding:12px 16px; border-bottom:1px solid #f5f5f5; white-space:nowrap; }
tr:last-child td { border-bottom:none; }

.dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.dot-online { background:#2ecc71; }
.dot-offline { background:#ccc; }

.actions { display:flex; gap:6px; }
.actions button { padding:4px 10px; border:1px solid #ddd; background:#fff; border-radius:4px; cursor:pointer; font-size:13px; }
.actions button:hover { background:#f5f5f5; }
.actions .btn-danger { color:#e74c3c; border-color:#fcc; }
.actions .btn-danger:hover { background:#fef0f0; }

/* Toast */
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:#333; color:#fff; padding:10px 24px; border-radius:8px; font-size:14px; opacity:0; transition:opacity .3s; pointer-events:none; z-index:999; }
.toast.show { opacity:1; }

/* Responsive */
@media(max-width:640px) {
  .stats { padding:12px 16px; gap:10px; }
  .stat-card { padding:14px 18px; flex:1; min-width:0; }
  .stat-num { font-size:24px; }
  .install-banner { margin:0 16px 12px; padding:12px 14px; font-size:13px; }
  .table-wrap { margin:0 16px 16px; }
  th,td { padding:10px 12px; font-size:13px; }
  header { padding:12px 16px; }
}
