/* ===================================
   Teacher Login — Premium Design
   =================================== */

:root {
    --teal-main: #00BFA5;
    --teal-deep: #00897B;
    --teal-dark: #004D40;
    --teal-light: #E0F2F1;
    --teal-gradient: linear-gradient(135deg, #00BFA5 0%, #00796B 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #f5f5f5 50%, #e8f5e9 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    display: flex;
    max-width: 900px;
    width: 100%;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12), 0 10px 30px rgba(0, 191, 165, 0.08);
    background: white;
    animation: cardSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* === Image Side === */
.login-image {
    flex: 1;
    background: linear-gradient(-45deg, #00BFA5, #00796B, #004D40, #00897B);
    background-size: 300% 300%;
    animation: gradientFlow 12s ease infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    overflow: hidden;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-image .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
}

.floating-shapes .shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    animation: floatShape 20s infinite linear;
}

.shape-1 { width: 200px; height: 200px; top: -50px; right: -30px; }
.shape-2 { width: 150px; height: 150px; bottom: -30px; left: -20px; animation-delay: -7s; }
.shape-3 { width: 100px; height: 100px; top: 40%; left: 20%; animation-delay: -14s; }

@keyframes floatShape {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(30px, -30px) rotate(120deg) scale(1.1); }
    66% { transform: translate(-20px, 20px) rotate(240deg) scale(0.95); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

.image-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
}

.teacher-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    animation: pulseIcon 3s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 10px rgba(255,255,255,0.1); }
}

.welcome-text {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.welcome-sub {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 400;
}

/* === Form Side === */
.login-form {
    flex: 1;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--teal-light);
    color: var(--teal-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(0, 191, 165, 0.15);
}

.form-header h3 {
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.form-header p {
    font-size: 0.9rem;
}

/* Custom Input Styling */
.input-group-modern {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafa;
    border: 2px solid #e8eded;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group-modern:focus-within {
    border-color: var(--teal-main);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 191, 165, 0.1);
}

.input-icon {
    padding: 0 0.5rem 0 1rem;
    color: #9e9e9e;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.input-group-modern:focus-within .input-icon {
    color: var(--teal-main);
}

.input-group-modern .form-control {
    border: none;
    background: transparent;
    padding: 0.85rem 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: none !important;
}

.input-group-modern .form-control::placeholder {
    color: #bdbdbd;
    font-weight: 400;
}

.toggle-password {
    padding: 0 1rem;
    cursor: pointer;
    color: #9e9e9e;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--teal-main);
}

/* Login Button */
.btn-login {
    background: var(--teal-gradient);
    border: none;
    color: white;
    padding: 0.85rem;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 191, 165, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 191, 165, 0.4);
    color: white;
}

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

.btn-login:disabled {
    opacity: 0.7;
    transform: none;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    font-size: 0.8rem;
    color: #9e9e9e;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Admin Link */
.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: #f5f5f5;
    border-radius: 12px;
    color: #616161;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background: var(--teal-light);
    color: var(--teal-deep);
}

/* Alert Styling */
.alert-danger {
    background: #FFEBEE;
    border: 1px solid #FFCDD2;
    color: #C62828;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        border-radius: 24px;
    }

    .login-image {
        min-height: 200px;
    }

    .welcome-text {
        font-size: 1.5rem;
    }

    .teacher-icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .login-form {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0.5rem;
    }

    .login-card {
        border-radius: 20px;
    }

    .login-image {
        min-height: 160px;
    }

    .login-form {
        padding: 1.5rem 1.25rem;
    }
}
