/* ============================================================
   Eco development — přihlášení, účet, avatary
   ============================================================ */

/* primární tlačítko (sdíleno napříč stránkami) */
.tf-btn { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 32px; border-radius: var(--r-pill);
  font-family: var(--font-sans); font-size: 16px; font-weight: 700; cursor: pointer; border: 0; white-space: nowrap;
  transition: transform 150ms var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tf-btn svg { width: 18px; height: 18px; }
.tf-btn--primary { background: var(--leaf-bright); color: #0C300B; box-shadow: 0 12px 30px -12px rgba(123,195,77,.65); }
.tf-btn--primary:hover { background: #8FD45F; box-shadow: 0 14px 34px -12px rgba(123,195,77,.7); }
.tf-btn--primary:active { transform: translateY(1px); }
.tf-btn[disabled] { opacity: .6; cursor: default; box-shadow: none; }

/* ---------- boot spinner ---------- */
.auth-boot { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--paper); z-index: 50; }
.auth-boot__spin { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--leaf-line); border-top-color: var(--leaf); animation: authSpin .8s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }

/* ---------- login screen ---------- */
.auth { position: relative; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 28px; overflow: hidden; }
.auth__bg { position: absolute; inset: 0; z-index: 0; filter: blur(80px) saturate(1.05); opacity: .8; }
.auth__bg svg { width: 100%; height: 100%; }
.auth__card { position: relative; z-index: 1; width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 40px 40px 32px; box-shadow: 0 30px 70px -40px rgba(27,42,29,.4); animation: authIn .6s var(--ease) both; }
@keyframes authIn { from { opacity: 0; transform: translateY(14px); } }
.auth__logobar { display: flex; align-items: center; justify-content: center; background: var(--forest-deep); border-radius: 16px; padding: 20px; margin-bottom: 28px; }
.auth__logo { height: 30px; width: auto; display: block; }
.auth__title { font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1.12; margin: 0 0 12px; color: var(--forest-deep); letter-spacing: -.01em; }
.auth__title em { font-style: italic; color: var(--leaf); }
.auth__sub { color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; margin: 0 0 26px; }
.auth__form { display: flex; flex-direction: column; gap: 16px; }
.auth__google { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 11px; height: 52px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-family: var(--font-sans); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.auth__google:hover { border-color: var(--ink-faint); box-shadow: 0 6px 18px -10px rgba(27,42,29,.4); }
.auth__or { display: flex; align-items: center; gap: 14px; margin: 20px 0 4px; color: var(--ink-faint); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; }
.auth__or::before, .auth__or::after { content: ""; height: 1px; flex: 1; background: var(--line-soft); }
.auth__go { width: 100%; justify-content: center; margin-top: 4px; }
.auth__go[disabled] { opacity: .6; cursor: default; }
.auth__note { margin: 22px 0 0; font-size: 13px; color: var(--ink-faint); line-height: 1.5; }
.auth__terms { margin: 20px 0 0; font-size: 12.5px; color: var(--ink-faint); line-height: 1.55; text-align: center; }
.auth__terms a { color: var(--leaf); font-weight: 600; }
.auth__terms a:hover { color: var(--forest-mid); }

.auth__sent { text-align: center; padding: 8px 0 4px; }
.auth__seal { width: 60px; height: 60px; margin: 0 auto 20px; border-radius: 50%; background: var(--leaf-soft); color: var(--forest-mid);
  display: flex; align-items: center; justify-content: center; }
.auth__seal svg { width: 26px; height: 26px; }
.auth__sent .auth__sub { margin-bottom: 20px; }
.auth__back { background: none; border: 0; color: var(--leaf); font-weight: 600; font-size: 14px; cursor: pointer; padding: 6px; }
.auth__back:hover { color: var(--forest-mid); }

/* ---------- avatar ---------- */
.eco-av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700;
  letter-spacing: .01em; color: #fff; flex: none; line-height: 1; }
.eco-av--leaf { background: linear-gradient(150deg, var(--leaf-bright), var(--leaf)); }
.eco-av--forest { background: linear-gradient(150deg, var(--forest-mid), var(--forest)); }
.eco-av--clay { background: linear-gradient(150deg, #d4894f, var(--clay)); }
.eco-av--ghost { background: var(--leaf-soft); color: var(--forest-mid); }
.eco-av--sun { background: linear-gradient(150deg, #F0D257, #D9A521); color: #4A3A0A; }
.eco-av--img { object-fit: cover; padding: 0; }

/* ---------- account badge ---------- */
.acct { position: relative; }
.acct__btn { display: inline-flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-pill); padding: 5px 14px 5px 5px; cursor: pointer; color: var(--ink); font-weight: 600; font-size: 14px; transition: border-color var(--dur) var(--ease); }
.acct__btn:hover { border-color: var(--leaf-line); }
.acct__name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; min-width: 220px; background: var(--card);
  border: 1px solid var(--line-soft); border-radius: var(--r-md); box-shadow: 0 20px 50px -24px rgba(27,42,29,.45); overflow: hidden; animation: authIn .2s var(--ease) both; }
.acct__who { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; }
.acct__who b { font-size: 14.5px; color: var(--ink); }
.acct__who span { font-size: 12.5px; color: var(--ink-faint); word-break: break-all; }
.acct__logout { width: 100%; text-align: left; background: none; border: 0; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--clay); cursor: pointer; }
.acct__link { display: block; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--forest-mid); text-decoration: none; border-bottom: 1px solid var(--line-soft); }
.acct__link:hover { background: var(--leaf-soft); }
.acct__link--btn { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; font-family: inherit; }
.acct__logout:hover { background: var(--clay-soft); }

/* ---------- nastavení účtu (modal) ---------- */
.setm { position: fixed; inset: 0; z-index: 100; background: rgba(20,40,24,.5); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: authIn .2s var(--ease) both; }
.setm__card { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; background: var(--card); border-radius: var(--r-lg); box-shadow: 0 40px 90px -30px rgba(20,40,24,.6); }
.setm__head { position: sticky; top: 0; background: var(--card); display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line-soft); }
.setm__head h2 { margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 22px; color: var(--forest-deep); }
.setm__x { background: none; border: 0; color: var(--ink-faint); cursor: pointer; padding: 4px; border-radius: 8px; display: flex; }
.setm__x:hover { background: var(--leaf-soft); color: var(--forest-mid); }
.setm__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.setm__photo { display: flex; align-items: center; gap: 16px; }
.setm__photo-actions { display: flex; align-items: center; gap: 14px; }
.setm__err { margin: 0; font-size: 13.5px; color: var(--clay); font-weight: 600; }
.setm__actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.setm__saved { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--forest-mid); }
.setm__danger { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.setm__danger-cap { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.setm__danger-btn { background: none; border: 0; padding: 4px 0; font-size: 14px; font-weight: 600; color: var(--forest-mid); cursor: pointer; }
.setm__danger-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.setm__danger-btn--red { color: var(--clay); }
.setm__data-ok { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--forest-mid); }
.setm__confirm { position: absolute; inset: 0; background: rgba(255,255,255,.86); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 24px; border-radius: var(--r-lg); }
.setm__confirm-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-md); box-shadow: 0 24px 60px -26px rgba(20,40,24,.5); padding: 24px; max-width: 380px; }
.setm__confirm-card h3 { margin: 0 0 8px; font-family: var(--font-serif); font-weight: 500; font-size: 20px; color: var(--forest-deep); }
.setm__confirm-card p { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.setm__confirm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.setm__note { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-family: var(--font-sans); font-size: 14px; resize: vertical; margin-bottom: 16px; }
.setm__note:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(123,195,77,.16); }
.setm__danger-btn--solid { background: var(--clay); color: #fff; padding: 12px 20px; border-radius: var(--r-pill); }
.setm__danger-btn--solid:hover { background: #a5442a; text-decoration: none; }

/* ---------- onboarding: locked e-mail + header right group ---------- */
.tf-locked { display: inline-flex; align-items: center; gap: 8px; background: var(--leaf-soft); color: var(--forest-mid);
  border: 1px solid var(--leaf-line); border-radius: var(--r-sm); padding: 12px 14px; font-weight: 600; font-size: 15px; width: 100%; }
.tf-locked svg { flex: none; }
.tf-head__right { display: flex; align-items: center; gap: 14px; }

@media (max-width: 560px) {
  .auth__card { padding: 30px 24px 26px; }
  .auth__title { font-size: 26px; }
  .acct__name { display: none; }
}
