/**
 * Account area: sign in, register, dashboard (overview), profile. Built on film-pages.css; only the bits the kit
 * doesn't have live here.
 */

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.fl-acct-small { font-size: 0.88rem; font-weight: 700; text-decoration: none; color: var(--fl-amber); }
.fl-acct-small:hover { text-decoration: underline; color: var(--film-orange-light); }

/* ------------------------------------------------------------------ auth */
.fl-auth__card .fl-alert { margin-bottom: 1.1rem; }
.fl-auth__intro .fl-ticks { margin-top: 0.4rem; }
.fl-acct-errors { margin: 0; padding-left: 1.1rem; }
.fl-acct-errors li { margin: 0.15rem 0; }
.fl-acct-legal { text-align: center; }
.fl-acct-match { color: #ff8a6b; }
.fl-auth__links p { margin: 0; color: var(--fl-paper-3); }

/* password with a show/hide button inside the field */
.fl-pass { position: relative; }
.fl-form .fl-pass input { padding-right: 4.6rem; }
.fl-pass__toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    transform: translateY(-50%);
    padding: 0.32rem 0.55rem;
    font-family: var(--fl-mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fl-paper-2);
    background: rgba(241, 235, 224, 0.06);
    border: 1px solid var(--fl-line);
    border-radius: 2px;
    cursor: pointer;
}
.fl-pass__toggle:hover { color: var(--fl-paper); background: rgba(241, 235, 224, 0.1); }
.fl-pass__toggle:focus-visible { outline: 2px solid var(--fl-amber); outline-offset: 2px; }

/* ------------------------------------------------------------------ overview */
.fl-acct-stats { margin-bottom: 2.4rem; }
.fl-acct-stats .fl-stat__note a { color: var(--fl-amber); text-decoration: none; font-weight: 700; }
.fl-acct-slots small { font-size: 0.6em; color: var(--fl-paper-3); margin: 0 0.15em; font-weight: 700; }

.fl-acct-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.fl-acct-main { display: grid; gap: 2.6rem; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.fl-acct-side { display: grid; gap: 1rem; position: sticky; top: 92px; }
@media (max-width: 980px) {
    .fl-acct-layout { grid-template-columns: minmax(0, 1fr); }
    .fl-acct-side { position: static; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
}

.fl-acct-block { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); scroll-margin-top: 96px; }
.fl-acct-block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.fl-acct-block__head h2 { margin: 0; font-size: 1.5rem; }

.fl-acct-licence { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
.fl-acct-licence__head { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.fl-acct-licence__name { flex: 1 1 12rem; min-width: 0; }
.fl-acct-licence__name h3 { margin: 0; font-size: 1.2rem; }
.fl-acct-licence__name p { margin: 0.15rem 0 0; font-size: 0.92rem; }
.fl-acct-licence .fl-dl { padding-top: 0.2rem; }
.fl-acct-note { margin: 0; font-style: italic; }

.fl-acct-legacy { border-top: 1px solid var(--fl-line); padding-top: 0.9rem; }
.fl-acct-legacy summary { cursor: pointer; font-weight: 700; color: var(--fl-paper-2); font-size: 0.93rem; }
.fl-acct-legacy summary:hover { color: var(--fl-paper); }
.fl-acct-legacy[open] summary { margin-bottom: 0.7rem; }
.fl-acct-legacy .fl-hint { margin-bottom: 0.8rem; }

.fl-acct-id { font-family: var(--fl-mono); font-size: 0.78rem; color: var(--fl-paper-3); overflow-wrap: anywhere; background: none; border: 0; padding: 0; }
.fl-acct-sub { display: block; font-size: 0.85rem; color: var(--fl-paper-3); margin-top: 0.1rem; }
.fl-acct-action { text-align: right; white-space: nowrap; }
.fl-acct-action form { margin: 0; }
.fl-acct-after { margin-top: 0.2rem; }

.fl-acct-slots-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin: 0 0 1.2rem; padding: 0; color: var(--fl-paper); font-size: 0.95rem; }
.fl-acct-slots-list .fl-label { margin-right: 0.4rem; }
#account-devices .fl-panel > p:first-child { margin-top: 0; }
#account-devices .fl-alert { margin-bottom: 1rem; }

/* side column */
.fl-acct-side .fl-panel { padding: 1.3rem; }
.fl-acct-side__title { font-family: var(--fl-mono); font-size: 0.7rem !important; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fl-edge-ink); margin: 0 0 0.9rem !important; }
.fl-acct-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.fl-acct-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.6rem;
    margin: 0 -0.6rem;
    color: var(--fl-paper);
    text-decoration: none;
    font-weight: 700;
    border-radius: 2px;
}
.fl-acct-links a:hover { background: rgba(241, 235, 224, 0.05); color: #fff6ea; }
.fl-acct-links a span { display: grid; }
.fl-acct-links small { font-weight: 400; font-size: 0.82rem; color: var(--fl-paper-3); }
.fl-acct-links--text a { padding-block: 0.35rem; font-weight: 400; color: var(--fl-paper-2); }
.fl-acct-links--text a::after { content: '→'; margin-left: auto; color: var(--fl-amber); transition: transform .2s ease; }
.fl-acct-links--text a:hover::after { transform: translateX(3px); }
.fl-acct-mini { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; margin-bottom: 0.9rem; }
.fl-acct-mini dd { margin-bottom: 0.5rem; font-size: 0.93rem; }

/* ------------------------------------------------------------------ profile */
.fl-acct-profile { align-items: start; margin-bottom: 1.25rem; }
.fl-acct-profile .fl-panel > p.fl-muted { margin: 0 0 1.3rem; }
.fl-acct-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.fl-acct-help h2 { font-size: 1.15rem; margin: 0 0 0.3rem; }
.fl-acct-help p { margin: 0; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 700px) {
    .fl-acct-action { text-align: left; }
    .fl-table--stack td.fl-acct-action { justify-content: flex-start; padding-top: 0.6rem; }
    .fl-table--stack td.fl-acct-action::before { display: none; }
    .fl-table--stack td[data-label="Device"] { display: block; text-align: left; }
    .fl-table--stack td[data-label="Device"]::before { display: none; }
    .fl-table--stack td code.fl-acct-id { text-align: right; }
}
@media (max-width: 480px) {
    .fl-acct-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .fl-acct-stats .fl-stat { padding: 1rem; }
    .fl-acct-stats .fl-stat__value { font-size: 1.6rem; }
}

/* the card's frame number needs room above the heading */
.fl-panel.fl-auth__card[data-frame] { padding-top: 2.8rem; }
/* style-darkroom.css pads every <section>; the blocks inside the account shell are sections too */
.fl-acct-block, .fl-acct-profile > section { padding: 0; }
.fl-acct-profile > section.fl-panel { padding: 2.3rem 1.6rem 1.6rem; }
@media (min-width: 981px) { .fl-acct-side { margin-top: 3.1rem; } }
@media (max-width: 600px) { .fl-acct-profile > section.fl-panel { padding: 2.1rem 1.1rem 1.3rem; } }
@media (max-width: 480px) {
    .fl-tabs { width: 100%; }
    .fl-tabs a { padding: 0.5rem 0.65rem; font-size: 0.86rem; }
    .fl-key code { font-size: 0.8rem; letter-spacing: 0.03em; }
}
.fl-acct-layout:has(.fl-acct-main > .fl-empty:first-child) .fl-acct-side { margin-top: 0; }

/* ================================================================== security (Nov 12) */
.fl-passkey-btn { gap: 0.6rem; align-items: center; }
.fl-divider span { font-size: 0.85rem; }
.fl-code-input {
    font-family: var(--fl-mono) !important;
    font-size: 1.6rem !important;
    letter-spacing: 0.4em;
    text-align: center;
    padding: 0.7rem 0.5rem !important;
}
.fl-code-input--recovery { font-size: 1.15rem !important; letter-spacing: 0.15em; }
.fl-code-input--sm { font-size: 1.2rem !important; letter-spacing: 0.3em; max-width: 12rem; }
.fl-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.9rem; color: var(--fl-paper-3); text-decoration: underline; cursor: pointer; }
.fl-linkbtn:hover { color: var(--fl-paper); }
.btn.fl-btn-danger { color: #ff8a6b; border-color: rgba(255, 90, 54, 0.45); }
.btn.fl-btn-danger:hover { color: #fff6ea; background: rgba(255, 90, 54, 0.18); border-color: rgba(255, 90, 54, 0.7); }

.fl-sec-summary { margin-bottom: 1.5rem; }
.fl-sec-summary a.fl-panel { text-decoration: none; }
.fl-sec-small { font-size: 1.15rem; line-height: 1.3; padding: 0.35rem 0 0.2rem; }
.fl-sec-main > .fl-panel { padding: 2.3rem 1.8rem 1.8rem; }
.fl-sec-main > .fl-panel > p.fl-muted { max-width: 72ch; margin: 0 0 1.3rem; }

.fl-sec-list { list-style: none; margin: 0 0 1.4rem; padding: 0; border-top: 1px solid var(--fl-line); }
.fl-sec-item { border-bottom: 1px solid var(--fl-line); padding: 0.9rem 0; }
.fl-sec-item__main { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.fl-sec-item__main > div { flex: 1 1 14rem; min-width: 0; display: grid; gap: 0.1rem; }
.fl-sec-item__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 184, 77, 0.1); color: var(--fl-amber); flex: none; }
.fl-sec-item__meta { font-size: 0.86rem; color: var(--fl-paper-3); }
.fl-sec-item__edit { margin: 0.5rem 0 0 calc(40px + 0.9rem); }
.fl-sec-item__edit summary { cursor: pointer; font-size: 0.88rem; font-weight: 700; color: var(--fl-paper-3); width: max-content; }
.fl-sec-item__edit summary:hover { color: var(--fl-paper); }
.fl-sec-item__forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; padding: 1rem 0 0.3rem; }
.fl-sec-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem; }
.fl-sec-inline .fl-field { flex: 1 1 12rem; }
.fl-sec-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem; padding: 1.1rem; border: 1px dashed var(--fl-line); border-radius: var(--fl-radius); background: rgba(12, 10, 9, 0.5); }
.fl-sec-add .fl-field { flex: 1 1 16rem; }
.fl-sec-actions { margin-top: 1.4rem; align-items: start; }
.fl-sec-actions .fl-form { padding: 1.2rem; border: 1px solid var(--fl-line); border-radius: var(--fl-radius); background: rgba(12, 10, 9, 0.45); gap: 0.8rem; }
.fl-sec-actions h3 { margin: 0; font-size: 1.05rem; }

.fl-sec-setup { list-style: none; counter-reset: step; margin: 0.4rem 0 1rem; padding: 0; display: grid; gap: 1.6rem; }
.fl-sec-setup > li { counter-increment: step; display: grid; gap: 0.8rem; padding-left: 2.8rem; position: relative; }
.fl-sec-setup > li::before {
    content: counter(step);
    position: absolute; left: 0; top: -0.1rem;
    width: 1.9rem; height: 1.9rem; display: grid; place-items: center;
    font-family: var(--fl-mono); font-weight: 700; color: var(--fl-base); background: var(--fl-amber); border-radius: 2px;
}
.fl-sec-setup h3 { margin: 0; font-size: 1.1rem; }
.fl-sec-qr { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.fl-sec-qr__code { width: 196px; height: 196px; padding: 0; background: #fff; border-radius: 3px; box-shadow: 0 0 0 6px #fff, 0 20px 40px -20px rgba(0, 0, 0, 0.8); flex: none; }
.fl-sec-qr__code svg { width: 100%; height: 100%; display: block; }
.fl-sec-qr__manual { flex: 1 1 16rem; display: grid; gap: 0.6rem; min-width: 0; }
.fl-sec-cancel { margin: 0; }

.fl-sec-codes { margin: 0 0 1.4rem; padding: 1.3rem; border: 1px solid rgba(255, 184, 77, 0.5); border-radius: var(--fl-radius); background: rgba(255, 184, 77, 0.06); display: grid; gap: 0.8rem; }
.fl-sec-codes p { margin: 0; }
.fl-sec-codes__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.fl-sec-codes__list code { display: block; text-align: center; padding: 0.55rem 0.3rem; font-family: var(--fl-mono); font-size: 0.98rem; letter-spacing: 0.06em; color: var(--fl-paper); background: #0a0807; border: 1px dashed var(--fl-line); border-radius: 2px; }

@media (max-width: 760px) {
    .fl-sec-item__forms { grid-template-columns: minmax(0, 1fr); }
    .fl-sec-item__edit { margin-left: 0; }
    .fl-sec-codes__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fl-sec-main > .fl-panel { padding: 2.1rem 1.1rem 1.3rem; }
}

/* app sign-in approval */
.fl-app-code { display: grid; gap: 0.5rem; justify-items: center; margin: 0.4rem 0 1.3rem; padding: 1.1rem; border: 1px dashed rgba(255, 184, 77, 0.45); border-radius: var(--fl-radius); background: #0a0807; }
.fl-app-code__value { font-family: var(--fl-mono); font-size: clamp(1.7rem, 6vw, 2.2rem); letter-spacing: 0.18em; color: var(--fl-amber); }
.fl-app-device { margin-bottom: 1.4rem; }

/* Upgrade / convert-to-Bundle offer above the licence cards (Nov 2026) */
.fl-acct-offer { display: grid; gap: 0.75rem; border-left: 3px solid var(--fl-amber); scroll-margin-top: 96px; }
.fl-acct-offer h3 { margin: 0; font-size: 1.15rem; }
.fl-acct-offer p { margin: 0; }
.fl-acct-offer code { font-size: 0.85em; overflow-wrap: anywhere; }
.fl-acct-offer .btn { justify-self: start; }
