/* Portal pages: sign-up, sign-in and the account. Builds on styles.css. */
.portal { min-height: calc(100vh - 72px - 170px); padding-block: clamp(48px, 7vw, 96px); }
.portal-narrow { max-width: 460px; }
.portal h1 { margin: 0 0 10px; font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.02; letter-spacing: -0.035em; }
.portal .lead { margin: 0 0 32px; color: var(--muted); font-size: 17px; }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field input {
  min-height: 50px; padding: 0 14px; border-radius: 4px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: inherit; font-size: 16px;
}
.field input:focus { outline: none; border-color: var(--accent); }
.hint { font-size: 13px; color: var(--faint); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.form-error { min-height: 22px; font-size: 14px; color: #FF8A6B; }
.switch { margin-top: 26px; font-size: 15px; color: var(--muted); }
.switch a { color: var(--accent); }
.aside { align-self: flex-end; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.notice { margin: 0 0 24px; padding: 14px 16px; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: 4px; background: var(--bg-2); color: var(--text-2); font-size: 15px; line-height: 1.5; }
.notice strong { color: var(--text); }

.account-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 40px; }
.account-head .who { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.panel { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); padding: clamp(22px, 3vw, 34px); margin-bottom: 24px; }
.panel h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; font-stretch: 112%; }
.panel > p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.empty { color: var(--faint); font-size: 15px; }
.rows { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .meta { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.row .name { font-weight: 600; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline .field { flex: 1 1 220px; }
.code {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 14px; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 4px; padding: 12px 14px; overflow-x: auto;
}
.code span { white-space: nowrap; }
.fresh { border: 1px solid var(--accent); border-radius: 6px; padding: 16px; margin-top: 16px; }
.fresh p { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }
.steps-plain { margin: 16px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.tag { display: inline-flex; font-family: var(--mono); font-size: 12px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; }

.google { gap: 12px; background: var(--text); border-color: var(--text); color: #14110D; margin-bottom: 18px; }
.google:hover { background: #fff; border-color: #fff; color: #14110D; }
.or { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 13px; margin: 6px 0 22px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fine { margin: -8px 0 18px; font-size: 13px; color: var(--faint); }
.fine a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---- The signed-in portal: sidebar and views ---- */
.app-body { background: #0B0B0A; }
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px;
  padding: 26px 16px 18px; border-right: 1px solid var(--line); background: var(--bg);
}
.side-brand { padding: 0 10px; font-size: 14px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px;
  color: var(--text-2); font-weight: 600; font-size: 15px; border: 1px solid transparent;
}
.side-nav a svg, .user-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; flex: none; }
.side-nav a:hover { background: var(--bg-2); color: var(--text); }
.side-nav a.is-active { color: var(--accent); background: var(--bg-2); border-color: var(--line-2); }
.side-user { margin-top: auto; position: relative; }
.user-button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 6px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: inherit; cursor: pointer; text-align: left;
}
.user-button:hover { border-color: var(--line-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--line-2); font-weight: 700; flex: none;
}
.user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-text span { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}
.user-menu a, .user-menu button {
  padding: 10px 12px; border-radius: 5px; font: inherit; font-size: 14px; color: var(--text-2); text-align: left;
  background: none; border: 0; cursor: pointer;
}
.user-menu a:hover, .user-menu button:hover { background: var(--bg-3); color: var(--text); }
.app-top { display: none; }
.app-main { padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 56px) 80px; max-width: 1180px; width: 100%; }
.view-title { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.03em; line-height: 1.05; }
.view-lead { margin: 8px 0 30px; color: var(--muted); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.panel-head a, .link { color: var(--accent); font-size: 14px; }
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.dash .panel { margin: 0; }
.form.narrow { max-width: 420px; }

.search { max-width: 520px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.chip.is-on { border-color: var(--accent); color: var(--accent); }
.catalog { display: flex; flex-direction: column; gap: 18px; }
.product {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); padding: 24px 28px;
}
.product img { width: 150px; height: 150px; }
.product h3 { margin: 0 0 6px; font-size: 22px; font-weight: 700; font-stretch: 112%; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.product .tagline { margin: 0 0 14px; color: var(--muted); font-size: 15px; max-width: 70ch; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.facts strong { color: var(--text); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tags span { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-3); color: var(--text-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pbadge { font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; border: 1px solid; background: transparent; }
.pbadge.owned { color: #7FD99A; border-color: #3E7A52; }
.pbadge.soon { color: var(--muted); border-color: var(--line-2); }
.pbadge.free { color: var(--accent); border-color: var(--accent); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.mono { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .app-top { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
  .side { position: fixed; z-index: 30; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform 0.2s; }
  .side.is-open { transform: none; }
  .product { grid-template-columns: 1fr; }
  .product img { width: 110px; height: 110px; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

[hidden] { display: none !important; }
.panel.danger { border-color: #5A2A1F; }
.panel.danger h2 { color: #FF8A6B; }

/* ---- The closed beta: forms, tabs, reports, admin ---- */
.field textarea, .field select {
  padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font: inherit; font-size: 16px;
}
.field select { min-height: 50px; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field textarea.mono { font-family: var(--mono); font-size: 13px; min-height: 140px; }
.field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.form.wide { max-width: 860px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tabs button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text-2); }
.tabs button.is-on { border-color: var(--accent); color: var(--accent); }
.drop { border: 1px dashed var(--line-2); border-radius: 6px; padding: 18px; color: var(--muted); font-size: 14px; text-align: center; cursor: pointer; }
.drop.is-over { border-color: var(--accent); color: var(--text); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.thumbs figure { margin: 0; position: relative; }
.thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line-2); display: block; }
.thumbs button { position: absolute; top: 4px; right: 4px; font: inherit; font-size: 12px; background: rgba(0,0,0,0.7); color: #fff; border: 0; border-radius: 3px; cursor: pointer; padding: 2px 6px; }
.stars { display: flex; gap: 6px; flex-wrap: wrap; }
.stars label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.stars input { accent-color: var(--accent); }
.rate-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.state { font-family: var(--mono); font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.state.new, .state.pending, .state.waiting { color: var(--accent); border-color: var(--accent); }
.state.fixed, .state.active, .state.approved { color: #7FD99A; border-color: #3E7A52; }
.state.revoked, .state.rejected, .state.expired { color: #FF8A6B; border-color: #5A2A1F; }
.big-number { font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: 44px; line-height: 1; }
.item { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 18px 20px; margin-bottom: 14px; }
.item h3 { margin: 0 0 6px; font-size: 17px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.item .meta { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.item dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; margin: 10px 0; font-size: 14px; }
.item dt { color: var(--faint); }
.item dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.item pre { max-height: 240px; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; padding: 10px; font-size: 12px; white-space: pre-wrap; }
.item .actions { margin-top: 12px; align-items: center; }
.item .actions select, .item .actions input { min-height: 38px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; }
.item textarea { width: 100%; min-height: 70px; margin-top: 10px; padding: 10px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; }
.reply { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--bg-2); font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; align-items: center; }
.filters select { min-height: 38px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; }
@media (max-width: 600px) { .item dl { grid-template-columns: 1fr; } }
