/* ============================================
   GreenBubble Sign In Page - Modern SaaS Design
   Beautiful, contemporary login experience
   ============================================ */

/* Prevent Flash of Unstyled Content (FOUC) */
#auth {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    animation-delay: 0.1s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Auth Page Background - Gradient */
#auth {
    background: linear-gradient(135deg, #0d6f63 0%, #128c7e 50%, #1a9e8e 100%) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Animated background pattern */
#auth::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    opacity: 0.3;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Modern Card Container */
#auth .card {
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 100px rgba(18, 140, 126, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    max-width: 440px;
    width: 100%;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#auth .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #128c7e, #0d6f63, #128c7e);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

#auth .card:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 0 120px rgba(18, 140, 126, 0.3);
    transform: translateY(-5px);
}

/* Remove Card Header - we'll style it differently */
#auth .card .card-header,
#auth .card-header {
    background: transparent !important;
    border: none;
    padding: 3rem 2.5rem 1.5rem;
    text-align: center;
}

/* Logo Area */
#auth .card-header img,
#auth .auth-logo img {
    max-width: 140px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(18, 140, 126, 0.2));
    transition: transform 0.3s ease;
}

#auth .card-header img:hover,
#auth .auth-logo img:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Title Styling */
#auth .card-header h4,
#auth .card-header h3,
#auth .card-header h2,
#auth .card-header .card-title {
    color: #1f2937 !important;
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

#auth .card-header p {
    color: #6b7280 !important;
    margin: 0;
    font-size: 0.9375rem;
}

/* Card Body */
#auth .card .card-body,
#auth .card-body {
    padding: 1.5rem 2.5rem 2.5rem;
    background: transparent !important;
}

/* Form Groups */
#auth .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Form Labels */
#auth .form-label,
#auth label {
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
    display: block;
    letter-spacing: 0.01em;
}

/* Keep the original icons but style them nicely */
#auth .form-control-icon,
#auth .input-group-text {
    color: #9ca3af;
    transition: color 0.3s ease;
}

#auth .form-group:has(input:focus) .form-control-icon,
#auth .form-group:has(input:focus) .input-group-text {
    color: #128c7e;
}

/* Form Inputs - Modern Style WITH proper icon spacing */
#auth .form-control,
#auth input[type="text"],
#auth input[type="email"],
#auth input[type="password"],
#auth input[type="tel"] {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.875rem 1rem 0.875rem 2.75rem !important;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f9fafb;
    color: #1f2937;
    width: 100%;
}

/* If there's no icon, use normal padding */
#auth .form-group:not(:has(.form-control-icon)) .form-control,
#auth .form-group:not(:has(svg)) input {
    padding: 0.875rem 1rem !important;
}

#auth .form-control:focus,
#auth input:focus {
    border-color: #128c7e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(18, 140, 126, 0.1);
    outline: none;
    transform: translateY(-2px);
}

#auth .form-control:hover,
#auth input:hover {
    border-color: #4bc0c0;
    background: #ffffff;
}

/* Placeholder Text */
#auth ::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Primary Button - Login */
#auth .btn-primary {
    background: linear-gradient(135deg, #128c7e 0%, #0d6f63 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(18, 140, 126, 0.4);
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

#auth .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#auth .btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

#auth .btn-primary:hover {
    background: linear-gradient(135deg, #0f7469 0%, #0a5850 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(18, 140, 126, 0.5);
}

#auth .btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 140, 126, 0.4);
}

/* Links */
#auth a {
    color: #128c7e;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

#auth a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #128c7e;
    transition: width 0.3s ease;
}

#auth a:hover::after {
    width: 100%;
}

#auth a:hover {
    color: #0d6f63;
}

/* Footer Links */
#auth .card-footer {
    background: transparent !important;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 2.5rem;
    text-align: center;
}

/* Divider */
#auth .divider,
#auth hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.75rem 0;
    position: relative;
}

#auth .divider::before {
    content: 'OR';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Remember Me Checkbox */
#auth .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#auth .form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#auth .form-check-input:checked {
    background-color: #128c7e;
    border-color: #128c7e;
    box-shadow: 0 2px 8px rgba(18, 140, 126, 0.3);
}

#auth .form-check-label {
    color: #4b5563;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Alert Messages */
#auth .alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#auth .alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

#auth .alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Loading Spinner */
#auth .spinner-border {
    color: #128c7e;
}

/* Responsive Design */
@media (max-width: 576px) {
    #auth .card {
        margin: 1rem;
        border-radius: 20px;
    }
    
    #auth .card-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    #auth .card-body {
        padding: 1rem 1.5rem 2rem;
    }
    
    #auth .card-header h4,
    #auth .card-header h3,
    #auth .card-header h2 {
        font-size: 1.5rem;
    }
    
    #auth .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Animation on Page Load */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#auth .card {
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Animation for Logo */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

#auth .card-header img,
#auth .auth-logo img {
    animation: float 3s ease-in-out infinite;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    #auth .card,
    #auth .btn-primary,
    #auth .form-control,
    #auth img {
        animation: none !important;
        transition: none !important;
    }
    
    #auth::before {
        animation: none !important;
    }
}

/* Placeholder Text */
#auth ::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Primary Button - Login */
#auth .btn-primary {
    background: linear-gradient(135deg, #128c7e 0%, #0d6f63 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(18, 140, 126, 0.4);
    cursor: pointer;
    width: 100%;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

#auth .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#auth .btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

#auth .btn-primary:hover {
    background: linear-gradient(135deg, #0f7469 0%, #0a5850 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(18, 140, 126, 0.5);
}

#auth .btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 140, 126, 0.4);
}

/* Links */
#auth a {
    color: #128c7e;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

#auth a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #128c7e;
    transition: width 0.3s ease;
}

#auth a:hover::after {
    width: 100%;
}

#auth a:hover {
    color: #0d6f63;
}

/* Footer Links */
#auth .card-footer {
    background: transparent !important;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 2.5rem;
    text-align: center;
}

/* Divider */
#auth .divider,
#auth hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.75rem 0;
    position: relative;
}

#auth .divider::before {
    content: 'OR';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* Remember Me Checkbox */
#auth .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#auth .form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#auth .form-check-input:checked {
    background-color: #128c7e;
    border-color: #128c7e;
    box-shadow: 0 2px 8px rgba(18, 140, 126, 0.3);
}

#auth .form-check-label {
    color: #4b5563;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Alert Messages */
#auth .alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#auth .alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

#auth .alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Loading Spinner */
#auth .spinner-border {
    color: #128c7e;
}

/* Responsive Design */
@media (max-width: 576px) {
    #auth .card {
        margin: 1rem;
        border-radius: 20px;
    }
    
    #auth .card-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    #auth .card-body {
        padding: 1rem 1.5rem 2rem;
    }
    
    #auth .card-header h4,
    #auth .card-header h3,
    #auth .card-header h2 {
        font-size: 1.5rem;
    }
    
    #auth .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Animation on Page Load */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#auth .card {
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Animation for Logo */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

#auth .card-header img,
#auth .auth-logo img {
    animation: float 3s ease-in-out infinite;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    #auth .card,
    #auth .btn-primary,
    #auth .form-control,
    #auth img {
        animation: none !important;
        transition: none !important;
    }
    
    #auth::before {
        animation: none !important;
    }
}