/* MHM Soft IT Solutions — sign-in and account pages (layouts/auth.blade.php) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/InterVariable.woff2') format('woff2');
}

@font-face {
    /* Bangla text: loaded only when Bengali characters appear (unicode-range). SIL OFL, see fonts/NotoSansBengali-LICENSE.txt */
    font-family: 'Noto Sans Bengali';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/NotoSansBengali-Variable.woff') format('woff');
    unicode-range: U+0964-0965, U+0980-09FE, U+1CD0-1CF9, U+200C-200D, U+25CC;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.mhm-auth {
    margin: 0;
    min-height: 100%;
    font-family: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
    color: #e2e8f0;
    background: #060b1a;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mt-3 { margin-top: 14px; }
.w-100 { width: 100%; }

/* ------------------------------------------------------------ backdrop */
.auth-backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
    background:
        radial-gradient(60% 50% at 50% 0%, rgba(59, 91, 247, .20) 0%, rgba(6, 11, 26, 0) 70%),
        radial-gradient(40% 45% at 100% 100%, rgba(37, 99, 235, .22) 0%, rgba(6, 11, 26, 0) 70%),
        linear-gradient(180deg, #08102a 0%, #060b1a 55%, #050915 100%);
}
.auth-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.auth-glow-a { width: 520px; height: 520px; left: -180px; bottom: -160px; background: radial-gradient(circle, rgba(59, 130, 246, .55), rgba(59, 130, 246, 0) 70%); }
.auth-glow-b { width: 420px; height: 420px; right: -120px; top: 10%; background: radial-gradient(circle, rgba(139, 92, 246, .35), rgba(139, 92, 246, 0) 70%); }
.auth-streaks {
    position: absolute; left: -10%; bottom: -10%; width: 70%; height: 70%; opacity: .45;
    background: repeating-linear-gradient(-28deg, rgba(96, 165, 250, 0) 0 22px, rgba(96, 165, 250, .14) 22px 23px, rgba(96, 165, 250, 0) 23px 46px);
    -webkit-mask-image: radial-gradient(ellipse at 20% 90%, #000 0%, transparent 65%);
    mask-image: radial-gradient(ellipse at 20% 90%, #000 0%, transparent 65%);
}
.auth-device { position: absolute; right: -40px; bottom: 40px; width: 420px; opacity: .55; transform: rotate(-6deg); }
.auth-device svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(37, 99, 235, .35)); }

/* --------------------------------------------------------------- shell */
.auth-shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 20px 18px; }
.auth-top { width: 100%; max-width: 1160px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-logo img { display: block; height: 36px; width: auto; }
.auth-trust {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: .78rem; font-weight: 600;
    color: #cbd5e1; background: rgba(15, 23, 42, .6); border: 1px solid rgba(148, 163, 184, .2);
}
.auth-trust i { color: #22c55e; }
.auth-main { width: 100%; max-width: 520px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 22px 0; }

/* ---------------------------------------------------------------- hero */
.auth-hero { text-align: center; display: flex; flex-direction: column; align-items: center; }
.auth-kicker {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a5b4fc;
    background: rgba(79, 70, 229, .14); border: 1px solid rgba(129, 140, 248, .22);
}
.auth-kicker i { font-size: .7rem; color: #818cf8; }
.auth-hero h1 { margin: 16px 0 12px; font-size: clamp(2rem, 4.2vw, 2.65rem); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; color: #fff; }
.auth-hero h1 span { background: linear-gradient(90deg, #22d3ee 0%, #60a5fa 40%, #a78bfa 75%, #c084fc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-hero p { margin: 0; max-width: 430px; color: #b6c2d9; font-size: .98rem; line-height: 1.6; }
.auth-features { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; }
.auth-features li {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 14px;
    background: rgba(15, 23, 42, .55); border: 1px solid rgba(148, 163, 184, .16); text-align: center;
}
.auth-features strong { font-size: .76rem; color: #f1f5f9; font-weight: 700; margin-top: 4px; }
.auth-features small { font-size: .72rem; color: #94a3b8; }
.auth-feature-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.auth-feature-icon.is-green { background: rgba(34, 197, 94, .14); color: #4ade80; border: 1px solid rgba(74, 222, 128, .35); }
.auth-feature-icon.is-blue { background: rgba(59, 130, 246, .14); color: #60a5fa; border: 1px solid rgba(96, 165, 250, .35); }
.auth-feature-icon.is-purple { background: rgba(139, 92, 246, .16); color: #a78bfa; border: 1px solid rgba(167, 139, 250, .35); }
.auth-feature-icon.is-orange { background: rgba(249, 115, 22, .14); color: #fb923c; border: 1px solid rgba(251, 146, 60, .35); }

/* ---------------------------------------------------------------- card */
.auth-card {
    width: 100%; max-width: 470px; padding: 30px 32px 28px; border-radius: 20px;
    background: linear-gradient(180deg, rgba(17, 25, 48, .92), rgba(12, 18, 37, .92));
    border: 1px solid rgba(148, 163, 184, .16);
    box-shadow: 0 30px 60px rgba(2, 6, 23, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.auth-card h2 { margin: 0; font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: -.015em; }
.auth-sub { margin: 6px 0 22px; color: #94a3b8; font-size: .9rem; line-height: 1.55; }

.auth-field { margin-bottom: 14px; }
.auth-input, .field-wrap { position: relative; display: flex; align-items: center; }
.auth-input > i, .field-wrap > .field-icon { position: absolute; left: 16px; color: #8b9ab5; font-size: .92rem; pointer-events: none; }
.auth-input input, .form-input {
    width: 100%; height: 50px; padding: 0 46px 0 46px; border-radius: 12px; font: inherit; font-size: .93rem; color: #f1f5f9;
    background: rgba(15, 23, 42, .75); border: 1px solid rgba(148, 163, 184, .22); transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-input input::placeholder, .form-input::placeholder { color: #8090a8; }
.auth-input input:focus, .form-input:focus { outline: none; border-color: #818cf8; background: rgba(15, 23, 42, .95); box-shadow: 0 0 0 4px rgba(129, 140, 248, .18); }
.auth-input.is-invalid input, .form-input.is-invalid { border-color: #f87171; }
.auth-input input:-webkit-autofill, .form-input:-webkit-autofill { -webkit-text-fill-color: #f1f5f9; -webkit-box-shadow: 0 0 0 40px #0f172a inset; transition: background-color 9999s; }
.auth-eye, .password-toggle {
    position: absolute; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #8b9ab5; cursor: pointer;
}
.auth-eye:hover, .password-toggle:hover { color: #e2e8f0; background: rgba(148, 163, 184, .12); }
.auth-eye:focus-visible, .password-toggle:focus-visible { outline: 2px solid #818cf8; outline-offset: 1px; }
.auth-error, .field-error { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: .8rem; color: #fca5a5; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 6px; font-size: .8rem; font-weight: 600; color: #cbd5e1; }
.form-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.form-help { margin: 6px 0 0; font-size: .76rem; color: #8090a8; }

.auth-row, .form-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; font-size: .86rem; }
.auth-check, .remember-control { display: inline-flex; align-items: center; gap: 9px; color: #cbd5e1; cursor: pointer; }
.auth-check input, .remember-control input { width: 17px; height: 17px; accent-color: #7c5cff; margin: 0; }
.auth-link, .text-link { color: #60a5fa; font-weight: 600; text-decoration: none; }
.auth-link:hover, .text-link:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .86rem; }

.auth-submit {
    position: relative; width: 100%; height: 52px; border: 0; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    font: inherit; font-size: .96rem; font-weight: 700; color: #fff;
    background: linear-gradient(90deg, #c026d3 0%, #8b5cf6 48%, #3b82f6 100%);
    box-shadow: 0 14px 30px rgba(124, 58, 237, .38); transition: filter .15s, transform .15s;
}
.auth-submit:hover { filter: brightness(1.08); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible { outline: 3px solid rgba(165, 180, 252, .75); outline-offset: 2px; }
.auth-submit[disabled] { opacity: .85; cursor: progress; }
.auth-spinner, .loading-spinner { display: none; }
.auth-submit.is-loading .auth-spinner, .auth-submit.is-loading .loading-spinner { display: inline-block; }
.auth-submit.is-loading .auth-btn-icon, .auth-submit.is-loading .button-icon { display: none; }
.loading-spinner { animation: auth-spin 1s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0 14px; color: #8090a8; font-size: .82rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(148, 163, 184, .2); }
.auth-secondary {
    width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, .55); background: rgba(15, 23, 42, .4); color: #fff !important; font: inherit; font-size: .93rem; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.auth-secondary:hover { background: rgba(59, 130, 246, .12); border-color: #60a5fa; }
.auth-switch { margin: 18px 0 0; text-align: center; font-size: .86rem; color: #94a3b8; }

.auth-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: .86rem; margin-bottom: 18px; }
.auth-alert-success { background: rgba(34, 197, 94, .12); border: 1px solid rgba(74, 222, 128, .35); color: #bbf7d0; }
.auth-alert-error { background: rgba(239, 68, 68, .12); border: 1px solid rgba(248, 113, 113, .35); color: #fecaca; }

.auth-footer { position: relative; z-index: 1; margin-top: 8px; font-size: .78rem; color: #64748b; text-align: center; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
    .auth-device { width: 320px; right: -80px; opacity: .35; }
}
@media (max-width: 575.98px) {
    .auth-shell { padding: 18px 14px 14px; }
    .auth-logo img { height: 30px; }
    .auth-trust { padding: 6px 10px; font-size: .72rem; }
    .auth-main { gap: 20px; padding: 18px 0; }
    .auth-features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .auth-card { padding: 24px 18px 22px; border-radius: 18px; }
    .auth-device { display: none; }
}
@media (max-width: 419.98px) {
    .auth-features li { flex-direction: row; text-align: left; gap: 10px; padding: 10px; }
    .auth-features li > span { flex: 0 0 36px; width: 36px; height: 36px; }
    .auth-features strong { margin-top: 0; display: block; }
    .auth-features li { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 0; align-items: center; }
    .auth-features li > span { grid-row: 1 / span 2; }
}
@media (max-width: 359.98px) {
    .auth-trust { display: none; }
    .auth-hero h1 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-submit, .auth-input input, .form-input { transition: none; }
    .loading-spinner, .auth-spinner { animation: none; }
}


/* Language selector on sign-in pages */
.auth-lang { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(15, 23, 42, .6); border: 1px solid rgba(148, 163, 184, .25); color: #94a3b8; }
.auth-lang > i { margin: 0 4px 0 8px; font-size: .85rem; }
.auth-lang-form { margin: 0; }
.auth-lang-btn { border: 0; background: transparent; color: #cbd5e1; font: inherit; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; line-height: 1.2; }
.auth-lang-btn:hover { color: #fff; background: rgba(148, 163, 184, .15); }
.auth-lang-btn:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.auth-lang-btn.is-active { background: #fff; color: #0f172a; }
html[lang="bn"] body.mhm-auth { line-height: 1.6; }
.auth-top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 575.98px) {
    .auth-top-actions .auth-trust { display: none; }
    .auth-lang-btn { padding: 6px 10px; }
}
