/**
 * EdumacFlo Automated Installer — Styling
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.85);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.12);
    --input-bg: #1e293b;
    --input-border: #334155;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.35);
    --accent: #38bdf8;
    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.12);
    --yellow: #f59e0b;
    --yellow-bg: rgba(245, 158, 11, 0.12);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.12);
    --radius: 12px;
    --font: 'Inter', system-ui, sans-serif;
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 16px;
}

.installer-container {
    width: 100%;
    max-width: 860px;
}

/* Header & Branding */
.installer-header {
    text-align: center;
    margin-bottom: 24px;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.installer-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.installer-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Step Wizard Navigation */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.45;
    transition: all 0.25s ease;
    cursor: default;
    user-select: none;
}

.step-item.active {
    opacity: 1;
}

.step-item.completed {
    opacity: 0.85;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.step-item.active .step-circle {
    background: var(--primary);
    border-color: #818cf8;
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}

.step-item.completed .step-circle {
    background: var(--green);
    border-color: #86efac;
    color: #064e3b;
}

.step-text {
    display: flex;
    flex-direction: column;
}

.step-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.step-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Step Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    margin-bottom: 20px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 24px;
}

/* Deployment Mode Cards */
.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.mode-option {
    background: #131d2f;
    border: 2px solid var(--card-border);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.mode-option:hover {
    border-color: rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
}

.mode-option.selected {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.2);
}

.mode-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.mode-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.mode-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.mode-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group.full {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #cbd5e1;
}

.form-group input, 
.form-group select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group .help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Requirements Table */
.req-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.req-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--card-border);
}

.req-table td {
    padding: 12px 14px;
    font-size: 0.86rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.req-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.req-badge.pass { background: var(--green-bg); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.25); }
.req-badge.warn { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(245, 158, 11, 0.25); }
.req-badge.fail { background: var(--red-bg); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.25); }

/* Progress & Execution Console */
.progress-bar-wrap {
    height: 10px;
    background: #1e293b;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 6px;
    transition: width 0.4s ease;
}

.terminal-box {
    background: #060911;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #94a3b8;
    height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.terminal-line {
    display: flex;
    gap: 8px;
}

.terminal-line .t-time {
    color: #475569;
}

.terminal-line .t-ok {
    color: var(--green);
}

.terminal-line .t-err {
    color: var(--red);
}

/* Success Card */
.success-banner {
    text-align: center;
    padding: 24px 10px;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--green-bg);
    border: 2px solid var(--green);
    color: var(--green);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.3);
}

.credentials-box {
    background: #131d2f;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.cred-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.86rem;
}

.cred-row:last-child {
    border-bottom: none;
}

.cred-label {
    color: var(--text-muted);
}

.cred-val {
    font-weight: 600;
    font-family: var(--font-mono);
    color: #fff;
}

/* Alert Boxes */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.86rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-info {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #bae6fd;
}

.alert-success {
    background: var(--green-bg);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #bbf7d0;
}

.alert-danger {
    background: var(--red-bg);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fecaca;
}

/* Action Buttons */
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-ghost {
    background: #1e293b;
    border: 1px solid var(--card-border);
    color: #cbd5e1;
}

.btn-ghost:hover {
    background: #334155;
    color: #fff;
}

.btn-success {
    background: var(--green);
    color: #064e3b;
    font-weight: 700;
}

.btn-success:hover {
    background: #16a34a;
    color: #fff;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .mode-grid, .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full {
        grid-column: span 1;
    }
    .step-desc {
        display: none;
    }
    .step-title {
        font-size: 0.78rem;
    }
}
