/* login.css - Premium Login Page Styles */

.auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f8fafc;
    overflow: hidden;
    position: relative;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.75rem 2rem;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.brand-logo {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    box-shadow: 0 10px 20px -5px rgba(2, 132, 199, 0.4);
}

.brand-logo .emoji {
    font-size: 24px;
}

.brand-name {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    margin: 0 0 0.25rem;
    letter-spacing: 1px;
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.institution-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.login-form .form-group {
    margin-bottom: 1.15rem;
}

.login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #64748b;
    pointer-events: none;
}

.login-form .form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.login-form .form-control::placeholder {
    color: #475569;
}

.btn-toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.btn-toggle-password:hover {
    color: #e2e8f0;
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    margin-top: 1rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.39);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
    background: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

/* Auth Alerts */
.auth-alert-container {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    z-index: 50;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-info {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #bae6fd;
}

.btn-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 0 0 1rem;
}

.btn-close:hover {
    opacity: 1;
}

/* Background Particles Effect */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56,189,248,0.4) 0%, rgba(56,189,248,0) 70%);
}

.p1 { width: 400px; height: 400px; top: -100px; left: -100px; animation: float1 15s infinite alternate ease-in-out; }
.p2 { width: 300px; height: 300px; bottom: -50px; right: -50px; animation: float2 20s infinite alternate-reverse ease-in-out; background: radial-gradient(circle, rgba(16,185,129,0.3) 0%, rgba(16,185,129,0) 70%); }
.p3 { width: 200px; height: 200px; top: 40%; left: 60%; animation: float3 12s infinite alternate ease-in-out; background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, rgba(139,92,246,0) 70%); }
.p4 { width: 150px; height: 150px; bottom: 20%; left: 10%; animation: float2 18s infinite alternate ease-in-out; }
.p5 { width: 250px; height: 250px; top: 10%; right: 20%; animation: float1 25s infinite alternate-reverse ease-in-out; }

@keyframes float1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

@keyframes float2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, 30px) scale(1.2); }
}

@keyframes float3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -40px) scale(0.9); }
}

/* PWA Installation Banner & Overlay */
.pwa-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 440px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s;
    opacity: 0;
}

.pwa-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.pwa-icon-container {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-text-container {
    flex-grow: 1;
}

.pwa-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.pwa-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.3;
}

.btn-pwa-action {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.btn-pwa-action:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.btn-pwa-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 4px;
}

.btn-pwa-close:hover {
    color: #ffffff;
}

/* iOS Overlay styling */
.pwa-ios-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.pwa-ios-card {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 85%;
    max-width: 320px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-pwa-ios-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-pwa-ios-close:hover {
    color: #fff;
}

.ios-steps {
    text-align: left;
}

.ios-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.step-num {
    width: 20px;
    height: 20px;
    background: #0ea5e9;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-text {
    color: #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.45;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
