:root {
  /* Brand palette sampled directly from the Indyx-industry logo. */
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;

  --color-primary: #143a69;      /* logo navy — structure, nav, headings */
  --color-primary-dark: #0c233f;
  --color-primary-light: #e8edf4;

  --color-accent: #70a028;       /* logo green — primary actions, success */
  --color-accent-dark: #5a8020;
  --color-accent-light: #f1f6ea;

  --color-text: #1f2430;
  --color-text-muted: #6b7280;
  --color-border: #e2e5eb;
  --color-danger: #dc2626;
  --color-danger-light: #fef2f2;
  --color-success: #5a8020;
  --color-success-light: #f1f6ea;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 24, 40, 0.08), 0 1px 2px rgba(20, 24, 40, 0.06);
  --shadow-lg: 0 10px 30px rgba(20, 24, 40, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Top bar (dashboard / admin) ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 28px;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary) 60%, var(--color-accent) 100%);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
  color: var(--color-primary-dark);
}

.brand-mark {
  height: 30px;
  width: auto;
  display: block;
}

.brand-name { letter-spacing: -0.01em; }

.topbar-nav {
  display: flex;
  gap: 4px;
  margin-left: 18px;
}

.topbar-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.topbar-nav a:hover { background: var(--color-primary-light); text-decoration: none; }
.topbar-nav a.active { background: var(--color-primary-light); color: var(--color-primary-dark); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.avatar,
.user-chip .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.user-chip {
  cursor: pointer;
  border-radius: 999px;
  padding: 3px 10px 3px 3px;
  transition: background 0.15s ease;
}
.user-chip:hover { background: var(--color-primary-light); }

/* Vivid, distinct chips per role — easier to scan at a glance than a single
   flat color for everyone. */
.role-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.role-badge-admin { background: var(--color-primary); color: #fff; }
.role-badge-redacteur { background: #7c3aed; color: #fff; }
.role-badge-auteur { background: #d97706; color: #fff; }
.role-badge-user { background: #0891b2; color: #fff; }
.role-badge-client { background: #64748b; color: #fff; }

/* Document validation workflow */
.status-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-closed { background: #e5e7eb; color: #374151; }
.status-locked { background: #fee2e2; color: #991b1b; }
.status-approved { background: #dcfce7; color: #166534; }

.action-btn-validate { background: #059669; }
.action-btn-secondary { background: #64748b; }
.action-btn-secondary.is-active { background: #334155; }

/* Row for a closed (archived) document reads as visually "dimmed" */
.file-row.is-closed { opacity: 0.65; }
.file-row.is-closed .file-name { text-decoration: line-through; text-decoration-color: var(--color-text-muted); }

.version-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--color-bg); }

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }

.btn-danger {
  background: var(--color-danger-light);
  border-color: #fecaca;
  color: var(--color-danger);
}
.btn-danger:hover { background: #fee2e2; }

.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Logout button — a colored outline so it stands out from the other plain
   toolbar buttons in the topbar (still white background, not a filled
   "danger" button, since signing out isn't a destructive action). */
#logout-btn {
  border-color: #2563eb;
  color: #2563eb;
}
#logout-btn:hover { background: #eff6ff; }

/* ---------- Layout containers ---------- */

.page-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.page-header {
  margin-bottom: 22px;
}

.page-header h1 {
  font-size: 22px;
  margin: 0 0 4px;
}

.page-header p {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 14.5px;
}

/* ---------- Process grid / cards ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.process-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.process-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.process-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.process-card-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 2px 0 0;
}

.access-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.access-badge.granted { background: var(--color-success-light); color: var(--color-success); }
.access-badge.readonly { background: #f1f2f4; color: var(--color-text-muted); }

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

/* Dense, table-like document register — inspired by professional document
   control software (reference/type/version/status columns) rather than a
   plain file list, while keeping the app's vivid accent colors. */
.file-list.wide {
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  /* Cancel the base .file-list's overflow-y:auto (its scroll clipping
     would also swallow the absolutely-positioned "⋮" dropdown menu). */
  overflow: visible;
  /* No overflow:hidden here (used to clip to the rounded corners) — that
     would also clip the absolutely-positioned "⋮" dropdown menu inside a
     row. The header/last-row corners are rounded individually instead. */
}
.file-list.wide .file-table-header { border-radius: 9px 9px 0 0; }
.file-list.wide .file-row:last-child { border-radius: 0 0 9px 9px; }

.file-table-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.6fr) 120px 120px 80px 150px auto;
  gap: 12px;
  align-items: center;
  padding: 9px 14px;
  background: var(--color-primary-light);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary-dark);
}
/* Référence/Type/Version/Statut headers, centered to match the centered
   data cells below them (a lone "—" placeholder or a short badge sits at
   the left edge of a 120px column otherwise, reading as offset from its
   header label). */
.file-table-header span:nth-child(3),
.file-table-header span:nth-child(4),
.file-table-header span:nth-child(5),
.file-table-header span:nth-child(6) {
  text-align: center;
}

.file-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.6fr) 120px 120px 80px 150px auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  font-size: 13.5px;
  border-top: 1px solid var(--color-border);
  transition: background 0.1s ease;
}
.file-row:hover { background: var(--color-bg); }

.file-col-reference,
.file-col-type,
.file-col-version {
  font-size: 12px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.file-col-reference { font-weight: 600; color: var(--color-text); }
.file-col-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
.file-mobile-meta { display: none; }

.file-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Vivid, labeled action buttons — named actions read faster than bare icons
   and the bright colors make the row feel inviting rather than clinical. */
.action-btn {
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.action-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(20, 24, 40, 0.18); }
.action-btn:active { transform: translateY(0); box-shadow: none; }

.action-btn-view { background: #2563eb; }             /* vivid blue — consultation only */
.action-btn-download { background: var(--color-accent); } /* brand green — primary action */
.action-btn-delete { background: #dc2626; }           /* vivid red — destructive */

/* "⋮ Plus d'actions" — secondary/infrequent actions (modifier, verrouiller,
   clore) tucked behind a dropdown so the action row stays short and the
   document name column keeps its width. */
.more-actions {
  position: relative;
  display: inline-flex;
}
.more-actions-toggle {
  padding: 6px 11px;
  font-size: 15px;
  line-height: 1;
}
.more-actions-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(20, 24, 40, 0.16);
  padding: 6px;
  flex-direction: column;
  gap: 2px;
}
.more-actions-menu.show { display: flex; }
.more-actions-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.more-actions-item:hover { background: var(--color-bg-soft, #f1f5f9); }

/* Circular "back" button styled like a refresh icon, per request. */
.back-btn-circle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.25s ease;
}
.back-btn-circle:hover {
  background: var(--color-accent);
  color: #fff;
  transform: rotate(-70deg);
}

.empty-files {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 10px 0;
  text-align: center;
}

.upload-zone {
  border-top: 1px dashed var(--color-border);
  padding-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.upload-zone input[type="file"] {
  flex: 1;
  font-size: 12.5px;
}

/* ---------- Auth / login page ---------- */

.auth-shell {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  background:
    radial-gradient(circle at 12% 15%, var(--color-primary-light) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, var(--color-accent-light) 0%, transparent 50%),
    var(--color-bg);
}

/* Split-screen "facade" layout: a branded panel that actually sells what the
   app does, next to the login form — instead of a small plain card floating
   on an empty background. */
.auth-layout {
  display: flex;
  width: 100%;
  max-width: 980px;
  min-height: 560px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-side {
  position: relative;
  flex: 1 1 44%;
  /* Brand-tinted overlay on top of the illustration so it reads as part of
     the app's palette rather than a bare stock photo, and keeps the white
     text legible over any bright/busy area of the image. */
  background:
    linear-gradient(160deg, rgba(11, 34, 64, 0.86) 0%, rgba(8, 23, 41, 0.9) 60%, rgba(8, 23, 41, 0.96) 100%),
    url('/images/login-hero.jpg') center center / cover no-repeat;
  color: #fff;
  padding: 48px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.auth-side-content { position: relative; z-index: 1; }

.auth-side-logo {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 26px;
}

.auth-side h1 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.auth-side-tagline {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 340px;
}

.auth-side-features {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-side-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.92);
}
.auth-side-feature-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.auth-side-footer {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.auth-form-side {
  flex: 1 1 56%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
}

/* Standalone card (used as-is on reset-password.html); inside .auth-form-side
   (the split login layout) it's overridden below to sit flush, without its
   own box, since the white panel already provides that container. */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 34px 32px 26px;
  overflow: hidden;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary) 55%, var(--color-accent) 100%);
}

.auth-form-side .auth-card {
  max-width: 360px;
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}
.auth-form-side .auth-card::before { display: none; }

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.auth-logo { height: 58px; width: auto; }
.auth-brand p { margin: 0; font-size: 13px; color: var(--color-text-muted); text-align: center; }

@media (max-width: 760px) {
  .auth-layout { flex-direction: column; max-width: 440px; min-height: 0; }
  .auth-side { padding: 32px 28px 26px; }
  .auth-side-tagline { max-width: none; }
  .auth-form-side { padding: 32px 28px; }
}

.tabs {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 3px;
  background: var(--color-bg);
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 6px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  color: var(--color-text-muted);
}

.tab-btn.active {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  box-shadow: var(--shadow);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 14px;
  background: #fff;
}

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.field-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }

.form-actions { margin-top: 18px; }
.form-actions .btn { width: 100%; padding: 11px; font-size: 14.5px; }

.form-footnote {
  text-align: center;
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-top: 14px;
}

.alert {
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: var(--color-danger-light); color: var(--color-danger); border: 1px solid #fecaca; }
.alert-success { background: var(--color-success-light); color: var(--color-success); border: 1px solid #d3e4bb; }
.alert code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 4px; word-break: break-all; }

.demo-hint {
  background: var(--color-accent-light);
  border: 1px solid #d3e4bb;
  color: var(--color-accent-dark);
  font-size: 12px;
  border-radius: 8px;
  padding: 9px 12px;
  margin-top: 16px;
}

/* ---------- Admin table ---------- */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

table.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.users-table th, .users-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.users-table th { color: var(--color-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }

.pill-group { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.pill { font-size: 11px; background: var(--color-primary-light); color: var(--color-primary-dark); padding: 2px 8px; border-radius: 999px; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  margin-top: 6px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 35, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }

.modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.modal.modal-wide { max-width: 720px; }

.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.activity-table th, .activity-table td {
  text-align: left;
  padding: 8px 8px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.activity-table th {
  color: var(--color-text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.activity-table td.activity-date { white-space: nowrap; color: var(--color-text-muted); }
.activity-table td.activity-user { white-space: nowrap; font-weight: 600; }
.activity-action-icon { margin-right: 6px; }

.modal h2 { margin-top: 0; font-size: 18px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

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

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.active { background: var(--color-success); }
.status-dot.inactive { background: var(--color-text-muted); }

.loading-text { color: var(--color-text-muted); font-size: 13px; padding: 20px; text-align: center; }

/* ---------- App shell: sidebar + main panel ---------- */

.app-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 65px);
}

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 18px 12px;
}

.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }

.sidebar-search { position: relative; margin: 0 6px 16px; }
.sidebar-search-row { display: flex; gap: 6px; }
.sidebar-search input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--color-bg);
}
.sidebar-search input:focus { outline: none; border-color: var(--color-accent); background: var(--color-surface); }

.search-filter-toggle {
  flex-shrink: 0;
  width: 36px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  font-size: 14px;
  cursor: pointer;
  color: var(--color-text-muted);
}
.search-filter-toggle:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }

.search-filters {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.search-filters.show { display: flex; }
.search-filters select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 12.5px;
  background: var(--color-surface);
}

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow-y: auto;
  z-index: 30;
}
.search-results.show { display: block; }

.search-result-row {
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-result-row:last-child { border-bottom: none; }
.search-result-row:hover { background: var(--color-primary-light); }
.search-result-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-meta { font-size: 11px; color: var(--color-text-muted); }
.search-no-results { padding: 12px; font-size: 12.5px; color: var(--color-text-muted); }

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0 10px 10px;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 8px 8px 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1px;
  border-left: 3px solid transparent;
}

.tree-row:hover { background: var(--color-bg); }
.tree-row.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-left-color: var(--color-accent);
}

/* Clearer hierarchy: processes read as bold section headers; the folders
   nested under them are visibly secondary, so the tree structure is legible
   at a glance instead of every row looking like the same weight. */
.tree-row[data-depth="1"] {
  font-weight: 500;
  font-size: 13px;
  color: var(--color-text-muted);
}
.tree-row[data-depth="1"].active { color: var(--color-primary-dark); }

.tree-toggle {
  flex-shrink: 0;
  width: 22px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 0;
  visibility: hidden;
}
.tree-toggle.has-children { visibility: visible; }
.tree-toggle:hover { background: var(--color-bg); color: var(--color-text); }

.sidebar-icon {
  font-size: 15px;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  flex-shrink: 0;
  background: var(--color-primary-light);
  border-radius: 7px;
}
.tree-row.active .sidebar-icon { background: var(--color-surface); }

/* Each process gets a distinct vivid tint in the sidebar so the list reads as
   a set of separate spaces rather than one uniform block. Assigned via an
   explicit data attribute (not nth-of-type) since expanded subfolders are
   flat siblings of the process rows and would otherwise throw the count off. */
.sidebar-icon[data-color="0"] { background: #dbeafe; }
.sidebar-icon[data-color="1"] { background: #fce7f3; }
.sidebar-icon[data-color="2"] { background: #dcfce7; }
.sidebar-icon[data-color="3"] { background: #fef3c7; }
.sidebar-icon[data-color="4"] { background: #ede9fe; }
.sidebar-icon[data-color="5"] { background: #cffafe; }
.sidebar-icon[data-color="6"] { background: #ffe4e6; }
.sidebar-icon[data-color="7"] { background: #ffedd5; }

.tree-folder-icon {
  flex-shrink: 0;
  font-size: 13px;
  width: 18px;
  text-align: center;
}

.tree-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-access-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar-access-dot.granted { background: var(--color-success); }
.sidebar-access-dot.readonly { background: #cbd2dd; }

.sidebar-add-folder,
.sidebar-delete-folder {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 17px;
  font-weight: 700;
  /* Always at least dimly visible — a control that only appears on hover
     (opacity 0 by default) reads as "barely showing" and is easy to miss,
     especially on touch devices with no hover state at all. */
  opacity: 0.45;
  transition: opacity 0.1s ease, background 0.1s ease, color 0.1s ease;
}
.sidebar-add-folder { color: var(--color-text-muted); }
.sidebar-delete-folder { color: var(--color-danger); }
.tree-row:hover .sidebar-add-folder,
.tree-row:hover .sidebar-delete-folder,
.sidebar-add-folder:focus-visible,
.sidebar-delete-folder:focus-visible { opacity: 1; }
.sidebar-add-folder:hover { background: var(--color-accent-light); color: var(--color-accent-dark); }
.sidebar-delete-folder:hover { background: var(--color-danger-light); color: var(--color-danger); }

.main-panel {
  flex: 1;
  min-width: 0;
  padding: 26px 34px 60px;
  padding-bottom: 88px; /* leaves room for the fixed, two-line activity-footer bar */
  transition: background 0.1s ease, outline 0.1s ease;
}

.file-type-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 22px;
  border-radius: 5px;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Persistent "last activity" bar — replaces the old full-history modal with a
   single always-visible line: who did what, and when. A bold accent-colored
   top border + lifted shadow clearly separate it from the page content above. */
.activity-footer {
  position: fixed;
  left: 264px;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  background: var(--color-surface);
  border-top: 3px solid var(--color-accent);
  box-shadow: 0 -6px 16px rgba(20, 24, 40, 0.10);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
}
.activity-footer-icon { flex-shrink: 0; font-size: 17px; }
.activity-footer-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  min-width: 0;
}
.activity-footer-label {
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-footer-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-footer-meta { flex-shrink: 0; color: var(--color-text-muted); margin-left: auto; padding-left: 10px; }
.activity-footer-muted { color: var(--color-text-muted); }

@media (max-width: 900px) {
  .activity-footer { left: 0; }
}

.main-panel.drop-active {
  outline: 3px dashed var(--color-accent);
  outline-offset: -8px;
  background: var(--color-accent-light);
}

.preview-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 70vh;
  overflow: auto;
  margin: 10px 0 4px;
  background: var(--color-bg);
  border-radius: 8px;
}
.preview-content img { max-width: 100%; max-height: 70vh; border-radius: 8px; }
.preview-content iframe { width: 100%; height: 70vh; border: none; border-radius: 8px; }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-muted);
}
.empty-state h2 { color: var(--color-text); margin-bottom: 8px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 6px;
}

.breadcrumb button {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 3px 5px;
  font-size: 14px;
  border-radius: 6px;
}
.breadcrumb button:hover { background: var(--color-primary-light); }
.breadcrumb button.current { color: var(--color-text); cursor: default; }
.breadcrumb button.current:hover { background: none; }

.breadcrumb-sep { color: var(--color-text-muted); font-size: 13px; }

.panel-subtitle {
  color: var(--color-text-muted);
  font-size: 13.5px;
  margin: 0 0 18px;
}

.access-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.access-note.granted { background: var(--color-success-light); color: var(--color-success); }
.access-note.readonly { background: #f1f2f4; color: var(--color-text-muted); }

.folder-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.explorer-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 4px 0 10px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.folder-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: 10px;
  padding: 14px 14px 12px;
  background: var(--color-surface);
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.folder-tile:hover { border-color: #c7d2e5; box-shadow: var(--shadow); transform: translateY(-2px); }

/* A rotating set of vivid top-border colors so a grid full of folders doesn't
   read as one flat wall of identical cards. */
.folder-grid .folder-tile:nth-child(6n+1) { border-top-color: var(--color-accent); }
.folder-grid .folder-tile:nth-child(6n+2) { border-top-color: #2563eb; }
.folder-grid .folder-tile:nth-child(6n+3) { border-top-color: #d97706; }
.folder-grid .folder-tile:nth-child(6n+4) { border-top-color: #7c3aed; }
.folder-grid .folder-tile:nth-child(6n+5) { border-top-color: #0891b2; }
.folder-grid .folder-tile:nth-child(6n+6) { border-top-color: #db2777; }

.folder-tile .folder-icon { font-size: 24px; }
.folder-tile .folder-name {
  font-weight: 700;
  font-size: 13.5px;
  word-break: break-word;
  padding-right: 40px;
}
.folder-tile .folder-meta { font-size: 11.5px; color: var(--color-text-muted); }

.folder-tile-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 2px;
}
.folder-tile-actions button {
  border: none;
  background: transparent;
  font-size: 12.5px;
  padding: 3px 5px;
  border-radius: 6px;
  color: var(--color-text-muted);
}
.folder-tile-actions button:hover { background: #eaecef; color: var(--color-text); }
.folder-tile-actions button.delete:hover { background: var(--color-danger-light); color: var(--color-danger); }

.file-list.wide { max-height: none; max-width: 100%; }

.empty-explorer {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 8px 0 20px;
}

@media (max-width: 900px) {
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 17px;
  }

  .app-shell { position: relative; }

  /* Off-canvas sliding panel instead of stacking full-width above the
     content — keeps the document list reachable without scrolling past
     the whole process tree first on a phone. */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 82vw;
    max-width: 320px;
    z-index: 60;
    overflow-y: auto;
    box-shadow: var(--shadow);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

  /* The dense document-register grid doesn't fit a phone screen — collapse
     each row back to a stacked card: hide the column header and the
     individual desktop columns, and show one condensed summary line instead. */
  .file-table-header { display: none; }
  .file-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .file-row .file-col-reference,
  .file-row .file-col-type,
  .file-row .file-col-version,
  .file-row .file-col-status {
    display: none;
  }
  .file-row .file-mobile-meta {
    display: block;
    font-size: 11.5px;
    color: var(--color-text-muted);
  }
  .file-row .file-actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .process-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .topbar { padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .topbar-nav { margin-left: 0; }
  .main-panel { padding: 20px 16px 50px; }
  .folder-grid { grid-template-columns: 1fr; }

  /* Keep the top bar to a single readable row: hide the name/role text next
     to the avatar (the avatar's initials are enough on a phone) and let the
     brand name shrink instead of pushing "Déconnexion" off-screen. */
  .user-chip > div { display: none; }
  .brand-name { display: none; }
  .topbar-right { gap: 8px; }
}

/* ---------- INDYX portal login — 2026 refresh ---------- */

.login-page {
  min-height: 100%;
  background: #f2f6f5;
  color: #10272d;
  overflow-x: hidden;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.92fr);
}

.login-brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(34px, 4vw, 66px) clamp(34px, 6vw, 92px) clamp(32px, 4vw, 58px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(58, 198, 125, 0.2), transparent 27%),
    linear-gradient(145deg, #031f2a 0%, #062e32 54%, #043c34 100%);
}

.login-brand-panel::before,
.login-brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.login-brand-panel::before {
  width: min(48vw, 690px);
  aspect-ratio: 1;
  right: -29%;
  bottom: -35%;
  border: 1px solid rgba(112, 229, 166, 0.2);
  box-shadow:
    0 0 0 76px rgba(64, 204, 127, 0.025),
    0 0 0 152px rgba(64, 204, 127, 0.025);
}

.login-brand-panel::after {
  width: 190px;
  height: 190px;
  right: 10%;
  top: -120px;
  background: rgba(74, 206, 132, 0.08);
  filter: blur(1px);
}

.login-brand-top,
.login-brand-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.login-logo {
  display: block;
  width: clamp(214px, 19vw, 292px);
  height: auto;
}

.login-portal-label {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.login-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding: clamp(54px, 9vh, 112px) 0 clamp(52px, 8vh, 96px);
}

.login-eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 24px;
  color: #74e3a8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-eyebrow span {
  width: 34px;
  height: 2px;
  background: #5bdb96;
}

.login-brand-copy h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(44px, 5.4vw, 78px);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-intro {
  max-width: 590px;
  margin: 30px 0 42px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.7;
}

.login-benefits {
  display: grid;
  gap: 20px;
  max-width: 610px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-benefits li {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: start;
  gap: 15px;
}

.login-benefits svg {
  width: 28px;
  height: 28px;
  margin-top: 2px;
  fill: none;
  stroke: #62dc9b;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.login-benefits div {
  display: grid;
  gap: 3px;
}

.login-benefits strong {
  color: #fff;
  font-size: 15px;
  font-weight: 750;
}

.login-benefits span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  line-height: 1.5;
}

.login-brand-footer {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-brand-footer strong {
  color: #6fe0a4;
  font-size: 12px;
  letter-spacing: 0.15em;
}

.login-form-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 72px clamp(36px, 6vw, 92px);
  background:
    linear-gradient(rgba(15, 74, 64, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 74, 64, 0.045) 1px, transparent 1px),
    #f5f8f7;
  background-size: 42px 42px;
}

.login-form-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(245, 248, 247, 0.9) 5%, rgba(245, 248, 247, 0.66) 55%, rgba(245, 248, 247, 0.94) 100%);
  pointer-events: none;
}

.login-form-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
}

.login-form-header {
  margin-bottom: 38px;
}

.login-form-header p {
  margin: 0 0 13px;
  color: #079461;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-form-header h2 {
  margin: 0 0 12px;
  color: #082c31;
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.045em;
}

.login-form-header > span {
  color: #68797b;
  font-size: 16px;
  line-height: 1.6;
}

.login-page .tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  margin: 0 0 30px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #cdd8d6;
  border-radius: 0;
  background: transparent;
}

.login-page .tab-btn {
  position: relative;
  min-height: 48px;
  padding: 0 0 15px;
  border: 0;
  border-radius: 0;
  color: #6d7b7d;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.login-page .tab-btn::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: #0fb879;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.login-page .tab-btn:hover,
.login-page .tab-btn.active {
  color: #082c31;
  background: transparent;
  box-shadow: none;
}

.login-page .tab-btn.active::after {
  transform: scaleX(1);
}

.login-page .tab-btn:focus-visible {
  outline: 3px solid rgba(15, 184, 121, 0.22);
  outline-offset: 3px;
}

.login-page .tab-panel[hidden] {
  display: none;
}

.login-page .field {
  margin-bottom: 21px;
}

.login-page .field label {
  margin-bottom: 9px;
  color: #203b3f;
  font-size: 14px;
  font-weight: 700;
}

.login-page .field input {
  min-height: 56px;
  padding: 15px 17px;
  border: 1px solid #c7d3d1;
  border-radius: 3px;
  color: #10272d;
  background: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-page .field input::placeholder {
  color: #93a09f;
}

.login-page .field input:hover {
  border-color: #9eafac;
}

.login-page .field input:focus {
  border-color: #079461;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 184, 121, 0.13);
}

.login-page .form-actions {
  margin-top: 30px;
}

.login-page .form-actions .btn-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 20px 0 22px;
  border: 1px solid #079461;
  border-radius: 3px;
  color: #fff;
  background: #079461;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(7, 148, 97, 0.19);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.login-page .form-actions .btn-primary svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.login-page .form-actions .btn-primary:hover {
  border-color: #067c52;
  background: #067c52;
  box-shadow: 0 17px 36px rgba(7, 124, 82, 0.24);
  transform: translateY(-1px);
}

.login-page .form-actions .btn-primary:hover svg {
  transform: translateX(3px);
}

.login-page .form-actions .btn-primary:focus-visible {
  outline: 3px solid rgba(15, 184, 121, 0.23);
  outline-offset: 3px;
}

.login-page .form-actions .btn-primary:disabled,
.login-page .form-actions .btn-primary.is-loading {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.login-page .form-footnote {
  margin-top: 19px;
  color: #6c7c7d;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

.login-page .alert {
  margin: 0 0 22px;
  padding: 13px 15px;
  border-radius: 3px;
  font-size: 14px;
  line-height: 1.5;
}

.login-page .alert-error {
  border-color: #efb7b7;
  color: #9d2424;
  background: #fff1f1;
}

.login-page .alert-success {
  border-color: #a9d8c1;
  color: #075c3f;
  background: #eaf8f1;
}

.login-access-note {
  position: absolute;
  z-index: 1;
  right: clamp(36px, 6vw, 92px);
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #778684;
  font-size: 12px;
}

.login-access-note span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0fb879;
  box-shadow: 0 0 0 4px rgba(15, 184, 121, 0.1);
}

.brand-mark {
  width: auto;
  max-width: 124px;
  object-fit: contain;
}

@media (max-width: 1050px) {
  .login-shell {
    grid-template-columns: minmax(0, 0.94fr) minmax(420px, 1.06fr);
  }

  .login-brand-panel {
    padding-right: 48px;
    padding-left: 48px;
  }

  .login-portal-label,
  .login-brand-footer span {
    display: none;
  }

  .login-brand-copy h1 {
    font-size: clamp(43px, 5.8vw, 62px);
  }
}

@media (max-width: 820px) {
  .login-page {
    overflow: auto;
  }

  .login-shell {
    display: block;
  }

  .login-brand-panel {
    min-height: auto;
    padding: 28px 26px 34px;
  }

  .login-logo {
    width: 210px;
  }

  .login-brand-copy {
    padding: 58px 0 18px;
  }

  .login-brand-copy h1 {
    font-size: clamp(39px, 11vw, 58px);
  }

  .login-intro {
    margin: 22px 0 0;
    font-size: 16px;
  }

  .login-benefits,
  .login-brand-footer {
    display: none;
  }

  .login-form-panel {
    min-height: auto;
    padding: 58px 26px 82px;
    background-size: 34px 34px;
  }

  .login-form-header {
    margin-bottom: 32px;
  }

  .login-access-note {
    right: 26px;
    bottom: 24px;
    left: 26px;
    justify-content: center;
  }
}

@media (max-width: 440px) {
  .login-brand-panel {
    padding: 24px 20px 29px;
  }

  .login-logo {
    width: 188px;
  }

  .login-brand-copy {
    padding-top: 46px;
  }

  .login-brand-copy h1 {
    font-size: 40px;
  }

  .login-form-panel {
    padding-right: 20px;
    padding-left: 20px;
  }

  .login-form-header h2 {
    font-size: 42px;
  }

  .login-page .tabs {
    grid-template-columns: 0.9fr 1.4fr;
    gap: 18px;
  }

  .login-page .tab-btn {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .login-brand-top,
  .login-brand-copy,
  .login-brand-footer {
    animation: login-rise 560ms ease both;
  }

  .login-brand-copy { animation-delay: 90ms; }
  .login-brand-footer { animation-delay: 160ms; }
  .login-form-wrap { animation: login-rise 560ms 120ms ease both; }

  @keyframes login-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
