/* Client portal (login.html, portal.html). Loaded after the Webflow styles. */
:root {
  --portal-purple: #ac449a;
  --portal-purple-dark: #8a3479;
  --portal-ink: #1a1b1f;
  --portal-muted: #5f6470;
  --portal-line: #dde1e7;
  --portal-bg: #f5f7fa;
  --portal-error: #b3261e;
  --portal-ok: #1e7b34;
}

.portal-page {
  background-color: var(--portal-bg);
  color: var(--portal-ink);
  font-family: 'Libre Franklin', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-page .navbar-no-shadow {
  background-color: var(--portal-purple);
}

/* Component display rules (e.g. .portal-btn's inline-flex) must not override the hidden attribute. */
.portal-page [hidden] {
  display: none !important;
}

.portal-hero {
  background-color: var(--portal-purple);
  color: #fff;
  text-align: center;
  padding: 48px 16px 56px;
}

.portal-hero h1 {
  margin: 0;
  font-family: 'Libre Franklin', sans-serif;
  font-size: 44px;
  font-weight: 300;
  line-height: 1.1;
  min-height: 1.1em; /* keeps the hero height steady until the project name loads */
}

.portal-eyebrow {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.portal-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.portal-main {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.portal-footer {
  background-color: #32343a;
  color: #c9ccd2;
  font-size: 13px;
  padding: 20px 16px;
  text-align: center;
}

/* ---------- Login card ---------- */

.portal-card {
  max-width: 400px;
  margin: 0 auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 14px rgba(26, 27, 31, 0.1);
  padding: 28px 28px 32px;
}

.portal-card h2 {
  margin: 0 0 6px;
  color: var(--portal-purple);
  font-family: 'Libre Franklin', sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

.portal-card p.portal-hint {
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.portal-field {
  margin-bottom: 16px;
}

.portal-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.portal-field input {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  border: 1px solid #b9bec7;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  color: var(--portal-ink);
  background: #fff;
}

.portal-field input:focus {
  outline: 2px solid var(--portal-purple);
  outline-offset: 1px;
  border-color: var(--portal-purple);
}

.portal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  padding: 10px 18px;
  background-color: var(--portal-purple);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.portal-btn:hover {
  background-color: var(--portal-purple-dark);
}

.portal-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.portal-btn.is-secondary {
  background-color: #fff;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
}

.portal-btn.is-secondary:hover {
  background-color: var(--portal-bg);
}

.portal-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--portal-purple);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.portal-message {
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 16px;
  padding: 10px 12px;
  white-space: pre-line;
}

.portal-message.is-error {
  background: #fdecea;
  color: var(--portal-error);
}

.portal-message.is-ok {
  background: #e8f5ea;
  color: var(--portal-ok);
}

.portal-message[hidden],
.portal-view[hidden] {
  display: none;
}

/* ---------- File browser ---------- */

.portal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.portal-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}

.portal-breadcrumb a {
  color: var(--portal-purple);
  text-decoration: none;
}

.portal-breadcrumb a:hover {
  text-decoration: underline;
}

.portal-breadcrumb span.sep {
  color: var(--portal-muted);
}

.portal-search input {
  height: 38px;
  width: 240px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #b9bec7;
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
}

.portal-table-wrap {
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  overflow-x: auto;
  position: relative;
}

.portal-table-wrap.is-dragover {
  outline: 3px dashed var(--portal-purple);
  outline-offset: -3px;
  background: #faf5f9;
}

.portal-staging {
  background: #fff;
  border: 1px solid var(--portal-purple);
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.portal-staging-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-staging-head .portal-field-hint {
  margin: 0;
}

.portal-staging ul {
  list-style: none;
  margin: 10px 0 12px;
  padding: 0;
}

.portal-staging li {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--portal-line);
  padding: 8px 2px;
  font-size: 15px;
}

.portal-staging li .portal-link {
  margin-left: auto;
}

.portal-uploads {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.portal-uploads li {
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 6px;
  padding: 8px 12px;
}

.portal-uploads li.is-error {
  color: var(--portal-error);
}

.portal-uploads progress {
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 6px;
  accent-color: var(--portal-purple);
}

.portal-admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Joined buttons: Upload Files | Add Folder, Move | Delete */
.portal-btn-group {
  display: inline-flex;
}

.portal-btn-group .portal-btn {
  border-radius: 0;
}

.portal-btn-group .portal-btn + .portal-btn {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.portal-btn-group .portal-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.portal-btn-group .portal-btn:last-child {
  border-radius: 0 4px 4px 0;
}

.portal-select {
  width: 100%;
  border: 1px solid #b9bec7;
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  padding: 4px;
}

.portal-select option {
  padding: 6px 8px;
  border-radius: 3px;
}

.portal-muted {
  color: var(--portal-muted);
  font-size: 13px;
  margin-left: 6px;
}

.portal-dialog {
  width: min(480px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(26, 27, 31, 0.25);
  padding: 28px;
  color: var(--portal-ink);
  font-family: 'Libre Franklin', sans-serif;
}

.portal-dialog::backdrop {
  background: rgba(26, 27, 31, 0.45);
}

.portal-dialog h2 {
  margin: 0 0 18px;
  color: var(--portal-purple);
  font-family: 'Libre Franklin', sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.portal-field-hint {
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 6px 0 16px;
}

.portal-inline {
  display: flex;
  gap: 8px;
}

.portal-inline input {
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
}

.portal-credentials {
  background: var(--portal-bg);
  border: 1px solid var(--portal-line);
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-all;
}

.portal-selection {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--portal-purple);
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
}

.portal-selection[hidden] {
  display: none;
}

.portal-btn.is-danger {
  background-color: var(--portal-error);
}

.portal-btn.is-danger:hover {
  background-color: #8c1d17;
}

.portal-table .col-check {
  width: 44px;
  padding-right: 0;
}

.portal-table input[type='checkbox'] {
  width: 17px;
  height: 17px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--portal-purple);
  cursor: pointer;
}

.portal-table tbody tr.is-selected {
  background: #f6ebf4;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.portal-table th {
  background: #eef0f4;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.portal-table th button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.portal-table th,
.portal-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-table tr:last-child td {
  border-bottom: 0;
}

.portal-table tbody tr:hover {
  background: #faf5f9;
}

.portal-table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.portal-table a.portal-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-ink);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.portal-table a.portal-item:hover {
  color: var(--portal-purple);
  text-decoration: underline;
}

.portal-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--portal-purple);
}

.portal-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--portal-purple);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.portal-download:hover {
  text-decoration: underline;
}

.portal-empty {
  color: var(--portal-muted);
  padding: 36px 16px;
  text-align: center;
}

.portal-status {
  color: var(--portal-muted);
  font-size: 14px;
  margin-top: 12px;
}

@media screen and (max-width: 767px) {
  .portal-hero h1 {
    font-size: 34px;
  }

  .portal-table .col-size,
  .portal-table .col-date,
  .portal-download span {
    display: none;
  }

  .portal-search,
  .portal-search input {
    width: 100%;
  }
}
