/* ==========================================================================
   SHARED AUTHENTICATION INTERFACE MODULE (LOGIN & REGISTER)
   ========================================================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* --- Core Layout Containers --- */
.content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    width: 100%;
    max-width: 1200px;
    gap: 40px;
    align-items: center;
    margin: 0 auto;
}

.left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.logo-landing {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.logo-img img {
    max-width: 160px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.logo-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
    margin-bottom: 8px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.logo-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.right {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* --- Base Form Box Structural Style --- */
.login-container,
.register-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-container { max-width: 440px; }
.register-container { max-width: 580px; } /* Mas malapad kaunti para sa split rows ng registration */

.login-header,
.register-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 35px 30px;
    text-align: center;
    color: white;
}

.school-name,
.register-header h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p,
.register-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* --- Dynamic Dynamic Badges --- */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
}

.login-body,
.register-body {
    padding: 35px;
}

/* --- State Messages System (Error & Success) --- */
.error, .success {
    border-left: 4px solid;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error {
    background: #fee2e2;
    color: #dc2626;
    border-color: #ef4444;
}

.success {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

/* --- Form Field Control Utilities --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 4px;
    position: relative;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4b5563;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label .required {
    color: #ef4444;
    font-weight: 700;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.forgot-link {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* --- System Framework Action Triggers --- */
.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.2);
    margin-top: 12px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 60, 114, 0.35);
}

.divider {
    text-align: center;
    margin: 25px 0 20px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 32%;
    height: 1px;
    background: #e5e7eb;
}
.divider::before { left: 0; }
.divider::after { right: 0; }

.register-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.register-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.register-btn:hover {
    border-color: #2563eb;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.register-btn .icon {
    font-size: 26px;
    margin-bottom: 8px;
    color: #2563eb;
}

.register-btn .title {
    font-weight: 700;
    color: #1f2937;
    font-size: 14px;
}

.register-btn .subtitle {
    color: #6b7280;
    font-size: 11px;
    margin-top: 2px;
}

.login-link {
    text-align: center;
    margin-top: 24px;
    color: #6b7280;
    font-size: 14px;
}

.login-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   MEDIA QUERY LIQUID GRID RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
    .content {
        grid-template-columns: 1fr;
        max-width: 480px;
        gap: 30px;
    }
    .logo-header h1 { font-size: 2.8rem; }
    .logo-img img { max-width: 120px; }
}

@media (max-width: 580px) {
    body { padding: 12px; }
    .login-container, .register-container { border-radius: 16px; }
    .login-header, .register-header { padding: 30px 20px; }
    .school-name, .register-header h1 { font-size: 26px; }
    .login-body, .register-body { padding: 24px 20px; }
    .form-grid { grid-template-columns: 1fr; gap: 14px; }
    .form-group.full-width { grid-column: span 1; }
    .register-btns { grid-template-columns: 1fr; gap: 12px; }
    .register-btn { flex-direction: row; justify-content: flex-start; gap: 16px; padding: 14px; }
    .register-btn .icon { margin-bottom: 0; font-size: 22px; }
    .register-btn .subtitle { display: none; }
}