/* Account layer: card on the home screen, paywall, sign-in and admin pages.
   Uses the original app's colours from styles.css (:root vars); the fallbacks are for login/admin pages. */
[hidden] { display: none !important; }
.acc-page *, .acc-page *::before, .acc-page *::after { box-sizing: border-box; }
.acc-page {
  --bg: #faf8f4; --card: #ffffff; --card-2: #f4efe9; --stroke: rgba(23, 52, 92, 0.18);
  --text: #17345c; --muted: #55606e; --brass: #906e59; --sea: #17345c; --wrong: #c62f3d; --correct: #1e8e4e;
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 17px; line-height: 1.45;
}

.acc-card {
  margin-top: 1.25rem; padding: 0.9rem 1rem; border: 1px solid var(--stroke, rgba(255,255,255,.22));
  border-radius: 0.9rem; background: var(--card, #10243a);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.acc-who { display: flex; flex-direction: column; min-width: 0; }
.acc-email { color: var(--muted, #c9d6e8); font-size: 0.9em; overflow-wrap: anywhere; }
.acc-status { font-weight: 700; }
.acc-status.is-full { color: var(--correct, #00e676); }
.acc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.acc-btn {
  font: inherit; font-weight: 700; color: var(--text, #fff); background: transparent; cursor: pointer;
  border: 1px solid var(--stroke, rgba(255,255,255,.22)); border-radius: 999px; padding: 0.5rem 1rem;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem;
}
.acc-btn:hover { border-color: var(--text, #fff); }
.acc-btn:focus-visible { outline: 3px solid var(--sea, #4fd4e8); outline-offset: 2px; }
.acc-btn-primary { background: var(--brass, #f0c75e); color: #ffffff; border-color: var(--brass, #f0c75e); }
.acc-btn-primary:hover { filter: brightness(1.08); border-color: var(--brass, #f0c75e); }
.acc-btn[disabled] { opacity: 0.6; cursor: progress; }

.acc-lock {
  display: inline-block; margin-left: 0.5em; padding: 0.05em 0.55em; border-radius: 999px; vertical-align: middle;
  font-size: 0.62em; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  color: #ffffff; background: var(--brass, #f0c75e);
}

.acc-modal {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(23, 52, 92, 0.45);
}
.acc-modal-box {
  width: min(32rem, 100%); padding: 1.5rem; border-radius: 1.15rem; background: var(--card, #10243a);
  border: 1px solid var(--stroke, rgba(255,255,255,.22)); box-shadow: 0 18px 50px rgba(23, 52, 92, 0.18);
  font-size: 1.05rem;
}
.acc-modal-title { margin: 0 0 0.75rem; font-size: 1.35em; line-height: 1.2; }
.acc-modal-box p { margin: 0 0 0.75rem; }
.acc-price { font-size: 1.6em; font-weight: 800; color: var(--brass, #f0c75e); }
.acc-muted { color: var(--muted, #c9d6e8); font-size: 0.92em; }
.acc-modal-box .acc-actions { margin-top: 1rem; }

/* ---- sign-in page */
.acc-auth { max-width: 26rem; margin: 0 auto; padding: 48px 16px; }
.acc-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.acc-brand img { width: 48px; height: 48px; border-radius: 12px; }
.acc-brand h1 { margin: 0; font-size: 1.4rem; line-height: 1.2; }
.acc-brand p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.acc-tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--stroke); }
.acc-tab {
  font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 0.6rem 0.75rem; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.acc-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brass); }
.acc-form { display: grid; gap: 0.9rem; }
.acc-field { display: grid; gap: 0.3rem; }
.acc-field label { font-weight: 700; font-size: 0.95rem; }
.acc-input, .acc-select, .acc-textarea {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--stroke);
  border-radius: 0.7rem; padding: 0.65rem 0.8rem; width: 100%;
}
.acc-textarea { min-height: 6rem; resize: vertical; }
.acc-input:focus, .acc-select:focus, .acc-textarea:focus { outline: 3px solid var(--sea); outline-offset: 1px; }
.acc-msg { margin: 0; padding: 0.7rem 0.9rem; border-radius: 0.7rem; font-size: 0.95rem; }
.acc-msg.is-error { background: rgba(198, 47, 61, 0.1); border: 1px solid var(--wrong); }
.acc-msg.is-ok { background: rgba(30, 142, 78, 0.1); border: 1px solid var(--correct); }
.acc-link { color: var(--sea); }
.acc-small { color: var(--muted); font-size: 0.88rem; }

/* ---- admin page */
.acc-admin { max-width: 64rem; margin: 0 auto; padding: 24px 16px 64px; }
.acc-admin header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.acc-admin h1 { margin: 0; font-size: 1.5rem; }
.acc-admin h2 { margin: 2rem 0 0.75rem; font-size: 1.2rem; }
.acc-panel { padding: 1rem; border: 1px solid var(--stroke); border-radius: 0.9rem; background: var(--card); }
.acc-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.acc-table-wrap { overflow-x: auto; border: 1px solid var(--stroke); border-radius: 0.9rem; }
.acc-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.acc-table th, .acc-table td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.acc-table th { color: var(--muted); font-weight: 700; background: var(--card-2); }
.acc-table td.acc-wrap { white-space: normal; min-width: 10rem; }
.acc-table tr:last-child td { border-bottom: 0; }
.acc-table .acc-btn { min-height: 2rem; padding: 0.25rem 0.7rem; font-size: 0.9em; }
.acc-tag { font-size: 0.85em; padding: 0.1em 0.55em; border-radius: 999px; border: 1px solid var(--stroke); }
.acc-tag.is-full { border-color: var(--correct); color: var(--correct); }
.acc-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.acc-toolbar .acc-input { max-width: 20rem; }

/* SailWithMe logo in place of the author's photo on the home screen */
.home-intro-photo.acc-brand-logo { border-radius: 22%; border: 1px solid var(--stroke); background: #ffffff; padding: 0.3rem; box-sizing: border-box; }
.home-intro-photo.acc-brand-logo img { object-fit: contain; border-radius: 0; }

/* pay page, trial */
.acc-wide { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.acc-center { text-align: center; }
.acc-list { margin: 0.4em 0 0.8em; padding-left: 1.2em; line-height: 1.7; }
.acc-price .acc-muted { font-size: 0.5em; font-weight: 500; }
.acc-trial { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line, rgba(23, 52, 92, 0.12)); text-align: center; }
.acc-banner {
  position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 900; display: flex; align-items: center; gap: 0.7em; max-width: calc(100% - 24px); box-sizing: border-box;
  padding: 0.5em 0.6em 0.5em 1em; border-radius: 999px; background: var(--text, #17345c); color: #fff;
  box-shadow: 0 6px 24px rgba(23, 52, 92, 0.25); font-size: 0.92em;
}
.acc-banner b { font-variant-numeric: tabular-nums; }
.acc-banner .acc-btn { padding: 0.35em 0.9em; white-space: nowrap; }
.acc-banner span { white-space: nowrap; }
#offer > * { margin: 0; }
#offer { gap: 0.8rem; }
