/* CodeCanyon Web Installer - Mira Theme & Modern Glass Layout */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --success: #10b981;
    --success-light: #ecfdf5;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --dark: #0f172a;
    --dark-card: #1e293b;
    --dark-border: #334155;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --radius: 12px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    color: var(--text-main);
}

.installer-container {
    width: 100%;
    max-width: 820px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.installer-header {
    background: #0f172a;
    color: #ffffff;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.installer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.installer-logo-badge {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.installer-brand-text h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.installer-brand-text p {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.installer-version-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Steps Progress Bar */
.installer-steps {
    display: flex;
    background: #1e293b;
    padding: 0 16px;
    border-bottom: 1px solid #334155;
    overflow-x: auto;
}

.step-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    position: relative;
    opacity: 0.5;
    transition: all 0.2s ease;
    cursor: default;
}

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

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

.step-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #334155;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-item.active .step-number {
    background: var(--primary);
    color: #ffffff;
}

.step-item.completed .step-number {
    background: var(--success);
    color: #ffffff;
}

.step-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
}

/* Body Content */
.installer-body {
    padding: 32px;
    min-height: 380px;
}

.step-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.pane-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.pane-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Alerts & Callouts */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Tables */
.check-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 13px;
}

.check-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.check-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

.check-table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-pass {
    background: #dcfce7;
    color: #15803d;
}

.badge-fail {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-warn {
    background: #fef3c7;
    color: #b45309;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

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

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

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
}

.form-label span.req {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.15s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-help {
    font-size: 11.5px;
    color: #64748b;
}

/* Footer / Actions */
.installer-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
}

/* Progress / Animation */
.install-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.log-box {
    background: #0f172a;
    color: #10b981;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    padding: 16px;
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
    line-height: 1.6;
    margin-top: 16px;
    text-align: left;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .installer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .installer-body {
        padding: 20px 16px;
    }
    .installer-footer {
        padding: 16px;
        flex-direction: column-reverse;
        gap: 12px;
    }
    .installer-footer .btn {
        width: 100%;
    }
}
