/* The sign-in page (Views/Public/Login.cshtml, /public/login - Layout null, not under _Layout: the page links this file
   itself, where its two <style> blocks were). Its own look, made to match the SchoolDesk app's sign-in screen: the card
   over the photo (a laptop) or the app's hexagons (a tablet / phone), the code popups (OTP, two-step, sign-in limit) and
   the QR popup. Colours are the theme's tokens (the page sets no data-theme, so they are the light values). Prefix
   .sd-pub- for the page's frame; the older .sd-otp-* / .sd-login-* / .sd-option* names are kept, the scripts use them. */

.fixed-background {
  background: url('/dore/img/login/backgrond-img.png') no-repeat center center fixed;
}

@media screen and (max-width:767px) {
  .fixed-background {
      background: url('/dore/img/login/plane-background.png') no-repeat center center fixed !important;
      background-size: cover !important;
      width: 100%;
      height: 100%;
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
  }
}

@media screen and (min-width:1140px) {
  .fixed-background {
      background-size: cover;
  }
}

/* Same font as the rest of the app (customs.css is not loaded on the login pages) */
@font-face { font-family: Montserrat; src: url(/dore/font/Montserrat-Regular.ttf); }
body, button, input, .btn { font-family: Montserrat, "Segoe UI", Roboto, Arial, sans-serif; }
/* Login / OTP login side by side */
.sd-login-row { display:flex; gap:8px; }
.sd-login-row .sd-login-btn { flex:1; width:auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding-left:6px; padding-right:6px; }
/* Too narrow for two buttons side by side: stack them. */
@media screen and (max-width:400px) {
  .sd-login-row { flex-direction:column; gap:6px; }
  .sd-login-row .sd-login-btn { width:100%; }
}
/* The code popup: used by OTP login and by two-step verification */
.sd-otp-back { display:none; position:fixed; inset:0; background:var(--sd-scrim); z-index:1080; align-items:center; justify-content:center; padding:16px; }
.sd-otp-card { background:var(--sd-card); border-radius:18px; max-width:360px; width:100%; padding:18px; text-align:center; box-shadow:0 8px 30px var(--sd-shadow);
             max-height:85vh; max-height:85dvh; overflow-y:auto; overscroll-behavior:contain; }
.sd-otp-card .sd-login-btn { width:auto; min-width:150px; height:auto; padding:7px 20px; font-size:14px; }
.sd-otp-card h5 { font-weight:700; margin:0 0 4px; font-size:17px; }
.sd-otp-sent { color:var(--sd-text-3); font-size:13px; margin-bottom:14px; }
.sd-otp-code { font-size:24px; letter-spacing:8px; text-align:center; font-weight:700; border-radius:12px; height:50px; }
.sd-otp-note { background:var(--sd-warn-bg); color:var(--sd-accent-fg); border-radius:10px; padding:8px; font-size:12px; margin-bottom:12px; }
.sd-otp-foot { display:flex; justify-content:space-between; align-items:center; margin-top:12px; }
.sd-otp-link { background:none; border:none; color:var(--sd-green-dark); font-size:13px; text-decoration:underline; padding:0; }
.sd-otp-link[disabled] { color:var(--sd-muted); text-decoration:none; cursor:not-allowed; }
.sd-otp-pick { display:flex; align-items:center; gap:8px; background:var(--sd-soft); border-radius:12px; padding:9px 12px; margin-bottom:8px; font-size:14px; cursor:pointer; }
.sd-otp-pick input { width:17px; height:17px; cursor:pointer; }
.sd-otp-pick.sd-otp-off { opacity:.55; cursor:not-allowed; }
.sd-limit-row { display:flex; align-items:center; gap:10px; background:var(--sd-icon-bg); border-radius:12px; padding:9px 12px; margin:0 0 8px; text-align:left; }
.sd-limit-row .sd-limit-what { flex:1; min-width:0; }
.sd-limit-row b { display:block; font-size:13px; color:var(--sd-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sd-limit-row small { display:block; font-size:11px; color:var(--sd-text-3); }
.sd-limit-out { background:none; border:none; color:var(--sd-danger); font-size:20px; padding:2px 4px; line-height:1; }
.sd-limit-at { color:var(--sd-danger); }
/* OTP chooser: one row per number / email when a student has authorised parents (OtpDestinations). */
.sd-otp-dests { margin:-4px 0 8px 22px; }
.sd-otp-dests:empty { display:none; }
/* Several numbers / emails: the channel row is only their heading - they are ticked one by one. */
.sd-otp-pick.sd-otp-head { background:none; padding:4px 2px 2px; margin-bottom:4px; cursor:default; font-weight:600; }
.sd-otp-pick.sd-otp-head input { display:none; }
.sd-otp-head + .sd-otp-dests { margin-left:0; margin-top:0; }
.sd-otp-dests .sd-otp-pick { background:var(--sd-card); border:1px solid var(--sd-border); padding:6px 10px; margin-bottom:5px; font-size:13px; }
.sd-otp-dests .sd-otp-pick b { font-weight:600; }
.sd-otp-dests.sd-otp-off { opacity:.5; pointer-events:none; }
/* Many sessions: the card stays inside the screen, only the list scrolls, Sign in stays reachable. */
.sd-limit-card { display:flex; flex-direction:column; overflow:hidden; }
.sd-limit-list { flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; margin:0 -4px; padding:0 4px; }
.sd-otp-pick.sd-otp-off input { cursor:not-allowed; }
.sd-otp-pick small { font-size:11px; max-width:52%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; direction:rtl; text-align:right; }
/* Sign-in options: dividers and labelled buttons */
.sd-divider { display:flex; align-items:center; margin:14px 0 10px; color:var(--sd-text-2); font-size:12px; font-weight:bold; }
.sd-divider::before, .sd-divider::after { content:""; flex:1; height:1px; background:var(--sd-shadow); }
.sd-divider span { padding:0 10px; white-space:nowrap; }
.sd-hint { font-size:11px; color:var(--sd-text-2); margin:4px 0 0 14px; }
.sd-login-btn { width:100%; height:34px; font-size:medium; }
.sd-options { display:flex; gap:8px; }
.sd-option { flex:1; display:flex; align-items:center; gap:8px; padding:6px 10px; background:var(--sd-card); border-radius:50px;
           color:var(--sd-text) !important; text-decoration:none !important; box-shadow:0 1px 3px var(--sd-shadow-soft); min-width:0; }
.sd-option:hover { box-shadow:0 2px 6px var(--sd-shadow); }
.sd-option-icon { flex:0 0 28px; width:28px; height:28px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:var(--sd-soft); }
.sd-option-text { display:flex; flex-direction:column; line-height:1.15; min-width:0; }
.sd-option-text b { font-size:13px; }
.sd-option-text small { font-size:10px; color:var(--sd-text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media screen and (max-width:400px) { .sd-options { flex-direction:column; } }
/* The page carries its own logo, so it reads on the yellow whatever the background does. */
.sd-brand { display:flex; align-items:center; justify-content:center; gap:10px; margin:0 0 18px; }
.sd-brand img { width:52px; height:auto; border-radius:12px; box-shadow:0 2px 8px var(--sd-shadow-soft); }
.sd-brand span { font-weight:800; letter-spacing:3px; font-size:15px; color:var(--sd-text); }
/* Phones: the background image has its own faded bee at the top - crop it away, the header above
   replaces it; the hint wraps instead of being cut off. */
@media screen and (max-width:767px) {
  .fixed-background { background-image: none !important; background-color: var(--sd-yellow) !important; }
  #divLogin, .multiple_accounts_list { margin-top: 24px; }
  .sd-brand img { width:46px; border-radius:11px; }
  .sd-hint { font-size:11px; margin-left:4px !important; white-space:normal !important; overflow:visible !important; }
}
/* The sign-in form as a card: boxes with what goes in them written inside (no labels over
   them) and an icon; a phone takes the width with a thin edge, a tablet or laptop a centred card. */
.sd-card { background:color-mix(in srgb, var(--sd-card) 94%, transparent); border-radius:22px; box-shadow:0 12px 34px var(--sd-shadow-soft); padding:26px 22px 20px !important; }
.sd-field { position:relative; margin-bottom:12px; }
.sd-field-icon { position:absolute; left:17px; top:50%; transform:translateY(-50%); font-size:16px; color:var(--sd-muted); pointer-events:none; z-index:2; }
.sd-field .sd-pub-input { width:100%; height:48px; padding:0 18px 0 46px; border:1px solid var(--sd-border); border-radius:24px !important; background:var(--sd-soft); font-size:15px; color:var(--sd-text); box-shadow:none; transition:border-color .15s, box-shadow .15s, background .15s; }
.sd-field .sd-pub-input::placeholder { color:var(--sd-muted); opacity:1; }
.sd-field .sd-pub-input:focus { background:var(--sd-card); border-color:var(--sd-green); box-shadow:0 0 0 3px rgba(var(--sd-primary-rgb), .22); outline:none; }
.sd-field .sd-pub-input:focus ~ .sd-field-icon, .sd-field:focus-within .sd-field-icon { color:var(--sd-green-dark); }
.sd-field-eye { position:absolute; right:14px; top:50%; transform:translateY(-50%); font-size:18px; line-height:1; padding:4px; cursor:pointer; color:var(--sd-text-3) !important; z-index:2; }
.sd-remember { display:flex; align-items:center; gap:8px; margin:6px 0 4px 8px; font-size:13px; color:var(--sd-text-2); cursor:pointer; }
.sd-remember input { width:16px; height:16px; accent-color:var(--sd-green); margin:0; }
.sd-card .sd-login-btn { height:44px; border-radius:22px; font-size:15px; font-weight:600; }
.sd-card .sd-hint { color:var(--sd-text-3); }
/* Phone and tablet: the background of the SchoolDesk app's sign-in screen
   (assets/images/splashscreenbackground.png), yellow hexagons on white, and the card in the middle.
   A phone is covered with it, as the app does; a tablet has it once at each side, white behind the
   card. A laptop or desktop keeps the photo, with the card on its right. */
@media screen and (max-width:1023px) {
  .fixed-background { position:fixed; inset:0; background:url('/dore/img/login/app-background.png') no-repeat left top / auto 100%, url('/dore/img/login/app-background.png') no-repeat right top / auto 100%, var(--sd-card) !important; }
}
@media screen and (max-width:767px) {
  .fixed-background { background:var(--sd-card) url('/dore/img/login/app-background.png') no-repeat center center / cover !important; }
}
/* tablet and laptop: a centred card of a comfortable width, whatever the column does */
@media screen and (min-width:768px) {
  .sd-card { max-width:420px; margin:0 auto; }
}
/* phone: the card is the page's width less a 16px edge on each side */
@media screen and (max-width:767px) {
  .sd-card { padding:22px 16px 18px !important; border-radius:20px; }
}
/* A message on the page must not crowd the form. */
.sd-alert { font-size:12px; line-height:1.3; margin:8px 0 6px; padding:7px 9px; border-radius:8px; background:color-mix(in srgb, var(--sd-card) 90%, transparent); color:var(--sd-danger); }
.sd-alert:empty { display:none; }

/* the page's frame (was Bootstrap's container / row / col-md-6 col-lg-4 mx-auto my-auto mr-0): the card at the right of
   the photo on a laptop, in the middle below 1024px, the page's width less 16px each side on a phone */
body.sd-pub-body, .sd-pub-main { overflow: hidden; }
.sd-pub-wrap { width: 100%; height: 100%; margin: 0 auto; padding: 0 15px; }
@media (min-width: 576px) { .sd-pub-wrap { max-width: 540px; } }
@media (min-width: 768px) { .sd-pub-wrap { max-width: 720px; } }
@media (min-width: 992px) { .sd-pub-wrap { max-width: 960px; } }
@media (min-width: 1200px) { .sd-pub-wrap { max-width: 1140px; } }
.sd-pub-row { display: flex; flex-wrap: wrap; height: 100%; margin: 0 -15px; }
.sd-pub-col { position: relative; width: 100%; padding: 0 15px; margin: auto 10px auto auto; }
@media (min-width: 768px) { .sd-pub-col { flex: 0 0 420px; max-width: 420px; } }
@media (max-width: 1023px) { .sd-pub-col { margin-left: auto; margin-right: auto; } }
@media (max-width: 767px) {
  .sd-pub-wrap { max-width: none; padding: 0 16px; }
  .sd-pub-row { margin: 0; }
  .sd-pub-col { padding: 0; margin-right: auto; }
}

/* the boxes (were Bootstrap's form-control): the user name and password in .sd-field, the code boxes in the popups */
.sd-pub-input { display: block; width: 100%; height: 38px; padding: 6px 12px; border: 1px solid var(--sd-border); border-radius: 6px; background: var(--sd-card); color: var(--sd-text); font-size: 15px; outline: 0; }
.sd-pub-input:focus { border-color: var(--sd-green); box-shadow: 0 0 0 3px rgba(var(--sd-primary-rgb), .22); }
.sd-field .sd-pub-input.is-eye { padding-right: 46px; }
.sd-otp-code { margin-bottom: 16px; }
.sd-pub-err { color: var(--sd-danger); }
.sd-otp-card .sd-pub-err { font-size: 12px; }
.sd-alert.is-ok { color: var(--sd-green-dark); }

/* the buttons (were Bootstrap / customs.css btn-style btn-xs btn-shadow): the theme's green, white words */
.btn.sd-pub-btn { background-color: var(--sd-green); color: var(--sd-on-color); box-shadow: 0 1px 2px var(--sd-shadow-soft); }
.btn.sd-pub-btn:hover, .btn.sd-pub-btn:focus-visible { background-color: var(--sd-green-dark); color: var(--sd-on-color); }
.btn.sd-pub-btn:disabled { opacity: .5; cursor: not-allowed; }
.sd-login-row .sd-login-btn { margin-bottom: 4px; }
.sd-login-btn.is-gap { margin-top: 8px; }
.sd-login-btn.is-gap-s { margin-top: 4px; }
.sd-pub-form { margin: 0; }
.sd-limit-all { margin-bottom: 8px; text-align: right; }
.sd-otp-link.is-danger { color: var(--sd-danger); }
.sd-ico { margin-right: 4px; }
.sd-otp-to-text { margin-left: auto; color: var(--sd-text-3); }
.sd-limit-ico { color: var(--sd-green-dark); font-size: 18px; }
.sd-option-img { width: 22px; }
.sd-option-ico { font-size: 15px; color: var(--sd-green-dark); }
.sd-pub-privacy { margin-top: 14px; text-align: center; font-size: 12px; }
.sd-pub-privacy a { color: var(--sd-text-3); }

/* Sign in with the app: the QR popup (its display is set by sdQrLogin) */
.sd-qr-back { position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; padding: 16px; background: var(--sd-scrim); }
.sd-qr-card { width: 100%; max-width: 360px; padding: 22px; border-radius: 20px; background: var(--sd-card); text-align: center; box-shadow: 0 8px 30px var(--sd-shadow); }
.sd-qr-head { display: flex; justify-content: space-between; align-items: center; }
.sd-qr-head h5 { margin: 0; font-weight: 700; }
.sd-qr-x { font-size: 22px; color: var(--sd-text-3); text-decoration: none; }
.sd-qr-help { margin: 8px 0 12px; font-size: 13px; color: var(--sd-text-3); }
.sd-qr-box { position: relative; display: inline-block; }
#sdQrImage { width: 220px; height: 220px; border-radius: 12px; border: 1px solid var(--sd-border); }
.sd-qr-mask { position: absolute; inset: 0; align-items: center; justify-content: center; flex-direction: column; border-radius: 12px; background: color-mix(in srgb, var(--sd-card) 92%, transparent); }
.sd-qr-masktext { margin-bottom: 8px; font-weight: 600; }
.sd-qr-as { margin-top: 10px; padding: 6px 8px; border-radius: 8px; background: var(--sd-warn-bg); color: var(--sd-accent-fg); font-size: 13px; }
.sd-qr-ask { margin-top: 12px; font-size: 13px; color: var(--sd-text-2); }
.sd-qr-code { font-size: 34px; font-weight: 800; letter-spacing: 4px; color: var(--sd-green-dark); }
.sd-qr-status { min-height: 18px; font-size: 13px; color: var(--sd-text-3); }

/* the error / expired-link page (Views/Public/Error.cshtml, /error): a card in the middle of the screen - was the page's
   own <style> with colours of its own; tokens now, so light and dark follow the theme */
body.sd-pub-error { display: flex; align-items: center; justify-content: center; height: 100vh; margin: 0; background: var(--sd-bg); color: var(--sd-text); font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; }
.sd-pub-error .error-container { max-width: 500px; padding: 40px 35px; text-align: center; border-radius: 16px; background: var(--sd-card); box-shadow: 0 4px 20px var(--sd-shadow); }
.sd-pub-error .logo { width: 90px; height: auto; margin-bottom: 25px; filter: drop-shadow(0 2px 4px var(--sd-shadow)); }
.sd-pub-error .error-icon { margin-bottom: 20px; font-size: 60px; color: var(--sd-danger); }
.sd-pub-error h1 { margin-bottom: 10px; font-size: 28px; }
.sd-pub-error p { margin-bottom: 25px; font-size: 16px; line-height: 1.5; color: var(--sd-text-3); }
.sd-pub-error p.sd-pub-error-alert { color: var(--sd-danger); }
.sd-pub-error .button-group { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin-bottom: 15px; }
.sd-pub-error a.button, .sd-pub-error button.button { padding: 12px 24px; border: 0; border-radius: 8px; background: var(--sd-primary); color: var(--sd-on-color); font-weight: 500; text-decoration: none; cursor: pointer; transition: background .3s, transform .2s; }
.sd-pub-error a.button:hover, .sd-pub-error button.button:hover { background: var(--sd-primary-hover); transform: scale(1.02); }
.sd-pub-error #countdown { font-size: 14px; color: var(--sd-text-3); }
.sd-pub-error #closeMessage { display: none; margin-top: 8px; font-size: 14px; color: var(--sd-text-3); }
@media (max-width: 600px) {
  .sd-pub-error .error-container { width: 90%; padding: 30px 20px; }
  .sd-pub-error .logo { width: 70px; }
}
