/* Страницы портала: профиль и подтверждение владения. Основа — styles.css лендинга. */
[hidden]{ display:none !important; }

/* Фон не повторяется на длинной странице, подвал прижат к низу на короткой. */
html, body{ height:auto; }
body{ min-height:100vh; display:flex; flex-direction:column; background-attachment:fixed; }
main{ flex:1 0 auto; }

.section--page{ padding: 40px 0 72px; }
.portal-head{ margin: 20px 0 22px; }
.portal-head h1{ margin-bottom: 8px; }

.tabs{
  display:flex; flex-wrap:wrap; gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.tabs a{
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.tabs a:hover{ color: var(--text); background: rgba(127,127,127,.12); }
.tabs a[aria-current="page"]{
  color: var(--text);
  background: linear-gradient(135deg, rgba(75,182,255,.25), rgba(139,92,246,.16));
}

.login-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items:stretch; }
.login-option{ display:flex; flex-direction:column; gap: 12px; padding: 20px; }
.login-option h2{ font-size: 18px; }
.login-option .muted{ margin: 0; }
.login-option__action{ margin-top: auto; display:grid; gap: 12px; }
.login-option .btn{ width: 100%; }

.portal-card{ padding: 20px; }
.portal-card h2{ font-size: 18px; margin-bottom: 14px; }

/* Поля */
.field{ display:grid; gap: 6px; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
select{
  width:100%;
  min-width:0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 12px;
  font: inherit;
  font-size: 13px;
  text-overflow: ellipsis;
  outline: none;
}
select option, select optgroup{ background: var(--card); color: var(--text); }
[data-theme="light"] select{ background: rgba(14,22,42,.04); }
textarea{ font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; overflow-wrap:anywhere; }
textarea:disabled, select:disabled{ opacity: .6; }
select:focus-visible, textarea:focus-visible, input:focus-visible{ border-color: var(--accent); }

.btn:disabled{ opacity: .5; cursor: default; transform:none; }
.btn:focus-visible, .tabs a:focus-visible, .link:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

.link{
  padding: 0; border: 0; background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.note{ margin: -6px 0 14px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.hint{ font-size: 12px; color: var(--muted); }
.actions{ display:flex; flex-wrap:wrap; gap: 8px; margin-top: 16px; }
.block{ margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.block h2{ font-size: 16px; margin-bottom: 12px; }

.status{ min-height: 1.5em; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.status.error{ color: #FF7A70; }
[data-theme="light"] .status.error{ color: #B42318; }

/* Выбор файла */
.file-row{ display:flex; flex-wrap:wrap; align-items:center; gap: 8px 16px; margin-top: -4px; font-size: 13px; }
.file input{ position:absolute; width:1px; height:1px; opacity:0; padding:0; }
.file span{ display:inline; margin:0; font-size:13px; color: var(--accent); text-decoration: underline; cursor:pointer; }
.file input:focus-visible + span{ outline: 2px solid var(--accent); outline-offset: 2px; }
.file-row .hint{ overflow-wrap:anywhere; }

/* Данные профиля и результат подписи */
.meta{ display:grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 16px; font-size: 13px; }
.meta dt{ color: var(--muted); }
.meta dd{ margin: 0; overflow-wrap:anywhere; }

.verify{ margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; border: 1px solid transparent; }
.verify p{ margin: 0 0 4px; }
.verify ul{ margin: 0; padding-left: 18px; }
.verify pre{ padding: 8px; max-height: 240px; border-radius: 8px; background: rgba(127,127,127,.12); white-space: pre-wrap; overflow-wrap:anywhere; }
.verify-title{ font-weight: 700; }
.verify.ok{ border-color: rgba(53,255,106,.3); background: rgba(53,255,106,.08); }
.verify.error{ border-color: rgba(255,122,112,.35); background: rgba(255,122,112,.1); }

@media (max-width: 760px){
  .login-grid{ grid-template-columns: 1fr; }
  .meta{ grid-template-columns: 1fr; gap: 2px; }
  .meta dd{ margin-bottom: 8px; }
}
