@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-blue: #1d4ed8;
    --secondary-blue: #3b82f6;
    --logo-blue: #1d4ed8;
    --logo-green: #2ecc71;
    --logo-darkgreen: #27ae60;
    --header-gradient: linear-gradient(135deg, #1d4ed8, #3b82f6);
    --bg-main: #f4f7f9;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* =======================================
   SPLIT SCREEN LOGIN ARCHITECTURE 
========================================= */

.split-screen-body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden; /* Prevent scrolling if fits */
}

.split-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* --- LEFT PANEL: INFORMATION & BRANDING --- */
.split-left {
    flex: 1;
    /* Darkened blue gradient per user request */
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.88) 0%, rgba(59, 130, 246, 0.88) 100%), url('../images/bg_kolej.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 40px;
    overflow: hidden;
}

/* Subtle background element / watermark */
.split-left::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.left-content {
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 15px;
}

.logo-img {
    object-fit: contain;
    filter: drop-shadow(0px 10px 15px rgba(0,0,0,0.3));
    height: auto; /* Membenarkan ketinggian mengikut proporsi bucu */
}

/* Keseimbangan Logo Web View / Desktop */
.brand-row .logo-img:first-child {
    width: 55%; /* Logo Jata Negara */
    max-width: 250px;
}
.brand-row .logo-img:last-child {
    width: 40%; /* Logo Kolej Komuniti */
    max-width: 170px;
}

.welcome-text h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 0px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.welcome-text h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #e0f2fe;
    margin-bottom: 0px;
}

.welcome-text .college-name {
    font-size: 1rem;
    font-weight: 400;
    color: #bae6fd;
    opacity: 0.9;
    margin-bottom: 10px;
}

.disclaimer-box {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 16px;
    margin-top: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.disclaimer-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fca5a5;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.disclaimer-box p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
    opacity: 0.9;
    text-align: justify;
}

/* --- RIGHT PANEL: LOGIN ACTIONS --- */
.split-right {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

.login-panel {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-header h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Auth Tabs - 3 Column Underline Style */
.auth-tabs {
    display: flex;
    border-bottom: 3px solid #e2e8f0;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 10px 5px;
    background: transparent;
    border: none;
    border-bottom: 4px solid transparent;
    font-weight: 800;
    font-size: 0.9rem;
    color: #94a3b8;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    margin-bottom: -3px; /* Pull down to overlap border */
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    color: #64748b;
    background: #f8fafc;
}

/* Unique Tab Active Colors */
#tab-pelajar.active {
    color: #27ae60;
    border-bottom-color: #27ae60;
    background: #f0fdf4;
}

#tab-admin.active {
    color: #1e40af; /* Navy Blue */
    border-bottom-color: #1e40af;
    background: #eff6ff;
}

#tab-pemantau.active {
    color: #2563eb; /* Bright Blue */
    border-bottom-color: #2563eb;
    background: #eff6ff;
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-form.active {
    display: block;
}

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

.input-group {
    margin-bottom: 18px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-transform: none; /* Removed uppercase as requested in image */
    letter-spacing: 0;
}

/* Add custom icon wrapper for input fields */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 12px 18px 12px 45px; /* Added left padding for icon */
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
    background: #f8fafc;
}

.input-group input:focus {
    border-color: var(--primary-blue);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.1);
}

/* specific logic for tac row */
.tac-input-wrapper {
    display: flex;
    gap: 10px;
}
.btn-request-tac {
    background: rgba(29, 78, 216, 0.6);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-request-tac:hover { background: rgba(30, 64, 175, 0.7); }

.password-group { position: relative; }
.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    background: none;
    padding: 5px;
}

.btn-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 1px;
    margin-top: 10px;
}
/* Pelajar Button */
.btn-pelajar { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
.btn-pelajar:hover { background: #27ae60; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(39, 174, 96, 0.2); }

/* Admin (Penyelaras) Button */
.btn-admin { background: linear-gradient(135deg, #1e52a4 0%, #1e40af 100%); }
.btn-admin:hover { background: #1e40af; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(30, 82, 164, 0.2); }

/* Pemantau Button */
.btn-pemantau-btn { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.btn-pemantau-btn:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2); }

.form-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.form-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.form-footer a:hover { text-decoration: underline; }
.link-telegram { display: inline-block; margin-top: 10px; padding: 6px 15px; border-radius: 50px; background: #e8f5e9; color: var(--logo-darkgreen) !important; text-decoration: none!important;}
.link-telegram:hover { background: #dcfce7; }

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }

/* --- Announcement Widget (Left Panel) --- */
.announcement-widget {
    margin-top: 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 12px 18px;
    max-height: 140px;
    overflow-y: auto;
    text-align: left;
}
.announcement-widget h3 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.8);
    margin: 0 0 12px;
}
.ann-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.ann-item:last-child { border-bottom: none; }
.ann-item strong { font-size: 0.86rem; color: #fff; display: block; margin-bottom: 3px; }
.ann-item p { font-size: 0.8rem; color: rgba(255,255,255,0.75); margin: 0; line-height: 1.5; }

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .split-screen-body {
        overflow-y: auto; /* allow scroll on mobile */
    }
    
    .split-container {
        flex-direction: column; /* Info on top (original request) */
        height: auto;
        min-height: 100vh;
    }
    
    .split-left {
        flex: none; 
        padding: 40px 20px 25px; /* Kurangkan padding bawah untuk rapatkan sikit tapi bernafas */
        text-align: center;
    }
    
    .brand-row {
        justify-content: center;
        margin-bottom: 20px;
        gap: 15px;
    }
    
    .logo-img { 
        filter: drop-shadow(0px 5px 10px rgba(0,0,0,0.3));
        height: auto; /* Tukar dari height tetap kepada height auto */
    }
    
    /* Gunakan peratusan lebar (width) supaya imej tidak 'termampat' (squished) pada skrin sempit */
    .brand-row .logo-img:first-child {
        width: 55%; /* Jata Negara perlukan ruang sedikit lebih kerana teksnya panjang ke bawah */
        max-width: 180px;
    }
    .brand-row .logo-img:last-child {
        width: 40%; /* Logo KKKL akan seimbang secara automatik mengikut ruang */
        max-width: 140px;
    }
    
    .welcome-text h1 { 
        font-size: 2rem; 
        margin-bottom: 5px;
        letter-spacing: 1px;
    }
    .welcome-text h2 { 
        font-size: 1.2rem; 
        margin-bottom: 3px;
    }
    .welcome-text .college-name { 
        font-size: 0.95rem;
        margin-bottom: 25px; 
    }

    .disclaimer-box {
        padding: 15px;
        margin-top: 20px;
        border-radius: 12px;
    }
    .disclaimer-box h3 { font-size: 0.95rem; margin-bottom: 8px; }
    .disclaimer-box p { font-size: 0.8rem; line-height: 1.5; }
    
    .announcement-widget {
        margin-top: 15px;
        padding: 12px;
        border-radius: 10px;
    }
    
    .split-right {
        padding: 30px 20px 60px; /* Tambah padding-top supaya sentiasa ada ruang bernafas di atas kotak */
        flex: 1; 
        background: var(--bg-main); /* Pastikan background kelabu lembut */
        align-items: flex-start; /* Susun kotak log masuk ke atas supaya tak terapung terlalu jauh untuk skrin panjang */
    }
    
    .login-panel {
        padding: 28px 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        border-radius: 20px;
        width: 100%;
    }
    
    .login-header h2 { font-size: 1.5rem; margin-bottom: 5px; }
    .login-header p { font-size: 0.9rem; }
    
    .auth-tabs { 
        flex-direction: row; 
        margin-bottom: 25px; 
    }
    .tab-btn { font-size: 0.85rem; padding: 12px 5px; }
    
    .input-group { margin-bottom: 15px; }
    .input-group label { font-size: 0.8rem; margin-bottom: 5px; }
    .input-group input { padding: 12px 14px 12px 40px; font-size: 0.9rem; }
    .input-icon { font-size: 1rem; left: 14px; }
    
    .btn-submit { padding: 14px; font-size: 1rem; margin-top: 5px; }
}