/* Written by the Norax actor; mail.node.setup replaces it. Norax Webmail's login and logout page, over Elastic: only templates/login.html
   uses it. Dark mode is Elastic's own: dark-mode on <html>, from the user's choice or the system's. */

/* Sora, self-hosted: latin and latin-ext (ă â î ș ț), 400, 600 and 700. @fontsource/sora 5.3.0, SIL OFL 1.1 (fonts/OFL.txt). */
@font-face { font-family: 'Sora'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/sora-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/sora-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/sora-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/sora-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/sora-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Sora'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/sora-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* The v3 mockup's tokens (docs/mockups/webmail-mockup-v3-build.js). --sub is a step darker in light mode than the mockup's #64748b,
   so all small text is at least 4.5:1. */
:root { --nx-page:#eef2f7; --nx-glow:rgba(0,160,231,.10); --nx-card:#fff; --nx-ink:#0f172a; --nx-sub:#526277; --nx-label:#334155; --nx-inbg:#f8fafc;
  --nx-inline:#dbe3ec; --nx-shadow:0 24px 60px -24px rgba(1,36,60,.28),0 4px 14px rgba(1,36,60,.08); --nx-line:#e2e8f0; --nx-row:#fff;
  --nx-rowline:#e8edf3; --nx-vyb:#005cf3; --nx-link:#005cf3; --nx-vsoft:#eef4ff; --nx-vline:#c9dafc; --nx-foot:#5b6b80; --nx-focus:#0277bd;
  --nx-stat-bg:#dcfce7; --nx-stat:#166534; --nx-bank-bg:#dbeafe; --nx-bank:#1e40af; --nx-warn-bg:#fee2e2; --nx-warn:#b91c1c; --nx-ok:#16a34a; }
html.dark-mode { --nx-page:#0d1117; --nx-glow:rgba(0,160,231,.12); --nx-card:#161b24; --nx-ink:#f1f5f9; --nx-sub:#94a3b8; --nx-label:#cbd5e1;
  --nx-inbg:#0f141c; --nx-inline:#273041; --nx-shadow:0 24px 60px -24px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.05); --nx-line:#232a36;
  --nx-row:#121821; --nx-rowline:#232a36; --nx-link:#7aa7ff; --nx-vsoft:#111a2e; --nx-vline:#28406f; --nx-foot:#8b98aa; --nx-focus:#38bdf8;
  --nx-stat-bg:#12321f; --nx-stat:#86efac; --nx-bank-bg:#13284d; --nx-bank:#93c5fd; --nx-warn-bg:#3b1414; --nx-warn:#fca5a5; --nx-ok:#4ade80; }

/* Elastic keeps the whole page in the viewport; this page scrolls when it is taller. */
html, body.task-login { height:auto; min-height:100%; }
body.task-login { margin:0; overflow-x:hidden; overflow-y:auto; font-family:Sora,system-ui,-apple-system,'Segoe UI',sans-serif; color:var(--nx-ink);
  background: radial-gradient(900px 500px at 50% 0%, var(--nx-glow), transparent 70%), var(--nx-page); background-color:var(--nx-page); }
html.dark-mode body.task-login { color:var(--nx-ink); background-color:var(--nx-page); }
.task-login *, .task-login *::before, .task-login *::after { box-sizing:border-box; }

.nx-page { min-height:100vh; display:flex; align-items:center; justify-content:center; gap:56px; padding:28px 18px; }
.nx-col { width:410px; max-width:100%; display:flex; flex-direction:column; align-items:center; }

/* The card. */
.nx-card { width:100%; background:var(--nx-card); border-radius:20px; padding:30px 32px 24px; box-shadow:var(--nx-shadow); }
.nx-brand { display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.nx-brand img { width:40px; height:40px; flex-shrink:0; }
.nx-brand b { display:block; font-size:15px; font-weight:600; letter-spacing:-.01em; overflow-wrap:anywhere; }
.nx-brand span { display:block; font-size:12.5px; color:var(--nx-sub); }
.nx-card h1 { font-family:inherit; font-size:24px; font-weight:700; line-height:1.2; margin:0 0 6px; letter-spacing:-.02em; color:var(--nx-ink); }
.nx-card p.nx-sub { font-size:14px; color:var(--nx-sub); margin:0 0 20px; }

/* Roundcube's own form, unchanged: its table of labels and fields, then its button. Its labels and button speak the request's language,
   so CSS hides them and the page's Romanian labels and button take their place in a grid: label, field, label, field, button. The
   fields are still _user and _pass in the same form, so saved passwords fill in as before. */
#nx-login-form { display:grid; grid-template-columns:minmax(0,1fr); margin:0; }
#nx-login-form table, #nx-login-form tbody, #nx-login-form tr { display:contents; }
#nx-login-form td.title, #nx-login-form p.formbuttons { display:none; }
#nx-login-form td.input { display:block; width:100%; padding:0; border:0; background:none; }
/* One column for all: the eye shares the password field's cell, and a row-placed item must not be pushed into a second column. */
#nx-login-form > *, #nx-login-form td { grid-column:1; }
#nx-login-form .nx-label-user { grid-row:1; }
#nx-login-form tr:first-child td.input { grid-row:2; margin-bottom:15px; }
#nx-login-form .nx-label-pass { grid-row:3; }
#nx-login-form tr:nth-child(2) td.input { grid-row:4; margin-bottom:15px; }
#nx-login-form .nx-go { grid-row:5; }
#nx-login-form label.nx-label { display:block; font-size:13px; font-weight:600; color:var(--nx-label); margin:0 0 7px; }
#nx-login-form input.form-control, #nx-login-form select { width:100%; height:48px; border-radius:12px; border:1px solid var(--nx-inline);
  background:var(--nx-inbg); padding:0 15px; font:inherit; font-size:15px; color:var(--nx-ink); box-shadow:none; }
#nx-login-form #rcmloginpwd { padding-right:46px; }
#nx-login-form input.form-control::placeholder { color:#94a3b8; opacity:1; }
#nx-login-form input.form-control:focus, #nx-login-form select:focus { outline:2px solid var(--nx-focus); outline-offset:1px; border-color:var(--nx-focus); }

/* The password eye, over the field's right end (the same grid cell). */
#nx-login-form .nx-eye { grid-row:4; grid-column:1; align-self:start; justify-self:end; width:40px; height:48px; margin:0 3px 0 0; padding:0;
  border:0; background:none; color:var(--nx-sub); cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:10px; }
#nx-login-form .nx-eye[hidden] { display:none; }
#nx-login-form .nx-eye:hover { color:var(--nx-ink); }
#nx-login-form .nx-eye:focus-visible { outline:2px solid var(--nx-focus); outline-offset:-4px; }
.nx-eye .nx-eye-off { display:none; } .nx-eye.nx-on .nx-eye-off { display:inline; }

#nx-login-form .nx-go { display:block; width:100%; height:50px; border:0; border-radius:12px; color:#fff; font:inherit; font-weight:600;
  font-size:15.5px; margin-top:4px; cursor:pointer; text-transform:none;
  background:linear-gradient(120deg,#027fc3 0%,#0277bd 55%,#025f96 100%); box-shadow:0 8px 16px -10px rgba(2,119,189,.55); }
#nx-login-form .nx-go:focus-visible { outline:2px solid var(--nx-focus); outline-offset:3px; }
#nx-login-form .nx-go:disabled { opacity:.7; cursor:default; }

.nx-card p.nx-forgot { text-align:center; font-size:13px; line-height:1.5; color:var(--nx-sub); margin:24px 0 0; }
.nx-or { display:flex; align-items:center; gap:12px; color:var(--nx-sub); font-size:12px; margin:22px 0 18px; }
.nx-or::before, .nx-or::after { content:""; flex:1; height:1px; background:var(--nx-line); }

/* Under the form, on every width: the same mailbox in vyb. */
.nx-invyb { display:flex; gap:12px; align-items:center; padding:13px 14px; border-radius:14px; border:1px solid var(--nx-vline);
  background:var(--nx-vsoft); color:var(--nx-ink); text-decoration:none; }
.nx-invyb:hover, .nx-invyb:focus { color:var(--nx-ink); text-decoration:none; }
.nx-invyb img { width:30px; height:30px; flex-shrink:0; }
.nx-invyb b { display:block; font-size:14px; font-weight:600; }
.nx-invyb-text > span { display:block; font-size:12.5px; color:var(--nx-sub); line-height:1.4; }
.nx-invyb-text > span.nx-trial { color:var(--nx-ink); font-weight:700; margin-top:2px; }
.nx-invyb .nx-arrow { margin-left:auto; color:var(--nx-link); font-weight:600; }
/* Deschide-l în vyb on: the same box, as the form's second submit button, with the consent line above it. */
.nx-card p.nx-consent { font-size:12.5px; line-height:1.45; color:var(--nx-sub); margin:0 0 10px; text-align:center; }
#nx-login-form button.nx-invyb { width:100%; font:inherit; text-align:left; text-transform:none; cursor:pointer; margin:0; }
#nx-login-form button.nx-invyb:focus-visible { outline:2px solid var(--nx-focus); outline-offset:3px; }
#nx-login-form button.nx-invyb:disabled { opacity:.7; cursor:default; }

.nx-done { text-align:center; margin-bottom:16px; }
.nx-done p { margin:0; } .nx-done .nx-done-title { font-size:20px; font-weight:700; margin-bottom:3px; letter-spacing:-.01em; }
.nx-done .nx-done-sub { color:var(--nx-sub); font-size:14px; }

/* The vyb logos: one for light, one for dark. */
.nx-dark { display:none !important; } html.dark-mode .nx-dark { display:block !important; } html.dark-mode .nx-light { display:none !important; }

/* From 1100 px, the vyb panel beside the card: an example inbox, the rest of the suite, one button. */
.nx-suite { display:none; flex:0 1 500px; min-width:0; color:var(--nx-ink); }
.nx-suite img.nx-logo { width:96px; height:auto; display:block; margin-bottom:16px; }
.nx-suite h2 { font-family:inherit; font-size:28px; line-height:1.18; letter-spacing:-.02em; margin:0 0 18px; font-weight:700; color:var(--nx-ink); }
.nx-inbox { border-radius:14px; background:var(--nx-row); box-shadow:0 0 0 1px var(--nx-rowline); overflow:hidden; margin-bottom:18px; }
.nx-r { display:flex; align-items:center; gap:10px; padding:11px 14px; font-size:13.5px; border-top:1px solid var(--nx-rowline); }
.nx-r:first-child { border-top:0; }
.nx-chip { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; padding:2px 8px; border-radius:6px; flex-shrink:0; }
.nx-stat { background:var(--nx-stat-bg); color:var(--nx-stat); } .nx-bank { background:var(--nx-bank-bg); color:var(--nx-bank); }
.nx-warn { background:var(--nx-warn-bg); color:var(--nx-warn); }
.nx-from { font-weight:600; flex-shrink:0; } .nx-subj { color:var(--nx-sub); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nx-r.nx-fold { color:var(--nx-sub); } .nx-r.nx-fold svg { flex-shrink:0; }
.nx-suite p.nx-rest { font-size:14.5px; font-weight:600; margin:0 0 10px; }
.nx-ticks { list-style:none; margin:0 0 20px; padding:0; font-size:13.5px; }
.nx-ticks li { display:flex; gap:8px; align-items:flex-start; margin-bottom:7px; line-height:1.45; }
.nx-ticks svg { margin-top:2px; color:var(--nx-ok); flex-shrink:0; }
.nx-ticks b { font-weight:600; }
.nx-vbtn { display:inline-block; height:46px; line-height:46px; padding:0 20px; border-radius:12px; background:var(--nx-vyb); color:#fff;
  font-weight:600; font-size:14.5px; text-decoration:none; }
.nx-vbtn:hover, .nx-vbtn:focus { color:#fff; text-decoration:none; }
.nx-suite p.nx-small { font-size:12.5px; color:var(--nx-foot); margin:10px 0 0; }
.nx-invyb:focus-visible, .nx-vbtn:focus-visible { outline:2px solid var(--nx-focus); outline-offset:3px; }

@media (min-width: 1100px) {
  .nx-page { padding:48px; }
  .nx-suite { display:block; }
}

/* The page already says the session closed: no second notice in the corner. */
body.nx-logout #messagestack > .alert-success { display:none; }
