/* Web twin of scenes/login/login.tscn. Sizes, colours and distances are those of the scene and of
   theme/gaya_theme.tres (the type variation is named next to each rule). Keep them in step. */
@font-face { font-family: 'Bebas Neue'; src: url('../fonts/BebasNeue-Regular.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/Montserrat-Regular.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: block; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; height: 100%; }
body { background: #141414; color: #E6E6E6; font-family: 'Montserrat', system-ui, sans-serif; font-size: 14px; line-height: 18px; -webkit-font-smoothing: antialiased; }

/* Backdrop, Shade, ShadeBottom */
#login { position: relative; min-height: 100%; display: flex; }
.backdrop, .shade, .shade-bottom { position: absolute; inset: 0; pointer-events: none; }
.backdrop { background: url('login_backdrop.jpg') center / cover no-repeat; }
.shade { background: linear-gradient(90deg, rgba(20, 20, 20, 0.35) 0%, rgba(20, 20, 20, 0.8) 55%, rgba(20, 20, 20, 0.97) 100%); }
.shade-bottom { background: linear-gradient(180deg, rgba(20, 20, 20, 0) 0%, rgba(20, 20, 20, 0.25) 60%, rgba(32, 12, 13, 0.85) 100%); }

/* Layout (margins 56 / 40) and Row (separation 48) */
.layout { position: relative; flex: 1; display: flex; gap: 48px; padding: 40px 56px; min-width: 0; }

/* Intro (separation 10) */
.intro { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.intro .spacer { flex: 1; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.badge { background: #BD2E33; border-radius: 2px; padding: 1px 6px; }                                   /* Badge */
.badge, .brand { font-family: 'Bebas Neue', sans-serif; font-size: 22px; line-height: 27px; color: #fff; } /* BrandLabel */
.kicker { font-weight: 600; font-size: 11px; line-height: 14px; color: #C8373C; }                        /* KickerLabel */
.hero { font-family: 'Bebas Neue', sans-serif; font-size: 120px; line-height: 144px; color: #fff; }       /* HeroLabel */
.tagline { margin: 0; min-height: 60px; font-size: 18px; line-height: 26px; }
.intro .gap { height: 24px; }
.link { align-self: flex-start; background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: 13px; line-height: 17px; color: #CFCFCF; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; } /* LinkButton */
.link:hover { color: #fff; }
.link:active { color: #C8373C; }

/* Card (Glass, 440 wide, centred vertically) and Column (separation 14) */
.card { width: 440px; flex: none; align-self: center; display: flex; flex-direction: column; gap: 14px; padding: 28px; background: rgba(22, 22, 22, 0.9); border: 1px solid #333; border-radius: 2px; }
.page { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.heading { margin: 0; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 44px; line-height: 53px; color: #fff; } /* HeadingLabel */
.heading.small { font-size: 36px; line-height: 44px; }
.dim { margin: 0; font-size: 12px; line-height: 15px; color: #9A9A9A; }                                  /* DimLabel */
.gap6 { height: 6px; }
.gap4 { height: 4px; }
.field { font-weight: 600; font-size: 12px; line-height: 16px; color: #BDBDBD; }                          /* FieldLabel */
.card input[type="email"], .card input[type="password"], .card input[type="text"] { width: 100%; height: 34px; padding: 7px 10px; background: #111; border: 1px solid #333; border-radius: 2px; color: #E6E6E6; caret-color: #fff; font: inherit; outline: none; } /* LineEdit */
.card input:focus { border-color: #BD2E33; }
.card input::placeholder { color: #6E6E6E; opacity: 1; }
.card input::selection { background: rgba(189, 46, 51, 0.55); }
.card input:-webkit-autofill { -webkit-text-fill-color: #E6E6E6; box-shadow: 0 0 0 100px #111 inset; caret-color: #fff; }
.check { display: flex; align-items: center; gap: 6px; padding: 4px; min-height: 30px; cursor: pointer; }  /* CheckBox */
.check:hover { color: #fff; }
.check input { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; margin: 0 1px; flex: none; border-radius: 2px; background: #D0D0D0; cursor: pointer; opacity: 0.35; }
.check input:checked { opacity: 1; background: #D0D0D0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23141414' stroke-width='2'/%3E%3C/svg%3E") center / 14px no-repeat; }
.check input:focus-visible { outline: 1px solid #BD2E33; outline-offset: 2px; }
.accent { width: 100%; height: 36px; padding: 9px 16px; background: #BD2E33; border: 0; border-radius: 2px; color: #fff; font: inherit; font-weight: 600; cursor: pointer; } /* AccentButton */
.accent:hover { background: #C8373C; }
.accent:active { background: #8E2226; }
.accent:disabled { background: #3A2325; color: #6E6E6E; cursor: default; }
.accent:focus-visible { outline: 1px solid #BD2E33; outline-offset: 1px; }
.links { display: flex; align-items: center; }
.links .spacer { flex: 1; }
.status { margin: 0; font-size: 13px; line-height: 17px; color: #E8A33D; }                                /* ErrorLabel */

/* Upright tablet and phone (views 1 and 3 of the scene): the card first, the introduction below, both centred. */
@media (orientation: portrait) {
  .layout { flex-direction: column; justify-content: center; gap: 40px; }
  .intro { flex: none; order: 2; }
  .intro .spacer { display: none; }
  .card { order: 1; align-self: center; max-width: 100%; }
}
/* Phone upright (view 3): card and introduction share one column, at least 340 wide. */
@media (orientation: portrait) and (max-width: 560px) {
  .layout { padding: 24px max(0px, min(56px, calc((100vw - 340px) / 2))); }
  .card { width: 100%; align-self: stretch; }
}
/* Phone lying (view 4): tighter introduction, no gap above the first field. */
@media (orientation: landscape) and (max-height: 480px) {
  .intro { gap: 8px; }
  .gap6 { display: none; }
  .layout { padding: 8px 56px; }
}

/* ---- The app (MGS engine) after sign-in: the canvas fills the page ---- */
body.app { overflow: hidden; touch-action: none; }
#canvas { display: block; margin: 0; border: 0; }
#canvas:focus { outline: none; }
#app-status { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; background: #141414; padding: 24px; text-align: center; }
#app-status progress { width: min(320px, 70vw); height: 4px; border: 0; border-radius: 2px; background: #2A2A2A; appearance: none; -webkit-appearance: none; }
#app-status progress::-webkit-progress-bar { background: #2A2A2A; border-radius: 2px; }
#app-status progress::-webkit-progress-value { background: #BD2E33; border-radius: 2px; }
#app-status progress::-moz-progress-bar { background: #BD2E33; border-radius: 2px; }
#app-notice { color: #B8B8B8; font-size: 14px; max-width: 460px; margin: 0; }

/* ---- oauth/callback.html: one card in the middle of the page ---- */
.single { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.single .card { max-width: 100%; }
.single .heading { text-transform: uppercase; }
.tagline-small { margin: 0; }
