/* ==========================================
   INSTALLER REGISTRATION FORM STYLES
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-light: #34D399;
    --secondary: #1F2937;
    --accent: #F59E0B;
    --danger: #EF4444;
    --text-dark: #111827;
    --text-light: #6B7280;
    --text-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 20px;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
}

/* ==========================================
   HEADER
   ========================================== */
.register-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 35px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.btn-login {
    background: var(--secondary);
    color: var(--text-white);
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--text-dark);
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.register-main {
    padding: 30px;
    min-height: calc(100vh - 70px);
}

/* ==========================================
   SUCCESS STATE
   ========================================== */
.success-container {
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
    background: var(--bg-white);
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.success-icon {
    width: 100px;
    height: 100px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.success-icon i {
    font-size: 3rem;
    color: var(--primary);
}

.success-container h1 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.success-container > p {
    color: var(--text-light);
    margin-bottom: 40px;
}

.success-info {
    text-align: left;
    margin-bottom: 40px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

.info-item h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.info-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ==========================================
   REGISTRATION CONTAINER
   ========================================== */
.register-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    min-height: calc(100vh - 130px);
}

/* Sidebar */
.register-sidebar {
    background: linear-gradient(180deg, var(--secondary) 0%, #111827 100%);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    color: var(--text-white);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.register-sidebar h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.4;
}

.sidebar-benefits {
    margin-bottom: 40px;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.benefit:last-child {
    border-bottom: none;
}

.benefit i {
    color: var(--primary);
    font-size: 1rem;
}

.benefit span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.progress-steps .step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-steps .step.active,
.progress-steps .step.completed {
    opacity: 1;
}

.progress-steps .step::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 50px;
    width: 2px;
    height: calc(100% - 20px);
    background: rgba(255, 255, 255, 0.2);
}

.progress-steps .step:last-child::after {
    display: none;
}

.progress-steps .step.completed::after {
    background: var(--primary);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step.active .step-number {
    background: var(--primary);
}

.step.completed .step-number {
    background: var(--primary);
}

.step.completed .step-number::after {
    content: '✓';
}

.step-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.step-desc {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ==========================================
   FORM WRAPPER
   ========================================== */
.register-form-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}

/* Error Box */
.error-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(239, 68, 68, 0.1);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    border-left: 4px solid var(--danger);
}

.error-box i {
    color: var(--danger);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-box strong {
    display: block;
    color: var(--danger);
    margin-bottom: 10px;
}

.error-box ul {
    list-style: none;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.error-box ul li {
    padding: 3px 0;
}

.error-box ul li::before {
    content: '• ';
    color: var(--danger);
}

/* ==========================================
   FORM STEPS
   ========================================== */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    margin-bottom: 30px;
}

.step-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--danger);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.required {
    color: var(--danger);
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

select {
    cursor: pointer;
    background: var(--bg-white) url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%236B7280" d="M6 8L1 3h10z"/></svg>') no-repeat right 16px center;
    appearance: none;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

small {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ==========================================
   PASSWORD (Strength + Inline Checks)
   ========================================== */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 46px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    cursor: pointer;
    user-select: none;
}

.toggle-password:hover {
    color: var(--text-dark);
}

.password-strength-container {
    margin-top: 10px;
}

.strength-bar-bg {
    width: 100%;
    height: 8px;
    background: #E5E7EB;
    border-radius: 999px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 180ms ease;
}

.strength-text {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--danger);
}

.password-requirements {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.requirement .req-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    color: var(--text-light);
}

.requirement.met {
    color: var(--primary-dark);
}

.requirement.met .req-icon {
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--primary-dark);
}

.password-mismatch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #B91C1C;
    font-weight: 700;
    font-size: 0.85rem;
}

.inline-error {
    display: block;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #B91C1C;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ==========================================
   FILE UPLOADS
   ========================================== */
.upload-group {
    margin-bottom: 30px;
}

.upload-group > label {
    font-size: 1rem;
    margin-bottom: 5px;
}

.upload-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.02);
}

.file-upload.has-files {
    border-style: solid;
    border-color: var(--primary);
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-placeholder i {
    font-size: 2.5rem;
    color: var(--primary);
}

.upload-placeholder span {
    font-weight: 500;
    color: var(--text-dark);
}

.upload-placeholder small {
    color: var(--text-light);
}

.file-upload.has-files .upload-placeholder {
    display: none;
}

.upload-preview {
    display: none;
}

.file-upload.has-files .upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.preview-item {
    width: 120px;
}

.preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.preview-item video {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.file-name {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 5px;
    word-break: break-all;
}

.file-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon i {
    font-size: 2rem;
    color: var(--danger);
}

/* Video Tips */
.video-tips {
    background: rgba(245, 158, 11, 0.1);
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.video-tips h4 {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-tips ul {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.video-tips ul li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.video-tips ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.upload-group.error .file-upload {
    border-color: var(--danger);
}

/* ==========================================
   AGREEMENT
   ========================================== */
.agreement-box {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius);
}

.agreement-box h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.agreement-content {
    margin-bottom: 25px;
}

.agreement-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.agreement-item:last-child {
    border-bottom: none;
}

.agreement-item i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.agreement-item.warning i {
    color: var(--accent);
}

.agreement-item strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.agreement-item p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Checkbox */
.agreement-checkbox {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.checkbox-label input {
    width: auto;
    margin-top: 3px;
}

.agreement-checkbox.error .checkbox-label {
    color: var(--danger);
}

/* ==========================================
   FORM ACTIONS
   ========================================== */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.btn-prev,
.btn-next,
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.btn-prev {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-prev:hover {
    background: var(--border);
}

.btn-next,
.btn-submit {
    background: var(--primary);
    color: var(--text-white);
    margin-left: auto;
}

.btn-next:hover,
.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-submit:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: var(--text-white);
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .register-container {
        grid-template-columns: 1fr;
    }
    
    .register-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .register-sidebar h2 {
        grid-column: 1 / -1;
    }
    
    .progress-steps {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .progress-steps .step {
        flex: 1;
        min-width: calc(50% - 10px);
        padding: 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius);
    }
    
    .progress-steps .step::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .register-main {
        padding: 15px;
    }
    
    .register-sidebar {
        grid-template-columns: 1fr;
        padding: 25px 20px;
    }
    
    .sidebar-benefits {
        display: none;
    }
    
    .register-form-wrapper {
        padding: 25px 20px;
        max-height: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-next,
    .btn-submit {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .btn-prev {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .header-right span {
        display: none;
    }
}

@media (max-width: 480px) {
    .progress-steps .step {
        min-width: 100%;
    }
    
    .step-header h2 {
        font-size: 1.3rem;
    }
    
    .agreement-box {
        padding: 20px 15px;
    }
}
