/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    color: #333;
    overflow-y: auto;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 650px;
    margin: 20px auto;
    animation: fadeIn 0.5s ease-in;
}

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

/* Header */
.header {
    background: white;
    padding: 20px 50px 15px;
    text-align: center;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* Top Green Header */
.top-header {
    background: #1a5c3a;
    padding: 12px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.logo {
    height: 75px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.header-icon {
    margin-bottom: 10px;
}

.header-icon i {
    font-size: 36px;
    color: #7bc96f;
    opacity: 0.7;
}

.header h1 {
    color: #1a5c3a;
    font-size: 26px;
    margin-bottom: 6px;
    font-weight: 700;
}

.subtitle {
    color: #6c757d;
    font-size: 14px;
    margin-top: 4px;
    font-weight: 400;
}

/* Progress Bar */
.progress-container {
    background: white;
    padding: 20px 50px 15px;
    border-top: 1px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a5c3a, #28a745);
    width: 25%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background: linear-gradient(135deg, #1a5c3a, #28a745);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 92, 58, 0.3);
    transform: scale(1.1);
}

.step span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.step.active span {
    color: #1a5c3a;
    font-weight: 600;
}

/* Main Card */
.card {
    background: white;
    padding: 30px 50px 25px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    position: relative;
    min-height: 320px;
}

/* Step Content */
.step-content {
    display: none;
    animation: slideIn 0.4s ease;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 20px;
}

.step-header i {
    font-size: 38px;
    color: #1a5c3a;
    margin-bottom: 10px;
}

.step-header h2 {
    color: #1a5c3a;
    font-size: 20px;
    margin-bottom: 6px;
    font-weight: 600;
}

.step-header p {
    color: #666;
    font-size: 14px;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.form-group label {
    color: #333;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #1a5c3a;
}

.form-group input[type="email"],
.form-group input[type="text"],
.form-group input[type="password"] {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.form-group input:focus {
    outline: none;
    border-color: #28a745;
    background: white;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #28a745;
}

/* PIN Input */
.pin-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.pin-input,
.pin-input-confirm,
.pin-input-8,
.pin-input-6,
.pin-confirm-8,
.pin-confirm-6 {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.pin-input:focus,
.pin-input-confirm:focus,
.pin-input-8:focus,
.pin-input-6:focus,
.pin-confirm-8:focus,
.pin-confirm-6:focus {
    outline: none;
    border-color: #28a745;
    background: white;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
    transform: scale(1.05);
}

.pin-input:disabled,
.pin-input-confirm:disabled,
.pin-input-8:disabled,
.pin-input-6:disabled,
.pin-confirm-8:disabled,
.pin-confirm-6:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #e9ecef;
}

.pin-input.filled,
.pin-input-confirm.filled,
.pin-input-8.filled,
.pin-input-6.filled,
.pin-confirm-8.filled,
.pin-confirm-6.filled {
    border-color: #28a745;
    background: #f0f9f4;
}

/* PIN Divider */
.pin-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    position: relative;
}

.pin-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    z-index: 0;
}

.pin-divider span {
    background: white;
    padding: 0 16px;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.pin-option {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pin-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #1a5c3a, #28a745);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(26, 92, 58, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 92, 58, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-retry {
    background: linear-gradient(135deg, #1a5c3a, #28a745);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 92, 58, 0.4);
}

/* Security Note */
.security-note {
    text-align: center;
    color: #28a745;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px;
    background: #f0f9f4;
    border-radius: 8px;
    border: 1px solid #d4edda;
}

.security-note i {
    font-size: 16px;
}

/* Loading Screen */
.loading-screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 15px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
}

.loading-screen.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid #e0e0e0;
    border-top: 5px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 25px;
    color: #1a5c3a;
    font-size: 18px;
    font-weight: 600;
}

.loading-subtext {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Error Screen */
.error-screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 15px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
    padding: 40px;
    text-align: center;
}

.error-screen.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.error-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    animation: pulse 2s infinite;
}

.error-icon i {
    font-size: 50px;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
    }
}

.error-screen h2 {
    color: #dc3545;
    font-size: 26px;
    margin-bottom: 15px;
    font-weight: 700;
}

.error-message {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 500;
}

.error-submessage {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.error-code {
    margin-top: 25px;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-family: monospace;
    font-size: 13px;
    border: 1px solid #e0e0e0;
}

/* Simple Scrollbar Styles */
body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: #f5f7fa;
}

body::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Firefox scrollbar */
body {
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 #f5f7fa;
}

/* Footer */
.footer {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-header {
        padding: 12px 20px;
    }

    .logo {
        height: 56px;
    }

    .container {
        max-width: 100%;
        margin: 30px 20px;
    }

    .header {
        padding: 25px 25px 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .card {
        padding: 35px 25px;
    }

    .progress-container {
        padding: 30px 25px 20px;
    }

    .step span {
        font-size: 10px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .pin-input,
    .pin-input-confirm,
    .pin-input-8,
    .pin-input-6,
    .pin-confirm-8,
    .pin-confirm-6 {
        width: 45px;
        height: 55px;
        font-size: 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .pin-input-container {
        gap: 8px;
    }

    .pin-input,
    .pin-input-confirm,
    .pin-input-8,
    .pin-input-6,
    .pin-confirm-8,
    .pin-confirm-6 {
        width: 40px;
        height: 50px;
        font-size: 18px;
    }

    .step-header h2 {
        font-size: 20px;
    }

    .step-header i {
        font-size: 40px;
    }
}

