@import url("/assets/fonts/fonts.css?v=5.2");
/* DOMA V5.2: keep the existing login design, share web fonts globally. */
:root {
    color-scheme: dark;
    --bg: #0d1829;
    --panel: rgba(13,24,41,.92);
    --panel-2: rgba(23,35,54,.92);
    --border: rgba(164,132,62,.34);
    --border-strong: rgba(164,132,62,.76);
    --text: #f4f7fb;
    --soft: #b5c1d0;
    --muted: #a7b5c8;
    --accent: #c4a052;
    --accent-2: #8f7131;
    --danger: #ff7894;
    --success: #45d796;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 10%, rgba(143,105,36,.18), transparent 34%),
        radial-gradient(circle at 88% 70%, rgba(143,105,36,.12), transparent 38%),
        linear-gradient(135deg, #0d1829 0%, #0d1829 52%, #0d1829 100%);
    font-family: "Segoe UI", Tahoma, Arial, "Noto Sans", sans-serif;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .18;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 85%);
}
.portal-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 46px; }
.portal-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 18px; font-weight: 700; letter-spacing: .1px; }
.brand img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(143,105,36,.32)); }
.language-picker { position: relative; }
.language-button {
    border: 1px solid var(--border);
    background: rgba(23,35,54,.84);
    color: var(--text);
    height: 44px;
    border-radius: 13px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font: inherit;
    transition: .16s ease;
}
.language-button:hover { border-color: var(--border-strong); background: rgba(43,56,76,.9); }
.language-icon { color: #d8b45e; font-weight: 800; }
.chevron { color: #aebbcc; font-size: 16px; }
.language-menu {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 9px);
    width: min(720px, calc(100vw - 36px));
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    background: rgba(13,24,41,.98);
    border: 1px solid var(--border-strong);
    border-radius: 17px;
    box-shadow: 0 24px 70px rgba(0,0,0,.54);
    backdrop-filter: blur(18px);
}
.language-menu[hidden] { display: none; }
.language-option { min-height: 42px; padding: 9px 11px; border-radius: 10px; display: flex; align-items: center; gap: 9px; color: var(--soft); text-decoration: none; border: 1px solid transparent; background: rgba(255,255,255,.025); }
.language-option:hover { background: rgba(143,105,36,.12); border-color: rgba(164,132,62,.34); color: white; }
.language-option.active { color: white; background: linear-gradient(135deg, rgba(143,105,36,.54), rgba(127,93,31,.54)); border-color: rgba(164,132,62,.7); }
.flag { font-size: 19px; line-height: 1; }
.check { margin-inline-start: auto; color: #d8b45e; }
.login-layout { min-height: calc(100vh - 126px); display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(36px, 6vw, 86px); padding: 44px 0 30px; }
.intro-panel { padding-inline: clamp(6px, 3vw, 34px); }
.eyebrow { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border: 1px solid rgba(164,132,62,.36); border-radius: 999px; color: #d8b45e; background: rgba(127,93,31,.10); font-size: 12px; font-weight: 700; letter-spacing: .45px; }
.intro-panel h1 { margin: 20px 0 10px; font-size: clamp(40px, 5vw, 68px); line-height: 1.02; letter-spacing: -1.8px; max-width: 680px; }
.intro-panel p { margin: 0; color: var(--soft); font-size: 17px; line-height: 1.7; max-width: 590px; }
.feature-list { margin-top: 36px; display: grid; gap: 10px; max-width: 520px; }
.feature { min-height: 49px; border: 1px solid rgba(164,132,62,.20); border-radius: 13px; background: rgba(13,24,41,.50); display: flex; align-items: center; gap: 13px; padding: 8px 13px; color: #d5dde9; font-size: 13px; }
.feature span { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #d8b45e; background: rgba(143,105,36,.16); border: 1px solid rgba(164,132,62,.28); font-size: 10px; font-weight: 800; }
.login-card { width: 100%; max-width: 520px; justify-self: center; padding: 30px 34px 28px; border-radius: 25px; border: 1px solid var(--border); background: linear-gradient(150deg, rgba(23,35,54,.97), rgba(13,24,41,.97)); box-shadow: 0 30px 90px rgba(0,0,0,.50), 0 0 42px rgba(184,138,53,.08); position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; width: 210px; height: 210px; border-radius: 50%; background: rgba(143,105,36,.11); filter: blur(50px); inset-inline-end: -90px; top: -110px; pointer-events: none; }
.card-logo-wrap { width: 90px; height: 90px; margin: 0 auto 10px; display: grid; place-items: center; }
.card-logo { max-width: 88px; max-height: 88px; object-fit: contain; filter: drop-shadow(0 0 16px rgba(143,105,36,.32)); }
.login-card h1, .login-card h2 { text-align: center; margin: 3px 0 7px; font-size: 25px; }
.card-subtitle { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0 auto 22px; max-width: 430px; }
.alert { margin: 0 0 15px; padding: 11px 13px; border-radius: 11px; border: 1px solid rgba(255, 98, 132, .42); background: rgba(91, 19, 39, .35); color: #ffb2c3; font-size: 12.5px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; color: #d5dde9; font-size: 12px; font-weight: 650; }
.field input { width: 100%; height: 48px; border-radius: 11px; border: 1px solid rgba(164,132,62,.55); background: rgba(13,24,41,.80); color: white; outline: none; padding: 0 14px; font: inherit; font-size: 14px; direction: ltr; text-align: start; transition: .15s ease; }
html[dir="rtl"] .field input:not([name="device_id"]):not([name="device_key"]) { direction: rtl; }
.field input::placeholder { color: #d8b45e; }
.field input:focus { border-color: #a4843e; box-shadow: 0 0 0 3px rgba(184,138,53,.11); }
.captcha-box { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.captcha-box img { width: 220px; height: 70px; max-width: 67%; border-radius: 13px; display: block; }
.refresh-captcha { flex: 1; min-height: 40px; border: 1px solid rgba(164,132,62,.34); border-radius: 10px; background: rgba(30,43,61,.68); color: #d5dde9; cursor: pointer; font: inherit; font-size: 11.5px; }
.refresh-captcha:hover { border-color: #a4843e; color: white; }
.login-button { width: 100%; height: 50px; margin-top: 3px; border: 0; border-radius: 12px; cursor: pointer; color: white; font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .2px; background: linear-gradient(135deg, #8f6924, #7f5d1f); box-shadow: 0 10px 28px rgba(184,138,53,.24); transition: transform .15s ease, filter .15s ease; }
.login-button:hover { filter: brightness(1.09); transform: translateY(-1px); }
.privacy { margin: 15px 4px 0; text-align: center; color: #d8b45e; font-size: 10.5px; line-height: 1.45; }
.connected-layout { min-height: calc(100vh - 100px); display: grid; place-items: center; padding: 40px 0; }
.connected-card { max-width: 600px; text-align: center; }
.success-icon { width: 62px; height: 62px; margin: 0 auto 15px; border-radius: 50%; display: grid; place-items: center; color: #bff6df; background: rgba(69, 215, 150, .12); border: 1px solid rgba(69, 215, 150, .45); font-size: 28px; }
.device-summary { margin-top: 22px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.device-summary div { min-height: 54px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid rgba(164,132,62,.24); }
.device-summary div:last-child { border-bottom: 0; }
.device-summary span { color: var(--muted); font-size: 12px; }
.device-summary strong { color: var(--text); font-size: 13px; }
.next-step { color: #aebbcc; font-size: 13px; margin: 19px 0 0; }
html[dir="rtl"] body { font-family: Tahoma, "Segoe UI", Arial, sans-serif; }
html[dir="rtl"] .intro-panel h1 { letter-spacing: 0; }
@media (max-width: 900px) {
    .portal-shell { width: min(100% - 26px, 680px); }
    .login-layout { grid-template-columns: 1fr; padding-top: 24px; gap: 30px; }
    .intro-panel { text-align: center; }
    .intro-panel h1, .intro-panel p, .feature-list { margin-inline: auto; }
    .intro-panel h1 { font-size: clamp(36px, 9vw, 56px); }
    .feature-list { display: none; }
    .language-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .portal-shell { width: calc(100% - 20px); padding-top: 12px; }
    .brand span { display: none; }
    .language-button > span:nth-child(2) { display: none; }
    .language-menu { grid-template-columns: 1fr; max-height: 70vh; }
    .login-layout { padding-top: 12px; }
    .intro-panel h1 { margin-top: 15px; font-size: 34px; }
    .intro-panel p { font-size: 14px; }
    .login-card { padding: 24px 18px 22px; border-radius: 20px; }
    .captcha-box { align-items: stretch; }
    .captcha-box img { max-width: 68%; object-fit: contain; }
}

/* DOMA portal header + footer v2 */
.portal-shell { width: min(1320px, calc(100% - 40px)); padding-top: 18px; }
.portal-header {
    min-height: 68px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 8px 0 14px;
    border-bottom: 1px solid rgba(164,132,62,.14);
}
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 0 13px rgba(143,105,36,.42)); }
.portal-nav { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; }
.portal-nav a {
    position: relative;
    color: #aebbcc;
    text-decoration: none;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 650;
    border: 1px solid transparent;
    transition: .16s ease;
}
.portal-nav a:hover { color: #fff; background: rgba(143,105,36,.09); border-color: rgba(164,132,62,.20); }
.portal-nav a.active { color: #fff; background: linear-gradient(135deg, rgba(143,105,36,.28), rgba(127,93,31,.24)); border-color: rgba(164,132,62,.48); }
.portal-nav a.active::after { content: ""; position: absolute; inset-inline: 14px; bottom: -10px; height: 2px; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--accent-2), transparent); }
.login-layout { min-height: calc(100vh - 220px); padding-top: 46px; padding-bottom: 36px; }
.card-logo-wrap { width: 94px; height: 94px; }
.card-logo { max-width: 92px; max-height: 92px; filter: drop-shadow(0 0 18px rgba(143,105,36,.38)); }
.portal-footer {
    min-height: 96px;
    border-top: 1px solid rgba(164,132,62,.17);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
    padding: 22px 0 26px;
    color: var(--muted);
}
.footer-brand { display: inline-flex; align-items: center; gap: 9px; color: #d5dde9; font-weight: 700; font-size: 13px; white-space: nowrap; }
.footer-brand img { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(143,105,36,.25)); }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 8px 20px; flex-wrap: wrap; }
.footer-links a { color: #aebbcc; text-decoration: none; font-size: 11.5px; transition: .15s ease; }
.footer-links a:hover { color: #d8b45e; }
.footer-rights { text-align: end; font-size: 10.5px; color: #d8b45e; line-height: 1.5; white-space: nowrap; }
@media (max-width: 1080px) {
    .portal-header { gap: 14px; }
    .portal-nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .portal-nav::-webkit-scrollbar { display: none; }
    .portal-nav a { padding-inline: 10px; font-size: 11.5px; }
}
@media (max-width: 900px) {
    .portal-header { grid-template-columns: 1fr auto; }
    .portal-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; border-top: 1px solid rgba(164,132,62,.10); padding-top: 10px; }
    .portal-nav a.active::after { display: none; }
    .portal-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; }
    .footer-rights { text-align: center; white-space: normal; }
}
@media (max-width: 560px) {
    .portal-nav { justify-content: flex-start; }
    .portal-nav a { min-height: 36px; padding: 0 9px; font-size: 10.5px; }
    .footer-links { gap: 8px 14px; }
}

/* Local flags also work on Windows browsers without emoji flag support. */
.doma-login .doma-flag-image { width:28px; height:20px; object-fit:cover; border-radius:4px; vertical-align:middle; }
.doma-login .flag { display:inline-flex; flex:none; align-items:center; }
.doma-login .mac-memory { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-top:6px; }
.doma-login .mac-memory small { color:var(--muted); font-size:11px; line-height:1.7; }
.doma-login .mac-memory button { padding:2px 0; background:transparent; border:0; color:#d8b45e; font-size:11px; white-space:nowrap; cursor:pointer; }
.doma-login .mac-memory button:hover { text-decoration:underline; }
.doma-login .mac-memory button:focus-visible { outline:2px solid #a4843e; outline-offset:3px; }
.doma-login [hidden] { display:none !important; }
