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

:root {
    --primary-navy: #082756;
    --primary-blue: #0b57d0;
    --primary-blue-hover: #0947b0;
    --blue-tint: #eaf2ff;
    --blue-subtle: #f4f8fe;
    
    --text-main: #0a2249;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --bg-page: #f1f4f9;
    --bg-card: #ffffff;
    --border-card: #e5ebf3;
    --border-input: #d8e1ee;
    
    --sector-blue: #1a68d8;
    --sector-green: #2ba672;
    --sector-purple: #7e3af2;
    --sector-coral: #ef4444;
    --sector-cyan: #06b6d4;
    
    --shadow-card: 0 2px 12px rgba(11, 39, 86, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-btn: 0 4px 14px rgba(11, 87, 208, 0.28);
}

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

html, body {
    width: 100%;
    min-height: 100%;
    background-color: #e5e9f0;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-body);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 440px;
    margin: 0 auto;
    background-color: var(--bg-page);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

/* ─────────────────────────────────────────────────────────────
   TOP GOV HEADER (EXACT REPLICA FROM SCREENSHOT)
───────────────────────────────────────────────────────────── */
.top-header {
    background: linear-gradient(90deg, #062047 0%, #082756 50%, #0a2e64 100%);
    height: 48px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jata-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

.brand-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.portal-text {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.mykerjaya-text {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.header-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.28);
    margin: 0 6px;
}

.gov-text {
    display: flex;
    flex-direction: column;
    font-size: 8.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.15;
}

.header-right {
    display: flex;
    align-items: center;
}

.lang-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    padding: 4px 7px;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.lang-badge:hover {
    background: rgba(255, 255, 255, 0.15);
}

.flag-icon {
    font-size: 12px;
}

.lang-badge i {
    font-size: 9px;
    opacity: 0.8;
}

/* ─────────────────────────────────────────────────────────────
   HERO BANNER
───────────────────────────────────────────────────────────── */
.hero-section {
    width: 100%;
    background-color: var(--primary-navy);
    position: relative;
    overflow: hidden;
}

.hero-image-box {
    width: 100%;
    line-height: 0;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ─────────────────────────────────────────────────────────────
   PORTAL MAIN CARD (BELOW HERO)
───────────────────────────────────────────────────────────── */
.portal-main-card {
    background: var(--bg-card);
    margin: 10px 10px 0 10px;
    border-radius: 12px;
    padding: 14px 14px 12px 14px;
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--blue-tint);
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 700;
    padding: 3.5px 9px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.badge-tag i {
    font-size: 12px;
}

.title-graphic-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.text-group {
    flex: 1;
}

.card-main-title {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.card-main-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    font-weight: 400;
}

.graphic-group {
    flex-shrink: 0;
    width: 76px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.stamp-badge-img {
    width: 72px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
}

/* SEARCH CTA BUTTON */
.btn-main-action {
    width: 100%;
    background: var(--primary-blue);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-main-action:hover, .btn-main-action:focus {
    background: var(--primary-blue-hover);
    transform: translateY(-1px);
}

.btn-main-action:active {
    transform: translateY(1px);
}

.btn-action-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-action-left i {
    font-size: 14px;
}

.btn-main-action > i {
    font-size: 14px;
}

.subtle-divider {
    height: 1px;
    background: #eef2f7;
    margin: 14px 0 10px 0;
}

/* 5 SECTOR ICONS IN ROW */
.sectors-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2px;
}

.sector-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    padding: 4px 1px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.sector-item:hover {
    background: rgba(11, 87, 208, 0.04);
}

.sector-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 5px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease;
}

.sector-item:hover .sector-circle {
    transform: scale(1.08);
}

.bg-blue   { background-color: var(--sector-blue); }
.bg-green  { background-color: var(--sector-green); }
.bg-purple { background-color: var(--sector-purple); }
.bg-coral  { background-color: var(--sector-coral); }
.bg-cyan   { background-color: var(--sector-cyan); }

.sector-title {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 2px;
}

.sector-subtitle {
    font-size: 8px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.15;
}

/* ─────────────────────────────────────────────────────────────
   APPLICATION FORM CARD
───────────────────────────────────────────────────────────── */
.form-wrapper-section {
    margin: 12px 10px 0 10px;
}

.form-box-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 18px 16px;
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
}

.form-header-area {
    text-align: center;
    margin-bottom: 18px;
}

.form-icon-pill {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--blue-tint);
    color: var(--primary-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
}

.form-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
}

.form-field-group {
    margin-bottom: 14px;
}

.form-field-group label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.field-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.field-input-box i {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-size: 15px;
    pointer-events: none;
}

.field-input-box input {
    width: 100%;
    height: 42px;
    border: 1.5px solid var(--border-input);
    border-radius: 8px;
    padding: 0 12px 0 36px;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--text-main);
    background: #fafcff;
    outline: none;
    transition: all 0.2s ease;
}

.field-input-box input:focus {
    border-color: var(--primary-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.12);
}

.phone-input-group {
    display: flex;
    height: 42px;
    border: 1.5px solid var(--border-input);
    border-radius: 8px;
    overflow: hidden;
    background: #fafcff;
    transition: all 0.2s ease;
}

.phone-input-group:focus-within {
    border-color: var(--primary-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.12);
}

.phone-prefix-box {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f1f5fa;
    padding: 0 10px;
    border-right: 1px solid var(--border-input);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    user-select: none;
}

.phone-input-group input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 12px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-main);
    background: transparent;
}

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.35;
}

.field-hint i {
    color: var(--primary-blue);
}

.submit-action-btn {
    width: 100%;
    margin-top: 14px;
    height: 44px;
    background: linear-gradient(135deg, #0b57d0 0%, #06409e 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.2s ease;
}

.submit-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(11, 87, 208, 0.35);
}

.submit-action-btn:active {
    transform: translateY(1px);
}

.form-trust-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f1f4f8;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9.5px;
    color: var(--text-muted);
}

.trust-badge i {
    color: #10b981;
    font-size: 12px;
}

/* ─────────────────────────────────────────────────────────────
   INFO NOTICE CARD
───────────────────────────────────────────────────────────── */
.info-section-wrapper {
    margin: 10px 10px 0 10px;
}

.info-alert-card {
    background: #eef6ff;
    border: 1px solid #cce3ff;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.info-alert-icon {
    font-size: 16px;
    color: var(--primary-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-alert-body strong {
    display: block;
    font-size: 11px;
    color: var(--primary-blue);
    margin-bottom: 2px;
}

.info-alert-body p {
    font-size: 10.5px;
    color: #3b5275;
    line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────
   BOTTOM SPACER & BOTTOM NAVBAR
───────────────────────────────────────────────────────────── */
.bottom-spacer {
    height: 75px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 440px;
    height: 56px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 600;
    transition: color 0.15s ease;
}

.nav-item i {
    font-size: 17px;
}

.nav-item.active {
    color: var(--primary-blue);
}

/* ─────────────────────────────────────────────────────────────
   LOADER OVERLAY
───────────────────────────────────────────────────────────── */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 39, 86, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-box {
    background: #ffffff;
    padding: 24px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px auto;
}

.loader-box p {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────
   SUB-PAGES: /info (OTP) & /auth (2FA) & /completed
───────────────────────────────────────────────────────────── */
.subpage-container {
    padding: 16px 12px;
    flex: 1;
}

.subpage-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px;
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
    text-align: center;
}

.subpage-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 14px;
}

.badge-blue { background: var(--blue-tint); color: var(--primary-blue); }
.badge-gold { background: #fef3c7; color: #d97706; }
.badge-green { background: #dcfce7; color: #16a34a; }

.subpage-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

.subpage-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.otp-inputs-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}

.otp-box {
    width: 48px;
    height: 52px;
    border: 2px solid var(--border-input);
    border-radius: 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-blue);
    background: #f8fafc;
    outline: none;
    transition: all 0.2s ease;
}

.otp-box:focus {
    border-color: var(--primary-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.15);
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.auth-input-wrap i {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    font-size: 16px;
}

.auth-input-wrap input {
    width: 100%;
    height: 46px;
    border: 1.5px solid var(--border-input);
    border-radius: 8px;
    padding: 0 14px 0 40px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
}

.auth-input-wrap input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.15);
}

.error-text {
    color: #dc2626;
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 12px;
}

.resend-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 16px;
}

.resend-text a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
}
