* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f1f5f9; color: #1e293b; min-height: 100vh; }
.container { max-width: 960px; margin: 0 auto; padding: 16px; }
header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
header h1 { font-size: 1.5rem; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 12px; padding: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-card .value { font-size: 1.8rem; font-weight: 700; color: #0f172a; }
.stat-card .label { font-size: 0.85rem; color: #64748b; margin-top: 4px; }
.toolbar { display: flex; justify-content: space-between; margin-bottom: 16px; gap: 8px; flex-wrap: wrap; }
.btn { padding: 8px 16px; border: none; border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: opacity 0.2s; }
.btn:hover { opacity: 0.85; }
.btn-primary { background: #3b82f6; color: #fff; }
.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-success { background: #10b981; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.site-list { display: flex; flex-direction: column; gap: 12px; }
.site-card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); display: flex; justify-content: space-between; align-items: center; }
.site-info { flex: 1; }
.site-name { font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.site-meta { font-size: 0.82rem; color: #64748b; margin-top: 4px; }
.site-balance { font-size: 1.3rem; font-weight: 700; text-align: right; min-width: 120px; }
.site-actions { display: flex; gap: 6px; margin-left: 12px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-ok { background: #22c55e; }
.status-low { background: #f59e0b; }
.status-error { background: #ef4444; }
.status-unknown { background: #94a3b8; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: 90%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-bottom: 16px; font-size: 1.2rem; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 0.85rem; font-weight: 500; color: #475569; }
.form-group input, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.95rem; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.2); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 0.9rem; z-index: 200; animation: fadeIn 0.3s; }
.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.low-badge { color: #f59e0b; font-size: 0.85rem; margin-left: 4px; }
.loading { opacity: 0.6; pointer-events: none; }
.login-overlay { position: fixed; inset: 0; background: #f1f5f9; display: flex; align-items: center; justify-content: center; z-index: 300; }
.login-box { background: #fff; border-radius: 16px; padding: 32px; width: 90%; max-width: 360px; box-shadow: 0 4px 24px rgba(0,0,0,0.1); text-align: center; }
.login-box h2 { font-size: 1.3rem; margin-bottom: 4px; }
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; }
  .site-card { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-balance { text-align: left; }
  .site-actions { margin-left: 0; }
}
