/* The sign-in page, Nov 9, 2026 (Richard, Design session).
   Computers and tablets (761 px and wider): the entrance photo (the ERP's own house photo with the Bellecitta entrance
   set in), the ERP's own top bar (logos, clock, Day/Night) and a glass card on the left, in the ERP's glass (clearer
   crystal by day, navy glass at night). Nov 10: the card is smaller, in the middle of the left side, and becomes the
   change-password card itself (no window). The bird: signin.js.
   Phones (760 px or less) keep the page exactly as it was: everything new is hidden there, and the old look files
   (signin-night.css) only reach phones. */

/* the label that reads differently on a phone and a computer (Current / Temporary password): its two inner words take
   the label's own look, not the general "label span" one (styles.css), so the phone page stays exactly as it was */
.signin-card label > span:first-child > span { display: inline; margin: 0; color: inherit; font-size: inherit; }

/* ---- phones: the page as it was ---- */
@media (max-width: 760px), (pointer: coarse) {
  .sign-top, .sign-photo, .sign-fill, .bird-scene, .on-desk, .signin .box > svg, .signin .eye, .signin-card header .pw-ic { display: none !important; }
  .signin .box { display: contents; }
}

/* ---- computers and tablets: the new page ---- */
@media (min-width: 761px) and (pointer: fine), (min-width: 761px) and (pointer: none) {
  .on-phone, .signin-plan, .signin-garden, .signin-erp, .signin-card header > span:first-child { display: none !important; }

  /* the photo, Day and Night (Nov 10, Richard's own pictures: the same scene, only the light changes).
     Nov 10, round 3 (Richard, way C): the page keeps the look of his screenshot at every size. signin.js places the photo
     so the scene (from the gate on the left to the wall past the lamp) always shows; spare room shows more of the photo,
     and where the photo runs out (narrow windows) a blurred copy fills the rest. Without signin.js the photo fills the window. */
  html body.signin-page { background: #6d8fb5 !important; }
  /* Nov 10 (Richard, E3): the top bar's 14 px gap is inside the page, not above it, so the page is exactly the window's
     height (the gap above it pushed the page 13 px past the window: a scroll bar on Windows) */
  html body.signin-page { box-sizing: border-box; padding-top: 14px; } html body.signin-page .sign-top { margin-top: 0; }
  html.dark body.signin-page { background: #0b1630 !important; }
  .sign-photo, .sign-fill { position: fixed; z-index: 0; pointer-events: none;
    background: url(/static/art/signin-day-2026-11-10.jpg) center / cover no-repeat; }
  html.dark .sign-photo, html.dark .sign-fill { background-image: url(/static/art/signin-night-2026-11-10.jpg); }
  .sign-photo { inset: 0; }
  .sign-photo.placed { inset: auto; background-size: 100% 100%; }
  .sign-fill { inset: -60px; filter: blur(28px) brightness(.75) saturate(1.1); }

  /* the old page's frame steps aside */
  html body .signin { background: transparent !important; display: block; min-height: 0; padding: 0; position: static; overflow: visible; }

  /* the card on the left: a glass panel below the top bar. Its glass is a layer behind it (::before), so the
     change-password window inside it can still cover the whole screen. */
  /* Nov 10 (Richard): a smaller card, as tall as its contents, in the middle of the left side (below the top bar) */
  html body .signin-main { position: fixed; z-index: 10; left: 56px; top: calc(50% + 42px); bottom: auto; transform: translateY(-50%);
    width: 400px; max-width: none; max-height: calc(100vh - 116px); box-sizing: border-box; border-radius: 26px; padding: 32px 36px 26px;
    display: flex; flex-direction: column; align-items: stretch;
    gap: 0; overflow-y: auto; isolation: isolate; color: #0d1f36; font-family: "DM Sans", "Segoe UI", sans-serif; }
  html body .signin-main::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background: var(--g-bg); border: 1px solid var(--g-line); box-shadow: var(--g-shadow);
    backdrop-filter: var(--g-blur); -webkit-backdrop-filter: var(--g-blur); }
  html.dark body .signin-main { color: #e9f2fc; }
  /* Nov 10, round 3 (Richard): light behind the card. Day: the glass catches the sun (a bright edge, a shine across
     it, a small shadow below). Nov 16 (Richard, Mock-up C): night is darkness instead of the old warm lamp light:
     a thin pale edge, like moonlight on the glass, with darkness round and below the card. The change-password
     card is the same card. */
  html.dark body .signin-main { box-shadow: 0 0 0 1.5px rgba(200, 220, 255, .55), 0 0 10px 1px rgba(170, 200, 255, .25),
    0 0 40px 14px rgba(0, 0, 0, .6), 0 28px 60px -16px rgba(0, 0, 0, .95) !important; }
  html.dark body .signin-main::before { border-color: rgba(210, 225, 255, .45); }
  html:not(.dark) body .signin-main { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9), 0 0 18px 4px rgba(255, 255, 255, .75),
    0 22px 44px -18px rgba(10, 30, 60, .5) !important; }
  html:not(.dark) body .signin-main::before { border-color: rgba(255, 255, 255, 1) !important;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .6) 42%, rgba(255, 255, 255, 0) 54%), var(--g-bg) !important;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 1), inset 0 3px 0 rgba(255, 255, 255, 1), inset 0 0 34px rgba(255, 255, 255, .8),
      inset 0 -14px 22px -14px rgba(255, 236, 190, .7) !important; }
  html body .signin-brand { margin: 0 0 26px; text-align: center; }
  html body .signin-logo { width: 190px; max-width: 100%; margin: 0 auto; }
  html.dark body .signin-logo { filter: brightness(0) invert(1); opacity: .95; }

  html body .signin-card { width: 100%; margin: 0; background: transparent !important; border: 0 !important; box-shadow: none !important;
    border-radius: 0; overflow: visible; }
  html body .signin-card header { background: none !important; display: flex; justify-content: flex-start; align-items: center; gap: 12px; padding: 0; }
  html body .signin-card header h1 { margin: 0; font: 700 28px/1.2 "DM Sans", "Segoe UI", sans-serif; letter-spacing: -.3px; color: #0b2f63; }
  html.dark body .signin-card header h1 { color: #f1f6ff; }
  html body .signin-card .body { padding: 0; display: flex; flex-direction: column; gap: 0; }
  html body .signin-card .body p.muted { margin: 4px 0 14px; font-size: 14.5px; color: #24426b; }
  html.dark body .signin-card .body p.muted { color: #c5d4e6; }
  html body .signin-card form.stack { display: flex; flex-direction: column; gap: 14px; margin: 0; }
  html body .signin-card label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
  html body .signin-card label > span:first-child { font-size: 14px; font-weight: 700; color: #0b2f63; }
  html.dark body .signin-card label > span:first-child { color: #e3eefc; }
  html body .signin .box { position: relative; display: flex; align-items: center; }
  html body .signin .box > svg.i { position: absolute; left: 14px; width: 19px; height: 19px; color: #3d5a80; pointer-events: none; }
  html body .signin .box input { width: 100%; height: 46px; box-sizing: border-box; margin: 0; padding: 0 46px 0 44px; font: 500 15px "DM Sans", sans-serif;
    background: rgba(255, 255, 255, .55) !important; border: 1px solid rgba(10, 40, 70, .16) !important; border-radius: 14px !important; color: #0d1f36; }
  html.dark body .signin .box input { background: rgba(255, 255, 255, .05) !important; border-color: rgba(255, 255, 255, .22) !important; color: #e9f2fc; }
  html body .signin .eye { position: absolute; right: 7px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: none;
    color: #3d5a80; display: grid; place-items: center; cursor: pointer; }
  html body .signin .eye svg { width: 19px; height: 19px; }
  html body .signin .eye[aria-pressed="true"] { color: #0262a3; }
  /* Nov 10 (Richard): at night the box icons (username, password, the eye) in the card's warm lamp colour, bolder and
     softly glowing, so they read clearly; the change-password card is the same card. Day is unchanged. */
  html.dark body .signin .box > svg.i { color: #ffd28a; stroke-width: 2.2; width: 21px; height: 21px; left: 13px;
    filter: drop-shadow(0 0 3px rgba(255, 190, 110, .75)); }
  html.dark body .signin .eye { color: #ffd28a; } html.dark body .signin .eye[aria-pressed="true"] { color: #fff3dc; }
  html.dark body .signin .eye svg { stroke-width: 2.2; filter: drop-shadow(0 0 3px rgba(255, 190, 110, .75)); }
  html body .signin-card .btn.primary { width: 100%; height: 50px; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 16px; border-radius: 14px !important; }
  html body .signin-card .btn.primary svg { width: 18px; height: 18px; }
  html body .login-foot { margin: 14px 0 0; text-align: center; font-size: 13.5px; color: #24426b; }
  html.dark body .login-foot { color: #c5d4e6; }
  html body .signin-card .errors { margin: 0 0 12px; border-radius: 12px; }
  html body .signin-card .signin-note { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px;
    border: 1px solid rgba(10, 40, 70, .12); background: rgba(255, 255, 255, .55); color: #0d1f36; font-size: 13.5px; line-height: 1.4; }
  html.dark body .signin-card .signin-note { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #e3eefc; }

  /* a username and password the browser fills in (Oct 27, Richard): parchment yellow, on computers too */
  input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:autofill {
    -webkit-box-shadow: 0 0 0 40px #f4ead0 inset !important; box-shadow: 0 0 0 40px #f4ead0 inset !important;
    -webkit-text-fill-color: #2b2414 !important; caret-color: #2b2414; border-color: #d9c89a !important; }
  /* Nov 16 (Richard, Alt B): at night no parchment: the glowing icons vanished on it. A filled-in field keeps the
     card's own navy look, with a thin gold edge as the sign the browser filled it in. Day keeps the parchment. */
  html.dark body .signin .box input:-webkit-autofill, html.dark body .signin .box input:-webkit-autofill:hover,
  html.dark body .signin .box input:-webkit-autofill:focus, html.dark body .signin .box input:autofill {
    -webkit-box-shadow: 0 0 0 40px #16243d inset !important; box-shadow: 0 0 0 40px #16243d inset !important;
    -webkit-text-fill-color: #e9f2fc !important; caret-color: #e9f2fc; border: 1.5px solid rgba(255, 200, 110, .75) !important; }

  /* ---- Change password (Nov 10, Richard): no window; the sign-in card itself becomes the change-password card ---- */
  html body.pw-mode .signin-brand { display: none; }
  html body.pw-mode .signin-card header { flex-direction: column; align-items: flex-start; gap: 12px; }
  html body .signin-card .pw-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #0262a3, #2b8cff); box-shadow: 0 10px 22px -10px #0262a3; }
  html body .signin-card .pw-ic svg { width: 22px; height: 22px; }
  html body.pw-mode .signin-card header h1 { font-size: 23px; }
  html body .signin-card .pw-sub { margin: 6px 0 14px; font-size: 14px; color: #24426b; }
  html.dark body .signin-card .pw-sub { color: #c5d4e6; }
  html body.pw-mode .signin-card form.stack { gap: 12px; }
  html body .pw-rules { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; font-size: 13px; font-weight: 500; color: #24426b; }
  html body .pw-rules li { display: flex; align-items: center; gap: 8px; }
  html body .pw-rules svg { width: 16px; height: 16px; color: #5d7593; }
  html body .pw-rules li.ok { color: #0c7a59; } html body .pw-rules li.ok svg { color: #10b383; }
  html.dark body .pw-rules { color: #c5d4e6; } html.dark body .pw-rules svg { color: #8197b1; }
  html.dark body .pw-rules li.ok { color: #6ee7b7; } html.dark body .pw-rules li.ok svg { color: #34d399; }
  html body .pw-out { margin: 12px 0 0; text-align: center; font-size: 13.5px; color: #24426b; }
  html.dark body .pw-out { color: #c5d4e6; }
  html body .pw-out a, html body .pw-out .linkish { color: #0262a3; font-weight: 650; text-decoration: underline; text-underline-offset: .25em;
    background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
  html.dark body .pw-out a, html.dark body .pw-out .linkish { color: #8cc4ff; }

  /* ---- the birds (signin.js): lined up with the photo at any screen size (signin.js sets .fit to the photo's place;
     without it, .fit fills the window the way the photo does) ---- */
  .bird-scene { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
  .bird-scene .fit { position: absolute; left: 50%; top: 50%; width: max(100vw, calc(100vh * 16 / 9)); height: max(100vh, calc(100vw * 9 / 16));
    transform: translate(-50%, -50%); }
  .birdlayer { width: 100%; height: 100%; display: block; overflow: visible; }
  .birdlayer .bird { filter: blur(.3px) drop-shadow(1px 2px 1.4px rgba(30, 20, 10, .3)); }
  html.dark .birdlayer .bird { filter: blur(.3px) brightness(.66) saturate(.85) drop-shadow(0 0 2.5px rgba(255, 186, 110, .5)); }
}
