:root {
    --bg-color: #0f172a;
    --card-bg: rgba(15, 23, 42, 0.75);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --border: #334155;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-image: url('bg.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #0f172a;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header p { color: var(--text-secondary); margin-top: 0.5rem; }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hidden { display: none !important; }

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

input:focus { border-color: var(--primary); }

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
    font-family: inherit;
}

button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

#login-btn { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }

.status-panel { margin-bottom: 2rem; }

.status-panel p {
    margin-top: 1rem;
    background: rgba(0,0,0,0.2);
    padding: 0.75rem;
    border-radius: 4px;
    font-family: monospace;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    vertical-align: middle;
}
.badge.running { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge.terminated { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge.unknown { background: rgba(148, 163, 184, 0.2); color: var(--text-secondary); }

.status-panel { margin-bottom: 1.5rem; }

.backup-panel {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.select-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    cursor: pointer;
}

.select-input:focus { border-color: var(--primary); }

.controls {
    display: flex;
    gap: 1rem;
}

.controls button { flex: 1; }

.error-text { color: var(--danger); font-size: 0.875rem; margin-top: 0.75rem; }
.info-text { color: var(--text-secondary); font-size: 0.875rem; margin-top: 1rem; text-align: center; }

/* ─── Server tabs ──────────────────────────────────────────────────────────── */
#tab-bar { display: flex; gap: 8px; margin-bottom: 16px; }

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover { border-color: var(--primary); color: var(--text-primary); }
.tab-btn.active { border-color: var(--primary); background: #1d3a6b; color: var(--text-primary); }
