/* AliothPress — Installation Wizard Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
        .wizard { background: white; border-radius: 16px; max-width: 620px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
        .wizard-header { background: #2d3748; color: white; padding: 28px 36px 20px; }
        .wizard-header h1 { font-size: 24px; margin-bottom: 4px; }
        .wizard-header p { font-size: 13px; color: #a0aec0; }
        .progress-bar { display: flex; gap: 6px; margin-top: 18px; }
        .progress-step { flex: 1; height: 4px; background: #4a5568; border-radius: 2px; transition: background 0.3s; }
        .progress-step.active { background: #667eea; }
        .progress-step.done { background: #48bb78; }
        .wizard-body { padding: 32px 36px; }
        .step { display: none; }
        .step.active { display: block; }
        .step-title { font-size: 20px; font-weight: 700; color: #1a202c; margin-bottom: 6px; }
        .step-subtitle { font-size: 14px; color: #718096; margin-bottom: 24px; }
        .form-group { margin-bottom: 18px; }
        .form-group label { display: block; margin-bottom: 5px; color: #4a5568; font-weight: 500; font-size: 14px; }
        .form-group input, .form-group select { width: 100%; padding: 10px 14px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 14px; font-family: inherit; transition: border-color 0.2s; }
        .form-group input:focus, .form-group select:focus { outline: none; border-color: #667eea; }
        .help-text { font-size: 12px; color: #a0aec0; margin-top: 4px; }

        /* Database cards */
        .db-selector { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
        .db-option { flex: 1; min-width: 120px; padding: 14px 10px; border: 2px solid #e2e8f0; border-radius: 10px; cursor: pointer; text-align: center; transition: all 0.2s; }
        .db-option:hover { border-color: #a0aec0; }
        .db-option.selected { border-color: #667eea; background: #f0f4ff; }
        .db-option .db-icon { font-size: 26px; margin-bottom: 4px; }
        .db-option .db-name { font-weight: 600; font-size: 13px; color: #2d3748; }
        .db-option .db-desc { font-size: 11px; color: #718096; margin-top: 2px; line-height: 1.3; }

        /* DB sub-panels */
        .db-panel { display: none; margin-top: 8px; }
        .db-panel.visible { display: block; }

        /* Language grid */
        .lang-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
        .lang-option { padding: 12px 8px; border: 2px solid #e2e8f0; border-radius: 8px; cursor: pointer; text-align: center; font-size: 13px; font-weight: 500; transition: all 0.2s; color: #4a5568; }
        .lang-option:hover { border-color: #a0aec0; }
        .lang-option.selected { border-color: #667eea; background: #f0f4ff; color: #1a202c; }

        /* Buttons */
        .wizard-footer { display: flex; justify-content: space-between; padding: 0 36px 32px; }
        .btn { padding: 12px 28px; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
        .btn-back { background: #e2e8f0; color: #4a5568; }
        .btn-back:hover { background: #cbd5e0; }
        .btn-next { background: #667eea; color: white; }
        .btn-next:hover { background: #5568d3; }
        .btn-launch { background: linear-gradient(135deg, #48bb78, #38a169); color: white; width: 100%; padding: 14px; font-size: 16px; }
        .btn-launch:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(72,187,120,0.4); }
        .btn-hidden { visibility: hidden; }
        .btn-sm { padding: 9px 18px; font-size: 13px; border-radius: 6px; }
        .btn-test { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }
        .btn-test:hover { background: #bee3f8; }
        .btn-auto { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
        .btn-auto:hover { background: #c6f6d5; }
        .btn:disabled { opacity: 0.5; cursor: wait; }

        /* Hints & alerts */
        .info-hint { background: #ebf8ff; border-left: 3px solid #4299e1; padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: 13px; color: #2b6cb0; margin-bottom: 18px; line-height: 1.5; }
        .alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
        .alert-error { background: #fed7d7; color: #c53030; }
        .alert-info { background: #bee3f8; color: #2c5282; }

        /* Status box for auto-setup */
        .status-box { background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; margin-top: 12px; font-size: 13px; line-height: 1.7; max-height: 180px; overflow-y: auto; }
        .status-box .step-ok { color: #276749; }
        .status-box .step-ok::before { content: '✓ '; font-weight: bold; }
        .status-box .step-fail { color: #c53030; }
        .status-box .step-fail::before { content: '✗ '; font-weight: bold; }
        .status-box .step-wait { color: #718096; }
        .status-box .step-wait::before { content: '… '; }

        /* Test result inline */
        .test-result { margin-top: 10px; padding: 8px 12px; border-radius: 6px; font-size: 13px; display: none; }
        .test-result.ok { display: block; background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
        .test-result.fail { display: block; background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }

        /* Summary table */
        .summary-table { width: 100%; font-size: 14px; }
        .summary-table td { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
        .summary-table td:first-child { color: #718096; width: 140px; }
        .summary-table td:last-child { font-weight: 500; color: #2d3748; }

        /* Spinner */
        .spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #a0aec0; border-top-color: #667eea; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* Transition overlay (two-phase setup) */
        .setup-overlay { display:none; position:fixed; inset:0; background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); z-index:9999; align-items:center; justify-content:center; flex-direction:column; color:white; text-align:center; }
        .setup-overlay.visible { display:flex; }
        .setup-overlay h2 { font-size:26px; font-weight:700; margin-bottom:8px; }
        .setup-overlay p { font-size:15px; opacity:0.85; margin-bottom:30px; }
        .setup-overlay .big-spinner { width:48px; height:48px; border:4px solid rgba(255,255,255,0.3); border-top-color:white; border-radius:50%; animation:spin 0.8s linear infinite; margin-bottom:24px; }
        .setup-overlay .done-icon { font-size:48px; margin-bottom:16px; display:none; }
        .setup-overlay.done .big-spinner { display:none; }
        .setup-overlay.done .done-icon { display:block; }
        .setup-overlay .overlay-error { background:rgba(255,255,255,0.15); border-radius:8px; padding:12px 20px; margin-top:16px; font-size:13px; display:none; }

        /* ── RTL support (Arabic, Hebrew) ── */
        .wizard.rtl { direction: rtl; text-align: right; }
        .wizard.rtl .wizard-header { text-align: right; }
        .wizard.rtl .progress-bar { direction: ltr; }
        .wizard.rtl .info-hint { border-left: none; border-right: 3px solid #4299e1; border-radius: 6px 0 0 6px; }
        .wizard.rtl .form-group input,
        .wizard.rtl .form-group select { text-align: right; }
        .wizard.rtl .form-group input[type="email"],
        .wizard.rtl .form-group input[type="password"],
        .wizard.rtl .form-group input[style*="monospace"] { direction: ltr; text-align: left; }
        .wizard.rtl .help-text { text-align: right; }
        .wizard.rtl .spinner { margin-right: 0; margin-left: 6px; }
        .wizard.rtl .summary-table td:first-child { text-align: right; }
        .wizard.rtl .summary-table td:last-child { text-align: left; }
        .wizard.rtl .lang-grid { direction: ltr; }
        .wizard.rtl .db-selector { direction: ltr; }
        .wizard.rtl .wizard-footer { flex-direction: row-reverse; }

        /* ── EULA step ── */
        .eula-box { max-height: 320px; overflow-y: auto; border: 2px solid #e2e8f0; border-radius: 8px; padding: 20px 24px; margin-bottom: 18px; font-size: 13px; line-height: 1.7; color: #4a5568; background: #f7fafc; }
        .eula-box h2 { font-size: 16px; margin-bottom: 4px; color: #1a202c; }
        .eula-box h3 { font-size: 14px; margin: 14px 0 6px; color: #2d3748; }
        .eula-box p { margin-bottom: 8px; }
        .eula-box strong { color: #1a202c; }
        .eula-loading { text-align: center; padding: 40px; color: #a0aec0; }
        .eula-agree { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; background: #ebf8ff; border-radius: 8px; cursor: pointer; transition: background 0.2s; }
        .eula-agree:hover { background: #bee3f8; }
        .eula-agree input[type="checkbox"] { margin-top: 2px; width: 18px; height: 18px; flex-shrink: 0; accent-color: #667eea; cursor: pointer; }
        .eula-agree span { font-size: 14px; color: #2d3748; font-weight: 500; cursor: pointer; }
        .wizard.rtl .eula-agree { flex-direction: row-reverse; }