/* Global Styles */
:root {
    --primary-color: #1e3a8a;
    /* Navy Blue */
    --primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    /* Navy to Blue */
    --secondary-color: #64748b;
    /* Slate Grey for secondary actions */
    --accent-color: #3b82f6;
    /* Brighter Blue */
    --bg-color: #f8fafc;
    /* Very light blue-grey/white */
    --text-color: #334155;
    /* Slate 700 */
    --glass-bg: rgba(255, 255, 255, 0.95);
    /* Less transparent, more solid white feel */
    --glass-border: rgba(226, 232, 240, 0.8);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --error-color: #ef4444;
    --success-color: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(180deg, #ffffff 0%, #93c5fd 100%);
    /* Stronger Blue Backdrop */
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}


/* Container */
.container {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.15);
    /* Glass Translucency */
    backdrop-filter: blur(25px);
    /* Strong Blur */
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* Glass Edge */
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    padding: 40px;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.8s ease-out;
    z-index: 1;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2,
h3 {
    color: #0f172a;
    /* Darker Navy for Text */
    margin-bottom: 20px;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    /* Slate 800 */
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    /* Glass Input */
    backdrop-filter: blur(5px);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    color: #0f172a;
}

/* Password eye positioning */
.password-wrapper {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    transition: color 0.3s ease;
    z-index: 5;
}

.toggle-password:hover {
    color: var(--primary-color);
}

input:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    /* Blue ring */
}

/* Validation Styles */
input.valid {
    border-color: var(--success-color);
}

input.invalid {
    border-color: var(--error-color);
}

/* Buttons */
.btn-primary,
.next-btn,
.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 10px;
    font-size: 1rem;
}

.btn-primary:hover,
.next-btn:hover,
.submit-btn:hover {
    background: #172554;
    /* Darker Navy */
    transform: none;
    box-shadow: none;
}

.btn-secondary,
.prev-btn {
    background: white;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-secondary:hover,
.prev-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Multi-step Navigation */
.step-content {
    display: none;
    animation: slideIn 0.3s ease-in-out;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.form-navigation button {
    flex: 1;
}

/* Progress Bar */
.progress-bar-container {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    transform: translateY(-50%);
    z-index: 0;
}

.progress-step {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #94a3b8;
    z-index: 1;
    transition: all 0.3s;
}

.progress-step.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Grid for Address */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Modal/Dialog */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.6);
    /* Slate 900 semi-transparent */
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.btn-confirm {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Success Details Box */
.success-details-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-item span:first-child {
    font-weight: 600;
    color: #64748b;
    font-size: 0.95rem;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: var(--text-color);
}

.copy-val {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: var(--primary-color);
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.copy-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Side Floating Logos */
.floating-logo-container {
    position: fixed;
    top: 120px;
    z-index: 10;
    width: 250px;
    text-align: center;
    pointer-events: none;
}

.floating-logo-container.left {
    left: 50px;
}

.floating-logo-container.right {
    right: 50px;
}

.logo-img-floating {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s ease;
    pointer-events: auto;
    opacity: 0.9;
}

.logo-img-floating:hover {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
}

@media (max-width: 1100px) {
    .floating-logo-container {
        display: none;
    }

    /* Fallback for smaller screens: Put them on top again but smaller */
    .container::before {
        content: '';
        display: block;
        height: 60px;
        /* Spacer */
    }

    .mobile-logos {
        display: flex !important;
        justify-content: center;
        gap: 20px;
        margin-bottom: 20px;
    }

    .mobile-logo-img {
        height: 60px;
        width: auto;
    }
}

/* Login Indicators */
.login-indicator {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 12px;
    animation: slideInIndicator 0.3s ease;
}

.login-indicator i {
    font-size: 1.1rem;
}

.indicator-warning {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.indicator-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.indicator-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

@keyframes slideInIndicator {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}