.login-header {
    background: linear-gradient(135deg, #662570 0%, #c13065 100%);
    position: relative;
    color: #fff;
    overflow: hidden;
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.login-header .header-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    line-height: 0;
}

.login-card {
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(102, 37, 112, 0.12);
    background: rgba(255, 255, 255, 0.85);
    transition: box-shadow 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}

.flash-message {
    padding: 0.875rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.flash-message.error {
    background-color: rgba(254, 226, 226, 0.95);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-left: 4px solid #dc2626;
}

.dark .flash-message.error {
    background-color: rgba(127, 29, 29, 0.85);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-left: 4px solid #ef4444;
}

.flash-message.success {
    background-color: rgba(220, 252, 231, 0.95);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-left: 4px solid #22c55e;
}

.dark .flash-message.success {
    background-color: rgba(20, 83, 45, 0.85);
    color: #bbf7d0;
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-left: 4px solid #4ade80;
}

.login-card {
    border: 2px solid transparent;
    /* Glassmorphism effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-card:before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: 0;
    border-radius: 2.2rem;
    background: conic-gradient(from 180deg at 50% 50%, #662570, #c13065, #662570 100%);
    opacity: 0.18;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.login-card>* {
    position: relative;
    z-index: 1;
}

.login-card:hover {
    box-shadow: 0 16px 48px rgba(102, 37, 112, 0.18);
    transform: translateY(-4px) scale(1.01);
}

.dark .login-card {
    background: rgba(31, 41, 55, 0.92);
}

.login-bg {
    background: linear-gradient(135deg, #f3e8ff 0%, #f8fafc 100%) !important;
}

.dark .login-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #232946 100%) !important;
}

.login-header h1,
.login-header p {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-wave svg {
    display: block;
    width: 100%;
    height: 40px;
}

/* Social login section */
.social-group {
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.social-btn {
    box-shadow: 0 2px 8px rgba(102, 37, 112, 0.08);
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
}

.social-btn:hover {
    border-color: #c13065;
    background: linear-gradient(135deg, #662570 0%, #c13065 100%);
    color: #fff !important;
}

.dark .social-btn {
    background: rgba(31, 41, 55, 0.7);
}

/* Enhanced floating label input styles */
.floating-label {
    position: relative;
    margin-bottom: 1.75rem;
}

.floating-label .form-input {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 2px 8px rgba(102, 37, 112, 0.06) inset;
    border: 1.5px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    border-radius: 1.2rem !important;
    padding: 1rem 2.75rem 1rem 2.75rem;
    width: 100%;
}

.dark .floating-label .form-input {
    background: rgba(31, 41, 55, 0.75);
    border-color: #374151;
    color: #fff;
}

.floating-label .form-input:focus {
    border-color: #662570;
    box-shadow: 0 0 0 3px rgba(193, 48, 101, 0.15), 0 2px 8px rgba(102, 37, 112, 0.10) inset;
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
}

.dark .floating-label .form-input:focus {
    border-color: #c13065;
    background: rgba(31, 41, 55, 0.95);
    box-shadow: 0 0 0 3px rgba(193, 48, 101, 0.2), 0 2px 8px rgba(102, 37, 112, 0.10) inset;
}

.floating-label label {
    position: absolute;
    left: 2.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    background: transparent;
    transition: all 0.25s cubic-bezier(.4, 0, .2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1;
    z-index: 1;
}

.dark .floating-label label {
    color: #a1a1aa;
}

.floating-label.is-focused label,
.floating-label .form-input:not(:placeholder-shown) ~ label {
    top: -0.65rem;
    left: 1.25rem;
    font-size: 0.75rem;
    color: #c13065;
    background: linear-gradient(to bottom, transparent 0%, transparent 40%, white 40%, white 100%);
    padding: 0 0.5rem;
    font-weight: 600;
}

.dark .floating-label.is-focused label,
.dark .floating-label .form-input:not(:placeholder-shown) ~ label {
    color: #c13065;
    background: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(31, 41, 55, 0.95) 40%, rgba(31, 41, 55, 0.95) 100%);
}

.floating-label .input-icon-left {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bdbdbd;
    pointer-events: none;
    transition: color 0.25s;
    font-size: 1.1rem;
    z-index: 2;
}

.floating-label.is-focused .input-icon-left {
    color: #c13065;
}

.floating-label .input-icon-right {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bdbdbd;
    background: none;
    border: none;
    padding: 0.5rem;
    font-size: 1.1rem;
    transition: all 0.25s;
    z-index: 2;
    cursor: pointer;
    border-radius: 50%;
}

.floating-label .input-icon-right:hover {
    background: rgba(193, 48, 101, 0.1);
    color: #c13065;
}

.floating-label.is-focused .input-icon-right {
    color: #c13065;
}

.floating-label .form-input:disabled {
    background: #f3f4f6;
    color: #bdbdbd;
    cursor: not-allowed;
    opacity: 0.6;
}

.dark .floating-label .form-input:disabled {
    background: #232946;
    color: #6b7280;
}

.floating-label .form-input.border-red-500 {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15), 0 2px 8px rgba(239, 68, 68, 0.10) inset;
}

.floating-label .form-input::-webkit-input-placeholder {
    color: transparent;
    opacity: 0;
}

.floating-label .form-input:-ms-input-placeholder {
    color: transparent;
    opacity: 0;
}

.floating-label .form-input::placeholder {
    color: transparent;
    opacity: 0;
}

/* Error state for label and icon */
.floating-label .form-input.border-red-500 ~ .input-icon-left,
.floating-label .form-input.border-red-500 ~ label {
    color: #ef4444 !important;
}

/* Focus animation */
.floating-label .form-input:focus ~ .input-icon-left {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.15); }
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .floating-label {
        margin-bottom: 1.5rem;
    }
    
    .floating-label .form-input {
        padding: 0.875rem 2.5rem 0.875rem 2.5rem;
        font-size: 0.95rem;
    }
    
    .floating-label label {
        left: 2.5rem;
        font-size: 0.9rem;
    }

    .floating-label.is-focused label,
    .floating-label .form-input:not(:placeholder-shown) ~ label {
        font-size: 0.7rem;
        left: 1rem;
    }
    
    .floating-label .input-icon-left,
    .floating-label .input-icon-right {
        font-size: 1rem;
    }
}

.btn-login {
    background: linear-gradient(135deg, #662570 0%, #c13065 100%);
    border: none;
    border-radius: 1.2rem;
    box-shadow: 0 4px 16px rgba(102, 37, 112, 0.25), 0 2px 8px rgba(193, 48, 101, 0.15);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-login:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #c13065 0%, #662570 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.btn-login:hover:not(:disabled),
.btn-login:focus:not(:disabled) {
    box-shadow: 0 8px 32px rgba(102, 37, 112, 0.35), 0 4px 12px rgba(193, 48, 101, 0.25);
    transform: translateY(-2px) scale(1.01);
}

.btn-login:hover:before {
    opacity: 1;
}

.btn-login:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
    box-shadow: 0 2px 8px rgba(102, 37, 112, 0.2);
}

.btn-login[disabled],
.btn-login:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: #d1d5db;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.dark .btn-login {
    background: linear-gradient(135deg, #662570 0%, #c13065 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(193, 48, 101, 0.3), 0 2px 8px rgba(102, 37, 112, 0.2);
}

.dark .btn-login:hover:not(:disabled),
.dark .btn-login:focus:not(:disabled) {
    box-shadow: 0 8px 32px rgba(193, 48, 101, 0.4), 0 4px 12px rgba(102, 37, 112, 0.3);
}

.dark .btn-login[disabled],
.dark .btn-login:disabled {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: #9ca3af;
}

/* Ripple effect for button */
.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.btn-login:active:not(:disabled)::after {
    transform: scale(2);
    opacity: 1;
    transition: transform 0.6s, opacity 0.3s;
}

/* Loading spinner animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Additional animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slideIn {
    animation: slideInFromTop 0.5s ease-out forwards;
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea {
    transition: all 0.2s ease;
}

/* Improved checkbox styling */
input[type="checkbox"] {
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background-color: #662570;
    border-color: #662570;
}

input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(193, 48, 101, 0.2);
}

.dark input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(193, 48, 101, 0.3);
}

/* Link hover effects */
a {
    position: relative;
}

a:not(.social-btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

a:not(.social-btn):hover::after {
    width: 100%;
}

/* Improved social button hover effects */
.social-btn {
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #662570 0%, #c13065 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-btn:hover::before {
    opacity: 0.1;
}

.social-btn i {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.social-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Focus visible styles for accessibility */
*:focus-visible {
    outline: 2px solid #c13065;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background-color: rgba(193, 48, 101, 0.3);
    color: #662570;
}

.dark ::selection {
    background-color: rgba(193, 48, 101, 0.4);
    color: #fff;
}
