/* Authentication Pages Stylesheet */
/* Unified styling for login, registration, and password reset pages */

/* Base Styles */
body.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Card Styling */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

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

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0;
}

/* Institute Logo */
.institute-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Welcome Messages */
.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1f36;
    margin-bottom: 0.5rem;
}

.institute-name {
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.user-email {
    color: #6b7280;
    font-size: 0.875rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Form Styling */
.form-floating {
    margin-bottom: 1.5rem;
}

.form-floating > .form-control {
    height: 60px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: #fafafa;
    transition: all 0.3s ease;
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fff;
    outline: none;
}

.form-floating > label {
    color: #6b7280;
    font-weight: 500;
    padding: 1rem 0.75rem;
    transition: all 0.3s ease;
}

/* Buttons */
.btn-auth {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

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

.btn-auth:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Secondary Button */
.btn-auth-secondary {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    transition: color 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-auth-secondary:hover {
    color: #667eea;
    text-decoration: none;
}

/* Error Messages */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Success Messages */
.success-message {
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.3);
    color: #198754;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Floating Shapes Animation */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Loading States */
.btn-auth.loading {
    pointer-events: none;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .institute-logo {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .form-floating > .form-control {
        height: 56px;
    }

    .btn-auth {
        height: 52px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: rgba(30, 30, 30, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .auth-title {
        color: #ffffff;
    }

    .auth-subtitle {
        color: #9ca3af;
    }

    .welcome-title {
        color: #ffffff;
    }

    .form-floating > .form-control {
        background: rgba(55, 65, 81, 0.5);
        border-color: rgba(75, 85, 99, 0.5);
        color: #ffffff;
    }

    .form-floating > label {
        color: #9ca3af;
    }
}

/* Print styles (hide decorative elements when printing) */
@media print {
    .floating-shapes,
    .shape {
        display: none;
    }

    body.auth-page {
        background: white;
    }

    .auth-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
