/* ═══════════════════════════════════════════════════════════
   KLD-IPATS AUTH MODAL STYLES
   Modern, Secure, Branded Design
   ═══════════════════════════════════════════════════════════ */

:root {
    --kld-primary: #1a6b3a;
    --kld-primary-dark: #0d3d21;
    --kld-primary-light: #2d8a50;
    --kld-gold: #c9a227;
    --kld-gold-dark: #b8911f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   AUTH WRAPPER
   ═══════════════════════════════════════════════════════════ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-image: url('../images/landing-page-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0d3d21 0%, #1a6b3a 50%, #2d8a50 100%);
    opacity: 0.85;
}

.pattern-overlay {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(201, 162, 39, 0.15) 0%, transparent 50%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.03) 0px,
            transparent 1px,
            transparent 40px,
            rgba(255, 255, 255, 0.03) 41px
        );
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════
   AUTH CONTAINER
   ═══════════════════════════════════════════════════════════ */

.auth-container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════
   LEFT PANEL (BRANDING)
   ═══════════════════════════════════════════════════════════ */

.auth-left {
    background: linear-gradient(135deg, rgba(10, 46, 25, 0.94) 0%, rgba(13, 61, 33, 0.94) 60%, rgba(26, 107, 58, 0.94) 100%),
                url('../images/landing-page-bg.png');
    background-size: cover;
    background-position: center;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    padding: 15px;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo i {
    font-size: 2.5rem;
    color: var(--kld-primary);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.brand-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 0.95rem;
}

.feature-item i {
    font-size: 1.25rem;
    color: var(--kld-gold);
}

.registration-benefits {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.registration-benefits h6 {
    color: white;
    font-weight: 600;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.benefit-item:last-child {
    margin-bottom: 0;
}

.benefit-item i {
    color: var(--kld-gold);
    font-size: 1.1rem;
}

.institution-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.seal-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    padding: 5px;
    object-fit: contain;
}

.inst-name {
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
}

.inst-tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ═══════════════════════════════════════════════════════════
   RIGHT PANEL (FORM)
   ═══════════════════════════════════════════════════════════ */

.auth-right {
    background: white;
    padding: 50px 45px;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 20;
}

.close-btn:hover {
    background: var(--kld-primary);
    color: white;
    transform: rotate(90deg);
}

.form-wrapper {
    max-width: 450px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 30px;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--kld-primary);
    margin-bottom: 8px;
}

.form-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════
   FORM STYLES
   ═══════════════════════════════════════════════════════════ */

.auth-form {
    margin-bottom: 20px;
}

.form-floating > .form-control,
.form-floating > .form-select {
    height: 58px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--kld-primary);
    box-shadow: 0 0 0 4px rgba(26, 107, 58, 0.1);
}

.form-floating > label {
    padding: 1rem 0.75rem;
    color: #6b7280;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--kld-primary);
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background: #ef4444;
}

.password-strength.medium {
    background: #f59e0b;
}

.password-strength.strong {
    background: #10b981;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */

.btn-auth {
    height: 56px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-primary.btn-auth {
    background: var(--kld-primary);
    border: none;
}

.btn-primary.btn-auth:hover {
    background: var(--kld-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(26, 107, 58, 0.3);
}

.btn-primary.btn-auth:active {
    transform: translateY(0);
}

.btn-loader {
    display: inline-flex;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════════════════════ */

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 15px;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   LINKS
   ═══════════════════════════════════════════════════════════ */

.register-link {
    text-align: center;
    color: #6b7280;
    font-size: 0.95rem;
}

.register-link a {
    color: var(--kld-primary);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: var(--kld-primary);
    font-size: 0.9rem;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.form-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.form-footer small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #9ca3af;
}

/* ═══════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════ */

.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .auth-left {
        display: none;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 10px;
    }
    
    .auth-container {
        border-radius: 16px;
    }
    
    .auth-right {
        padding: 30px 25px;
    }
    
    .form-title {
        font-size: 1.75rem;
    }
    
    .form-floating > .form-control,
    .form-floating > .form-select {
        height: 54px;
    }
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM SCROLLBAR
   ═══════════════════════════════════════════════════════════ */

.auth-right::-webkit-scrollbar {
    width: 6px;
}

.auth-right::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.auth-right::-webkit-scrollbar-thumb {
    background: var(--kld-primary);
    border-radius: 3px;
}

.auth-right::-webkit-scrollbar-thumb:hover {
    background: var(--kld-primary-dark);
}