@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.01em;
}

.auth-layout {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

/*
   The photograph behind the card, from public/hero via App\Support\HeroMedia.

   The scrim is one flat rgba block, not a gradient, so the white card keeps a
   constant amount of contrast behind it no matter how light or dark the photo
   happens to be. The card itself stays pure white and unreadable-looking text
   never appears over the image.
*/
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: #0f172a;
}

.auth-bg picture {
    display: block;
    width: 100%;
    height: 100%;
}

.auth-bg-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.auth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.82);
}

/* No photograph on disk: the plain navy block is the whole background. */
.auth-layout--plain {
    background: #f8fafc;
}

.auth-layout--plain .auth-card {
    border: 1px solid #e2e8f0;
}

/*
   The blurred pastel orbs (auth-bg-orb / orb-1 / orb-2), the 12s and 15s
   float-orb animation, the grid overlay and a leftover gradientShift keyframe
   were all removed. They were decorative motion behind a login form, and the
   design direction is a flat, still, enterprise surface. The markup that used
   them is gone from layouts/auth.blade.php.
*/

/* Main container */
.auth-main {
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
    position: relative;
    z-index: 10;
}

/* Auth card - Clean white with soft shadow */
.auth-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 
        0 20px 60px rgba(37, 99, 235, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

/* Brand hairline across the top of the card. Solid, not a gradient. */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #2563eb;
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    max-height: 56px;
    width: auto;
    transition: transform 0.3s ease;
}

.auth-logo img:hover {
    transform: scale(1.02);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h3 {
    font-weight: 700;
    font-size: 1.75rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-header .subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    font-weight: 400;
    line-height: 1.5;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:hover {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.invalid-feedback {
    color: #dc2626;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-top: 0.5rem;
    display: block;
}

/* Password field */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.375rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #2563eb;
}

/* Remember & Forgot */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.form-check-input {
    accent-color: #2563eb;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    color: #475569;
    font-weight: 500;
    cursor: pointer;
}

a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Password strength */
.password-strength {
    margin-top: 0.75rem;
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

.password-strength.active {
    display: block;
}

.strength-bar {
    height: 100%;
    transition: width 0.4s ease, background-color 0.3s ease;
    width: 0%;
}

.strength-weak { background: #dc2626; width: 33%; }
.strength-medium { background: #f59e0b; width: 66%; }
.strength-strong { background: #10b981; width: 100%; }

.strength-text {
    font-size: 0.6875rem;
    margin-top: 0.375rem;
    text-align: right;
    font-weight: 600;
}

.strength-weak-text { color: #dc2626; }
.strength-medium-text { color: #d97706; }
.strength-strong-text { color: #059669; }

/* Primary button */
.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

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

/* Ripple effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out 0.3s forwards;
}

.auth-footer p {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 575.98px) {
    .auth-main {
        padding: 1rem;
        max-width: 100%;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    .auth-header h3 {
        font-size: 1.5rem;
    }
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Password Rules */
.password-rules {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.password-requirements {
    margin: 0;
    padding: 0;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.requirement.met {
    color: #059669;
}

.requirement.unmet {
    color: #64748b;
}

.requirement i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Password Match Indicator */
#password-match-indicator {
    min-height: 1.25rem;
}

#password-match-indicator.show-success #password-match-text {
    color: #059669 !important;
}

#password-match-indicator.show-error #password-match-text {
    color: #dc2626 !important;
}

/* Form Scrolling */
.auth-form {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
}

.auth-form::-webkit-scrollbar {
    width: 4px;
}

.auth-form::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.auth-form::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.auth-form::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
