/* ========================================
   BASE STYLES & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --primary-color: #7d0c00;
    --secondary-color: #0067b8;
    --neutral-color: #545454;
    --white: #ffffff;
    --light-gray: #f9fafb;
    --border-gray: #e5e7eb;
    --text-gray: #6b7280;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --shadow: rgba(0, 0, 0, 0.1);
}

html {
    height: 100%;
}

body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

/* ========================================
   FLOATING BACKGROUND SHAPES
   ======================================== */
.floating-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.08;
    animation: float 25s infinite ease-in-out;
}

.shape-1 {
    top: 5%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 50%;
    animation-delay: 0s;
}

.shape-2 {
    top: 70%;
    right: 8%;
    width: 150px;
    height: 150px;
    background: var(--white);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-delay: 3s;
}

.shape-3 {
    bottom: 10%;
    left: 10%;
    width: 120px;
    height: 120px;
    background: var(--white);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-delay: 6s;
}

.shape-4 {
    top: 30%;
    right: 25%;
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: 20%;
    animation-delay: 9s;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
    }
    25% { 
        transform: translate(30px, -30px) rotate(10deg); 
    }
    50% { 
        transform: translate(-20px, 20px) rotate(-10deg); 
    }
    75% { 
        transform: translate(20px, 15px) rotate(5deg); 
    }
}

/* ========================================
   MAIN AUTHENTICATION CONTAINER
   ======================================== */
.auth-container {
    background: var(--white);
    width: 440px;
    max-width: 90vw;
    max-height: 100vh;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
}

/* Wide Signup Container */
.signup-container {
    width: 750px;
    max-width: 90vw;
}

.auth-content {
    flex: 1;
    overflow-y: auto;
    padding: 36px 40px 20px;
}

/* Custom Scrollbar */
.auth-content::-webkit-scrollbar {
    width: 6px;
}

.auth-content::-webkit-scrollbar-track {
    background: var(--light-gray);
}

.auth-content::-webkit-scrollbar-thumb {
    background: var(--border-gray);
    border-radius: 3px;
}

.auth-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* ========================================
   BRAND SECTION
   ======================================== */
.brand-section {
    text-align: center;
    margin-bottom: 20px;
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(125, 12, 0, 0.25);
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.logo-wrapper:hover {
    transform: scale(1.05) rotate(3deg);
}

.logo-wrapper i {
    font-size: 32px;
    color: var(--white);
}

.brand-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--neutral-color);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-gray);
    font-weight: 500;
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
    text-align: center;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--neutral-color);
    margin-bottom: 6px;
}

.page-header p {
    font-size: 14px;
    color: var(--text-gray);
}

/* ========================================
   FORM GRID - TWO COLUMN LAYOUT
   ======================================== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 15px;
    margin-bottom: 10px;
}

/* ========================================
   FORM CONTAINERS
   ======================================== */
.form-container {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-container.active {
    display: block;
}

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

/* ========================================
   INPUT GROUPS
   ======================================== */
.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--neutral-color);
    margin-bottom: 7px;
}

.input-group label i {
    color: var(--secondary-color);
    margin-right: 6px;
    width: 14px;
    text-align: center;
    font-size: 13px;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"],
.input-group select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 14px;
    color: var(--neutral-color);
    transition: all 0.3s ease;
    background: var(--white);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 103, 184, 0.1);
}

.input-group input::placeholder {
    color: #9ca3af;
}

.input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23545454' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ========================================
   PASSWORD WRAPPER
   ======================================== */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 15px;
    transition: color 0.3s ease;
    padding: 4px;
}

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

/* ========================================
   PASSWORD STRENGTH INDICATOR
   ======================================== */
.password-strength {
    height: 3px;
    background: var(--border-gray);
    border-radius: 2px;
    margin-top: 7px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 11px;
    margin-top: 5px;
    font-weight: 500;
}

/* ========================================
   FORM OPTIONS
   ======================================== */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-gray);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group {
    margin-bottom: 10px;
}

.checkbox-group .checkbox-label {
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-group .checkbox-label input {
    margin-top: 2px;
    flex-shrink: 0;
}

.forgot-link,
.link {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-link:hover,
.link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ========================================
   PRIMARY BUTTON
   ======================================== */
.btn-primary {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(125, 12, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(125, 12, 0, 0.35);
}

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

/* ========================================
   SECONDARY BUTTON
   ======================================== */
.btn-secondary {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(125, 12, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(125, 12, 0, 0.35);
}

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

/* ========================================
   SWITCH AUTH LINK
   ======================================== */
.switch-auth {
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-gray);
}

.switch-auth p {
    font-size: 14px;
    color: var(--text-gray);
}

.switch-link {
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.switch-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ========================================
   FOOTER
   ======================================== */
.auth-footer {
    text-align: center;
    padding: 14px 20px;
    border-top: 1px solid var(--border-gray);
    background: var(--light-gray);
    flex-shrink: 0;
}

.auth-footer p {
    font-size: 12px;
    color: var(--text-gray);
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .signup-container {
        width: 100%;
        max-width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .auth-content {
        padding: 28px 24px 16px;
    }
}

@media (max-width: 640px) {
    .auth-container {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
    }

    .auth-content {
        padding: 24px 20px 16px;
    }

    .brand-title {
        font-size: 24px;
    }

    .logo-wrapper {
        width: 60px;
        height: 60px;
    }

    .logo-wrapper i {
        font-size: 28px;
    }

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

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-height: 700px) {
    .brand-section {
        margin-bottom: 16px;
    }

    .page-header {
        margin-bottom: 20px; 
    }

    .logo-wrapper {
        width: 55px;
        height: 55px;
        margin-bottom: 10px;
    }

    .logo-wrapper i {
        font-size: 28px;
    }

    .brand-title {
        font-size: 22px;
    }

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

.mb-10px {
    margin-bottom: 10px;
}

.mt-10px {
    margin-top: 10px;
}

/* Wrap both elements in a single row */
.otp-row {
    display: flex;
    align-items: center;
    gap: 15px; /* spacing between button and input */
    margin-bottom: 10px;
}

/* Button styling */
.otp-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.otp-btn:hover {
    background-color: #0056b3;
}

/* Input wrapper positioned to hold the eye icon */
.otp-input-wrapper {
    position: relative;
}

/* Input field */
.otp-input-wrapper input {
    padding: 10px 0px 10px 10px; /* extra right padding for icon */
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.otp-input-wrapper input:focus {
    border-color: #007bff;
}

.other-login-button {
    font-weight: 600;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    padding-top: 10px;
}

.h-100 {
    height: 100px;
}