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

/* Login */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%); }
.login-card { background: rgba(255,255,255,0.95); padding: 40px; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); width: 100%; max-width: 380px; backdrop-filter: blur(10px); }
.login-card h1 { font-size: 20px; margin-bottom: 8px; color: #111; }
.login-card p { font-size: 13px; color: #666; margin-bottom: 24px; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; margin-bottom: 16px; }
.login-card input:focus { outline: none; border-color: #25d366; }
/* Input with icon */
.input-icon { position: relative; margin-bottom: 16px; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #999; }
.login-card .input-icon input { padding-left: 36px; padding-right: 38px; margin-bottom: 0; }
/* Password visibility toggle */
.toggle-pwd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 4px; cursor: pointer; width: auto; color: #999; display: flex; align-items: center; }
.toggle-pwd:hover { color: #666; background: none; }
.toggle-pwd svg { width: 18px; height: 18px; }
.login-card button[type="submit"] { width: 100%; padding: 10px; background: #25d366; color: #fff; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; font-weight: 500; }
.login-card button[type="submit"]:hover { background: #1fb855; }
.login-error { color: #e53935; font-size: 13px; margin-bottom: 12px; display: none; }

/* Header */
.header { background: #075e54; color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 18px; font-weight: 500; }
.header button { background: rgba(255,255,255,0.15); color: #fff; border: none; padding: 6px 14px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.header button:hover { background: rgba(255,255,255,0.25); }

/* Content */
.content { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.toolbar .info { font-size: 13px; color: #666; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }

/* Search box */
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #999; }
.search-box input { padding: 8px 12px 8px 32px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; width: 200px; }
.search-box input:focus { outline: none; border-color: #25d366; }
.btn-danger { background: #e53935; color: #fff; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 500; }
.btn-danger:hover { background: #c62828; }
.btn-danger:disabled { background: #ccc; cursor: not-allowed; }

/* Table */
.table-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { background: #f8f9fa; text-align: left; padding: 12px 16px; font-size: 12px; text-transform: uppercase; color: #666; font-weight: 600; border-bottom: 1px solid #eee; }
td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr:hover { background: #f8f9fa; }

/* Status badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.badge-ready { background: #e8f5e9; color: #2e7d32; }
.badge-disconnected { background: #ffebee; color: #c62828; }
.badge-connecting { background: #fff8e1; color: #f57f17; }
.badge-qr { background: #e3f2fd; color: #1565c0; }

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 4px; cursor: pointer; border: none; font-weight: 500; }
.btn-sm.delete { background: #ffebee; color: #c62828; }
.btn-sm.delete:hover { background: #ffcdd2; }

.empty { text-align: center; padding: 40px; color: #999; font-size: 14px; }

.hidden { display: none !important; }
