/* ==========================================================================
   MCB Islamic FX Portal – LOGIN page
   Place : src/main/webapp/css/login.css   (loaded AFTER style.css)
   All rules are scoped to .fxl-* classes so nothing else in the app changes.
   ========================================================================== */

body.fxl-body { background: #04302a !important; margin: 0; color: #1f2d3d !important; font-family: "Segoe UI", Arial, Helvetica, sans-serif !important; }
.fxl-page, .fxl-page * { box-sizing: border-box; }
.fxl-page { width: 100%; padding: 0; margin: 0; }

/* ---------- Header (bank logo) ------------------------------------------------ */
.fxl-page .fxl-header { background: #fff; padding: 6px 24px; border-bottom: 3px solid #52b04b; }
.fxl-page .fxl-header img { display: block; max-width: 100%; height: auto; max-height: 90px; margin: 0; padding: 0; }

/* ---------- Hero ------------------------------------------------------------------ */
.fxl-hero {
    position: relative; overflow: hidden;
    min-height: calc(100vh - 100px);
    padding: 40px 5vw;
    display: grid; grid-template-columns: 420px minmax(0, 1fr);
    gap: 5vw; align-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 12% 30%, #0f8a78 0, transparent 42%),
        radial-gradient(circle at 90% 85%, #1d8f4e 0, transparent 38%),
        linear-gradient(135deg, #06433b, #032a25);
}
.fxl-globe { position: absolute; left: -160px; top: 50%; transform: translateY(-50%); width: 760px; max-width: none; opacity: .5; pointer-events: none; }
.fxl-sym { position: absolute; font: 800 90px Georgia, serif; color: rgba(255, 255, 255, .06); user-select: none; pointer-events: none; }
.fxl-sym1 { left: 44%; top: 6%; } .fxl-sym2 { left: 3%; bottom: 8%; } .fxl-sym3 { left: 48%; bottom: 4%; } .fxl-sym4 { right: 3%; top: 4%; }

/* ---------- Sign-in card -------------------------------------------------------------- */
.fxl-page .fxl-form { position: relative; z-index: 2; margin: 0; }
.fxl-page .login-panel.fxl-card {
    position: relative; left: auto; top: auto; margin: 0; width: 100%; max-width: 440px;
    background: #fff; opacity: 1; padding: 0; overflow: hidden;
    border-radius: 20px; box-shadow: 0 28px 70px rgba(0, 0, 0, .45);
}
.fxl-page .fxl-card-head { display: flex; align-items: center; gap: 12px; padding: 18px 26px; text-align: left; background: linear-gradient(135deg, #52b04b, #00805a); color: #fff; }
.fxl-page .fxl-card-head h1 { margin: 0; font-size: 1.25rem; letter-spacing: 1px; color: #fff; }
.fxl-page .fxl-card-head small { display: block; font-size: .78rem; opacity: .9; }
.fxl-card-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.fxl-page .fxl-card-body { padding: 24px 26px 22px; color: #1f2d3d; }

/* status message (login.message / login.color) */
.fxl-page .fxl-message { display: block; margin-bottom: 14px; padding: 10px 12px; border-left: 4px solid currentColor; border-radius: 8px; background: #f6f8fa; font-size: .85rem; font-weight: 600; text-align: left; }
.fxl-page .fxl-message:empty { display: none; }

/* inputs (override style.css: width 95%, height 22px, underline style) */
.fxl-page .fxl-field { margin-bottom: 12px; }
.fxl-page .fxl-field .ui-password { display: block; width: 100%; }
.fxl-page input.fxl-input {
    display: block; width: 100% !important; height: 46px !important; min-height: 46px;
    margin: 0; padding: 0 14px 0 44px !important;
    border: 1.5px solid #e1e8ee !important; border-radius: 11px !important;
    background-color: #f8fafb !important; background-repeat: no-repeat !important;
    background-position: 14px 50% !important; background-size: 18px 18px !important;
    color: #1f2d3d; font-size: .95rem; outline: 0; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.fxl-page input.fxl-user { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300805a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") !important; }
.fxl-page input.fxl-pass { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300805a' stroke-width='2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 018 0v3'/%3E%3C/svg%3E") !important; }
.fxl-page input.fxl-input:focus { border-color: #52b04b !important; background-color: #fff !important; box-shadow: 0 0 0 4px rgba(82, 176, 75, .2); }

.fxl-page .fxl-forgot { margin: 0 0 14px; text-align: right; font-size: .85rem; }
.fxl-page .fxl-card a, .fxl-page .fxl-card a:visited { color: #00805a; font-weight: 700; text-decoration: none; }
.fxl-page .fxl-card a:hover { text-decoration: underline; }

/* captcha */
.fxl-page .fxl-captcha { margin-bottom: 14px; padding: 12px; border: 1px dashed #b9d9b5; border-radius: 12px; background: #eef6f1; color: #456; font-size: .82rem; }
.fxl-page .fxl-captcha label { display: block; margin-bottom: 8px; font-weight: 600; color: #345; }
.fxl-page .fxl-captcha-img { margin-bottom: 10px; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.fxl-page .fxl-captcha-img > * { max-width: 100%; }
.fxl-page .fxl-captcha-img img { max-width: 100%; height: auto; border-radius: 6px; }
.fxl-page input.fxl-captcha-input { padding-left: 14px !important; background-image: none !important; background-color: #fff !important; }

/* login button */
.fxl-page .fxl-login-btn.ui-button {
    display: block; width: 100% !important; height: 48px; min-height: 48px; margin: 0; padding: 0 16px;
    border: 0 !important; border-radius: 11px !important;
    background: linear-gradient(135deg, #52b04b, #00805a) !important;
    color: #fff !important; font-size: .98rem; font-weight: 700; letter-spacing: 1px;
    box-shadow: 0 10px 22px rgba(0, 128, 90, .35); cursor: pointer;
}
.fxl-page .fxl-login-btn.ui-button:hover { filter: brightness(1.07); }
.fxl-page .fxl-login-btn .ui-button-text, .fxl-page .fxl-login-btn .ui-icon { color: #fff !important; }
.fxl-page .fxl-signup { margin-top: 14px; text-align: center; font-size: .86rem; color: #555; }

/* ---------- Portal information (right side) -------------------------------------- */
.fxl-info { position: relative; z-index: 1; min-width: 0; }
.fxl-hero > * { min-width: 0; }
.fxl-info h2 { margin: 0; font: 900 clamp(1.6rem, 3.2vw, 2.8rem)/1.05 "Segoe UI", Arial, sans-serif; color: #52d66a; letter-spacing: .5px; }
.fxl-sub { margin: 6px 0 30px; font-size: clamp(1.1rem, 2vw, 1.6rem); color: #fff; }
.fxl-info h3 { margin: 0 0 10px; color: #52d66a; font-size: 1.1rem; letter-spacing: 1px; }
.fxl-features { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 24px; margin-bottom: 28px; font-size: .95rem; color: #fff; }
.fxl-features span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: #fff; border-radius: 2px; }
.fxl-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fxl-step { position: relative; padding: 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; background: rgba(255, 255, 255, .08); font-size: .85rem; line-height: 1.4; color: #fff; overflow-wrap: break-word; }
.fxl-step b { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.fxl-step b i { width: 34px; height: 34px; border-radius: 50%; background: #52b04b; display: grid; place-items: center; font-style: normal; flex: 0 0 auto; }
.fxl-step:not(:last-child)::after { content: "\203A"; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); font-size: 22px; color: #52d66a; }

/* ---------- Dialogs (OTP + success) ----------------------------------------------- */
.fxl-dialog.ui-dialog { width: min(420px, 70vw) !important; border: 0; border-radius: 16px; overflow: hidden; padding: 0; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.fxl-dialog .ui-dialog-titlebar { background: #00593b !important; color: #fff !important; border: 0; padding: 14px 20px; }
.fxl-dialog .ui-dialog-content { padding: 18px 20px !important; color: #1f2d3d; }
.fxl-dialog .ui-panelgrid, .fxl-dialog .ui-panelgrid tr, .fxl-dialog .ui-panelgrid td { border: 0; background: transparent; }
.fxl-dialog .ui-panelgrid td { display: block; width: 100%; padding: 6px 0; }
.fxl-dialog .ui-panelgrid .ui-panelgrid-header { background: #eaf6e9; color: #00593b; font-weight: 700; padding: 10px; border-radius: 8px; text-align: center; }
.fxl-dialog input.ui-inputtext { width: 100% !important; height: 46px; padding: 0 14px; border: 1.5px solid #e1e8ee; border-radius: 11px; background: #f8fafb; }
.fxl-dialog input.ui-inputtext:focus { border-color: #52b04b; box-shadow: 0 0 0 4px rgba(82, 176, 75, .2); outline: 0; }
.fxl-dialog .ui-button { height: 44px; border-radius: 10px; border: 0; font-weight: 600; color: #fff; }
.fxl-dialog .ui-confirmdialog-yes { margin-top: 14px; width: 120px; height: 42px; border-radius: 10px; background: #52b04b !important; color: #fff !important; border: 0; font-weight: 700; }

/* ==========================================================================
   TABLET / PHONE : title+features  ->  sign-in form  ->  steps
   ========================================================================== */
@media (max-width: 980px) {
    .fxl-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 16px; min-height: 0; }
    .fxl-info { display: contents; }
    .fxl-info > * { order: 1; }
    .fxl-form { order: 2; min-width: 0; width: 100%; max-width: 460px; margin: 0 auto; }
    .fxl-info > .fxl-steps { order: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fxl-step:not(:last-child)::after { display: none; }
    .fxl-features { grid-template-columns: minmax(0, 1fr); margin-bottom: 4px; }
    .fxl-sub { margin-bottom: 14px; }
    .fxl-globe { opacity: .25; }
    .fxl-page .fxl-header { padding: 6px 14px; }
}
@media (max-width: 420px) {
    .fxl-hero { padding: 18px 12px; }
    .fxl-page .fxl-captcha { padding: 8px; }
    .fxl-info > .fxl-steps { grid-template-columns: minmax(0, 1fr); }
    .fxl-page .fxl-card-body { padding: 16px 14px; }
    .fxl-page .fxl-card-head { padding: 16px 18px; }
    .fxl-steps { grid-template-columns: 1fr; }
}

/* ==========================================================================
   OTP DIALOG
   ========================================================================== */
.fxl-otp-dialog.ui-dialog { width: min(400px, 70vw) !important; }
.fxl-otp-dialog .ui-dialog-titlebar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.fxl-otp-dialog .ui-dialog-title { color: #fff !important; font-weight: 700; font-size: 1.05rem; letter-spacing: .5px; float: none; }
.fxl-otp-dialog .ui-dialog-titlebar-icon { position: static; margin: 0; color: #fff !important; border-radius: 50%; }
.fxl-otp-dialog .ui-dialog-titlebar-icon .ui-icon { background-image: none; text-indent: 0; width: auto; height: auto; }
.fxl-otp-dialog .ui-dialog-content { padding: 26px 24px 24px !important; background: #fff; }
.fxl-otp-dialog form, .fxl-otp-dialog .ui-panelgrid { width: 100%; }
.fxl-otp-dialog .ui-panelgrid { border-collapse: separate; border-spacing: 0; }
.fxl-otp-dialog .ui-panelgrid th, .fxl-otp-dialog .ui-panelgrid .ui-panelgrid-header {
    display: block; margin-bottom: 14px; padding: 0 0 0 0 !important; background: transparent !important;
    color: #00593b !important; font-size: 1.05rem; font-weight: 700; text-align: center; border: 0;
}
.fxl-otp-dialog .ui-panelgrid th::before { content: "\1F510"; display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 16px; font-size: 26px; background: linear-gradient(135deg, #52b04b, #00805a); box-shadow: 0 8px 20px rgba(82, 176, 75, .35); }
.fxl-otp-dialog input.fxl-otp-input { height: 52px !important; text-align: center; font-size: 1.25rem; font-weight: 700; letter-spacing: 6px; padding: 0 14px; border: 1.5px solid #e1e8ee; border-radius: 12px; background: #f8fafb; }
.fxl-otp-dialog input.fxl-otp-input::placeholder { font-size: .9rem; font-weight: 400; letter-spacing: 0; color: #8a97a3; }
.fxl-otp-dialog .ui-button { width: 100% !important; height: 48px; margin: 4px 0 0; border-radius: 12px; font-weight: 700; letter-spacing: .5px; }
.fxl-otp-dialog .fxl-otp-submit.ui-button { background: linear-gradient(135deg, #52b04b, #00805a) !important; color: #fff !important; box-shadow: 0 8px 18px rgba(0, 128, 90, .3); }
.fxl-otp-dialog .fxl-otp-resend.ui-button { background: #fff !important; color: #00805a !important; border: 1.5px solid #52b04b !important; box-shadow: none; }
.fxl-otp-dialog .fxl-otp-resend.ui-button:hover { background: #eaf6e9 !important; }
.fxl-otp-dialog .fxl-otp-submit .ui-button-text, .fxl-otp-dialog .fxl-otp-submit .ui-icon { color: #fff !important; }
.fxl-otp-dialog .fxl-otp-resend .ui-button-text, .fxl-otp-dialog .fxl-otp-resend .ui-icon { color: #00805a !important; }
.fxl-dialog, .fxl-dialog * { box-sizing: border-box; }
