.db-grid { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; }
.db-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.db-panel h3 { margin-bottom: 1.25rem; font-size: 1.05rem; }
.db-panel--wide { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.db-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.db-table th, .db-table td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.db-table th { color: var(--text-muted); font-weight: 600; background: var(--surface2); }
.db-table tbody tr:hover { background: var(--surface2); }
.pass-cell { display: flex; align-items: center; gap: .5rem; }
.pass-toggle { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: .85rem; }
.login-sim { max-width: 480px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.login-sim h3 { margin-bottom: .5rem; }
.login-sim p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.5rem; }
.login-form { margin-bottom: 1rem; }
.login-result { padding: 1rem; border-radius: 8px; margin-top: 1rem; font-weight: 600; }
.login-result.success { background: rgba(34,197,94,.15); border: 1px solid var(--success); color: var(--success); }
.login-result.error { background: rgba(239,68,68,.15); border: 1px solid var(--danger); color: var(--danger); }
.json-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.json-panel__header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.json-view { background: #0d1117; padding: 1.5rem; font-size: .85rem; color: #e6edf3; overflow: auto; max-height: 400px; font-family: monospace; }
.apps-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
@media (max-width: 768px) { .db-grid { grid-template-columns: 1fr; } }
/* ── Environment Panel (Simular Login) ──────────────── */
.env-error { color: #ef4444; font-size: .9rem; }

.env-panel { background: #0a0e1a; border: 1px solid #1e293b; border-radius: 14px; overflow: hidden; }
.env-header { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; background: linear-gradient(135deg,#7c3aed15,#06b6d415); border-bottom: 1px solid #1e293b; flex-wrap: wrap; }
.env-avatar { width: 52px; height: 52px; background: #1e293b; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; border: 2px solid #7c3aed; flex-shrink: 0; }
.env-identity { flex: 1; }
.env-username { display: block; font-size: 1.2rem; font-weight: 800; color: #f1f5f9; }
.env-level { background: #7c3aed30; color: #c4b5fd; border-radius: 999px; padding: .15rem .6rem; font-size: .75rem; font-weight: 700; margin-right: .4rem; }
.env-since { color: #64748b; font-size: .75rem; }
.env-badge { background: #22c55e20; color: #22c55e; border: 1px solid #22c55e40; border-radius: 999px; padding: .25rem .75rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.env-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: #1e293b; border-bottom: 1px solid #1e293b; }
.env-stat { background: #0f172a; padding: .9rem; text-align: center; }
.env-stat__val { display: block; font-size: 1.1rem; font-weight: 800; color: #f1f5f9; }
.env-stat__lbl { font-size: .7rem; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }

.env-creds { padding: .9rem 1.25rem; background: #050810; border-bottom: 1px solid #1e293b; font-size: .85rem; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.env-creds__label { color: #64748b; }
.env-creds code { background: #1e293b; color: #4ade80; padding: .2rem .5rem; border-radius: 6px; font-size: .85rem; }

.env-apps-section { padding: 1.25rem; }
.env-apps-section h4 { color: #f1f5f9; font-size: .9rem; margin-bottom: .9rem; }
.env-apps-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(110px,1fr)); gap: .6rem; }
.env-app { background: color-mix(in srgb, var(--ac,#7c3aed) 10%, #111827); border: 1px solid color-mix(in srgb, var(--ac,#7c3aed) 30%, transparent); border-radius: 10px; padding: .75rem .5rem; text-align: center; display: flex; flex-direction: column; gap: .25rem; }
.env-app__icon { font-size: 1.5rem; }
.env-app__name { color: #f1f5f9; font-size: .78rem; font-weight: 700; }
.env-app__cat  { color: #64748b; font-size: .65rem; }
.env-empty { color: #475569; font-size: .85rem; }

@media(max-width:600px) { .env-stats { grid-template-columns: repeat(2,1fr); } }
