/* Shared login and signup styling, scoped to the public TuneButler pages. */
.tb-auth { --auth-blue: #2b3aff; --auth-ink: #10141c; --auth-muted: #67748e; box-sizing: border-box; min-height: 100svh; padding: 28px clamp(20px, 4vw, 64px) 20px; background: #efefff; color: var(--auth-ink); font: 400 14px/1.6 "Open Sans", sans-serif; }
.tb-auth *, .tb-auth *::before, .tb-auth *::after { box-sizing: border-box; }
.tb-auth a { color: var(--auth-blue); text-decoration: none; }
.tb-auth a:hover { text-decoration: underline; }
.tb-auth :is(a, button, input, select):focus-visible { outline: 2px solid var(--auth-blue); outline-offset: 3px; }
.tb-auth [hidden] { display: none !important; }
.tb-auth-header, .tb-auth-main, .tb-auth-footer { width: 100%; max-width: 1180px; margin-inline: auto; }
.tb-auth-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.tb-auth-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--auth-ink) !important; font-size: 19px; font-weight: 700; letter-spacing: -.6px; }
.tb-auth-brand:hover { text-decoration: none !important; }
.tb-auth-logo { display: block; width: clamp(130px, 24vw, 180px); height: auto; }
.tb-auth-mark { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid #fff; border-radius: 50%; background: #ffffffb3; }
.tb-auth-mark img { width: 23px; height: 22px; }
.tb-auth-header-nav { display: flex; align-items: center; gap: 16px; color: var(--auth-muted); font-size: 12px; }
.tb-auth-header-link { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; border: 1px solid #d4d3f4; border-radius: 7px; background: #ffffff80; font-weight: 600; }
.tb-auth-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 56px); align-items: center; min-height: calc(100svh - 180px); }
.tb-auth-card { min-width: 0; padding: clamp(28px, 3.5vw, 52px); border: 1px solid #fff; border-radius: 16px; background: linear-gradient(135deg, #ffffffed, #ffffff99); }
.tb-auth-eyebrow { margin: 0 0 14px; color: var(--auth-muted); font-size: 10px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }
.tb-auth h1 { margin: 0 0 14px; color: var(--auth-ink); font: 600 clamp(27px, 2.8vw, 36px)/1.2 "Open Sans", sans-serif; letter-spacing: -1.1px; }
.tb-auth-intro { margin: 0 0 32px; color: var(--auth-muted); font-size: 13px; line-height: 1.7; }
.tb-auth-form { margin: 0; }
.tb-auth-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.tb-auth-field { min-width: 0; }
.tb-auth-field--wide { grid-column: 1 / -1; }
.tb-auth-field label, .tb-auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 9px; color: #344767; font-size: 12px; font-weight: 600; }
.tb-auth-label-row label { margin: 0; }
.tb-auth-label-row a { font-size: 11px; font-weight: 400; }
/* Keep inputs at 16px in every orientation to prevent Safari focus zoom. */
.tb-auth-field :is(input, select) { display: block; width: 100%; min-width: 0; min-height: 49px; margin: 0; padding: 13px 15px; border: 1px solid #dfdfef; border-radius: 6px; background: #f4f3fd99; color: #344767; font: 400 16px/1.5 "Open Sans", sans-serif; box-shadow: none; }
.tb-auth-field select { padding-right: 28px; }
.tb-auth-field input::placeholder { color: #8a93a9; opacity: 1; }
.tb-auth-field :is(input, select):focus { border-color: var(--auth-blue); outline: 2px solid #2b3aff24; outline-offset: 1px; }
.tb-auth-password { position: relative; }
.tb-auth-password input { padding-right: 64px; }
.tb-auth-password-toggle { position: absolute; top: 4px; right: 4px; min-height: 41px; min-width: 50px; padding: 8px; border: 0; border-radius: 4px; background: transparent; color: var(--auth-blue); font: 600 11px "Open Sans", sans-serif; cursor: pointer; }
.tb-auth-hint { margin: 8px 0 0; color: var(--auth-muted); font-size: 10px; line-height: 1.6; }
.tb-auth-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 49px; margin-top: 28px; padding: 13px 18px; border: 0; border-radius: 6px; background: var(--auth-blue); color: #fff; font: 600 13px/1.5 "Open Sans", sans-serif; cursor: pointer; transition: background .15s ease; }
.tb-auth-submit:hover { background: #2332e8; }
.tb-auth-submit:disabled { opacity: .65; cursor: wait; }
.tb-auth-submit img { width: 13px; height: 11px; }
.tb-auth-switch { margin: 24px 0 0; color: var(--auth-muted); text-align: center; font-size: 12px; }
.tb-auth-switch a { font-weight: 600; }
.tb-auth-care { margin: 28px 0 0; padding-top: 24px; border-top: 1px solid #e9e8f3; color: var(--auth-muted); text-align: center; font-size: 11px; }
.tb-auth-care a { display: inline-block; margin-left: 4px; font-weight: 600; }
.tb-auth-alert { position: relative; margin-bottom: 24px; padding: 14px 42px 14px 16px; border: 1px solid #f1cbd4; border-radius: 6px; background: #fff0f3; color: #9c2943; font-size: 12px; }
.tb-auth-alert strong { display: block; }
.tb-auth-alert--success { border-color: #a7dfbf; background: #edf9f1; color: #21633e; }
.tb-auth-alert button { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 20px; cursor: pointer; }
.tb-auth-story { min-width: 0; padding: 12px 0; }
.tb-auth-story h2 { max-width: 480px; margin: 0 0 18px; color: var(--auth-ink); font: 600 clamp(30px, 3vw, 44px)/1.15 "Open Sans", sans-serif; letter-spacing: -1.5px; }
.tb-auth-story-intro { max-width: 410px; margin: 0 0 28px; color: #536383; font-size: 13px; line-height: 1.8; }
.tb-auth-preview { position: relative; overflow: hidden; margin: 0 0 20px; border: 1px solid #fff; border-radius: 12px; background: #e3e2f5; }
.tb-auth-preview > img { display: block; width: 100%; height: auto; aspect-ratio: 1.65; object-fit: cover; object-position: center 40%; }
.tb-auth-preview figcaption { position: absolute; inset: auto 0 0; padding: 36px 20px 18px; background: linear-gradient(transparent, #10141cb3); color: #fff; font-size: 12px; font-weight: 600; }
.tb-auth-preview figcaption span { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #36d79b; }
.tb-auth-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tb-auth-feature { min-width: 0; padding: 18px; border: 1px solid #fff; border-radius: 10px; background: #ffffff8c; }
.tb-auth-feature img { display: block; width: 26px; height: 26px; object-fit: contain; margin-bottom: 14px; }
.tb-auth-feature h3 { margin: 0 0 6px; color: var(--auth-ink); font: 600 13px/1.4 "Open Sans", sans-serif; }
.tb-auth-feature p { margin: 0; color: var(--auth-muted); font-size: 11px; line-height: 1.7; }
.tb-auth-footer { margin-top: 28px; color: var(--auth-muted); text-align: center; font-size: 10px; }
.tb-auth--signup .tb-auth-main { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; }
.tb-auth--signup .tb-auth-story { position: sticky; top: 32px; padding-top: 42px; }
.tb-auth--signup .tb-auth-intro { margin-bottom: 26px; }
.tb-auth--signup h1 { font-size: clamp(27px, 2.5vw, 33px); }
/* Size the signup composition against the available viewport height. */
@media (min-width: 768px) {
  .tb-auth--signup { display: flex; flex-direction: column; justify-content: center; padding-block: clamp(12px, 2svh, 24px); }
  .tb-auth--signup .tb-auth-header { margin-bottom: clamp(12px, 2svh, 24px); }
  .tb-auth--signup .tb-auth-main { min-height: 0; align-items: center; }
  .tb-auth--signup .tb-auth-card { padding: clamp(20px, 3svh, 36px); }
  .tb-auth--signup .tb-auth-eyebrow { margin-bottom: 8px; }
  .tb-auth--signup h1 { margin-bottom: 10px; }
  .tb-auth--signup .tb-auth-intro { margin-bottom: clamp(12px, 2svh, 20px); }
  .tb-auth--signup .tb-auth-fields { gap: clamp(8px, 1.4svh, 16px) 16px; }
  .tb-auth--signup .tb-auth-field label { margin-bottom: 5px; }
  .tb-auth--signup .tb-auth-field :is(input, select) { min-height: 44px; padding-block: 9px; }
  .tb-auth--signup .tb-auth-password-toggle { top: 0; min-height: 44px; }
  .tb-auth--signup .tb-auth-consents { gap: 6px; margin-top: 12px; }
  .tb-auth--signup .tb-auth-submit { min-height: 44px; margin-top: 12px; padding-block: 10px; }
  .tb-auth--signup .tb-auth-switch { margin-top: 12px; }
  .tb-auth--signup .tb-auth-story { position: static; padding: 0; }
  .tb-auth--signup .tb-auth-preview > img { height: clamp(160px, 28svh, 306px); aspect-ratio: auto; }
  .tb-auth--signup .tb-auth-footer { margin-top: 12px; }
}
@media (min-width: 768px) and (max-height: 950px) {
  .tb-auth--signup { padding-block: 12px; }
  .tb-auth--signup .tb-auth-header { margin-bottom: 12px; }
  .tb-auth--signup .tb-auth-card { padding: 16px 24px; }
  .tb-auth--signup .tb-auth-fields { row-gap: 8px; }
  .tb-auth--signup .tb-auth-intro { font-size: 12px; line-height: 1.5; }
  .tb-auth--signup .tb-auth-fields > .tb-auth-field:nth-child(-n + 2) { grid-column: auto; }
  .tb-auth--signup .tb-auth-eyebrow,
  .tb-auth--signup .tb-auth-switch { display: none; }
  .tb-auth--signup h1 { font-size: 27px; }
  .tb-auth--signup .tb-auth-story h2 { margin-bottom: 12px; font-size: 34px; }
  .tb-auth--signup .tb-auth-story-intro { margin-bottom: 16px; }
  .tb-auth--signup .tb-auth-feature { padding: 14px; }
  .tb-auth--signup .tb-auth-feature img { margin-bottom: 8px; }
}
@media (min-width: 768px) and (max-height: 750px) {
  .tb-auth--signup .tb-auth-intro,
  .tb-auth--signup .tb-auth-footer { display: none; }
}
.tb-auth-consents { display: grid; gap: 12px; margin-top: 24px; }
.tb-auth-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: #536383; font-size: 11px; font-weight: 400; cursor: pointer; }
.tb-auth-check input { flex-shrink: 0; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--auth-blue); cursor: pointer; }
.tb-auth-check label { display: inline; margin: 0; font: inherit; cursor: pointer; }
#tbSignupError { margin: 20px 0 0; }
.tb-auth-terms-link { padding: 0; border: 0; background: transparent; color: var(--auth-blue); font: inherit; text-decoration: underline; cursor: pointer; }
.tb-auth-loading { position: fixed; inset: 0; z-index: 1100; display: grid; align-content: center; justify-items: center; gap: 20px; padding: 24px; background: #efeffff5; color: #344767; font-family: "Open Sans", sans-serif; text-align: center; }
.tb-auth-loading img { width: 180px; }
.tb-auth-loading p { margin: 0; }
.tb-auth-loading-ring { width: 28px; height: 28px; border: 3px solid #d9daf7; border-top-color: #2b3aff; border-radius: 50%; animation: tb-auth-spin 1s linear infinite; }
.tb-auth-terms .modal-content { border: 1px solid #fff; border-radius: 12px; background: #fafaff; color: #344767; font-family: "Open Sans", sans-serif; }
.tb-auth-terms .modal-header, .tb-auth-terms .modal-footer { padding: 20px 24px; border-color: #eeedf6; }
.tb-auth-terms .modal-body { padding: 24px; }
.tb-auth-terms .modal-footer button { background: #2b3aff; color: #fff; }
@keyframes tb-auth-spin { to { transform: rotate(360deg); } }
@media (min-width: 1600px) { .tb-auth-main { min-height: min(780px, calc(100svh - 180px)); } }
@media (min-width: 992px) and (max-height: 800px) {
  .tb-auth--login { padding-block: 20px; }
  .tb-auth--login .tb-auth-header { margin-bottom: 20px; }
  .tb-auth--login .tb-auth-main { min-height: 0; gap: 36px; }
  .tb-auth--login .tb-auth-card { padding: 28px 36px; }
  .tb-auth--login .tb-auth-eyebrow { margin-bottom: 10px; }
  .tb-auth--login h1 { font-size: 30px; }
  .tb-auth--login .tb-auth-intro { margin-bottom: 24px; }
  .tb-auth--login .tb-auth-fields { gap: 16px; }
  .tb-auth--login .tb-auth-submit { margin-top: 24px; }
  .tb-auth--login .tb-auth-switch { margin-top: 18px; }
  .tb-auth--login .tb-auth-care { margin-top: 20px; padding-top: 16px; }
  .tb-auth--login .tb-auth-story { padding: 0; }
  .tb-auth--login .tb-auth-story h2 { margin-bottom: 12px; font-size: 34px; }
  .tb-auth--login .tb-auth-story-intro { margin-bottom: 20px; }
  .tb-auth--login .tb-auth-preview > img { height: 200px; aspect-ratio: auto; }
  .tb-auth--login .tb-auth-feature { padding: 14px; }
  .tb-auth--login .tb-auth-feature img { margin-bottom: 10px; }
  .tb-auth--login .tb-auth-footer { margin-top: 20px; }
}
@media (max-width: 991.98px) {
  .tb-auth-main, .tb-auth--signup .tb-auth-main { grid-template-columns: minmax(0, 1fr); max-width: 620px; min-height: 0; gap: 36px; }
  .tb-auth-header { max-width: 620px; margin-bottom: 28px; }
  .tb-auth--signup .tb-auth-story { position: static; padding-top: 0; }
  .tb-auth-story h2 { max-width: none; }
  .tb-auth-story-intro { max-width: none; }
  .tb-auth--signup .tb-auth-story { display: none; }
}
@media (max-width: 767.98px) {
  .tb-auth-story { display: none; }
}
@media (max-width: 575.98px) {
  .tb-auth { padding: 20px 16px; }
  .tb-auth-header { gap: 12px; margin-bottom: 24px; }
  .tb-auth-brand { gap: 8px; font-size: 17px; }
  .tb-auth-mark { width: 36px; height: 36px; }
  .tb-auth-mark img { width: 20px; height: 20px; }
  .tb-auth-header-nav > span { display: none; }
  .tb-auth-header-link { padding: 8px 12px; min-height: 36px; font-size: 11px; }
  .tb-auth-card { padding: 28px 22px; border-radius: 12px; }
  .tb-auth-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tb-auth h1 { letter-spacing: -.8px; }
  .tb-auth-intro { margin-bottom: 28px; }
  .tb-auth-story { padding: 0 4px; }
  .tb-auth-story h2 { font-size: 30px; letter-spacing: -.9px; }
  .tb-auth-features { gap: 10px; }
  .tb-auth-feature { padding: 14px; }
  .tb-auth-switch { line-height: 1.8; }
}
@media (prefers-reduced-motion: reduce) { .tb-auth-loading-ring { animation: none; } }

@media (max-width: 767.98px) {
  .tb-auth--reset { width: 100%; min-height: 100vh; min-height: 100dvh; padding: 12px; display: flex; flex-direction: column; }
  .tb-auth--reset .tb-auth-header { max-width: none; gap: 12px; margin-bottom: 12px; }
  .tb-auth--reset .tb-auth-header-link { min-height: 44px; }
  .tb-auth--reset .tb-auth-main { flex: 1; max-width: none; gap: 0; align-items: stretch; }
  .tb-auth--reset .tb-auth-card { display: flex; flex-direction: column; justify-content: center; padding: 28px 20px; }
  .tb-auth--reset h1 { font-size: 27px; }
  .tb-auth--reset .tb-auth-fields { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tb-auth--reset .tb-auth-field input { min-height: 52px; }
  .tb-auth--reset .tb-auth-password-toggle { min-height: 44px; }
  .tb-auth--reset .tb-auth-submit { min-height: 48px; }
  .tb-auth--reset .tb-auth-switch a { display: inline-block; padding-block: 12px; }
  .tb-auth--reset .tb-auth-footer { display: none; }
}

@media (max-width: 767.98px) {
  .tb-auth--signup { width: 100%; min-height: 100vh; min-height: 100dvh; padding: 12px; display: flex; flex-direction: column; }
  .tb-auth--signup .tb-auth-header { gap: 12px; margin-bottom: 12px; }
  .tb-auth--signup .tb-auth-header-nav > span { display: none; }
  .tb-auth--signup .tb-auth-header-link { min-height: 44px; }
  .tb-auth--signup .tb-auth-header { max-width: none; }
  .tb-auth--signup .tb-auth-main { flex: 1; max-width: none; gap: 0; align-items: stretch; }
  .tb-auth--signup .tb-auth-card { display: flex; flex-direction: column; padding: 18px 16px; }
  .tb-auth--signup .tb-auth-form { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
  .tb-auth--signup .tb-auth-eyebrow,
  .tb-auth--signup .tb-auth-intro,
  .tb-auth--signup .tb-auth-switch,
  .tb-auth--signup .tb-auth-footer { display: none; }
  .tb-auth--signup h1 { margin-bottom: 16px; font-size: 24px; line-height: 1.2; letter-spacing: -.7px; }
  .tb-auth--signup .tb-auth-fields { flex: 1; align-content: space-between; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .tb-auth--signup .tb-auth-field label { margin-bottom: 4px; font-size: 11px; line-height: 1.4; }
  .tb-auth--signup .tb-auth-field :is(input, select) { min-height: 44px; padding: 9px 10px; font-size: 16px; }
  .tb-auth--signup .tb-auth-field select { padding-right: 24px; }
  .tb-auth--signup .tb-auth-password input { padding-right: 60px; }
  .tb-auth--signup .tb-auth-password-toggle { top: 0; right: 0; min-height: 44px; }
  .tb-auth--signup .tb-auth-hint { margin-top: 4px; line-height: 1.4; }
  .tb-auth--signup .tb-auth-consents { gap: 4px; margin-top: 10px; }
  .tb-auth--signup .tb-auth-check { min-height: 32px; align-items: center; gap: 8px; line-height: 1.4; }
  .tb-auth--signup .tb-auth-check input { margin: 0; }
  .tb-auth--signup .tb-auth-terms-link { min-height: 28px; }
  .tb-auth--signup .tb-auth-submit { min-height: 44px; margin-top: 0; padding-block: 10px; }
  .tb-auth--signup #tbSignupError { margin-block: 10px; }
  .tb-auth--signup .tb-auth-form > .tb-auth-hint { margin-block: 0; }
}

/* Keep the login form compact and comfortable on narrow phone screens. */
@media (max-width: 575.98px) {
  .tb-auth--login { padding: 16px 12px; }
  .tb-auth--login .tb-auth-header { flex-wrap: wrap; margin-bottom: 20px; }
  .tb-auth--login .tb-auth-header-link { min-height: 44px; padding-inline: 10px; }
  .tb-auth--login .tb-auth-card { padding: 24px 20px; }
  .tb-auth--login h1 { font-size: clamp(25px, 7vw, 32px); }
  .tb-auth--login .tb-auth-intro { margin-bottom: 24px; }
  .tb-auth--login .tb-auth-intro br { display: none; }
  .tb-auth--login .tb-auth-label-row { flex-wrap: wrap; gap: 4px 12px; }
  .tb-auth--login .tb-auth-label-row a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; font-size: 12px; }
  .tb-auth--login .tb-auth-field input { min-height: 52px; }
  .tb-auth--login .tb-auth-password-toggle { min-height: 44px; font-size: 12px; }
  .tb-auth--login .tb-auth-submit { min-height: 52px; margin-top: 24px; font-size: 15px; }
  .tb-auth--login .tb-auth-switch { margin-top: 18px; }
  .tb-auth--login .tb-auth-care { margin-top: 20px; padding-top: 18px; }
  .tb-auth--login .tb-auth-switch a, .tb-auth--login .tb-auth-care a { padding-block: 12px; }
  .tb-auth--login .tb-auth-footer { margin-top: 20px; }
}
