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

/* Login */
#login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); width: 360px; }
.login-box h2 { margin-bottom: 1rem; }
.login-box input { width: 100%; padding: 0.5rem; margin-bottom: 0.75rem; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.login-box button { width: 100%; padding: 0.5rem; background: #2563eb; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }

/* Layout */
#app { display: none; }
.header { background: #1e293b; color: #fff; padding: 0.75rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 1.1rem; }
.header button { background: #475569; color: #fff; border: none; padding: 0.4rem 0.8rem; border-radius: 4px; cursor: pointer; font-size: 13px; }
.main { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem; }

/* Toolbar */
.toolbar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar button { padding: 0.4rem 0.8rem; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.toolbar button.primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.toolbar button.danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.toolbar button.success { background: #16a34a; color: #fff; border-color: #16a34a; }

/* Table */
.table-wrap { background: #fff; border-radius: 8px; overflow-x: auto; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid #eee; white-space: nowrap; }
th { background: #f8fafc; font-weight: 600; position: sticky; top: 0; }
tr:hover { background: #f8fafc; }
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-free { background: #dbeafe; color: #1d4ed8; }
.badge-premium { background: #fef3c7; color: #b45309; }
.badge-tag { background: #e0e7ff; color: #4338ca; margin-right: 0.2rem; }
.badge-healthy { background: #dcfce7; color: #166534; }
.badge-unhealthy { background: #fecaca; color: #991b1b; }
.badge-unknown { background: #e5e7eb; color: #6b7280; }
.badge-enabled { background: #dcfce7; color: #166534; }
.badge-disabled { background: #fecaca; color: #991b1b; }
td .actions button { padding: 0.2rem 0.5rem; margin-right: 0.3rem; border: 1px solid #ddd; background: #fff; border-radius: 3px; cursor: pointer; font-size: 12px; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 8px; padding: 1.5rem; width: 560px; max-height: 85vh; overflow-y: auto; }
.modal h3 { margin-bottom: 1rem; }
.form-group { margin-bottom: 0.75rem; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 0.25rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.4rem; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; font-family: inherit; }
.form-group textarea { height: 120px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.form-actions button { padding: 0.4rem 1rem; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; }
.form-actions button.primary { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Toast */
.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; padding: 0.75rem 1rem; border-radius: 6px; color: #fff; font-size: 13px; z-index: 200; animation: fadeIn 0.2s; }
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Cache panel */
.cache-panel { background: #fff; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.cache-panel h3 { margin-bottom: 0.5rem; font-size: 14px; }
.cache-info { font-size: 12px; color: #6b7280; font-family: monospace; }
