/* ── Shared page layout (header / footer) ── */

.page-header {
  background: #0d1118;
  border-bottom: 1px solid #1e2640;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.header-inner {
  width: 100%; max-width: 800px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.header-right { display: flex; align-items: center; gap: 20px; }
.page-footer {
  padding: 20px 24px; text-align: center;
  font-size: 0.75rem; color: #5a6880;
  border-top: 1px solid #1e2640; flex-shrink: 0;
}
.page-footer a { color: #5a6880; text-decoration: none; margin: 0 8px; }
.page-footer a:hover { color: #e8eaf0; }

/* ── Toggle track/thumb (static HTML in header) ── */
.toggle-track { background: #252d3d; }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
html.light .toggle-track { background: #3b4cca; }
html.light .toggle-thumb { transform: translateX(18px); }

/* ── Light mode for all secondary pages (login, account, legal, etc.) ── */

html.light body { background: #f5f6fa; color: #1a1d2e; }

html.light .page-header { background: #ffffff; border-bottom-color: #e0e3ef; }
html.light .page-footer { border-top-color: #e0e3ef; }
html.light .page-footer a { color: #7a8394; }
html.light .page-footer a:hover { color: #1a1d2e; }

html.light .card {
  background: #ffffff;
  border-color: #e0e3ef;
}

html.light .logo-kymora { color: #0E1420; }
html.light .subtitle    { color: #5a6880; }
html.light .back-link   { color: #5a6880; }

/* ── Inputs ── */
html.light input[type="text"],
html.light input[type="email"],
html.light input[type="password"] {
  background: #f0f2fa;
  border-color: #c8cde8;
  color: #1a1d2e;
}
html.light input::placeholder { color: #9aa3c2; }
html.light input:focus        { border-color: #3b4cca; }
html.light label              { color: #5a6880; }

/* ── Login tabs ── */
html.light .tabs          { background: #f0f2fa; }
html.light .tab-btn       { color: #7a8394; }
html.light .tab-btn.active { background: #e4e8f8; color: #1a1d2e; }

/* ── Register info box ── */
html.light [data-i18n-html="register_info"] {
  background: #f0f2fa !important;
}

/* ── Register language buttons ── */
html.light .reg-lang-btn {
  background: #f0f2fa !important;
  border-color: #c8cde8 !important;
}

/* ── Account type toggle buttons (login + account pages) ── */
.acct-type-btn {
  padding: 9px;
  border-radius: 8px;
  border: 1px solid #2a3a58;
  background: #1a2035;
  color: #7a8394;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.acct-type-btn.active {
  border-color: #3b4cca;
  background: #3b4cca;
  color: #fff;
}
html.light .acct-type-btn {
  background: #f0f2fa;
  border-color: #c8cde8;
  color: #5a6880;
}
html.light .acct-type-btn.active {
  background: #3b4cca;
  border-color: #3b4cca;
  color: #fff;
}

/* ── Account page ── */
html.light .page-title    { color: #1a1d2e; }
html.light .section-title { color: #7a8394; }
html.light .info-value    { color: #1a1d2e; }
html.light .info-row      { border-bottom-color: #e0e3ef; }
html.light .divider       { border-top-color: #e0e3ef; }

html.light .lang-card {
  background: #f0f2fa;
  border-color: #c8cde8;
  color: #5a6880;
}
html.light .lang-card:hover  { border-color: #3b4cca; color: #1a1d2e; }
html.light .lang-card.active { border-color: #3b4cca; background: #e8ecff; color: #1a1d2e; font-weight: 600; }

/* ── Legal / Privacy / Terms pages ── */
html.light .container { color: #1a1d2e; }
html.light .back      { color: #5a6880; }
html.light .lang-btn  { border-color: #c8cde8; color: #5a6880; }
html.light .lang-btn:hover,
html.light .lang-btn.active { border-color: #3b4cca; color: #3b4cca; }
html.light p, html.light li { color: #4a5580; }
html.light h2           { color: #3b4cca; }
html.light .nav-links   { border-top-color: #e0e3ef; }
html.light .nav-links a { color: #3b4cca; }

/* ── Header lang dropdown (secondary pages) ── */
.page-lang-dd { position: relative; }
.page-lang-btn {
  display: flex; align-items: center; gap: 4px;
  background: #1a2035; border: 1px solid #252d3d; border-radius: 8px;
  padding: 5px 9px; cursor: pointer; font-size: 1.1rem; color: #c8cfe0;
  transition: background 0.2s, border-color 0.2s; line-height: 1;
}
.page-lang-btn:hover { background: #252d3d; border-color: #3b4cca; }
.page-lang-arrow { font-size: 0.65rem; color: #7a8394; margin-top: 1px; }
.page-lang-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: #161b27; border: 1px solid #252d3d; border-radius: 10px;
  padding: 4px; z-index: 200; min-width: 130px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.page-lang-menu.open { display: block; }
.page-lang-menu .lang-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; background: none; border: none; border-radius: 7px;
  padding: 8px 12px; color: #c8cfe0; font-size: 0.88rem;
  cursor: pointer; font-family: inherit; transition: background 0.15s; white-space: nowrap;
}
.page-lang-menu .lang-btn:hover  { background: #1a2035; border: none; }
.page-lang-menu .lang-btn.active { background: #252d3d; color: #fff; font-weight: 600; border: none; }

html.light .page-lang-btn { background: #e8eaf0; border-color: #c8cfe0; color: #1a2035; }
html.light .page-lang-btn:hover { background: #dde1f0; border-color: #3b4cca; }
html.light .page-lang-menu { background: #ffffff; border-color: #c8cfe0; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
html.light .page-lang-menu .lang-btn { color: #1a2035; }
html.light .page-lang-menu .lang-btn:hover { background: #f0f2fa; }
html.light .page-lang-menu .lang-btn.active { background: #e8ecff; color: #3b4cca; }

/* ── Language custom dropdown ── */
.lang-select { position: relative; }
.lang-select-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: #1a2035; border: 1px solid #2a3a58; border-radius: 10px;
  padding: 10px 14px; color: #e8eaf0; font-size: 0.88rem; font-family: inherit;
  cursor: pointer; transition: border-color 0.2s; text-align: left;
}
.lang-select-btn:hover { border-color: #3b4cca; }
.lang-chevron { margin-left: auto; color: #5a6880; font-size: 0.78rem; }
.lang-select-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #1a2035; border: 1px solid #2a3a58; border-radius: 10px;
  overflow: hidden; z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.lang-select-menu.open { display: block; }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; font-size: 0.88rem; color: #b0b8cc;
  transition: background 0.15s;
}
.lang-option:hover { background: #252d3d; color: #e8eaf0; }
.lang-option.active { color: #e8eaf0; font-weight: 600; }

html.light .lang-select-btn { background: #f0f2fa; border-color: #c8cde8; color: #1a1d2e; }
html.light .lang-select-btn:hover { border-color: #3b4cca; }
html.light .lang-select-menu { background: #ffffff; border-color: #c8cde8; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
html.light .lang-option { color: #4a5580; }
html.light .lang-option:hover { background: #f0f2fa; color: #1a1d2e; }
html.light .lang-option.active { color: #1a1d2e; }

/* ── Email verified page ── */
html.light .text          { color: #5a6880; }
html.light .redirect-info { color: #7a8394; }

/* ── Theme toggle (secondary pages) ── */
.kymora-toggle-icon { color: #5a6880; }
html.light .kymora-toggle-icon { color: #9aa3c2; }
