/* ============================================================
   Salama Hosting — Auth CSS
   Bootstrap 5 handles base form/utility styles.
   This file: layout, theme colours, custom components only.
   ============================================================ */

@import url('./fonts/ssp/stylesheet.css');
@import url('./fonts/google/stylesheet.css');
@import url('https://fonts.googleapis.com/css2?family=Varela+Round&display=swap');
/* ── Custom properties ──────────────────────────────────────── */
:root {
    --teal-50:  #EBF3FF;
    --teal-600: #2065C8;
    --teal-700: #1751A8;
    --teal-900: #092040;
    --navy-50:  #f0f4ff;
    --navy-600: #2a5298;
    --navy-700: #1e3c72;
    --portal-bg-from: #0f172a;
    --portal-bg-to:   #1e293b;
    --auth-panel:  #092040;
    --auth-radius: 8px;
    --shadow-dark: 0 30px 70px rgba(0,0,0,.42), 0 6px 20px rgba(0,0,0,.22);
    --shadow-btn-teal: 0 8px 28px rgba(32,101,200,.36);
    --shadow-btn-navy: 0 8px 28px rgba(30,60,114,.40);
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Font override for all auth pages ───────────────────────── */
body, button, input, select, textarea {
    font-family: 'Varela Round', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Body themes ────────────────────────────────────────────── */
body.auth-customer { background: #fff; min-height: 100vh; }

body.auth-admin,
body.auth-portal {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
body.auth-admin  { background: linear-gradient(160deg, #1a2545 0%, #1e2d5a 100%); }
body.auth-portal { background: linear-gradient(160deg, var(--portal-bg-from) 0%, var(--portal-bg-to) 100%); }

/* ── Auth container ─────────────────────────────────────────── */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}
body.auth-admin .auth-container,
body.auth-portal .auth-container { min-height: 0; align-items: center; justify-content: center; }

/* ── Card entrance (admin / portal only) ────────────────────── */
.adm-card, .portal-wrap { animation: auth-appear .38s var(--ease) both; }
@keyframes auth-appear {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════
   CUSTOMER SPLIT LAYOUT
   ════════════════════════════════════════════════════════════ */

.ac { display: flex; width: 100%; min-height: 100vh; }

/* ── Left panel ─────────────────────────────────────────────── */
/* Place photo at: public/asset/images/auth-bg.jpg */
.al {
    width: 60%;
    flex-shrink: 0;
    background-color: var(--auth-panel);
    background-image: url('../asset/images/auth-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.al::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(6,18,44,.88) 0%, rgba(9,32,64,.76) 55%, rgba(6,18,44,.92) 100%);
    pointer-events: none;
}

.dc { display: block; position: absolute; border-radius: 50%; pointer-events: none; }
.dc1 { width: 420px; height: 420px; top: -120px; right: -120px; background: rgba(32,101,200,.08); border: 1px solid rgba(32,101,200,.10); }
.dc2 { width: 240px; height: 240px; bottom: -60px; left: -80px; background: rgba(32,101,200,.06); border: 1px solid rgba(32,101,200,.08); }
.dc3 { width: 120px; height: 120px; bottom: 80px; right: 60px; background: rgba(96,165,250,.06); }

/* ── Illustration slot ──────────────────────────────────────── */
.al-illus { position: relative; margin-bottom: 2rem; display: flex; align-items: center; justify-content: center; }
.al-illus-icon {
    width: 140px; height: 140px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    position: relative;
}
.al-illus-icon i { font-size: 4rem; color: rgba(255,255,255,.85); }
.al-illus-ring { position: absolute; inset: -18px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.15); }

/* ── Brand panel content ────────────────────────────────────── */
.bn { display: inline-flex; align-items: center; gap: .75rem; font-size: 1rem; font-weight: 700; margin-bottom: 2rem; position: relative; }
.bn i { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--auth-radius); background: rgba(96,165,250,.18); color: #93C5FD; font-size: 1.1rem; }
.bn span { color: #fff; font-weight: 700; letter-spacing: -.02em; }

.bh { font-size: 1.7rem; font-weight: 800; line-height: 1.18; margin-bottom: .75rem; color: #fff; letter-spacing: -.03em; position: relative; }
.bs { color: #93B8DC; font-size: .9rem; line-height: 1.7; max-width: 380px; position: relative; }

.bf { display: inline-flex; flex-direction: column; gap: .55rem; margin-top: 1.75rem; list-style: none; padding: 0; text-align: left; position: relative; }
.bf li { display: flex; align-items: center; gap: .65rem; color: #CBD8EC; font-size: .875rem; }
.bf li i { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(96,165,250,.16); color: #93C5FD; font-size: .65rem; flex-shrink: 0; }

/* ── Right panel ────────────────────────────────────────────── */
.ar { flex: 1; background: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; max-height: 100vh; overflow-y: auto; }

/* ════════════════════════════════════════════════════════════
   FORM ELEMENTS
   (Bootstrap form-control / form-label base assumed)
   ════════════════════════════════════════════════════════════ */

.ft { font-size: 1.55rem; font-weight: 700; color: #111827; margin: 0 0 .2rem; line-height: 1.2; }
.fsub { font-size: .875rem; color: #6b7280; margin: 0 0 1.75rem; }

.fg { margin-bottom: 1.1rem; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.fl { display: block; font-size: .8rem; font-weight: 700; color: #374151; margin-bottom: .4rem; }

.fi {
    display: block;
    width: 100%;
    padding: .72rem 1rem;
    font-size: .9rem;
    color: #111827;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: .5rem;
    outline: none;
    transition: border-color .17s var(--ease), box-shadow .17s var(--ease), background .17s;
    font-family: inherit;
    line-height: 1.5;
}
.fi::placeholder { color: #9ca3af; }
.fi:focus { background: #fff; }
.fi.is-invalid { border-color: #ef4444; background: #fff8f8; }
body.auth-customer .fi:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(32,101,200,.12); }
body.auth-admin .fi:focus, .adm-body .fi:focus { border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(42,82,152,.12); }

/* Password field with overlay toggle */
.fw { position: relative; }
.fw .fi { padding-right: 3rem; }
.feye {
    position: absolute; width: 36px; height: 36px; right: .35rem; top: 50%; transform: translateY(-50%);
    border: none; border-radius: 6px; background: transparent; color: #9ca3af; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: .85rem;
    transition: background .12s, color .12s;
}
.feye:hover { background: #f3f4f6; color: #374151; }

.ferr { font-size: .78rem; color: #dc2626; margin-top: .35rem; display: flex; align-items: center; gap: .3rem; }
.fhint, .pwd-hint { font-size: .78rem; color: #6b7280; margin-top: .35rem; }

.fck { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; color: #374151; cursor: pointer; line-height: 1.5; }
.fck input[type="checkbox"] { width: 1rem; height: 1rem; margin-top: .18rem; flex-shrink: 0; cursor: pointer; }
body.auth-customer .fck input[type="checkbox"] { accent-color: var(--teal-600); }
body.auth-admin    .fck input[type="checkbox"] { accent-color: var(--navy-600); }

.info-box { background: var(--navy-50); border-left: 3px solid var(--navy-600); border-radius: .5rem; padding: .75rem 1rem; margin-bottom: 1.35rem; font-size: .82rem; color: #374151; }

/* Large OTP input */
.fi-otp {
    width: 100%; border: 2px solid #e5e7eb; border-radius: .5rem; padding: .9rem 1rem;
    font-size: 2rem; color: #111827; background: #f9fafb; outline: none;
    text-align: center; letter-spacing: .5em; font-weight: 700;
    transition: border-color .17s var(--ease), box-shadow .17s var(--ease);
    font-family: 'Courier New', monospace;
}
.fi-otp::placeholder { color: #d1d5db; letter-spacing: .4em; }
.fi-otp:focus { border-color: var(--teal-600); background: #fff; box-shadow: 0 0 0 3px rgba(32,101,200,.12); }
.fi-otp.is-invalid { border-color: #ef4444; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-teal, .btn-navy, .btn-main {
    width: 100%; border: none; border-radius: .5rem; padding: .82rem 1.5rem;
    font-size: .93rem; font-weight: 600; cursor: pointer; font-family: inherit;
    letter-spacing: .02em; display: flex; align-items: center; justify-content: center;
    gap: .45rem; color: #fff; margin-top: .25rem;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn-teal { background: linear-gradient(135deg, var(--teal-600) 0%, var(--teal-900) 100%); }
.btn-navy, .btn-main { background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 100%); }
.btn-teal:hover  { transform: translateY(-1px); box-shadow: var(--shadow-btn-teal); }
.btn-navy:hover, .btn-main:hover { transform: translateY(-1px); box-shadow: var(--shadow-btn-navy); }
.btn-teal:active, .btn-navy:active, .btn-main:active { transform: translateY(0); box-shadow: none; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alrt { border-radius: .5rem; padding: .8rem 1rem; margin-bottom: 1.15rem; font-size: .855rem; line-height: 1.55; }
.alrt.danger  { background: #fef2f2; border-left: 3px solid #ef4444; color: #991b1b; }
.alrt.success { background: #f0fdf4; border-left: 3px solid #22c55e; color: #166534; }
.alrt.info    { background: var(--teal-50); border-left: 3px solid var(--teal-600); color: var(--teal-700); }
.alrt strong  { font-weight: 600; }
.alrt > div   { margin-top: .2rem; }

/* ── Form footer ─────────────────────────────────────────────── */
.aor { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; font-size: .78rem; color: #9ca3af; }
.aor::before, .aor::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }

.alk { text-align: center; font-size: .875rem; margin-top: .75rem; }

.areg, .alog { border-radius: .5rem; padding: .75rem 1rem; text-align: center; font-size: .85rem; color: #6b7280; margin-top: .75rem; }
body.auth-customer .areg, body.auth-customer .alog { background: var(--teal-50); }
body:not(.auth-customer) .areg, body:not(.auth-customer) .alog { background: var(--navy-50); }

.fsub a, .alk a, .areg a, .alog a, .fck a { color: var(--teal-600); font-weight: 600; text-decoration: none; }
.fsub a:hover, .alk a:hover, .areg a:hover, .alog a:hover, .fck a:hover { color: var(--teal-700); text-decoration: underline; }
body:not(.auth-customer) .areg a, body:not(.auth-customer) .alog a { color: var(--navy-600); }

/* ════════════════════════════════════════════════════════════
   ADMIN CARD
   ════════════════════════════════════════════════════════════ */
.adm-card { width: 100%; max-width: 430px; border-radius: 1.25rem; overflow: hidden; box-shadow: var(--shadow-dark); }
.adm-card.wide { max-width: 510px; }

.adm-head {
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 100%);
    color: #fff; padding: 2.25rem 2rem; text-align: center; position: relative; overflow: hidden;
}
.adm-head-dc1 { position: absolute; border-radius: 50%; width: 195px; height: 195px; background: rgba(255,255,255,.06); top: -68px; right: -68px; }
.adm-head-dc2 { position: absolute; border-radius: 50%; width: 130px; height: 130px; background: rgba(255,255,255,.04); bottom: -45px; left: -45px; }

.adm-icon { width: 3.5rem; height: 3.5rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; margin: 0 auto .9rem; position: relative; }
.adm-badge { display: block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: rgba(255,255,255,.92); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .22rem .75rem; border-radius: 2rem; margin-bottom: .65rem; }
.adm-head h1 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .3rem; position: relative; }
.adm-head p  { font-size: .8rem; color: rgba(255,255,255,.68); margin: 0; position: relative; }
.adm-body { background: #fff; padding: 2rem; }

.adm-links { margin-top: 1.35rem; display: flex; flex-direction: column; gap: .65rem; }
.adm-link-row { text-align: center; font-size: .875rem; }
.adm-link-row a { color: var(--navy-600); font-weight: 500; text-decoration: none; }
.adm-link-row a:hover { text-decoration: underline; }

.adm-reg-box, .adm-log-box { background: var(--navy-50); border-radius: .5rem; padding: .7rem 1rem; text-align: center; font-size: .85rem; color: #6b7280; }
.adm-reg-box a, .adm-log-box a { color: var(--navy-600); font-weight: 600; text-decoration: none; }
.adm-reg-box a:hover, .adm-log-box a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════
   PORTAL SELECTION
   ════════════════════════════════════════════════════════════ */
.portal-wrap { max-width: 680px; width: 100%; }
.portal-header { text-align: center; margin-bottom: 2.5rem; }
.portal-logo { display: flex; align-items: center; justify-content: center; gap: .65rem; font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: .6rem; }
.portal-logo i { font-size: 1.4rem; color: #3B82F6; }
.portal-header p { font-size: .95rem; color: rgba(255,255,255,.5); margin: 0; }

.portal-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.portal-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.11);
    border-radius: 1.1rem; padding: 2.25rem 1.75rem; color: #fff; text-decoration: none;
    transition: background .24s, transform .24s, border-color .24s, box-shadow .24s;
}
.portal-card:hover { background: rgba(255,255,255,.12); transform: translateY(-4px); border-color: rgba(255,255,255,.22); color: #fff; box-shadow: 0 18px 44px rgba(0,0,0,.30); }
.portal-card:active { transform: translateY(-1px); }

.p-icon { width: 3.75rem; height: 3.75rem; border-radius: .9rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.15rem; }
.p-icon.teal { background: linear-gradient(135deg, var(--teal-600), #3B82F6); }
.p-icon.navy { background: linear-gradient(135deg, var(--navy-700), var(--navy-600)); }

.portal-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .45rem; }
.portal-card p  { font-size: .85rem; color: rgba(255,255,255,.58); margin: 0 0 1.5rem; line-height: 1.5; }

.p-btn { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; padding: .45rem 1.1rem; border-radius: 2rem; border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.82); background: rgba(255,255,255,.08); transition: background .18s, border-color .18s, color .18s; margin-top: auto; }
.portal-card:hover .p-btn { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.40); color: #fff; }

.portal-foot { text-align: center; margin-top: 2rem; font-size: .875rem; color: rgba(255,255,255,.42); }
.portal-foot a { color: #3B82F6; font-weight: 500; text-decoration: none; }
.portal-foot a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) { .al { width: 52%; } }

@media (max-width: 768px) {
    .ac { flex-direction: column; }
    .al { width: 100%; min-height: 240px; padding: 2.5rem 2rem; }
    .al-illus, .bs, .bf { display: none; }
    .ar { flex: 1; max-height: none; overflow-y: visible; padding: 2rem 1.75rem; }
    .fgrid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .al { padding: 1.75rem 1.25rem; min-height: 180px; }
    .bh { font-size: 1.3rem; }
    .ar, .adm-body { padding: 1.5rem; }
    .ft { font-size: 1.35rem; }
}

@media (max-width: 540px) {
    .portal-cards { grid-template-columns: 1fr; }
    .portal-wrap { max-width: 380px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
