/* ===== Login Page (Financial Theme) ===== */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #004080, #0066cc); /* Biru korporat */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #333;
}

/* Container utama */
.login-container {
    background: #fff;
    padding: 40px 30px;   /* padding seimbang */
    border-radius: 10px;
    width: 300px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    text-align: center;
}

/* Field input */
.login-container input {
    width: 90%;          /* kecilkan sikit supaya ada ruang kiri-kanan */
    padding: 10px;
    margin: 8px auto;    /* auto = center */
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    font-size: 14px;
    display: block;      /* pastikan duduk tengah */
}

/* Button */
.login-container button {
    width: 94%;
    margin: 15px auto 0 auto;  /* center juga */
    display: block;
}


/* Tajuk */
.login-container h2 {
    margin-bottom: 20px;
    color: #004080;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.4;
    text-transform: uppercase;
}

.login-container h2 small {
    display: block;
    font-size: 13px;
    color: #555;
    margin-top: 8px;
    font-weight: 500;
}

.info {
    font-size: 13px;
    color: #0066cc;
    animation: blink 1s step-start infinite;
}

.error {
    font-size: 13px;
    color: #cc0000;
    animation: blink 1s step-start infinite;
}

/* Animasi berkelip */
@keyframes blink {
    50% {
        opacity: 0;
    }
}

form input[type="text"],
form input[type="password"] {
    width: 200px;
    padding: 6px 10px;
    font-size: 13px;
    box-sizing: border-box;
    display: block;
    margin: 10px auto;  /* Tengah */
    text-align: center; /* ✅ Letakkan teks & placeholder di tengah */
}

input[type="password"] {
    -webkit-text-security: square;  /* default (•) */
    /* Tukar kepada pilihan lain: */
    /* -webkit-text-security: circle; */
    /* -webkit-text-security: square; */
    /* -webkit-text-security: none; */ /* Papar teks sebenar */
}


button[type="submit"] {
    width: 150px;
    padding: 8px 12px;
    font-size: 15px;
    display: block;
    margin: 10px auto;
}

form label {
    display: block;
    text-align: center;  /* ✅ Font label di tengah */
    font-weight: 600;
    margin-bottom: 5px;
}





/* Label */
label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    text-align: left;
    color: #444;
    font-size: 14px;
}

/* Input field */
input {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #ccd6e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.3s ease;
}

.password-wrapper {
    position: relative;          /* Bekas jadi rujukan posisi */
    display: inline-block;
}

.password-wrapper input {
    width: 200px;
    padding: 6px 35px 6px 10px;  /* ✅ Tambah ruang kanan untuk ikon */
    font-size: 14px;
    text-align: center;
    box-sizing: border-box;
}

/* ✅ Letakkan ikon mata di dalam kotak input (sebelah kanan) */
.password-wrapper .toggle-password {
    position: absolute;
    right: 10px;                 /* Jarak dari tepi kanan input */
    top: 50%;                    /* Letak di tengah menegak */
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    color: #555;                 /* (Opsyenal) warna ikon */
}

.password-wrapper .toggle-password:hover {
    color: #000;                 /* (Opsyenal) tukar warna bila hover */
}


input:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 5px rgba(0,102,204,0.3);
}

/* Button */
button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: linear-gradient(90deg, #0066cc, #004080);
    border: none;
    color: white;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: linear-gradient(90deg, #004080, #00264d);
    transform: translateY(-2px);
}

/* Logo */
.login-logo {
    width: 80px;
    margin-bottom: 15px;
}

/* Footer */
.login-footer {
    margin-top: 25px;
    font-size: 12px;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Error box */
.error {
    background: #ffe6e6;
    border: 1px solid #ff4d4d;
    color: #b30000;
    padding: 10px;
    margin-bottom: 18px;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
}


/* ===== Popup Notis Keselamatan ===== */
/* ✅ Betulkan lapisan overlay supaya menutup seluruh skrin */
.popup-overlay {
    display: none;                     /* Mula tersembunyi */
    position: fixed;                   /* Tutup keseluruhan viewport */
    top: 0;
    left: 0;
    width: 100vw;                      /* Guna lebar penuh skrin */
    height: 100vh;                     /* Guna tinggi penuh skrin */
    background: rgba(0, 0, 0, 0.7);    /* Lapisan gelap separa lut sinar */
    backdrop-filter: blur(2px);        /* (opsyenal) efek kabur */
    justify-content: center;
    align-items: center;
    z-index: 99999;                    /* Pastikan di atas semua elemen lain */
}

/* ✅ Popup box kekal kemas di tengah */
.popup-box {
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    padding: 30px 40px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    text-align: left;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6em;
    color: #333;
    position: relative;
    z-index: 100000; /* tambah supaya berada di atas overlay */
}


.popup-box h3 {
    margin-top: 0;
    color: #b35400;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
    font-size: 18px;
    text-align: center;
}

.popup-box p,
.popup-box ul {
    font-size: 14px;
    color: #222;
    margin: 10px 0;
}

.popup-box li {
    margin-bottom: 5px;
}

.consent-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    margin-top: 20px;
    font-size: 14px;
    gap: 6px;
    padding-left: 0;
}

.consent-label input[type="checkbox"] {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 2px solid #555;
    border-radius: 3px;
    margin: 0;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.consent-label input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.consent-label input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.popup-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

/* Elak gaya global button daripada menjejaskan butang popup */
.popup-actions button {
    all: unset;              /* buang semua gaya global */
    display: inline-block;   /* pulihkan gaya asas */
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
}

/* Butang SETUJU (biru korporat kekal) */
.btn-ok {
    background-color: #0066cc !important;
    color: #ffffff !important;
    border: 2px solid #004c99 !important;
    border-radius: 6px !important;
    padding: 10px 22px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    box-shadow: 0 3px 6px rgba(0, 102, 204, 0.3) !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-ok:hover {
    background-color: #0066cc !important; /* kekal biru */
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 10px rgba(0, 102, 204, 0.4) !important;
}

/* Butang TIDAK SETUJU (merah amaran kekal) */
.btn-cancel {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border: 2px solid #a00000 !important;
    border-radius: 6px !important;
    padding: 10px 22px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    box-shadow: 0 3px 6px rgba(220, 53, 69, 0.3) !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-cancel:hover {
    background-color: #dc3545 !important; /* kekal merah */
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 10px rgba(220, 53, 69, 0.4) !important;
}

/* Tetap sembunyikan butang SETUJU pada permulaan */
#okBtn {
    display: none;
}

h3 {
    color: #b22222;
    font-weight: 700;
    text-transform: uppercase;
}

p, ul {
    font-size: 14px;
    line-height: 1.6;
}

/* Logo dalam Popup */
.popup-logo {
    text-align: center;
    margin-bottom: 15px;
}

.popup-logo img {
    width: 80px;               /* saiz sama seperti login page */
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
