.wide {
  width: 100%;
  margin-top: 17px;
}
.login-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.login-help {
  font-size: 11px;
  flex-shrink: 0;
}
#access .footnote {
  text-align: center;
}
.success {
  font-size: 13px;
  line-height: 1.7;
  color: #b8d6c4;
}
.filters {
  display: flex;
  gap: 8px;
}
.list-options {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 16px 25px;
  border-bottom: 1px solid var(--line);
}
.list-options label {
  display: grid;
  gap: 7px;
  margin: 0;
  font-size: 11px;
  min-width: 0;
}
.list-options select,
.list-options input,
.list-options button {
  height: 36px;
  font-size: 12px;
  padding: 8px 10px;
}
.number-search {
  flex: 1 1 190px;
}
.search-result {
  margin: 14px 25px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.filter {
  background: transparent;
  border: 0;
  font-size: 12px;
  color: #91979e;
  padding: 9px;
}
.filter.active {
  background: #2c3731;
  color: #c6e2d1;
}
.fax-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 69px;
  gap: 20px;
  padding: 23px 25px;
  border-bottom: 1px solid #303338;
  align-items: center;
}
.fax-number {
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}
.fax-row > * {
  min-width: 0;
}
.fax-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fax-number-line {
  min-width: 0;
}
.fax-heading > button {
  flex-shrink: 0;
}
.fax-note {
  margin-top: 8px;
  font-size: 11px;
  color: #91979e;
}
.status {
  font-size: 11px;
  padding: 6px 9px;
  border-radius: 6px;
  background: #30383a;
  color: #cad6d8;
  display: inline-block;
}
.status.good {
  background: #263b30;
  color: #badac8;
}
.status.bad {
  background: #492d2b;
  color: #efb7af;
}
.test-banner {
  border: 1px solid #766138;
  background: #322c21;
  color: #d6c7a5;
  font-size: 12px;
  padding: 12px 16px;
  border-radius: 8px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 23px;
  font-size: 11px;
  color: #91979e;
}
.pagination button {
  font-size: 11px;
  padding: 8px 12px;
}
.downloads {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
}
.download {
  display: block;
  padding: 12px 15px;
  border: 1px solid #46564e;
  border-radius: 8px;
  color: #b8d6c4;
  text-decoration: none;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.remove {
  color: #efb7af;
  font-size: 12px;
  margin-top: 20px;
}
select,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 7px;
  border: 1px solid #373b40;
  background: #111315;
  color: #f3f4f5;
  font: inherit;
}
textarea {
  resize: vertical;
}
#fax-details {
  display: grid;
  gap: 15px;
  margin-top: 25px;
}
#fax-details .detail {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
}
.filters button:focus-visible {
  outline: 2px solid #b8d6c4;
}
input[type="file"] {
  font-size: 12px;
}
input[type="file"]::file-selector-button {
  padding: 7px 10px;
  border: 0;
  background: #b8d6c4;
  color: #14251d;
  border-radius: 5px;
  margin-right: 10px;
}
@media (max-width: 650px) {
  .fax-row {
    grid-template-columns: minmax(0, 1fr) 69px;
    gap: 15px;
  }
  .fax-row > :nth-child(1),
  .fax-row > :nth-child(2),
  .fax-row > :nth-child(3) {
    grid-column: 1;
  }
  .fax-actions {
    grid-column: 2;
    grid-row: 1 / 4;
  }
  #fax-details .detail {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .section-heading {
    gap: 7px;
  }
  .filters {
    gap: 1px;
  }
  .filter {
    font-size: 10px;
    padding: 8px;
  }
  .section-heading > button {
    font-size: 10px !important;
  }
  .fax-row > button {
    font-size: 11px;
  }
  .login-panel h1 {
    font-size: 28px;
  }
}

.profile-access {
  border: 1px solid #373b40;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.profile-access p {
  font-size: 13px;
  line-height: 1.6;
}
#password-form {
  border-top: 1px solid #373b40;
  padding-top: 16px;
  margin: 24px 0;
}
.help-page {
  max-width: 960px;
}
.help-section {
  padding: 28px;
  margin: 24px 0;
  line-height: 1.8;
  scroll-margin-top: 24px;
}
.help-section li {
  margin: 8px 0;
}
.help-section dt {
  font-weight: 600;
  margin-top: 16px;
}
.help-section dd {
  margin: 6px 0;
  color: #b9bec4;
}
.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0;
}
.help-nav a,
.help-section a {
  color: var(--accent);
}
.header-actions {
  flex-wrap: wrap;
  align-items: center;
}

/* Keep portal controls quiet; input contents remain selectable/editable. */
body {
  -webkit-user-select: none;
  user-select: none;
}
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
#account {
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-height: calc(100dvh - 48px);
}
#account::-webkit-scrollbar {
  display: none;
}
#password-form {
  display: grid;
  gap: 18px;
}
#password-form label,
#password-form h3,
#password-form p {
  margin: 0;
}
#password-form button[type="submit"] {
  justify-self: start;
  margin-top: 6px;
}
#password-error:empty {
  display: none;
}
.fax-row .status,
.fax-row .fax-details-action {
  height: 29px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 15px;
  border-radius: 6px;
}
.fax-row .status {
  display: flex;
  align-items: center;
}
.fax-row .fax-details-action {
  font-weight: 500;
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.document-actions .download {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
#preview-dialog {
  width: min(840px, 94vw);
  height: 75dvh;
  max-height: 75dvh;
  padding: 20px;
  overflow: hidden;
}
#preview-dialog[open] {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}
#preview-filename {
  margin: 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#preview-error {
  margin: 0;
}
#preview-error:empty {
  display: none;
}
.preview-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0;
}
#preview-paper {
  grid-row: 5;
  background: #303338;
  padding: 16px;
  border-radius: 8px;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#preview-sheet {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 210 / 297;
  background: white;
}
#preview-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #30333844;
}
.preview-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #858b93;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: preview-spin 0.8s linear infinite;
}
@keyframes preview-spin {
  to {
    transform: rotate(360deg);
  }
}
#preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fax-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 650px) {
  .fax-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .fax-number {
    overflow-wrap: anywhere;
  }
}
