/* Local Inter Font */
@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.back-to-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4A5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.3s forwards;
}

.back-to-home:hover {
    color: #667EEA;
    transform: translateX(-5px);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.auth-container.wide {
    max-width: 650px;
}

.auth-header {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Car Wheel */
.gear {
    position: relative;
    width: 100%;
    height: 100%;
    border: 4px solid #2D3748;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E0 100%);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.2), 0 3px 8px rgba(0, 0, 0, 0.1);
    animation: rotateWheel 4s linear infinite;
}

/* Wheel Spokes */
.gear-tooth {
    position: absolute;
    width: 2.5px;
    height: 40%;
    background: rgb(1, 97, 254);
    top: 50%;
    left: 50%;
    transform-origin: center;
}

.gear-tooth:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg); }
.gear-tooth:nth-child(2) { transform: translate(-50%, -50%) rotate(60deg); }
.gear-tooth:nth-child(3) { transform: translate(-50%, -50%) rotate(120deg); }
.gear-tooth:nth-child(4) { transform: translate(-50%, -50%) rotate(180deg); }

/* Center Hub */
.wrench {
    position: absolute;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, rgb(1, 97, 254) 0%, rgb(0, 82, 224) 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(1, 97, 254, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrench::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.wrench::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgb(1, 97, 254);
    border-radius: 50%;
    z-index: 1;
}

.gear::before {
    content: '';
    position: absolute;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border: 2px solid #94A3B8;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gear::after {
    content: '';
    position: absolute;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border: 1px dashed #64748B;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 0.5rem;
}

.auth-header p {
    font-size: 0.95rem;
    color: #718096;
}

.auth-body {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4A5568;
    margin-bottom: 0.5rem;
}

.required {
    color: #E53E3E;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: rgb(1, 97, 254);
    background: white;
    box-shadow: 0 0 0 3px rgba(1, 97, 254, 0.1);
}

.form-control.is-invalid {
    border-color: #E53E3E;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.input-group {
    display: flex;
    gap: 0;
    align-items: stretch;
}

.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: #f8f9fa;
    border: 2px solid #E2E8F0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.input-group .form-control {
    flex: 1;
    border-top: 2px solid #E2E8F0;
    border-bottom: 2px solid #E2E8F0;
    border-left: none;
    border-right: 2px solid #E2E8F0;
    border-radius: 0;
}

.input-group .form-control:only-child {
    border: 2px solid #E2E8F0;
    border-radius: 10px;
}

.input-group:has(.input-group-text) .form-control {
    border-left: none;
}

.input-group:has(.btn-toggle-password) .form-control {
    border-right: none;
    border-radius: 0;
}

.input-group:has(.input-group-text):has(.btn-toggle-password) .form-control {
    border-radius: 0;
}

.input-group:has(.input-group-text):not(:has(.btn-toggle-password)) .form-control {
    border-radius: 0 10px 10px 0;
}

.input-group:not(:has(.input-group-text)):has(.btn-toggle-password) .form-control {
    border-left: 2px solid #E2E8F0;
    border-radius: 10px 0 0 10px;
}

.input-group:focus-within .input-group-text {
    border-color: rgb(1, 97, 254);
    background: white;
}

.input-group:focus-within .form-control {
    border-color: rgb(1, 97, 254);
}

.input-group:focus-within .btn-toggle-password {
    border-color: rgb(1, 97, 254);
    background: white;
}

.btn-toggle-password {
    padding: 0 1rem;
    background: #f8f9fa;
    border: 2px solid #E2E8F0;
    border-left: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-password:hover {
    background: #e2e8f0;
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #718096;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: rgb(1, 97, 254);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(1, 97, 254, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(1, 97, 254, 0.4);
    background: rgb(0, 82, 224);
}

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

.auth-link {
    text-align: center;
    padding-top: 1rem;
}

.auth-link p {
    color: #718096;
    font-size: 0.9rem;
}

.auth-link a {
    color: rgb(1, 97, 254);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: rgb(0, 82, 224);
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: #FEE;
    border: 1px solid #FCC;
    color: #C33;
}

.alert-info {
    background: #E6F3FF;
    border: 1px solid #B3DAFF;
    color: rgb(1, 97, 254);
}

.alert-success {
    background: #EFE;
    border: 1px solid #CFC;
    color: #2C7A2C;
}

.alert ul {
    margin: 0;
    padding-left: 1.25rem;
}

.alert li {
    margin-bottom: 0.25rem;
}

.invalid-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #E53E3E;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes rotateWheel {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .back-to-home {
        top: 1rem;
        left: 1rem;
    }

    .auth-container {
        border-radius: 16px;
    }

    .auth-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .auth-body {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
