/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #1a1a2e; color: #e0e0e0; }
a { color: #64b5f6; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Navbar */
.navbar { display: flex; align-items: center; padding: 0 20px; height: 50px; background: #16213e; border-bottom: 1px solid #0f3460; }
.nav-brand { font-size: 18px; font-weight: bold; color: #e94560; margin-right: 40px; }
.nav-links { display: flex; gap: 20px; }
.nav-link { color: #a0a0c0; font-size: 14px; }
.nav-link:hover { color: #fff; text-decoration: none; }

/* Content */
.content { padding: 20px; max-width: 1400px; margin: 0 auto; }

/* Login */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.login-box { background: #16213e; padding: 40px; border-radius: 8px; text-align: center; min-width: 350px; }
.login-box h1 { color: #e94560; margin-bottom: 30px; font-size: 24px; }

/* Forms */
.form-group { margin-bottom: 15px; }
.input { width: 100%; padding: 10px 15px; background: #0f3460; border: 1px solid #333; border-radius: 4px; color: #e0e0e0; font-size: 14px; }
.input:focus { outline: none; border-color: #e94560; }

/* Buttons */
.btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; background: #0f3460; color: #e0e0e0; }
.btn:hover { background: #1a4a8a; }
.btn-primary { background: #e94560; color: #fff; }
.btn-primary:hover { background: #c73650; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { background: #8b0000; }
.btn-danger:hover { background: #a50000; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { background: #16213e; padding: 20px; border-radius: 8px; border: 1px solid #0f3460; }
.card h3 { color: #e94560; margin-bottom: 15px; font-size: 16px; }
.card p { margin: 5px 0; font-size: 14px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 10px; background: #0f3460; color: #a0a0c0; font-weight: normal; }
.table td { padding: 8px 10px; border-bottom: 1px solid #1a1a3e; }
.table tr:hover { background: #1a2a4e; }

/* Badges */
.badge { padding: 2px 8px; border-radius: 3px; font-size: 12px; }
.badge-ok { background: #1b5e20; color: #4caf50; }
.badge-err { background: #8b0000; color: #ef5350; }

/* Error & Success */
.error { color: #ef5350; margin: 10px 0; font-size: 14px; }
.success { color: #4caf50; margin: 10px 0; font-size: 14px; }

/* Warning banner */
.warning-banner { background: #5c3c00; border: 1px solid #ff9800; color: #ffcc02; padding: 12px 20px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; }
.warning-banner a { color: #fff; font-weight: bold; text-decoration: underline; }

/* Files */
.files-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; margin-bottom: 10px; }
.path-display { font-family: monospace; font-size: 14px; color: #64b5f6; }

/* Editor toolbar */
.editor-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.editor-toolbar .toolbar-actions { display: flex; gap: 10px; }

/* Database page */
.database-page .card { margin-bottom: 20px; }
.database-page .form-group { margin-bottom: 12px; }
.database-page .form-group label { display: block; margin-bottom: 4px; font-size: 13px; color: #a0a0c0; }
.database-page .form-row { display: flex; gap: 15px; }
.database-page .form-row .form-group { flex: 1; }
.database-page .output { margin-top: 12px; padding: 10px; background: #0a0a1a; border: 1px solid #333; border-radius: 4px; font-size: 12px; max-height: 300px; overflow-y: auto; white-space: pre-wrap; }
.database-page .card-actions { margin-top: 12px; }
.status-ok { color: #4caf50; font-weight: bold; }
.status-warn { color: #ff9800; font-weight: bold; }
