:root {
    --bgmea-primary: #005a9c;
    --bgmea-primary-dark: #004071;
    --bgmea-accent: #0d9488;
    --bgmea-accent-light: #f0fdfa;
    --bgmea-dark: #0f172a;
    --bgmea-slate: #334155;
    --bgmea-muted: #64748b;
    --bgmea-light-bg: #f1f5f9;
    --bgmea-card-bg: #ffffff;
    --bgmea-border: #e2e8f0;
    --bgmea-radius: 12px;
    --bgmea-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --bgmea-shadow-hover: 0 20px 30px -10px rgba(15, 23, 42, 0.12), 0 10px 15px -5px rgba(15, 23, 42, 0.06);
}

body {
    background: linear-gradient(135deg, #eef2f6 0%, #e5ebf2 50%, #dbe4ee 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    color: var(--bgmea-dark);
    margin: 0;
    padding: 0;
}

.login-page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top Announcement Marquee Bar */
.top-announcement-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--bgmea-border);
    padding: 8px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.announcement-badge {
    background: linear-gradient(135deg, #005a9c, #0d9488);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.spnMessageText {
    text-decoration: none;
    margin-right: 100px;
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.88rem;
}

/* Main Content Grid */
.main-content-section {
    flex: 1;
    padding: 25px 20px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

/* Left Card - Guidelines */
.guidelines-card {
    background: var(--bgmea-card-bg);
    border-radius: var(--bgmea-radius);
    box-shadow: var(--bgmea-shadow);
    border: 1px solid var(--bgmea-border);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.guidelines-header {
    padding: 22px 26px 16px 26px;
    border-bottom: 1px solid var(--bgmea-border);
    background: #ffffff;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.guidelines-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.3px;
}

.guidelines-subtitle {
    font-size: 0.86rem;
    color: var(--bgmea-muted);
    margin: 4px 0 0 0;
}

/* Tab Switcher & Search Bar Toolbar */
.guidelines-toolbar {
    padding: 14px 26px;
    background: #f8fafc;
    border-bottom: 1px solid var(--bgmea-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.custom-nav-pills {
    display: flex;
    gap: 6px;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 10px;
    margin: 0;
    list-style: none;
}

.custom-nav-pills .nav-item .nav-link {
    border: none;
    background: transparent;
    color: var(--bgmea-slate);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 7px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.custom-nav-pills .nav-item .nav-link:hover {
    color: var(--bgmea-primary);
}

.custom-nav-pills .nav-item .nav-link.active {
    background: #ffffff;
    color: var(--bgmea-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.search-box-wrapper {
    position: relative;
    min-width: 220px;
    flex: 1;
    max-width: 320px;
}

.search-box-wrapper input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    font-size: 0.84rem;
    border-radius: 8px;
    border: 1px solid var(--bgmea-border);
    background: #ffffff;
    color: var(--bgmea-dark);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box-wrapper input:focus {
    border-color: var(--bgmea-primary);
    box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.12);
}

.search-box-wrapper .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Guideline Tables Styling */
.guidelines-body {
    padding: 20px 26px;
    flex: 1;
    overflow-y: auto;
    max-height: 520px;
}

.table-category-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bgmea-dark);
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e8f0;
}

.table-category-heading .cat-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--bgmea-slate);
}

.guideline-custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 22px;
    border: 1px solid var(--bgmea-border);
    border-radius: 10px;
    overflow: hidden;
}

.guideline-custom-table th {
    background: #f8fafc;
    color: var(--bgmea-slate);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--bgmea-border);
    border-top: none;
}

.guideline-custom-table td {
    padding: 11px 16px;
    font-size: 0.88rem;
    color: var(--bgmea-dark);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    background: #ffffff;
    transition: background 0.15s ease;
}

.guideline-custom-table tr:last-child td {
    border-bottom: none;
}

.guideline-custom-table tr:hover td {
    background: #f8fafc;
}

.app-title-cell {
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-title-cell .icon-pill {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.app-title-cell .icon-pill.service {
    background: #f0fdf4;
    color: #16a34a;
}

/* Download Action Button */
.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 7px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-download-pdf:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
    text-decoration: none;
}

.guidelines-footer-note {
    background: #f8fafc;
    padding: 12px 24px;
    border-top: 1px solid var(--bgmea-border);
    font-size: 0.8rem;
    color: var(--bgmea-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* Right Card - Login Panel */
.login-card {
    background: var(--bgmea-card-bg);
    border-radius: var(--bgmea-radius);
    box-shadow: var(--bgmea-shadow);
    border: 1px solid var(--bgmea-border);
    padding: 32px 30px 24px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-brand-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-brand-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.login-system-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.login-portal-pill {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 12px;
    margin-top: 6px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* Form Controls */
.custom-form-group {
    margin-bottom: 16px;
    position: relative;
}

.custom-form-group .form-control {
    height: 46px;
    padding-left: 42px;
    padding-right: 42px;
    font-size: 0.92rem;
    border-radius: 9px;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #0f172a;
}

.custom-form-group .form-control:focus {
    border-color: var(--bgmea-primary);
    box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.15);
    background: #ffffff;
}

.custom-form-group .input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.05rem;
    z-index: 4;
}

.custom-form-group .password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.05rem;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 4px 6px;
    z-index: 4;
    transition: color 0.2s ease;
}

.custom-form-group .password-toggle-btn:hover {
    color: var(--bgmea-primary);
}

.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.84rem;
}

.form-options-row a {
    color: var(--bgmea-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.form-options-row a:hover {
    color: var(--bgmea-primary-dark);
    text-decoration: underline;
}

.btn-signin-cta {
    height: 46px;
    background: linear-gradient(135deg, #005a9c 0%, #0369a1 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 90, 156, 0.25);
    cursor: pointer;
    width: 100%;
}

.btn-signin-cta:hover {
    background: linear-gradient(135deg, #00467a 0%, #025381 100%);
    box-shadow: 0 6px 16px rgba(0, 90, 156, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

/* Support Hotline Card */
.hotline-banner-card {
    background: #fff1f2;
    border: 1px solid #ffe4e6;
    border-radius: 9px;
    padding: 10px 14px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hotline-icon {
    width: 36px;
    height: 36px;
    background: #e11d48;
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.hotline-content h6 {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #9f1239;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hotline-content p {
    margin: 2px 0 0 0;
    font-size: 0.84rem;
    color: #881337;
    font-weight: 600;
}

/* Secondary Action Buttons */
.auth-divider {
    text-align: center;
    position: relative;
    margin: 16px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: #ffffff;
    position: relative;
    padding: 0 12px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-register-cta {
    height: 40px;
    border: 1.5px solid #0d9488;
    color: #0d9488;
    background: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-register-cta:hover {
    background: #0d9488;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2);
    text-decoration: none;
}

.guide-links-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-secondary-link {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 7px;
    border: 1px solid var(--bgmea-border);
    background: #f8fafc;
    color: var(--bgmea-slate);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary-link:hover {
    background: #e2e8f0;
    color: var(--bgmea-dark);
    text-decoration: none;
}

/* Footer */
.login-footer {
    text-align: center;
    padding: 14px 20px;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.6);
}

/* Responsive Tweaks */
@media (max-width: 991px) {
    .main-content-section {
        padding: 15px 10px;
    }
    .guidelines-card {
        margin-bottom: 25px;
    }
    .guidelines-body {
        max-height: 420px;
    }
}
