@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #090d16;
  --panel-bg: #111827;
  --card-bg: #1f2937;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --secondary: #374151;
  --secondary-hover: #4b5563;
  --border: #1f2937;
  --border-light: #374151;
  --success: #10b981;
  --error: #ef4444;
  --accent: #8b5cf6;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; }
body { background: var(--bg); color: var(--text); padding: 0; min-height: 100vh; }

.hidden { display: none !important; }

header { background: var(--panel-bg); border-bottom: 1px solid var(--border-light); padding: 16px 32px; display: flex; justify-content: space-between; align-items: center; }
header h1 { font-size: 1.25rem; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 10px; }
header h1::before { content: ''; display: inline-block; width: 12px; height: 12px; background: var(--primary); border-radius: 50%; }

.container { max-width: 1200px; margin: 32px auto; padding: 0 24px; display: flex; flex-direction: column; gap: 32px; }

.card { background: var(--panel-bg); padding: 24px; border-radius: 12px; border: 1px solid var(--border-light); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
h2 { font-size: 1.1rem; font-weight: 600; color: #fff; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
input, select { padding: 10px 14px; background: var(--bg); border: 1px solid var(--border-light); border-radius: 8px; color: var(--text); font-size: 0.9rem; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

button { padding: 10px 18px; border: none; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 0.875rem; transition: all 0.15s ease; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); color: var(--text); }
.btn-secondary:hover { background: var(--secondary-hover); }
.logout-btn { background: transparent; border: 1px solid var(--border-light); color: var(--text-muted); }
.logout-btn:hover { background: var(--secondary); color: #fff; }

.preset-buttons { display: flex; gap: 8px; margin-bottom: 6px; }
.preset-buttons button { padding: 6px 12px; font-size: 0.75rem; background: var(--secondary); color: var(--text); border-radius: 6px; }
.preset-buttons button:hover { background: var(--primary); color: #fff; }

.table-wrapper { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border-light); }
.history-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; background: var(--panel-bg); }
.history-table th, .history-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.history-table th { background: var(--bg); color: var(--text-muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.history-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; display: inline-block; }
.status-SUCCESS { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-FAILED { background: rgba(239, 68, 68, 0.15); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.3); }
.status-RUNNING { background: rgba(59, 130, 246, 0.15); color: var(--primary); border: 1px solid rgba(59, 130, 246, 0.3); animation: pulse 1.5s infinite; }

@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

.status-msg { font-size: 0.875rem; font-weight: 500; margin-left: 12px; }
.error { color: var(--error); }

.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-content { background: var(--panel-bg); padding: 32px; border-radius: 12px; border: 1px solid var(--border-light); width: 100%; max-width: 450px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); }

.connection-card { background: var(--bg); border: 1px solid var(--border-light); border-radius: 8px; padding: 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.connection-info h4 { font-size: 0.95rem; margin-bottom: 4px; color: #fff; }
.connection-info p { font-size: 0.8rem; color: var(--text-muted); }

.badge-default { background: var(--accent); color: #fff; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-left: 8px; font-weight: normal; }
