/* ============================================
   ECCAF Global Styles
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.login-page {
    position: relative;
    overflow-y: auto;
    align-items: flex-start;
    padding: 24px 16px;
}

body.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../images/IIUM Kuantan.png') center center / cover no-repeat;
    filter: blur(4px) brightness(0.75);
    transform: scale(1.05);
    z-index: -1;
}

/* ============================================
   Login Page Layout
   ============================================ */

.login-container {
    display: flex;
    width: 960px;
    max-width: 95vw;
    min-height: 580px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* --- Left Panel: Info --- */
.info-panel {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.info-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.info-panel::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.info-content {
    position: relative;
    z-index: 1;
}

.info-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.info-content > p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 32px;
}

.info-highlights {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.highlight-icon {
    font-size: 0.8rem;
    color: #c4b5fd;
}

.highlight-heading {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-top: 6px;
}

/* --- Right Panel: Login Form --- */
.form-panel {
    flex: 1;
    background: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 4px;
}

.form-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 28px;
}

/* Error message */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* Input groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input-group input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.input-group input::placeholder {
    color: #9ca3af;
}

.input-group input.uppercase {
    text-transform: uppercase;
}

/* Form options row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    accent-color: #7c3aed;
}

.forgot-link {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Login button */
.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-login:hover {
    opacity: 0.92;
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form footer */
.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: #6b7280;
}

.form-footer a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Forgot Password Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 420px;
    max-width: 90vw;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 8px;
}

.modal-desc {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #374151;
}

/* ============================================
   Register Page
   ============================================ */

.register-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.register-card {
    background: #fff;
    width: 720px;
    max-width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px 48px;
}

.register-header {
    text-align: center;
    margin-bottom: 8px;
}

.register-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e1b4b;
    margin-bottom: 4px;
}

/* Role Tabs */
.role-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 28px;
}

.role-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.role-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    border-radius: 3px 3px 0 0;
    transition: background 0.2s;
}

.role-tab:hover {
    color: #6b7280;
}

.role-tab.active {
    color: #4f46e5;
}

.role-tab.active::after {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* Success message */
.success-message {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* Form row (side by side fields) */
.form-row {
    display: flex;
    gap: 16px;
}

.form-row .input-group {
    flex: 1;
}

/* Select inputs */
.input-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input-group select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* Radio Groups */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 6px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #374151;
    cursor: pointer;
    padding: 6px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.radio-label:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.radio-label input[type="radio"] {
    accent-color: #7c3aed;
    margin: 0;
}

.radio-label:has(input:checked) {
    border-color: #7c3aed;
    background: #f5f3ff;
    font-weight: 600;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
        width: 100%;
    }

    .info-panel {
        padding: 32px 24px;
    }

    .info-content h1 {
        font-size: 1.4rem;
    }

    .form-panel {
        padding: 32px 24px;
    }

    /* Register page mobile */
    .register-card {
        padding: 28px 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ============================================
   Announcement Bell — shared across dashboards
   ============================================ */
.bell-wrap {
    position: relative;
    margin-right: 8px;
}

.btn-bell {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 6px 8px;
    border-radius: 8px;
    color: #64748b;
    position: relative;
    transition: background 0.15s;
}

.btn-bell:hover { background: #f1f5f9; }

.bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc2626;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.bell-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 999;
    overflow: hidden;
    max-height: 420px;
    flex-direction: column;
}

.bell-panel.open {
    display: flex;
}

#bell-list {
    overflow-y: auto;
    flex: 1;
}


.bell-panel-header {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.bell-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.bell-item:last-child { border-bottom: none; }

.bell-item-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.bell-item-msg {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 6px;
    white-space: pre-wrap;
}

.bell-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bell-item-date { font-size: 0.75rem; color: #94a3b8; }

.bell-dismiss {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.bell-dismiss:hover { background: #f1f5f9; color: #64748b; }

.bell-empty {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}
