/* Satyro Lab sign-in — "Roteiro da Casa": the house as a Sunday-paper TV listing, the form as the newsprint
   slip beside it. Injected over Authelia (auth.satyrolab.tech) and LLDAP (conta.satyrolab.tech) by the
   login-skin proxy; selectors use the apps' stable ids/names only. Yellow is reserved for "no ar" and Entrar. */

@font-face {
    font-family: 'Big Shoulders';
    src: url('./fonts/big-shoulders-latin.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
    font-family: 'Big Shoulders';
    src: url('./fonts/big-shoulders-latin-ext.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+A720-A7FF;
}

:root {
    --sl-night: #0f1b3d;
    --sl-rule: rgba(242, 239, 230, 0.16);
    --sl-paper: #f2efe6;
    --sl-paper-2: #e7e2d4;
    --sl-ink: #13203f;
    --sl-ink-soft: #4a5672;
    --sl-onair: #ffcf3f;
    --sl-onair-ink: #2a2100;
    --sl-error: #b3261e;
    --sl-filmes: #e5483b;
    --sl-musica: #7fd1c4;
    --sl-arquivos: #7f9cff;
    --sl-documentos: #c9a7ff;
    --sl-senhas: #f2efe6;
    --sl-font: 'Big Shoulders', 'Arial Narrow', sans-serif;
}

html.sl-skin,
html.sl-skin body {
    background: var(--sl-night) !important;
    color: var(--sl-paper);
    font-family: var(--sl-font);
    font-optical-sizing: auto;
}
html.sl-skin ::selection { background: var(--sl-onair); color: var(--sl-onair-ink); }
html.sl-skin body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(380px, 5fr);
    caret-color: var(--sl-ink);
}

/* ---- The listing ------------------------------------------------------------------------------------- */
.sl-listing {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    padding: clamp(32px, 6vh, 72px) clamp(28px, 5vw, 88px) 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
}
.sl-head {
    position: relative;
    border-bottom: 3px solid var(--sl-paper);
    padding-bottom: 18px;
    margin-bottom: 40px;
    transition: border-color 0.3s ease;
}
/* the masthead's thick-and-thin rule, with the date as its folio */
.sl-head::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 1px;
    background: var(--sl-paper);
}
.sl-folio {
    position: absolute;
    right: 0;
    bottom: -38px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(242, 239, 230, 0.78);
}
.sl-head.is-tuned { animation: sl-tune 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes sl-tune { 30% { border-color: #ffffff; } }
.sl-title {
    margin: 0;
    font-size: clamp(3.5rem, 7.2vw, 6rem);
    font-weight: 800;
    line-height: 0.88;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--sl-paper);
}
.sl-grid {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sl-row {
    display: grid;
    grid-template-columns: 3.4rem 4.2rem minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--sl-rule);
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.sl-num {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(242, 239, 230, 0.55);
    font-variant-numeric: tabular-nums;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.sl-tag { display: none; }
.sl-row.is-live .sl-tag {
    display: block;
    padding: 3px 6px 2px;
    border-radius: 3px;
    background: var(--sl-onair);
    color: var(--sl-onair-ink);
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}
.sl-bug {
    width: 4.2rem;
    height: 2.4rem;
    border-radius: 7px;
    background: var(--bug);
    position: relative;
}
.sl-bug::after {
    /* the bug's lettering: the channel's short name, set like a TV corner logo */
    content: attr(data-l);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    color: var(--sl-night);
}
.sl-filmes { --bug: var(--sl-filmes); }
.sl-musica { --bug: var(--sl-musica); }
.sl-arquivos { --bug: var(--sl-arquivos); }
.sl-documentos { --bug: var(--sl-documentos); }
.sl-senhas { --bug: var(--sl-senhas); }
.sl-prog { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sl-prog strong {
    font-size: 1.75rem;
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: 0.005em;
    text-transform: uppercase;
}
.sl-prog span {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(242, 239, 230, 0.74);
    max-width: 46ch;
}
.sl-row.is-live .sl-num { color: var(--sl-paper); }
.sl-row.is-tuned { animation: sl-row-tune 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes sl-row-tune { 30% { background-color: rgba(242, 239, 230, 0.08); } }
/* the guide's now-line: runs across the whole row and settles under the channel being tuned */
.sl-marker {
    position: absolute;
    left: clamp(28px, 5vw, 88px);
    right: clamp(28px, 5vw, 88px);
    top: 0;
    height: 3px;
    margin-top: -2px;
    border-radius: 2px;
    background: var(--sl-onair);
    box-shadow: 0 4px 14px rgba(255, 207, 63, 0.35);
    opacity: 0;
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sl-marker.is-on { opacity: 1; }
.sl-foot {
    margin: auto 0 0;
    padding-top: 28px;
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(242, 239, 230, 0.6);
}

/* ---- The slip (the apps' own root) ------------------------------------------------------------------- */
html.sl-authelia #root,
html.sl-lldap body > .sl-slip {
    grid-column: 2;
    grid-row: 1;
    background: var(--sl-paper);
    color: var(--sl-ink);
    min-height: 100vh;
    box-shadow: -18px 0 48px rgba(4, 9, 24, 0.45);
    position: relative;
}
html.sl-authelia #root > .hidden { display: none !important; }
html.sl-authelia #root header { background: transparent !important; }
html.sl-authelia #language-button {
    color: var(--sl-ink-soft) !important;
    font-family: var(--sl-font);
    font-size: 1.05rem;
    font-weight: 600;
}
html.sl-authelia [id$='-stage'] {
    min-height: calc(100vh - 64px) !important;
    color: var(--sl-ink);
}
html.sl-authelia [id$='-stage'] > div { max-width: 25rem !important; }  /* rem: grows with the TV root size */

/* the mark replaces Authelia's generic avatar */
html.sl-authelia #UserSvg,
html.sl-authelia [id$='-stage'] svg[id$='Svg'] { display: none !important; }
html.sl-authelia [id$='-stage'] > div > div > div:first-child:has(svg[id$='Svg']) {
    height: 72px;
    padding: 0 !important;
    margin-bottom: 18px;
    background: url('./mark.svg?v=8') left center / 72px 72px no-repeat;
}
html.sl-authelia [id$='-stage'] h5,
html.sl-authelia [id$='-stage'] h1,
html.sl-authelia [id$='-stage'] h2 {
    font-family: var(--sl-font) !important;
    font-size: 3rem !important;
    font-weight: 800 !important;
    line-height: 0.95 !important;
    letter-spacing: -0.005em;
    text-transform: uppercase;
    text-align: left !important;
    color: var(--sl-ink) !important;
    margin: 0 0 6px !important;
}
html.sl-authelia [id$='-stage'] p,
html.sl-authelia [id$='-stage'] label,
html.sl-authelia [id$='-stage'] span {
    font-family: var(--sl-font);
}
html.sl-authelia [id$='-stage'] p { color: var(--sl-ink-soft); font-size: 1.15rem; }
/* the slip's name on the sign-in step (Authelia's "Iniciar sessão" stays on the button and for screen readers) */
html.sl-authelia #first-factor-stage h5 { font-size: 0 !important; }
html.sl-authelia #first-factor-stage h5::before {
    content: 'No ar agora';
    font-size: 3rem;
}

/* fields: printed form boxes on the slip */
html.sl-skin input[type='text'],
html.sl-skin input[type='password'],
html.sl-skin input[type='email'],
html.sl-skin input:not([type]) {
    font-family: var(--sl-font) !important;
    font-size: 1.35rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    color: var(--sl-ink) !important;
    background: #fbfaf6 !important;
    border: 1.5px solid var(--sl-ink) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}
html.sl-skin input::placeholder { color: var(--sl-ink-soft) !important; opacity: 1; }
/* Authelia's labels float over the field; its placeholder repeats them, so it stays invisible */
html.sl-authelia #form-login input::placeholder { color: transparent !important; }
html.sl-skin input:focus {
    outline: 3px solid var(--sl-ink) !important;
    outline-offset: 2px;
    border-color: var(--sl-ink) !important;
}
html.sl-authelia #form-login label {
    color: var(--sl-ink-soft) !important;
    font-size: 1.1rem !important;
    font-weight: 600;
    background: transparent;
}
html.sl-authelia #form-login input:is([type='text'], [type='password']):focus + label,
html.sl-authelia #form-login input:is([type='text'], [type='password']):not(:placeholder-shown) + label {
    background: #fbfaf6 !important;
    padding: 0 6px;
    color: var(--sl-ink) !important;
}
html.sl-authelia #form-login button[type='button'] svg { color: var(--sl-ink-soft); }
html.sl-authelia #remember-checkbox {
    border: 1.5px solid var(--sl-ink) !important;
    background: #fbfaf6 !important;
    width: 20px !important;
    height: 20px !important;
}
html.sl-authelia #remember-checkbox[data-state='checked'],
html.sl-authelia #remember-checkbox[aria-checked='true'] {
    background: var(--sl-ink) !important;
    color: var(--sl-paper) !important;
}
html.sl-authelia #form-login .flex-row label { color: var(--sl-ink) !important; font-size: 1.15rem !important; }

/* the one yellow action */
html.sl-skin #sign-in-button,
html.sl-authelia [id$='-stage'] button[type='submit'],
html.sl-authelia [id$='-stage'] button[id$='-button']:not(#language-button):not([id*='cancel']):not([id*='deny']):not([id*='logout']) {
    width: 100%;
    min-height: 60px;
    font-family: var(--sl-font) !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sl-onair-ink) !important;
    background: var(--sl-onair) !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 6px 16px rgba(19, 32, 63, 0.22) !important;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease, filter 0.18s ease;
}
html.sl-skin #sign-in-button:hover { box-shadow: 0 10px 22px rgba(19, 32, 63, 0.28) !important; filter: brightness(1.03); }
html.sl-skin #sign-in-button:active { transform: translateY(1px); box-shadow: 0 3px 8px rgba(19, 32, 63, 0.22) !important; }
html.sl-skin #sign-in-button:disabled { filter: saturate(0.4); opacity: 0.7; }
html.sl-skin button:focus-visible,
html.sl-skin a:focus-visible {
    outline: 3px solid var(--sl-ink) !important;
    outline-offset: 3px;
}
/* secondary buttons (cancel, logout, other methods) stay ink-outlined */
html.sl-authelia [id$='-stage'] button[id*='cancel'],
html.sl-authelia [id$='-stage'] button[id*='deny'],
html.sl-authelia [id$='-stage'] button[id*='logout'] {
    font-family: var(--sl-font) !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    color: var(--sl-ink) !important;
    background: transparent !important;
    border: 1.5px solid var(--sl-ink) !important;
    border-radius: 8px !important;
}
html.sl-authelia [id$='-stage'] a { color: var(--sl-ink) !important; text-underline-offset: 0.2em; }
html.sl-authelia [id$='-stage'] a[href*='authelia.com'] {
    color: var(--sl-ink-soft) !important;
    font-size: 0.85rem !important;
}
/* errors/notifications keep their meaning in the slip's ink */
html.sl-authelia [role='alert'],
html.sl-authelia [data-sonner-toast] {
    font-family: var(--sl-font) !important;
    font-size: 1.15rem !important;
    border-radius: 8px !important;
}
/* one-time code inputs (2FA) */
html.sl-authelia [id$='-stage'] input[inputmode='numeric'] {
    font-size: 2rem !important;
    text-align: center;
}

/* ---- Small screens: slip first, listing below as a compact channel strip ------------------------------ */
@media (max-width: 899px) {
    html.sl-skin body { display: flex; flex-direction: column; }
    html.sl-authelia #root,
    html.sl-lldap body > .sl-slip { order: 1; min-height: auto; box-shadow: 0 18px 40px rgba(4, 9, 24, 0.45); }
    html.sl-authelia [id$='-stage'] { min-height: auto !important; padding: 8px 0 36px; }
    html.sl-authelia [id$='-stage'] h5 { font-size: 2.5rem !important; }
    .sl-listing { order: 2; min-height: auto; padding: 32px 20px 28px; }
    .sl-title { font-size: 2.6rem; }
    .sl-folio { font-size: 0.95rem; bottom: -34px; }
    .sl-head { margin-bottom: 36px; }
    /* the listing collapses to a channel strip: number, bug, name */
    .sl-prog span { display: none; }
    .sl-row { grid-template-columns: 2.2rem 2.8rem minmax(0, 1fr); gap: 12px; padding: 12px 0; }
    .sl-num { font-size: 1.6rem; }
    .sl-bug { width: 2.8rem; height: 1.7rem; border-radius: 5px; }
    .sl-bug::after { font-size: 0.8rem; }
    .sl-prog strong { font-size: 1.3rem; }
    .sl-prog span { font-size: 1rem; }
    .sl-marker { left: 20px; right: 20px; }
}

/* 10-foot (TV) screens: everything a step larger, thicker focus rings */
@media (min-width: 1700px) {
    html.sl-skin { font-size: 20px; }
    html.sl-skin input:focus,
    html.sl-skin button:focus-visible,
    html.sl-skin a:focus-visible { outline-width: 5px !important; outline-offset: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .sl-head.is-tuned, .sl-row.is-tuned { animation: none; }
    .sl-marker, .sl-row, html.sl-skin #sign-in-button { transition: none !important; }
}

/* ---- LLDAP (conta.satyrolab.tech): Bootstrap app, restyled into the same slip ------------------------- */
html.sl-lldap body > div:not(.sl-listing) {
    grid-column: 2;
    grid-row: 1;
    background: var(--sl-paper) !important;
    color: var(--sl-ink);
    min-height: 100vh;
    box-shadow: -18px 0 48px rgba(4, 9, 24, 0.45);
    display: flex;
    flex-direction: column;
}
html.sl-lldap body > div:not(.sl-listing) * { font-family: var(--sl-font); }
html.sl-lldap body > div:not(.sl-listing) header { border: 0 !important; background: transparent !important; padding: 20px 28px 0 !important; margin: 0 !important; }
html.sl-lldap body > div:not(.sl-listing) header h2 { display: none !important; }
html.sl-lldap .sl-listing { padding: clamp(32px, 6vh, 72px) clamp(28px, 5vw, 88px) 40px !important; }
html.sl-lldap main::before {
    /* the mark above the slip heading, as on the sign-in page */
    content: '';
    display: block;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    background: url('./mark.svg?v=8') left center / 72px 72px no-repeat;
}
html.sl-lldap body > div:not(.sl-listing) header .d-flex { justify-content: space-between !important; }
html.sl-lldap body > div:not(.sl-listing) header .nav-link,
html.sl-lldap body > div:not(.sl-listing) header a { color: var(--sl-ink) !important; font-size: 1.2rem; font-weight: 700; }
html.sl-lldap .form-switch,
html.sl-lldap footer { display: none !important; }
html.sl-lldap body > div:not(.sl-listing) > .container {
    flex: 1;
    display: flex;
    align-items: center;
    background: transparent !important;
    max-width: 28.75rem;
    padding: 24px 28px 48px !important;
}
html.sl-lldap body > div:not(.sl-listing) > .container > .row { width: 100%; margin: 0; padding-bottom: 0 !important; }  /* LLDAP adds 80px under its footer-less row */
html.sl-lldap main { width: 100%; padding: 0 !important; }
html.sl-lldap main form.center-block { width: 100% !important; max-width: none !important; flex: none !important; margin: 0 !important; }
html.sl-lldap main form.center-block::before {
    /* the slip's heading for this page; LLDAP's login has none of its own */
    content: 'Sua conta';
    display: block;
    margin-bottom: 8px;
    font-size: 3rem;
    font-weight: 800;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--sl-ink);
}
html.sl-lldap main form.center-block::after {
    content: 'Entre com o mesmo usuário e senha de filmes, música e arquivos para trocar a sua senha.';
    display: block;
    order: -1;
    margin: 0 0 22px;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--sl-ink-soft);
}
html.sl-lldap main form.center-block { display: flex; flex-direction: column; gap: 16px; }
html.sl-lldap main form.center-block::after { order: 0; }
html.sl-lldap main form.center-block > * { order: 1; }
html.sl-lldap .input-group { flex-wrap: nowrap; align-items: stretch; }
html.sl-lldap .input-group-prepend { display: flex; }
html.sl-lldap .border-bottom { border-bottom: 0 !important; }
html.sl-lldap main .form-group.row { margin: 0 !important; }
html.sl-lldap .input-group-text {
    background: var(--sl-paper-2) !important;
    border: 1.5px solid var(--sl-ink) !important;
    border-right: 0 !important;
    color: var(--sl-ink) !important;
    border-radius: 6px 0 0 6px !important;
    width: 52px;
    min-height: 56px;
    justify-content: center;
}
html.sl-lldap .input-group .form-control { border-radius: 0 6px 6px 0 !important; min-height: 56px; }
html.sl-lldap .form-control { min-height: 52px; }
html.sl-lldap .form-control::placeholder { color: rgba(74, 86, 114, 0.75) !important; font-weight: 500 !important; }
html.sl-lldap label, html.sl-lldap .form-label, html.sl-lldap .col-form-label:not(.btn) { color: var(--sl-ink) !important; font-size: 1.15rem; font-weight: 600; }
html.sl-lldap .btn-primary,
html.sl-lldap button[type='submit'] {
    width: 100%;
    min-height: 60px;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sl-onair-ink) !important;
    background: var(--sl-onair) !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 6px 16px rgba(19, 32, 63, 0.22) !important;
    margin: 6px 0 0 !important;
}
html.sl-lldap .btn-primary i { display: none; }
html.sl-lldap .btn-secondary, html.sl-lldap .btn-outline-secondary, html.sl-lldap .btn-danger {
    color: var(--sl-ink) !important;
    background: transparent !important;
    border: 1.5px solid var(--sl-ink) !important;
    border-radius: 8px !important;
    font-weight: 700;
}
html.sl-lldap .alert, html.sl-lldap .text-danger { font-size: 1.1rem; border-radius: 8px; }
html.sl-lldap .text-danger { color: var(--sl-error) !important; }
html.sl-lldap .table, html.sl-lldap .table * { color: var(--sl-ink) !important; background: transparent !important; border-color: rgba(19, 32, 63, 0.16) !important; }
html.sl-lldap body > div:not(.sl-listing) :is(h1, h2:not(header h2), h3, h4, h5) {
    color: var(--sl-ink);
    font-weight: 800;
    text-transform: uppercase;
}
@media (max-width: 899px) {
    html.sl-lldap body > div:not(.sl-listing) { order: 1; min-height: auto; box-shadow: 0 18px 40px rgba(4, 9, 24, 0.45); }
    html.sl-lldap body > div:not(.sl-listing) > .container { padding: 12px 20px 36px !important; flex: none; }
    html.sl-lldap body > div:not(.sl-listing) header { padding: 12px 20px 0 !important; }
    html.sl-lldap .sl-listing { padding: 32px 20px 28px !important; }
    html.sl-lldap main form.center-block::before { font-size: 2.5rem; }
}
