/* Kinetikum ERP Installation Wizard */
* { box-sizing: border-box; }
body {
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: #333;
}

#wizard-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.wizard-header {
    background: rgba(255,255,255,0.1);
    padding: 15px 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area .fa { font-size: 28px; color: #fff; }
.logo-area .brand { font-size: 20px; font-weight: 700; color: #fff; }
.logo-area .label-installer { font-size: 13px; color: rgba(255,255,255,0.7); margin-left: 8px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.3); }

/* Body */
.wizard-body { flex: 1; padding: 30px 0; }
.container { max-width: 960px; margin: 0 auto; padding: 0 15px; }

/* Step Tracker */
.step-tracker { display: flex; justify-content: center; margin-bottom: 30px; gap: 4px; flex-wrap: wrap; }
.step-dot {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    transition: all 0.3s;
    position: relative;
}
.step-dot.completed { background: #4caf50; color: #fff; }
.step-dot.active { background: #fff; color: #1a237e; box-shadow: 0 0 0 3px rgba(255,255,255,0.3); transform: scale(1.15); }
.step-dot + .step-dot::before {
    content: ''; position: absolute; left: -14px; top: 50%;
    width: 10px; height: 2px; background: rgba(255,255,255,0.2);
}
.step-dot.completed + .step-dot::before, .step-dot.completed + .step-dot.active::before { background: #4caf50; }

.step-label { text-align: center; color: rgba(255,255,255,0.7); font-size: 12px; margin-top: 6px; }

/* Card */
.wizard-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 35px 40px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.wizard-card h2 { margin: 0 0 5px; font-size: 24px; font-weight: 700; color: #1a237e; }
.wizard-card .subtitle { color: #666; margin-bottom: 25px; font-size: 14px; }

/* Form elements */
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 5px; color: #444; font-size: 13px; }
.form-row label .required { color: #e53935; margin-left: 2px; }
.form-row .hint { font-size: 12px; color: #888; margin-top: 3px; }

.form-input {
    width: 100%; padding: 10px 12px;
    border: 1px solid #ddd; border-radius: 6px;
    font-size: 14px; color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus { border-color: #3f51b5; box-shadow: 0 0 0 3px rgba(63,81,181,0.1); }
select.form-input { height: 42px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* Buttons */
.wizard-actions { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.btn-wiz {
    padding: 10px 24px; border-radius: 6px; font-size: 14px; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none;
}
.btn-wiz-primary { background: #3f51b5; color: #fff; }
.btn-wiz-primary:hover { background: #303f9f; color: #fff; text-decoration: none; }
.btn-wiz-secondary { background: #f5f5f5; color: #555; border: 1px solid #ddd; }
.btn-wiz-secondary:hover { background: #eee; color: #333; text-decoration: none; }
.btn-wiz-success { background: #4caf50; color: #fff; }
.btn-wiz-success:hover { background: #43a047; color: #fff; text-decoration: none; }
.btn-wiz-danger { background: #e53935; color: #fff; }
.btn-wiz-danger:hover { background: #c62828; }
.btn-wiz-test { background: #ff9800; color: #fff; font-size: 13px; padding: 8px 16px; }
.btn-wiz-test:hover { background: #f57c00; }

.btn-wiz:disabled { opacity: 0.5; cursor: not-allowed; }

/* Alert */
.alert-box { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 13px; }
.alert-box.error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.alert-box.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-box.info { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.alert-box.warning { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }

/* Check table */
.check-table { width: 100%; border-collapse: collapse; }
.check-table th { background: #f5f5f5; padding: 10px 12px; text-align: left; font-size: 13px; font-weight: 600; border-bottom: 2px solid #ddd; }
.check-table td { padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 13px; }
.check-table tr:last-child td { border-bottom: none; }
.check-pass { color: #4caf50; font-weight: 600; }
.check-fail { color: #e53935; font-weight: 600; }
.check-warn { color: #ff9800; font-weight: 600; }

/* Profile cards */
.profile-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 20px; }
.profile-card {
    border: 2px solid #e0e0e0; border-radius: 8px; padding: 16px;
    cursor: pointer; transition: all 0.2s; position: relative;
}
.profile-card:hover { border-color: #3f51b5; background: #f8f9ff; }
.profile-card.selected { border-color: #3f51b5; background: #e8eaf6; }
.profile-card .card-title { font-weight: 700; font-size: 14px; color: #1a237e; margin-bottom: 4px; }
.profile-card .card-desc { font-size: 12px; color: #666; line-height: 1.4; }
.profile-card .card-check {
    position: absolute; top: 10px; right: 10px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #4caf50; color: #fff; display: none;
    align-items: center; justify-content: center; font-size: 12px;
}
.profile-card.selected .card-check { display: flex; }

/* Radio cards */
.radio-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 15px; }
.radio-card {
    border: 2px solid #e0e0e0; border-radius: 8px; padding: 14px;
    cursor: pointer; transition: all 0.2s;
}
.radio-card:hover { border-color: #7986cb; }
.radio-card.selected { border-color: #3f51b5; background: #e8eaf6; }
.radio-card .rc-title { font-weight: 700; font-size: 13px; color: #333; }
.radio-card .rc-desc { font-size: 12px; color: #666; margin-top: 4px; }

/* Module grid */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.module-item {
    border: 2px solid #e0e0e0; border-radius: 8px; padding: 14px;
    display: flex; align-items: flex-start; gap: 12px;
    cursor: pointer; transition: all 0.2s;
}
.module-item:hover { border-color: #7986cb; }
.module-item.selected { border-color: #3f51b5; background: #e8eaf6; }
.module-item.core { border-color: #a5d6a7; background: #f1f8e9; }
.module-item .mi-icon { font-size: 24px; color: #3f51b5; min-width: 30px; text-align: center; padding-top: 2px; }
.module-item .mi-name { font-weight: 700; font-size: 13px; color: #333; }
.module-item .mi-desc { font-size: 11px; color: #666; margin-top: 2px; }
.module-item .mi-badge { display: inline-block; font-size: 10px; padding: 2px 6px; border-radius: 3px; background: #e8eaf6; color: #3f51b5; margin-top: 4px; font-weight: 600; }

/* Progress */
.install-progress { margin-top: 20px; }
.progress-bar-wrap { background: #e0e0e0; border-radius: 8px; height: 10px; overflow: hidden; margin-bottom: 15px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #3f51b5, #4caf50); border-radius: 8px; transition: width 0.5s ease; width: 0%; }
.install-log {
    background: #263238; color: #b0bec5; border-radius: 8px;
    padding: 16px; font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px; max-height: 300px; overflow-y: auto; line-height: 1.8;
}
.install-log .log-ok { color: #81c784; }
.install-log .log-err { color: #ef5350; }
.install-log .log-info { color: #4fc3f7; }

/* IndoHRM section */
.indohrm-toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 12px; background: #f5f5f5; border-radius: 8px; }
.indohrm-toggle label { margin: 0; font-weight: 600; }
.indohrm-config { display: none; }
.indohrm-config.visible { display: block; }

/* Test result */
.test-result { padding: 10px 14px; border-radius: 6px; margin-top: 10px; font-size: 13px; display: none; }
.test-result.visible { display: block; }

/* Welcome features */
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.feature-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: #f8f9ff; border-radius: 8px; }
.feature-item .fi-icon { font-size: 20px; color: #3f51b5; min-width: 28px; text-align: center; }
.feature-item .fi-title { font-weight: 700; font-size: 13px; color: #333; }
.feature-item .fi-desc { font-size: 12px; color: #666; }
@media (max-width: 600px) { .feature-list { grid-template-columns: 1fr; } }

/* Installed page */
.installed-card { text-align: center; padding: 40px; }
.installed-card .big-icon { font-size: 64px; color: #4caf50; margin-bottom: 15px; }

/* Summary grid */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.summary-section { background: #f8f9ff; border-radius: 8px; padding: 16px; }
.summary-section h4 { margin: 0 0 10px; font-size: 14px; color: #1a237e; }
.summary-section .s-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.summary-section .s-label { color: #666; }
.summary-section .s-value { font-weight: 600; color: #333; }
@media (max-width: 600px) { .summary-grid { grid-template-columns: 1fr; } }

/* Footer */
.wizard-footer {
    background: rgba(0,0,0,0.15);
    padding: 12px 0;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}
.wizard-footer .pull-left { float: left; }
.wizard-footer .pull-right { float: right; }
.clearfix::after { content: ''; display: table; clear: both; }

/* Checkbox toggle */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #ccc; border-radius: 24px; transition: 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #4caf50; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Sync checkboxes */
.sync-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.sync-opt { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; cursor: pointer; }
.sync-opt:hover { border-color: #3f51b5; }
.sync-opt input[type="checkbox"] { margin: 0; }
