/* The Resans sign-in screen, both editions: the card, fields, pill buttons and the bell wordmark. Colours and the background are in
   resans-hotel.css (one look for hotels and restaurants). Dark theme: charcoal glass. */
:root[data-brand] .login::before { content: ""; position: fixed; inset: 0; background: linear-gradient(180deg, rgba(6, 12, 34, .28), rgba(6, 12, 34, .10) 40%, rgba(6, 12, 34, .30)); pointer-events: none; }
:root[data-brand] .login > * { position: relative; }

/* ---- the card ---- */
:root[data-brand] .login-card { width: min(680px, 100%); gap: 16px; padding: clamp(24px, 4.5vh, 44px) clamp(22px, 6vw, 62px) clamp(22px, 4vh, 40px);
  background: linear-gradient(160deg, rgba(246, 248, 253, .90), rgba(226, 232, 245, .84)); border: 1px solid rgba(255, 255, 255, .75); border-radius: clamp(26px, 5vw, 44px); color: #0E1430;
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(2, 8, 30, .55), 0 0 0 1px rgba(120, 170, 255, .18), 0 1px 0 rgba(255, 255, 255, .9) inset; }
:root[data-brand] .login-card p.muted, :root[data-brand] .login-card .muted { color: #26304F; }
:root[data-brand] .login-card .brand + p.muted { font-size: clamp(16px, 2.2vw, 19px); line-height: 1.4; text-align: center; margin: 0 auto 6px; max-width: 420px; }
:root[data-brand] .login-card h2 { text-align: center; font-size: 22px; color: #0E1430; margin: 4px 0 0; }

/* ---- fields ---- */
:root[data-brand] .login-card label { position: relative; color: #0E1430; font-size: 17px; font-weight: 650; gap: 8px; }
:root[data-brand] .login-card label::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; background: currentColor;
  -webkit-mask: var(--rl-ic) center / contain no-repeat; mask: var(--rl-ic) center / contain no-repeat; }
:root[data-brand] .login-card label { padding-left: 0; text-indent: 32px; --rl-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3M12 15v2'/%3E%3C/svg%3E"); }
:root[data-brand] .login-card label:has(input[type="email"]) { --rl-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
:root[data-brand] .login-card label:has(input[name="code"]) { --rl-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='3' width='10' height='18' rx='2'/%3E%3Cpath d='M11 17h2'/%3E%3C/svg%3E"); }
:root[data-brand] .login-card input { text-indent: 0; height: 56px; padding: 0 20px; font-size: 17px; font-weight: 400; color: #0E1430; background: rgba(255, 255, 255, .72); border: 1.5px solid #8B93B4; border-radius: 13px;
  box-shadow: 0 1px 2px rgba(14, 20, 48, .06) inset; }
:root[data-brand] .login-card input::placeholder { color: #5B6385; }
:root[data-brand] .login-card input:focus { outline: 0; border-color: #0B4FD8; box-shadow: 0 0 0 4px rgba(11, 79, 216, .18); background: #fff; }
:root[data-brand] .login-card label:has(.rl-eye) input { padding-right: 58px; }
.rl-eye { display: none; }
:root[data-brand] .rl-eye { display: grid; place-items: center; position: absolute; right: 8px; bottom: 7px; width: 42px; height: 42px; border: 0; border-radius: 10px; background: transparent; color: #0E1430; cursor: pointer; text-indent: 0; }
:root[data-brand] .rl-eye:hover { background: rgba(14, 20, 48, .08); }
.rl-eye svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rl-eye[aria-pressed="true"] .rl-slash { display: block; } .rl-eye .rl-slash { display: none; }

/* ---- buttons and links ---- */
:root[data-brand] .login-card .btn.primary { height: 68px; margin-top: 10px; border: 0; border-radius: 999px; font-size: clamp(22px, 3vw, 27px); font-weight: 700; letter-spacing: -.01em; color: #fff;
  background: linear-gradient(180deg, #1E6BF0 0%, #0B4FD8 45%, #0A3AA8 100%); box-shadow: 0 10px 26px rgba(11, 79, 216, .45), 0 1px 0 rgba(255, 255, 255, .35) inset; transition: transform .15s, box-shadow .15s, filter .15s; }
:root[data-brand] .login-card .btn.primary::after { content: "→"; margin-left: 14px; font-weight: 500; }
:root[data-brand] .login-card .btn.primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 32px rgba(11, 79, 216, .55), 0 1px 0 rgba(255, 255, 255, .35) inset; }
:root[data-brand] .login-card .error { text-align: center; color: #B42318; font-weight: 600; margin: 0; }
:root[data-brand] .login-card .error:empty { display: none; }
:root[data-brand] .login-card a { color: #0B4FD8; }
:root[data-brand] .login-card p.small { text-align: center; margin: 0; }
:root[data-brand] .login-card p.small:not(.by-resans) > a { font-size: 19px; font-weight: 600; text-underline-offset: 4px; }
/* "or" + the API key pill */
:root[data-brand] .login-card details { position: relative; margin-top: 14px; padding-top: 30px; border-top: 1px solid rgba(14, 20, 48, .22); text-align: center; color: #0E1430; }
:root[data-brand] .login-card details::before { content: "or"; position: absolute; top: -19px; left: 50%; transform: translateX(-50%); width: 40px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: #F4F6FC; color: #0E1430; font-size: 17px; font-weight: 600; box-shadow: 0 1px 3px rgba(14, 20, 48, .12); }
:root[lang="es"][data-brand] .login-card details::before { content: "o"; }
:root[data-brand] .login-card summary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: min(380px, 100%); height: 54px; padding: 0 26px; border: 1.5px solid #5B6385; border-radius: 999px;
  font-size: 19px; font-weight: 650; color: #0E1430; cursor: pointer; list-style: none; background: rgba(255, 255, 255, .35); transition: background-color .15s; }
:root[data-brand] .login-card summary::-webkit-details-marker { display: none; }
:root[data-brand] .login-card summary::before { content: ""; width: 26px; height: 26px; background: #0B4FD8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='15.5' cy='8.5' r='4.5'/%3E%3Cpath d='M12 12 4 20M7 17l2 2M4 20l2 1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='15.5' cy='8.5' r='4.5'/%3E%3Cpath d='M12 12 4 20M7 17l2 2M4 20l2 1'/%3E%3C/svg%3E") center / contain no-repeat; }
:root[data-brand] .login-card summary:hover { background: rgba(255, 255, 255, .7); }
:root[data-brand] .login-card details[open] summary { margin-bottom: 12px; }
:root[data-brand] .login-card details .btn { height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 650; }
:root[data-brand] .login-card .by-resans { color: #454D6B; }
:root[data-brand] .brigade-install { border-top-color: rgba(14, 20, 48, .18); }
:root[data-brand] .brigade-install .btn { border-color: #0B4FD8; color: #0B4FD8; border-radius: 999px; height: 46px; }
:root[data-brand] .brigade-install summary { min-width: 0; height: 44px; font-size: 15px; border-width: 1px; } :root[data-brand] .brigade-install summary::before { content: none; }
:root[data-brand] .brigade-install details { border-top: 0; padding-top: 0; margin-top: 0; } :root[data-brand] .brigade-install details::before { content: none; }

/* ---- theme and language, top right (the same switch as the corner dock, so the dock is not repeated here) ---- */
:root[data-brand] body:has(#login:not(.hidden)) .theme-dock { display: none; }
:root[data-brand] .login-theme { position: fixed; top: 22px; right: 26px; z-index: 2; display: flex; align-items: center; gap: 14px; margin: 0; }
:root[data-brand] .login-theme .theme-label { font-size: 0; gap: 0; color: #fff; }
:root[data-brand] .login-theme select, :root[data-brand] .login-theme .lang-btn { height: 48px; padding: 0 22px; margin: 0; border: 1.5px solid rgba(255, 255, 255, .75); border-radius: 999px; background: rgba(8, 16, 44, .55);
  color: #fff; font: 600 18px Inter, system-ui, sans-serif; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); min-height: 0; }
:root[data-brand] .login-theme select option { color: #0E1430; background: #fff; }
:root[data-brand] .login-theme .lang-btn:hover, :root[data-brand] .login-theme select:hover { background: rgba(8, 16, 44, .8); }

/* ---- dark theme: charcoal glass, white logo ---- */
:root[data-brand][data-theme="dark"] .login-card { background: linear-gradient(160deg, rgba(26, 26, 26, .88), rgba(12, 12, 12, .86)); border-color: rgba(255, 255, 255, .14); color: #F4F4F4;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .08) inset; }
:root[data-brand][data-theme="dark"] .login-card .brand-mark img { filter: brightness(0) invert(1); }
:root[data-brand][data-theme="dark"] .login-card p.muted, :root[data-brand][data-theme="dark"] .login-card .muted, :root[data-brand][data-theme="dark"] .login-card .by-resans { color: #C4C4C4; }
:root[data-brand][data-theme="dark"] .login-card label, :root[data-brand][data-theme="dark"] .login-card h2, :root[data-brand][data-theme="dark"] .login-card details,
:root[data-brand][data-theme="dark"] .login-card summary, :root[data-brand][data-theme="dark"] .rl-eye { color: #F4F4F4; }
:root[data-brand][data-theme="dark"] .login-card input { background: rgba(0, 0, 0, .45); border-color: #5A5A5A; color: #fff; }
:root[data-brand][data-theme="dark"] .login-card input::placeholder { color: #9A9A9A; }
:root[data-brand][data-theme="dark"] .login-card input:focus { background: #000; border-color: #6FA0FF; box-shadow: 0 0 0 4px rgba(111, 160, 255, .22); }
:root[data-brand][data-theme="dark"] .login-card a, :root[data-brand][data-theme="dark"] .brigade-install .btn { color: #8DB4FF; }
:root[data-brand][data-theme="dark"] .login-card .error { color: #FF8A80; }
:root[data-brand][data-theme="dark"] .login-card details { border-top-color: rgba(255, 255, 255, .18); }
:root[data-brand][data-theme="dark"] .login-card details::before { background: #2A2A2A; color: #F4F4F4; }
:root[data-brand][data-theme="dark"] .login-card summary { border-color: #8A8A8A; background: rgba(255, 255, 255, .05); }
:root[data-brand][data-theme="dark"] .login-card summary::before { background: #8DB4FF; }
:root[data-brand][data-theme="dark"] .login-card summary:hover { background: rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) {
  :root[data-brand]:not([data-theme="light"]) .login-card { background: linear-gradient(160deg, rgba(26, 26, 26, .88), rgba(12, 12, 12, .86)); border-color: rgba(255, 255, 255, .14); color: #F4F4F4; }
  :root[data-brand]:not([data-theme="light"]) .login-card .brand-mark img { filter: brightness(0) invert(1); }
  :root[data-brand]:not([data-theme="light"]) .login-card p.muted, :root[data-brand]:not([data-theme="light"]) .login-card .muted, :root[data-brand]:not([data-theme="light"]) .login-card .by-resans { color: #C4C4C4; }
  :root[data-brand]:not([data-theme="light"]) .login-card label, :root[data-brand]:not([data-theme="light"]) .login-card h2, :root[data-brand]:not([data-theme="light"]) .login-card details,
  :root[data-brand]:not([data-theme="light"]) .login-card summary, :root[data-brand]:not([data-theme="light"]) .rl-eye { color: #F4F4F4; }
  :root[data-brand]:not([data-theme="light"]) .login-card input { background: rgba(0, 0, 0, .45); border-color: #5A5A5A; color: #fff; }
  :root[data-brand]:not([data-theme="light"]) .login-card input::placeholder { color: #9A9A9A; }
  :root[data-brand]:not([data-theme="light"]) .login-card a { color: #8DB4FF; }
  :root[data-brand]:not([data-theme="light"]) .login-card details { border-top-color: rgba(255, 255, 255, .18); }
  :root[data-brand]:not([data-theme="light"]) .login-card details::before { background: #2A2A2A; color: #F4F4F4; }
  :root[data-brand]:not([data-theme="light"]) .login-card summary { border-color: #8A8A8A; background: rgba(255, 255, 255, .05); }
  :root[data-brand]:not([data-theme="light"]) .login-card summary::before { background: #8DB4FF; }
}
@media (max-width: 560px) {
  :root[data-brand] .login { padding-top: 76px; }
  :root[data-brand] .login-theme { top: 14px; right: 14px; gap: 8px; }
  :root[data-brand] .login-theme select, :root[data-brand] .login-theme .lang-btn { height: 42px; padding: 0 14px; font-size: 15px; }
  :root[data-brand] .login-card .btn.primary { height: 60px; }
}
@media (prefers-reduced-motion: reduce) { :root[data-brand] .login-card .btn.primary { transition: none; } }

/* ===================== inside the Resans desktop window (<html data-desktop="1">) =====================
   The window has no frame: a small fixed sign-in window with the photo showing around a compact card and its own X,
   then the full app with minimize / size / close in the top bar. Drag the window by the background or the top bar. */
.rd-close, .rd-win { display: none; }
:root[data-desktop] body:has(#login:not(.hidden)) { overflow: hidden; }
:root[data-desktop] .login { min-height: 100vh; padding: 76px 16px 24px; cursor: default; }
:root[data-desktop][data-brand] .login-card { width: min(430px, 100%); gap: 11px; padding: 24px 40px 26px; border-radius: 30px; }
:root[data-desktop][data-brand] .login-card .brand + p.muted { font-size: 15px; margin-bottom: 2px; max-width: 320px; }
:root[data-desktop][data-brand] .login-card label { font-size: 15px; gap: 6px; text-indent: 28px; }
:root[data-desktop][data-brand] .login-card label::before { width: 19px; height: 19px; top: 1px; }
:root[data-desktop][data-brand] .login-card input { height: 46px; font-size: 15.5px; padding: 0 16px; border-radius: 11px; text-indent: 0; }
:root[data-desktop][data-brand] .rl-eye { width: 36px; height: 36px; bottom: 5px; right: 6px; } :root[data-desktop] .rl-eye svg { width: 22px; height: 22px; }
:root[data-desktop][data-brand] .login-card .btn.primary { height: 54px; font-size: 20px; margin-top: 8px; }
:root[data-desktop][data-brand] .login-card p.small:not(.by-resans) > a { font-size: 16px; }
:root[data-desktop][data-brand] .login-card details { margin-top: 12px; padding-top: 24px; }
:root[data-desktop][data-brand] .login-card details::before { top: -16px; width: 34px; height: 32px; font-size: 15px; }
:root[data-desktop][data-brand] .login-card summary { min-width: 0; width: 100%; height: 46px; font-size: 16px; }
:root[data-desktop][data-brand] .login-card summary::before { width: 21px; height: 21px; }
:root[data-desktop] .login-card .by-resans, :root[data-desktop] .brigade-install { display: none; }   /* already installed: nothing to offer */
:root[data-desktop][data-brand] .login-theme { top: 16px; right: 68px; gap: 10px; }
:root[data-desktop][data-brand] .login-theme select, :root[data-desktop][data-brand] .login-theme .lang-btn { height: 40px; padding: 0 16px; font-size: 15px; }
:root[data-desktop] .rd-close { display: grid; place-items: center; position: fixed; top: 16px; right: 16px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .75);
  background: rgba(8, 16, 44, .55); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color .15s, border-color .15s; }
:root[data-desktop] .rd-close:hover { background: #D03030; border-color: #D03030; }
:root[data-desktop] .rd-close svg, :root[data-desktop] .rd-b svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
/* the app: window buttons at the right end of the top bar; the theme and language switch moves left to make room */
:root[data-desktop] .ws-bar { cursor: default; }
:root[data-desktop] .rd-win { display: flex; position: absolute; top: 0; right: 0; height: 100%; align-items: stretch; z-index: 22; }
:root[data-desktop] .rd-b { width: 46px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color .15s; }
:root[data-desktop] .rd-b:hover { background: rgba(255, 255, 255, .14); } :root[data-desktop] .rd-b.rd-x:hover { background: #D03030; }
@media (min-width: 901px) {
  :root[data-desktop] body.ws-body-root:has(#shell:not(.hidden)) .theme-dock { right: 154px; }
  :root[data-desktop] .ws-right { margin-right: 434px; }
}
@media (max-width: 900px) { :root[data-desktop] .ws-right { margin-right: 140px; } }
@media print { .rd-win, .rd-close { display: none !important; } }

/* ---- the Resans company name design on every sign-in card (restaurant and hotel): navy name, gold bell as the A.
   Dark screens get the copy with a white name (the bell stays gold). These win over the per-edition logo rules above. ---- */
:root[data-brand] .login .login-card .brand { flex-direction: column; gap: 0; font-size: 0; line-height: 0; color: transparent; }
:root[data-brand] .login .login-card .brand-mark, :root[data-brand] .login .login-card .brand-mark.logo { width: min(440px, 92%); height: auto; aspect-ratio: 1000 / 268;
  margin: 2px auto 10px; background: none; box-shadow: none; border-radius: 0; }
:root[data-brand] .login .login-card .brand-mark img { content: url("icons/resans-wordmark.png"); width: 100%; height: 100%; object-fit: contain; filter: none !important; }
:root[data-brand][data-theme="dark"] .login .login-card .brand-mark img { content: url("icons/resans-wordmark-dark.png"); }
@media (prefers-color-scheme: dark) { :root[data-brand]:not([data-theme="light"]) .login .login-card .brand-mark img { content: url("icons/resans-wordmark-dark.png"); } }
:root[data-desktop][data-brand] .login .login-card .brand-mark, :root[data-desktop][data-brand] .login .login-card .brand-mark.logo { width: 300px; }
