/* Customer Authentication Pages Styles */
@import url('theme-color.css');

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--primary-light);
}

/* Auth Layout Container */
.auth-layout {
    min-height: 100vh;
    display: flex;
    position: relative;
}

/* Left Side - Branding Section */
.auth-left {
    flex: 0 0 50%;
    background: var(--gradient-hero);
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
    z-index: 1;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(77, 106, 146, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(90, 143, 160, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.auth-left-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    text-align: center;
    color: var(--text-dark);
}

.auth-logo {
    width: 150px;
    height: 89px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 10px 30px rgba(77, 106, 146, 0.3);
    padding: 12px 16px;
    overflow: hidden;
}

.auth-logo i {
    font-size: 2.5rem;
    color: white;
}

.auth-logo .site-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-left h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-left p {
    font-size: 1.125rem;
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.auth-features {
    list-style: none;
    text-align: left;
    margin-top: 2rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-medium);
    font-size: 0.9375rem;
}

.auth-features li i {
    color: var(--accent-blue);
    font-size: 1.125rem;
    width: 20px;
}

/* Back to Home Button */
.auth-back-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    transition: all 0.3s ease;
    z-index: 10;
}

.auth-back-home:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--accent-blue);
    transform: translateX(-4px);
}

.auth-back-home i {
    font-size: 1rem;
}

/* Right Side - Form Section */
.auth-right {
    flex: 1;
    margin-left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--primary-light);
    min-height: 100vh;
}

.auth-form-container {
    width: 100%;
    max-width: 500px;
}

.auth-form-card {
    width: 100%;
}

.auth-form-header {
    margin-bottom: 2.5rem;
}

.auth-form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.auth-form-header p {
    font-size: 0.9375rem;
    color: var(--text-medium);
    margin: 0;
}

/* Login Method Toggle */
.auth-method-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--secondary-light);
    padding: 0.25rem;
    border-radius: 12px;
}

.auth-method-btn {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: none;
    background: transparent;
    color: var(--text-medium);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.auth-method-btn:hover {
    color: var(--accent-blue);
    background: var(--tertiary-light);
}

.auth-method-btn.active {
    background: white;
    color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(77, 106, 146, 0.15);
}

.auth-method-btn i {
    font-size: 0.875rem;
}

/* Form Styles */
.auth-form-group {
    margin-bottom: 1rem;
}

.auth-form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}

.auth-form-label .required {
    color: var(--accent-orange);
    margin-left: 0.25rem;
}

.auth-form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border-light);
    border-radius: 10px;
    background: white;
    color: var(--text-dark);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.auth-form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(77, 106, 146, 0.1);
}

.auth-form-input::placeholder {
    color: var(--text-light);
    font-size: 0.8125rem;
}

.auth-form-input:disabled {
    background: var(--secondary-light);
    cursor: not-allowed;
}

/* Password Input Group */
.auth-password-group {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.auth-password-toggle:hover {
    color: var(--accent-blue);
    background: var(--secondary-light);
}

/* OTP Input */
.auth-otp-input {
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0.4rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    padding: 0.75rem;
}

.auth-otp-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-medium);
    margin-top: 0.5rem;
}

.auth-otp-hint.success {
    color: var(--accent-green);
}

.auth-otp-hint i {
    margin-right: 0.25rem;
    font-size: 0.6875rem;
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.auth-btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(77, 106, 146, 0.25);
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 106, 146, 0.35);
}

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

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn-outline {
    background: white;
    color: var(--accent-blue);
    border: 1.5px solid var(--accent-blue);
}

.auth-btn-outline:hover {
    background: var(--accent-blue);
    color: white;
}

.auth-btn-google {
    background: white;
    color: var(--text-medium);
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 2px 0 rgba(51, 65, 85, 0.3), 0 1px 3px 1px rgba(51, 65, 85, 0.15);
    font-weight: 500;
    font-size: 0.875rem;
    transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn-google:hover {
    box-shadow: 0 1px 3px 0 rgba(51, 65, 85, 0.3), 0 4px 8px 3px rgba(51, 65, 85, 0.15);
    background: var(--secondary-light);
}

.auth-btn-google:active {
    box-shadow: 0 1px 2px 0 rgba(51, 65, 85, 0.3), 0 2px 6px 2px rgba(51, 65, 85, 0.15);
}

.auth-btn-google i {
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTcuNjQgOS4yMDRjMC0uNjM2LS4wNTctMS4yNzQtLjE2NC0xLjg3M0g5LjE4M3YzLjU0NGg0Ljg0NGMtLjIwNiAxLjIxMy0uODQzIDIuMjQtMS44NDQgMi45MTN2Mi4zMTdoMi45OTJjMS43NS0xLjYxIDIuNzU5LTQuMDggMi43NTktNi45NTh6IiBmaWxsPSIjNDI4NUY0Ii8+PHBhdGggZD0iTTkuMTgzIDE4YzIuNDc5IDAgNC41NDItLjgyIDYuMDYtMi4yNDZsLTIuOTkyLTIuMzE3Yy0uODI3LjU1Ny0xLjg4Ni44ODctMy4wNjguODg3LTIuMzU3IDAtNC4zNTMtMS41OTEtNS4wNjctMy43NDdoLTMuMDk5djIuMzg5QzMuOTIxIDE1LjUzIDYuNDc3IDE4IDkuMTgzIDE4eiIgZmlsbD0jMzRBMzg0Lz48cGF0aCBkPSJNNC4xMTYgMTAuNzE0Yy0uMTg0LS41MzctLjI4OS0xLjExMi0uMjg5LTEuNzE0cy4xMDUtMS4xNzcuMjg5LTEuNzE0VjQuOTA3SDEuMDI0Qy4zNjcgNi4xNzcgMCA3LjU0IDAgOWMwIDEuNDUuMzY3IDIuODIzIDEuMDI0IDQuMDkzbDMuMDkyLTIuMzg5eiIgZmlsbD0jRkJCQzA0Lz48cGF0aCBkPSJNOS4xODMgMy42ODZjMS4zMDcgMCAyLjQ4Ni40NDUgMy40MTEgMS4yOTZsMi42MDctMi42MDdDMTMuNzI0LjkyIDExLjY2MiAwIDkuMTgzIDAgNS40NzcgMCAyLjA5MiAyLjYxNy4zNjcgNi4zMDdsMy4wOTIgMi4zODlDNS4xODMgNy4wOTUgNy4wMjYgMy42ODYgOS4xODMgMy42ODZ6IiBmaWxsPSIjRUE0MzM1Ii8+PC9nPjwvc3ZnPg==') no-repeat center;
    background-size: 18px 18px;
    width: 18px;
    height: 18px;
    display: inline-block;
    margin-right: 0.5rem;
}

.auth-btn-google svg {
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.auth-btn-google i.fab {
    display: none;
}

/* Checkbox */
.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 0.125rem;
    cursor: pointer;
    accent-color: var(--accent-blue);
    flex-shrink: 0;
}

.auth-checkbox label {
    font-size: 0.8125rem;
    color: var(--text-medium);
    cursor: pointer;
    line-height: 1.5;
}

.auth-checkbox label a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.auth-checkbox label a:hover {
    text-decoration: underline;
}

/* Alerts */
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
    border-left: 3px solid;
}

.auth-alert-success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--accent-green);
    border-color: var(--accent-green);
}

.auth-alert-error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

.auth-alert-warning {
    background: rgba(234, 88, 12, 0.1);
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

.auth-alert-info {
    background: rgba(77, 106, 146, 0.1);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.auth-alert i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    padding: 0 0.875rem;
}

/* Links */
.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-medium);
}

.auth-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Forgot Password Link */
.auth-forgot-link {
    text-align: right;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.auth-forgot-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
}

.auth-forgot-link a:hover {
    text-decoration: underline;
}

/* Loading Spinner */
.auth-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

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

/* Loading states - Hide loading by default, show content by default */
/* Livewire wire:loading elements are hidden by default */
span[wire\:loading] {
    display: none !important;
}

/* Livewire wire:loading.remove elements are shown by default */
span[wire\:loading\.remove] {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
}

/* When parent has wire-loading class (added by Livewire), show loading and hide content */
button.wire-loading span[wire\:loading],
div.wire-loading span[wire\:loading] {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
}

button.wire-loading span[wire\:loading\.remove],
div.wire-loading span[wire\:loading\.remove] {
    display: none !important;
}

/* Method toggle loading state */
.auth-method-toggle.opacity-50 {
    opacity: 0.6;
}

.auth-method-toggle.pointer-events-none {
    pointer-events: none;
}

/* Method toggle button loading states */
.auth-method-btn span[wire\:loading] {
    display: none !important;
}

.auth-method-btn span[wire\:loading\.remove] {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
}

.auth-method-btn.wire-loading span[wire\:loading] {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
}

.auth-method-btn.wire-loading span[wire\:loading\.remove] {
    display: none !important;
}

/* Error States */
.auth-form-input.is-invalid {
    border-color: var(--accent-orange);
}

.auth-form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(162, 198, 233, 0.1);
}

.auth-error-message {
    color: var(--accent-orange);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.auth-error-message i {
    font-size: 0.6875rem;
}

/* Success States */
.auth-form-input.is-valid {
    border-color: var(--accent-green);
}

.auth-form-input.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Responsive Design */
@media (max-width: 992px) {
    .auth-layout {
        flex-direction: column;
    }

    .auth-left {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 300px;
        padding: 2rem 1.5rem;
        flex: 0 0 auto;
    }

    .auth-left h1 {
        font-size: 2rem;
    }

    .auth-left p {
        font-size: 1rem;
    }

    .auth-features {
        display: none;
    }

    .auth-right {
        margin-left: 0;
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    /* Stack name fields on mobile */
    .auth-form-card [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .auth-left {
        position: relative;
        width: 100%;
        min-height: 250px;
        padding: 1.5rem 1rem;
    }

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

    .auth-logo {
        width: 130px;
        height: 77px;
        margin-bottom: 1rem;
        padding: 10px 14px;
    }

    .auth-logo i {
        font-size: 2rem;
    }

    .auth-logo .site-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .auth-left h1 {
        font-size: 1.75rem;
    }

    .auth-left p {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
    }

    .auth-right {
        padding: 1rem;
    }

    .auth-form-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .auth-form-header h2 {
        font-size: 1.5rem;
    }

    .auth-form-header p {
        font-size: 0.875rem;
    }

    .auth-method-toggle {
        margin-bottom: 1.25rem;
    }

    .auth-form-group {
        margin-bottom: 0.875rem;
    }

    .auth-otp-input {
        font-size: 1.125rem;
        letter-spacing: 0.3rem;
    }
}

@media (max-width: 480px) {
    .auth-left {
        position: relative;
        width: 100%;
        min-height: 200px;
        padding: 1rem;
    }

    .auth-back-home {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .auth-back-home span {
        display: none;
    }

    .auth-logo {
        width: 110px;
        height: 65px;
        margin-bottom: 0.75rem;
        padding: 8px 12px;
    }

    .auth-logo i {
        font-size: 1.5rem;
    }

    .auth-logo .site-logo {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .auth-left h1 {
        font-size: 1.5rem;
    }

    .auth-left p {
        font-size: 0.875rem;
    }

    .auth-right {
        padding: 0.75rem;
    }

    .auth-form-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .auth-form-header {
        margin-bottom: 1.5rem;
    }

    .auth-form-header h2 {
        font-size: 1.25rem;
    }

    .auth-form-input {
        padding: 0.5625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .auth-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .auth-otp-input {
        font-size: 1rem;
        letter-spacing: 0.25rem;
        padding: 0.625rem;
    }

    /* Stack name fields on small screens */
    .auth-form-card [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
}