/* ============================================================
   ÚČET — profil v hlavičce + přepínání záložek
   ============================================================ */

/* Profil v hlavičce */
.account-chip { position: relative; }
/* Přihlášený uživatel v hlavičce = jen kompaktní kolečko s fotkou (bez jména a šipky). */
.account-chip-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  background: rgba(255, 255, 255, .6); border: 1px solid var(--line);
  border-radius: 50%; padding: 3px; cursor: pointer;
  color: var(--ink); transition: background .2s, box-shadow .2s;
}
.account-chip-btn:hover { background: #fff; box-shadow: 0 6px 16px -10px rgba(120,80,40,.5); }
.account-chip-btn .chip-name,
.account-chip-btn > svg { display: none; }
.account-avatar.sm { width: 36px; height: 36px; font-size: 15px; }

.nav-google-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 5px 14px 5px 6px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.nav-google-login:hover {
  background: #fff;
  border-color: var(--line);
  transform: translateY(-1px);
}
.google-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: #db6f45;
  border: 1px solid var(--line);
  font-weight: 800;
  font-family: Arial, sans-serif;
}

.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 250px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 10px; z-index: 60;
}
.account-menu-head { display: flex; gap: 10px; align-items: center;
  padding: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.account-menu-head strong { font-size: 14.5px; }
.account-menu-head small { display: block; color: var(--muted); font-size: 12.5px;
  max-width: 175px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu a, .account-menu button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 8px; border-radius: 10px; cursor: pointer;
  font-family: var(--sans); font-size: 14.5px; color: var(--ink);
}
.account-menu a:hover, .account-menu button:hover { background: var(--bg-2); }
.account-menu .account-menu-logout,
#logout-btn,
#nav-logout-btn {
  color: #b6422f;
  font-weight: 700;
}
.account-menu .account-menu-logout:hover,
#logout-btn:hover,
#nav-logout-btn:hover {
  background: rgba(182, 66, 47, .09);
}

/* Avatar — Google fotka místo iniciály */
.account-avatar { overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* Uvítací karta po přihlášení */
.welcome-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.welcome-row small { display: block; color: var(--muted); font-size: 13px; }
.welcome-actions { display: flex; flex-direction: column; gap: 10px; }
.welcome-actions .btn-primary, .welcome-actions .btn-outline { text-align: center; }

/* Badge u záložky (nezaplacené) */
.tab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px; background: var(--terra); color: #fff;
  font-size: 12px; font-weight: 600; vertical-align: middle; margin-left: 6px; }

/* Záložky — vidět jen aktivní panel */
.js-tabs .account-content > section.tab-panel { display: none; }
.js-tabs .account-content > section.tab-panel.is-active { display: block; }
.account-sidebar a.active { background: var(--bg-2); font-weight: 600; border-radius: 12px; }

/* Odhlášený účet: login zůstává aktivní, obsah účtu je jen naznačený v pozadí. */
.auth-locked .portal-hero { margin-bottom: 28px; }
.auth-locked .portal-hero .login-card { position: relative; z-index: 2; }
.auth-locked .account-grid,
.auth-locked .footer {
  filter: blur(9px);
  opacity: .42;
  pointer-events: none;
  user-select: none;
}
.auth-locked .account-grid { max-height: 560px; overflow: hidden; }

/* Toasty */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 14.5px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease; max-width: 320px; }
.toast.show { opacity: 1; transform: none; }
.toast.success { background: #2f6b46; }
.toast.error { background: #9a3b2e; }

@media (max-width: 620px) {
  .account-chip-btn { padding: 3px; }
  .account-menu { width: min(250px, calc(100vw - 28px)); }
}

/* Přehled — větší odsazení tří karet */
.account-content .dash-cards { gap: 20px; }

/* Přehled klienta — akce u šperku (minimalisticky, vlevo dole) */
.owned-jewel-body { display: flex; flex-direction: column; }
.owned-jewel-actions { display: flex; gap: 16px; align-items: center; margin-top: auto; padding-top: 14px; }
.owned-order-btn {
  border: 1px solid var(--line, #e6dcca); background: #fff; color: var(--ink, #2a2521);
  font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px;
  cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.owned-order-btn:hover { background: var(--bg-2, #f6efe5); border-color: var(--gold-2, #d0a15a); }
.owned-reading-link {
  border: 0; background: none; color: var(--muted, #8c8174); font: inherit; font-size: 13.5px;
  cursor: pointer; padding: 4px 2px; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.owned-reading-link:hover { color: var(--ink, #2a2521); border-bottom-color: currentColor; }

/* Detail objednávky — akce (faktura) */
.order-detail-actions { margin-top: 18px; }
