/**
 * PV GreenCard Registration - Styles
 * Clean, modern design system
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-color: #009345;
    --primary-dark: #007a3a;
    --primary-light: #00b354;
    --secondary-color: #062539;
    --accent-color: #f4a100;
    
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-dark: #062539;
    
    --border-color: #dee2e6;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    --transition: all 0.3s ease;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.registration-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========================================
   Header Styles
   ======================================== */
.registration-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.logo-container .logo {
    max-height: 80px;
    width: auto;
}

.logo-container h1 {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================
   Progress Steps
   ======================================== */
.steps-container {
    padding: 16px 0;
}

.steps-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-muted);
    transition: var(--transition);
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    transition: var(--transition);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    max-width: 80px;
    margin: 0 8px;
    margin-bottom: 28px;
    transition: var(--transition);
}

/* Step States */
.step-item.active .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(0, 147, 69, 0.2);
}

.step-item.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step-item.complete .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step-item.complete .step-label {
    color: var(--primary-color);
}

.step-connector.complete {
    background: var(--primary-color);
}

.step-item.disabled .step-number {
    opacity: 0.5;
}

.step-item.disabled .step-label {
    opacity: 0.5;
}

/* ========================================
   Main Content
   ======================================== */
.registration-content {
    flex: 1;
    padding: 32px 0;
}

.form-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.form-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px 32px;
    text-align: center;
}

.form-card-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.form-card-header p {
    margin: 8px 0 0;
    opacity: 0.9;
    font-size: 15px;
}

.form-card-body {
    padding: 32px;
}

/* ========================================
   Form Styles
   ======================================== */
.form-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title i {
    color: var(--primary-color);
}

.form-section-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 14px;
}

.form-label.required::after {
    content: ' *';
    color: #dc3545;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 147, 69, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Input Group */
.input-icon {
    position: relative;
}

.input-icon .form-control {
    padding-left: 44px;
}

.input-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    padding: 12px 24px;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-size: 15px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   Token Input (Email Verification)
   ======================================== */
.token-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.token-input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.token-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 147, 69, 0.15);
    outline: none;
}

.token-input.filled {
    border-color: var(--primary-color);
    background: rgba(0, 147, 69, 0.05);
}

/* ========================================
   File Upload
   ======================================== */
.file-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
    min-height: 160px;
    height: 160px;
}

/* Documents upload row - equal height columns */
.row.g-4 > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.row.g-4 > [class*="col-"] .form-label {
    min-height: 40px;
    display: flex;
    align-items: flex-start;
}

.file-upload-zone:hover {
    border-color: var(--primary-color);
    background: rgba(0, 147, 69, 0.02);
}

.file-upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 147, 69, 0.05);
}

.file-upload-zone.has-file {
    border-color: var(--primary-color);
    border-style: solid;
}

.file-upload-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.file-upload-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.file-upload-text strong {
    color: var(--primary-color);
}

/* ========================================
   Payment Options
   ======================================== */
.payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    height: 100%;
    min-height: 280px;
}

.payment-option .btn,
.payment-option button {
    margin-top: auto;
}

.payment-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.payment-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 147, 69, 0.02);
}

.payment-option-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.payment-option-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.payment-option-description {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Fee Display */
.fee-display {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0a3a5c 100%);
    color: white;
    padding: 20px 24px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 24px;
}

.fee-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.fee-amount {
    font-size: 32px;
    font-weight: 700;
}

/* ========================================
   Sponsors Section
   ======================================== */
.sponsors-section {
    background: linear-gradient(135deg, #009345 0%, #007a3a 100%);
    border-top: none;
}

.sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.sponsor-logo {
    max-height: 50px;
    width: auto;
    opacity: 0.85;
    transition: var(--transition);
    filter: none;
}

.sponsor-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* ========================================
   Footer
   ======================================== */
.registration-footer {
    background: var(--bg-dark);
    color: white;
}

.registration-footer a {
    color: white;
    text-decoration: none;
}

.registration-footer a:hover {
    text-decoration: underline;
}

/* ========================================
   Alerts & Messages
   ======================================== */
.alert {
    border-radius: var(--border-radius-sm);
    border: none;
    padding: 16px 20px;
}

.alert-success {
    background: rgba(0, 147, 69, 0.1);
    color: var(--primary-dark);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.alert-info {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* ========================================
   Utilities
   ======================================== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .steps-wrapper {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .step-connector {
        display: none;
    }
    
    .step-item {
        min-width: 80px;
    }
    
    .form-card-body {
        padding: 20px;
    }
    
    .token-inputs {
        gap: 8px;
    }
    
    .token-input {
        width: 48px;
        height: 56px;
        font-size: 20px;
    }
    
    .payment-options-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .logo-container .logo {
        max-height: 60px;
    }
    
    .logo-container h1 {
        font-size: 16px;
    }
    
    .form-card-header {
        padding: 20px;
    }
    
    .form-card-header h2 {
        font-size: 20px;
    }
}

/* ========================================
   Loading States
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   Animations
   ======================================== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   Password Strength Meter
   ======================================== */
.password-strength-container {
    margin-top: 8px;
}

.password-strength-bar {
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.password-strength-fill.weak {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.password-strength-fill.medium {
    background: linear-gradient(90deg, #ffc107, #f39c12);
}

.password-strength-fill.strong {
    background: linear-gradient(90deg, #17a2b8, #3498db);
}

.password-strength-fill.very-strong {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.password-strength-text {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.password-strength-text small {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Password Requirements */
.password-requirements {
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    border: 1px solid var(--border-color);
}

.password-requirements small {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.password-requirements small:last-child {
    margin-bottom: 0;
}

.req-icon {
    font-size: 8px;
    transition: color 0.2s ease;
}

.req-icon.text-success {
    font-size: 10px;
}

/* Toggle Password Visibility */
.toggle-password {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.toggle-password:focus {
    outline: none;
    box-shadow: none;
}

/* Password input with toggle button */
.position-relative .form-control {
    padding-right: 45px;
}

