/* Convivamos Release Dashboard — Minimal, functional CSS */

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-hover: #232636;
    --border: #2a2d3a;
    --text: #e1e4ed;
    --text-muted: #8b8fa3;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --danger: #ef4444;
    --danger-hover: #f87171;
    --success: #22c55e;
    --warning: #eab308;
    --blue: #3b82f6;
    --green: #22c55e;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.nav-brand { font-weight: 700; font-size: 16px; }
.nav-links { display: flex; gap: 16px; }
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

/* Container */
.container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.card h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Slot cards */
.slot-card { position: relative; }
.slot-active { border-color: var(--success); border-width: 2px; }
.slot-standby { opacity: 0.7; }
.slot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.slot-badge {
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 4px;
    text-transform: uppercase;
}
.slot-blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.slot-green { background: rgba(34, 197, 94, 0.15); color: var(--green); }

.status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
.status-badge.active { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.status-badge.standby { background: rgba(139, 143, 163, 0.15); color: var(--text-muted); }

.slot-info { display: flex; flex-direction: column; gap: 8px; }
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.info-label { color: var(--text-muted); }
.info-value { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; }

/* Canary bar */
.canary-card { border-color: var(--warning); }
.canary-card h3 { font-size: 14px; margin-bottom: 12px; color: var(--warning); }
.canary-bar {
    height: 24px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.canary-active {
    height: 100%;
    background: var(--warning);
    color: var(--bg);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-hover); }
.btn-full { width: 100%; }

.actions-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Log output */
.log-output {
    background: #000;
    color: #0f0;
    padding: 16px;
    border-radius: var(--radius);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.table .row-failed { background: rgba(239, 68, 68, 0.08); }
.text-mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; }
.text-muted { color: var(--text-muted); }

/* Badges */
.action-badge, .result-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.action-badge.deploy { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.action-badge.rollback { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.result-badge.success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.result-badge.failed { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Login */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 380px;
}
.login-card h1 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 24px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-error { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Iframes */
iframe {
    border-radius: var(--radius);
    background: var(--surface);
}

/* Build form */
.form-group-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.form-group-inline label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group-inline select {
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}
.form-group-inline select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .actions-row { flex-wrap: wrap; }
}
