/* The account page (/cont): sign in or register over the dimmed cover wall, then the account as panels. */
/* Panels, forms and buttons set their own display: what is hidden stays hidden. */
[hidden] { display: none !important; }
.acct-page { min-height: 100vh; display: flex; flex-direction: column; }
.acct-backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.acct-backdrop .wall { z-index: 0; }
.acct-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(90% 70% at 50% 40%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.92) 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35) 40%, #000 100%);
}
.acct-page.is-signed .acct-backdrop::after { background: rgba(0, 0, 0, 0.9); }
.acct-page.is-signed .acct-backdrop .wall { opacity: 0.35; }
.acct-top { position: relative; }
.acct-top [data-action="logout"] { margin-left: 6px; }
main { flex: 1; }
.acct-loading { padding: 120px var(--gutter); color: var(--ink-3); text-align: center; }

/* Sign in / register */
.auth { display: grid; place-items: center; padding: 32px 16px 80px; }
.auth-card {
  width: min(450px, 100%);
  padding: 48px clamp(22px, 5vw, 64px) 44px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.auth-title { font: 800 32px/1.1 var(--display); font-stretch: 110%; margin-bottom: 8px; }
.auth-lead { color: var(--ink-2); font-size: 15px; margin-bottom: 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); }
.auth-tabs button {
  padding: 10px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  font: 700 15px/1 var(--display);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.auth-tabs button[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }

/* Google, above the email forms */
.google { display: grid; gap: 18px; margin-bottom: 22px; }
.google-button { min-height: 44px; display: flex; justify-content: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.14); }

/* Forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 12px; }
.field input {
  width: 100%;
  padding: 14px 14px;
  border-radius: 6px;
  border: 1px solid #4d4d4d;
  background: rgba(22, 22, 22, 0.85);
  color: var(--ink);
  font: 500 16px/1.2 var(--display);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 197, 41, 0.25); }
/* The eye: shows or hides what was typed in a password field */
.pw { position: relative; display: block; }
.pw input { padding-right: 50px; }
.eye {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
.eye:hover, .eye[aria-pressed="true"] { color: var(--ink); }
.eye svg { width: 20px; height: 20px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; justify-self: start; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-error { min-height: 1.2em; color: #ff8f7a; font-size: 14px; }
.form-error:empty { min-height: 0; }
.form-note { color: var(--ink-3); font-size: 13px; }
.btn { border: 0; cursor: pointer; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-block { width: 100%; justify-content: center; padding: 15px 22px; font-size: 17px; }
.btn-danger { background: #e5484d; color: #fff; }
.btn-danger:hover { background: #f2555a; }

/* Signed in */
.acct { padding: 24px var(--gutter) 80px; max-width: 1240px; margin: 0 auto; }
.acct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 24px 0 28px; border-bottom: 1px solid var(--line); }
.acct-kicker { color: var(--brand); font-weight: 800; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 8px; }
.acct-title { font: 800 clamp(26px, 3.4vw, 40px)/1.1 var(--display); font-stretch: 105%; overflow-wrap: anywhere; }
.acct-meta { color: var(--ink-3); margin-top: 8px; font-size: 15px; }
.acct-meta strong { color: var(--ink); letter-spacing: 0.04em; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; background: rgba(255, 255, 255, 0.1); }
.badge::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.badge.is-on { color: #46d17d; background: rgba(70, 209, 125, 0.12); }
.badge.is-off { color: #ffb020; background: rgba(255, 176, 32, 0.12); }
.badge.is-stop { color: #ff6b6b; background: rgba(255, 107, 107, 0.12); }
.notice { margin-top: 20px; padding: 14px 18px; border-radius: 8px; background: rgba(70, 209, 125, 0.12); color: #9ff0bf; font-weight: 600; }
.notice.is-warn { background: rgba(255, 176, 32, 0.12); color: #ffd18a; }

.acct-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.panel { display: grid; align-content: start; gap: 14px; padding: 26px; border-radius: 10px; background: var(--panel); border: 1px solid #222; }
.panel-wide { grid-column: 1 / -1; background: linear-gradient(135deg, #1d1806, #141414 55%); border-color: rgba(255, 197, 41, 0.25); }
.panel-danger { border-color: rgba(229, 72, 77, 0.35); }
.panel-title { font: 800 20px/1.2 var(--display); }
.panel-title small { color: var(--ink-3); font-weight: 600; font-size: 14px; margin-left: 6px; }
.panel-note { color: var(--ink-3); font-size: 14px; }
.panel .btn { justify-self: start; }

.sub-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.price { font: 400 clamp(46px, 6vw, 64px)/1 var(--numeral); color: var(--brand); }
.price small { font: 600 16px/1 var(--display); color: var(--ink-3); margin-left: 8px; }
.sub-status { color: var(--ink-2); margin-top: 8px; }
.sub-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sub-actions .btn small { font-weight: 600; opacity: 0.75; }
.renew { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: var(--ink-2); }

.transfer { border-top: 1px solid var(--line); padding-top: 14px; }
.transfer summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.transfer[open] summary { margin-bottom: 14px; }
.kv { display: grid; gap: 10px; margin: 0; }
.kv div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; }
.kv dt { color: var(--ink-3); font-size: 14px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: 0.02em; }

.devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.device { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); }
.device-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 197, 41, 0.12); color: var(--brand); }
.device-icon svg { width: 20px; height: 20px; }
.device-text { flex: 1; min-width: 0; }
.device-name { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-meta { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.device-meta .is-wait { color: #ffb020; }
.device button { flex: none; padding: 8px 12px; border-radius: 6px; border: 1px solid #444; background: transparent; color: var(--ink-2); font: 600 13px/1 var(--display); cursor: pointer; }
.device button:hover { border-color: #e5484d; color: #ff8f7a; }

.acct-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--gutter); border-top: 1px solid #1d1d1d; background: #000; }

@media (max-width: 860px) {
  .acct-grid { grid-template-columns: 1fr; }
  .acct-top .top-links { display: none; }
  .acct-top [data-action="logout"] { margin-left: auto; }
}
@media (max-width: 480px) {
  .auth-card { padding: 34px 20px; }
  .panel { padding: 20px; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
}
