.portal-body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-primary);
}

.portal-body button,
.portal-body input,
.portal-body textarea {
  font: inherit;
}

.portal-logo {
  display: inline-flex;
  align-items: center;
  width: min(176px, 52vw);
}

.portal-logo img {
  width: 100%;
  height: auto;
}

.portal-kicker {
  margin: 0 0 16px;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.68fr);
  min-height: 100vh;
}

.login-art {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}

.login-art::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 14, 14, 0.5), rgba(14, 14, 14, 0.08)),
    linear-gradient(0deg, rgba(14, 14, 14, 0.7), transparent 60%);
  content: "";
}

.login-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.72);
}

.login-page-client .login-art img {
  object-position: center 34%;
}

.login-art-copy {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 72px));
  margin: 0 auto;
  padding: 72px 0;
  color: var(--white);
}

.login-art-copy .portal-kicker {
  color: rgba(255, 255, 255, 0.7);
}

.login-art-copy h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(3rem, 6vw, 6.8rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.login-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: clamp(28px, 5vw, 58px);
  border-left: 1px solid var(--line);
  background: var(--paper);
}

.login-panel > .portal-logo {
  align-self: center;
}

.login-panel > .portal-logo img {
  transition: filter 220ms ease;
}

.login-panel > .portal-logo:hover img,
.login-panel > .portal-logo:focus-visible img {
  filter: saturate(0.72);
}

.login-form-wrap {
  width: min(100%, 430px);
  margin: auto;
  padding: 70px 0;
}

.login-form-wrap h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 620;
  letter-spacing: -0.052em;
  line-height: 0.98;
}

.login-intro {
  max-width: 390px;
  margin: 24px 0 34px;
  color: var(--soft-ink);
  line-height: 1.7;
}

.portal-form {
  display: grid;
  gap: 22px;
}

.portal-form label {
  display: grid;
  gap: 9px;
  color: var(--soft-ink);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-form input {
  width: 100%;
  min-height: 50px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  text-transform: none;
}

.portal-form input:focus {
  border-bottom-color: var(--ink);
}

.portal-form .button {
  justify-self: start;
  margin-top: 10px;
}

.login-security-note {
  max-width: 410px;
  margin: 24px 0 0;
  color: var(--soft-ink);
  font-size: 0.72rem;
  line-height: 1.6;
}

.form-alert {
  margin: 0 0 24px;
  padding: 13px 15px;
  border-left: 3px solid var(--clay);
  background: rgba(155, 104, 79, 0.09);
  color: #704733;
  font-size: 0.88rem;
  line-height: 1.5;
}

.back-link,
.header-back-link {
  color: var(--soft-ink);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.back-link {
  align-self: flex-start;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  background: #f4f1ea;
}

.sidebar-logo {
  width: 154px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  margin-top: 76px;
}

.sidebar-nav a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 13px 12px;
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

.sidebar-nav a span {
  color: var(--clay);
  font-size: 0.65rem;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus-visible,
.sidebar-nav a.is-active {
  background: rgba(21, 21, 21, 0.055);
  color: var(--ink);
}

.sidebar-account {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sidebar-account p {
  margin: 0 0 4px;
  color: var(--soft-ink);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-account strong {
  display: block;
  margin-bottom: 18px;
  font-size: 0.9rem;
}

.logout-button {
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.logout-button:hover,
.logout-button:focus-visible {
  color: var(--clay);
}

.dashboard-main {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(42px, 6vw, 84px);
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(38px, 6vw, 70px);
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.dashboard-header h1,
.client-gallery-heading h1,
.gallery-title-block h1,
.gallery-unavailable h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 6.4rem);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.gallery-count {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--soft-ink);
  text-transform: uppercase;
}

.gallery-count strong {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 600;
}

.gallery-count span {
  font-size: 0.7rem;
  font-weight: 800;
}

.gallery-sort-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-sort-form label {
  color: var(--soft-ink);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gallery-sort-form select {
  min-width: 190px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0 34px 0 12px;
}

.gallery-sort-form button {
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0 14px;
  text-transform: uppercase;
}

.gallery-sort-form button:hover,
.gallery-sort-form button:focus-visible {
  background: var(--clay);
  border-color: var(--clay);
}

.client-gallery-sort-form {
  justify-content: flex-end;
  margin: 0 0 32px auto;
}

.gallery-sort-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 32px;
}

.admin-gallery-grid,
.client-gallery-grid {
  display: grid;
  gap: clamp(20px, 2.4vw, 34px);
}

.admin-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-gallery-card {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--white);
  outline-offset: 4px;
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.portal-gallery-card:hover,
.portal-gallery-card:focus-visible {
  box-shadow: 0 18px 50px rgba(21, 21, 21, 0.11);
  transform: translateY(-3px);
}

.portal-gallery-card figure {
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: #e8e3da;
}

.portal-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82);
  transition: filter 320ms ease, transform 480ms ease;
}

.portal-gallery-card:hover img,
.portal-gallery-card:focus-visible img {
  filter: saturate(1);
  transform: scale(1.025);
}

.portal-gallery-card-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
}

.portal-gallery-card-copy p {
  margin: 0 0 6px;
  color: var(--clay);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-gallery-card-copy h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.portal-gallery-card-copy small {
  display: block;
  margin-top: 8px;
  color: var(--soft-ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.portal-gallery-card-copy > span {
  flex: 0 0 auto;
  color: var(--soft-ink);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 54px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--soft-ink);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pagination > :last-child {
  justify-self: end;
}

.pagination a:hover,
.pagination a:focus-visible {
  color: var(--clay);
}

.pagination [aria-disabled="true"] {
  opacity: 0.35;
}

.empty-state {
  max-width: 760px;
  padding: clamp(50px, 9vw, 100px);
  border: 1px solid var(--line);
  background: var(--white);
}

.empty-state h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 620;
  letter-spacing: -0.05em;
  line-height: 1;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 15px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(21, 21, 21, 0.09);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(18px);
}

.portal-header-account {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--soft-ink);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-gallery-main {
  width: min(1180px, calc(100% - clamp(34px, 8vw, 100px)));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 124px) 0;
}

.client-gallery-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px 50px;
  margin-bottom: clamp(44px, 7vw, 76px);
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.client-gallery-heading .portal-kicker {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.client-gallery-heading > p:last-child {
  max-width: 400px;
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.7;
}

.client-empty-state p:not(.portal-kicker) {
  margin: 22px 0 28px;
  color: var(--soft-ink);
  line-height: 1.7;
}

.gallery-view-body {
  background: #f5f2ec;
}

.gallery-title-block {
  width: min(1200px, calc(100% - clamp(34px, 8vw, 100px)));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 128px) 0 clamp(46px, 7vw, 84px);
  border-bottom: 1px solid var(--line);
}

.gallery-title-meta {
  display: block;
  margin-top: 28px;
}

.gallery-title-meta > p {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gallery-download-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.gallery-action-button,
.gallery-cancel-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, opacity 180ms ease;
}

.gallery-action-button:hover,
.gallery-action-button:focus-visible {
  background: var(--ink);
  color: var(--white);
}

.gallery-action-primary {
  background: var(--ink);
  color: var(--white);
}

.gallery-action-primary:hover,
.gallery-action-primary:focus-visible {
  background: var(--moss);
  border-color: var(--moss);
}

.gallery-action-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.gallery-cancel-button {
  min-height: auto;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  color: var(--soft-ink);
}

.gallery-cancel-button:hover,
.gallery-cancel-button:focus-visible {
  color: var(--clay);
}

.gallery-cancel-button[hidden] {
  display: none;
}

.selection-status {
  width: 100%;
  min-height: 1.2em;
  color: var(--soft-ink);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: left;
}

.client-gallery-alert {
  display: flex;
  width: min(1200px, calc(100% - clamp(34px, 8vw, 100px)));
  align-items: center;
  gap: 14px;
  margin: 24px auto 0;
  padding: 16px 18px;
  border: 1px solid rgba(155, 104, 79, 0.34);
  background: rgba(155, 104, 79, 0.09);
  color: var(--ink);
}

.client-gallery-alert p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.55;
}

.gallery-alert-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--clay);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-notification-settings {
  margin-top: clamp(34px, 5vw, 58px);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  background: var(--white);
}

.notification-settings-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.notification-settings-heading .portal-kicker {
  margin-bottom: 9px;
}

.notification-settings-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.notification-settings-heading > p {
  max-width: 390px;
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.84rem;
  line-height: 1.65;
}

.notification-settings-form {
  display: grid;
  gap: 26px;
  margin-top: 26px;
}

.notification-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.notification-toggle > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.notification-toggle-track {
  position: relative;
  width: 48px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid #aaa69e;
  border-radius: 999px;
  background: #d8d4cc;
  transition: background 180ms ease, border-color 180ms ease;
}

.notification-toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 5px rgba(21, 21, 21, 0.22);
  transition: transform 180ms ease;
}

.notification-toggle > input:checked + .notification-toggle-track {
  border-color: var(--moss);
  background: var(--moss);
}

.notification-toggle > input:checked + .notification-toggle-track span {
  transform: translateX(22px);
}

.notification-toggle > input:focus-visible + .notification-toggle-track {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.notification-toggle-copy {
  display: grid;
  gap: 3px;
}

.notification-toggle-copy strong {
  font-size: 0.86rem;
}

.notification-toggle-copy small {
  color: var(--soft-ink);
  font-size: 0.72rem;
  line-height: 1.4;
}

.notification-message-field {
  display: grid;
  gap: 9px;
  color: var(--soft-ink);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.notification-message-field textarea {
  width: 100%;
  min-height: 92px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.6;
  resize: vertical;
  text-transform: none;
}

.notification-message-field textarea:focus {
  border-bottom-color: var(--ink);
}

.notification-message-field textarea::placeholder {
  color: #8a8883;
  opacity: 1;
}

.notification-settings-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.clear-entry-button {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--soft-ink);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.clear-entry-button:hover,
.clear-entry-button:focus-visible {
  color: var(--clay);
}

.settings-feedback {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--moss);
  background: rgba(89, 99, 79, 0.1);
  font-size: 0.82rem;
  font-weight: 650;
}

.settings-feedback.is-error {
  border-left-color: var(--clay);
  background: rgba(155, 104, 79, 0.1);
}

.admin-session-log {
  margin-top: clamp(22px, 3vw, 34px);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  background: var(--white);
}

.session-log-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.session-log-heading .portal-kicker {
  margin-bottom: 9px;
}

.session-log-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.session-log-heading > p {
  max-width: 330px;
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: right;
}

.session-log-table-wrap {
  margin-top: 24px;
  overflow-x: auto;
}

.session-log-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.76rem;
  line-height: 1.5;
}

.session-log-table th,
.session-log-table td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.session-log-table th {
  color: var(--soft-ink);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.session-log-table tbody tr:last-child td {
  border-bottom: 0;
}

.session-log-table time {
  white-space: nowrap;
}

.general-session-log {
  margin-top: 0;
}

.general-session-log .session-log-table {
  min-width: 1120px;
}

.log-gallery-link {
  color: var(--clay);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(155, 104, 79, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.log-gallery-link:hover,
.log-gallery-link:focus-visible {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.session-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(89, 99, 79, 0.12);
  color: var(--moss);
  font-size: 0.61rem;
  font-weight: 800;
  white-space: nowrap;
  text-transform: uppercase;
}

.session-status.is-open {
  background: rgba(155, 104, 79, 0.12);
  color: #704733;
}

.session-status.is-timeout {
  background: rgba(21, 21, 21, 0.08);
  color: var(--soft-ink);
}

.session-log-privacy {
  margin: 18px 0 0;
  color: var(--soft-ink);
  font-size: 0.68rem;
  line-height: 1.6;
}

.session-log-empty {
  margin-top: 24px;
  padding: 24px;
  background: #f5f2ec;
}

.session-log-empty strong {
  font-size: 0.9rem;
}

.session-log-empty p {
  margin: 7px 0 0;
  color: var(--soft-ink);
  font-size: 0.78rem;
  line-height: 1.6;
}

.admin-download-log {
  margin-top: clamp(22px, 3vw, 34px);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  background: var(--white);
}

.download-log-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.download-log-heading .portal-kicker {
  margin-bottom: 9px;
}

.download-log-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.download-log-heading > p {
  max-width: 330px;
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: right;
}

.download-log-list {
  margin-top: 0;
  border-top: 1px solid var(--line);
}

.download-log-columns {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(210px, 1fr) minmax(100px, 0.45fr) minmax(72px, 0.35fr);
  gap: 18px;
  margin-top: 24px;
  padding: 0 4px 11px;
  color: var(--soft-ink);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.download-log-columns span:nth-child(3),
.download-log-columns span:nth-child(4) {
  text-align: left;
}

.download-log-entry {
  border-bottom: 1px solid var(--line);
}

.download-log-entry summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(210px, 1fr) minmax(100px, 0.45fr) minmax(72px, 0.35fr);
  align-items: center;
  gap: 18px;
  padding: 18px 4px;
  cursor: pointer;
  list-style: none;
}

.download-log-entry summary::-webkit-details-marker {
  display: none;
}

.download-log-entry summary:hover,
.download-log-entry summary:focus-visible {
  color: var(--clay);
}

.download-log-time {
  display: grid;
  gap: 3px;
}

.download-log-time strong {
  font-size: 0.8rem;
}

.download-log-time small,
.download-log-location {
  color: var(--soft-ink);
  font-size: 0.7rem;
}

.download-log-count {
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.download-log-expand {
  color: var(--clay);
  font-size: 0.63rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.download-log-entry[open] .download-log-expand {
  color: var(--soft-ink);
}

.general-download-log .download-log-columns,
.general-download-log .download-log-entry summary {
  grid-template-columns:
    minmax(190px, 1.15fr)
    minmax(150px, 0.8fr)
    minmax(210px, 1fr)
    minmax(100px, 0.45fr)
    minmax(72px, 0.35fr);
}

.general-download-log .general-log-gallery {
  align-self: center;
  font-size: 0.72rem;
}

.download-log-files {
  padding: 6px 18px 18px;
}

.download-log-files ul {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.download-log-files li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 13px;
  background: #f5f2ec;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.download-variant {
  display: inline-flex;
  min-height: 23px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.download-variant.is-color {
  background: rgba(155, 104, 79, 0.12);
  color: #704733;
}

.download-variant.is-black-white {
  background: rgba(21, 21, 21, 0.1);
  color: var(--ink);
}

.download-log-privacy {
  margin: 18px 0 0;
  color: var(--soft-ink);
  font-size: 0.68rem;
  line-height: 1.6;
}

.download-log-empty {
  margin-top: 24px;
  padding: 24px;
  background: #f5f2ec;
}

.download-log-empty strong {
  font-size: 0.9rem;
}

.download-log-empty p,
.download-log-files > p {
  margin: 7px 0 0;
  color: var(--soft-ink);
  font-size: 0.78rem;
  line-height: 1.6;
}

.private-photo-grid {
  width: min(1440px, calc(100% - clamp(28px, 5vw, 76px)));
  margin: 0 auto;
  padding: clamp(32px, 5vw, 72px) 0 clamp(80px, 10vw, 140px);
  column-count: 3;
  column-gap: clamp(12px, 1.8vw, 26px);
}

.private-photo {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 clamp(12px, 1.8vw, 26px);
  padding: 0;
  break-inside: avoid;
  overflow: hidden;
  border: 0;
  background: #ded8ce;
  cursor: zoom-in;
}

.private-photo::before,
.private-photo::after {
  position: absolute;
  z-index: 2;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.private-photo::before {
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
}

.private-photo::after {
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: rgba(21, 21, 21, 0.78);
  color: var(--white);
  content: "\2713";
  font-size: 0.95rem;
  font-weight: 800;
  transform: scale(0.82);
}

.private-photo-grid.is-selecting .private-photo {
  cursor: pointer;
}

.private-photo.is-selected::before,
.private-photo.is-selected::after {
  opacity: 1;
}

.private-photo.is-selected::after {
  transform: scale(1);
}

.private-photo img {
  width: 100%;
  height: auto;
  transition: filter 320ms ease, transform 420ms ease;
}

.private-photo:hover img,
.private-photo:focus-visible img {
  filter: brightness(0.9);
  transform: scale(1.012);
}

.gallery-unavailable {
  width: min(850px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(100px, 18vw, 220px) 0;
}

.gallery-unavailable > p:not(.portal-kicker) {
  max-width: 560px;
  margin: 28px 0;
  color: var(--soft-ink);
  line-height: 1.7;
}

.portal-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  margin: 0;
  padding: 60px 20px 34px;
  border: 0;
  background: transparent;
  color: var(--white);
}

.portal-lightbox[open] {
  display: grid;
}

.portal-lightbox::backdrop {
  background: rgba(12, 12, 12, 0.95);
}

.portal-lightbox figure {
  display: grid;
  min-width: 0;
  max-height: calc(100dvh - 94px);
  justify-items: center;
  margin: 0;
}

.portal-lightbox img {
  max-width: 100%;
  max-height: calc(100dvh - 126px);
  object-fit: contain;
  transition: filter 220ms ease;
}

.portal-lightbox img.is-black-and-white {
  filter: grayscale(1);
}

.portal-lightbox figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 800;
}

.portal-lightbox-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.portal-lightbox-effect,
.portal-lightbox-download {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  color: var(--white);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

.portal-lightbox-effect {
  gap: 8px;
  background: transparent;
  cursor: pointer;
}

.portal-lightbox-effect-track {
  position: relative;
  width: 26px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 180ms ease, border-color 180ms ease;
}

.portal-lightbox-effect-track span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 180ms ease;
}

.portal-lightbox-effect.is-active .portal-lightbox-effect-track {
  border-color: #d7a689;
  background: #d7a689;
}

.portal-lightbox-effect.is-active .portal-lightbox-effect-track span {
  transform: translateX(12px);
}

.portal-lightbox-effect:hover,
.portal-lightbox-effect:focus-visible,
.portal-lightbox-download:hover,
.portal-lightbox-download:focus-visible {
  background: var(--white);
  color: var(--ink);
}

.portal-lightbox-close,
.portal-lightbox-nav {
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  padding: 8px;
  font-size: 0.72rem;
}

.portal-lightbox-nav {
  min-height: 64px;
  font-size: 1.25rem;
}

.portal-lightbox-nav:hover,
.portal-lightbox-nav:focus-visible,
.portal-lightbox-close:hover,
.portal-lightbox-close:focus-visible {
  color: #d7a689;
}

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: minmax(0, 0.85fr) minmax(370px, 0.75fr);
  }

  .admin-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .private-photo-grid {
    column-count: 2;
  }
}

@media (max-width: 820px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: 42vh;
  }

  .login-art-copy {
    width: calc(100% - 40px);
    padding: 46px 0;
  }

  .login-art-copy h1 {
    font-size: clamp(2.8rem, 10vw, 5rem);
  }

  .login-panel {
    min-height: 58vh;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .login-form-wrap {
    width: 100%;
    padding: 70px 0;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    height: auto;
    gap: 24px;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-logo {
    width: 142px;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    margin-top: 0;
  }

  .sidebar-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
    padding-top: 18px;
  }

  .sidebar-account strong {
    margin: 0 auto 0 10px;
  }

  .dashboard-main {
    padding: clamp(34px, 7vw, 60px) 20px 70px;
  }

  .client-gallery-heading {
    grid-template-columns: 1fr;
  }

  .notification-settings-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-log-table-wrap {
    overflow: visible;
  }

  .session-log-table {
    min-width: 0;
  }

  .general-session-log .session-log-table {
    min-width: 0;
  }

  .session-log-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .session-log-table,
  .session-log-table tbody,
  .session-log-table tr,
  .session-log-table td {
    display: block;
    width: 100%;
  }

  .session-log-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .session-log-table tbody tr:last-child {
    border-bottom: 0;
  }

  .session-log-table td,
  .session-log-table tbody tr:last-child td {
    display: grid;
    grid-template-columns: minmax(118px, 0.7fr) minmax(0, 1.3fr);
    gap: 16px;
    padding: 9px 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .session-log-table td::before {
    color: var(--soft-ink);
    content: attr(data-label);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
  }

  .session-log-table time {
    white-space: normal;
  }

}

@media (max-width: 640px) {
  .admin-gallery-grid,
  .client-gallery-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-sort-row,
  .gallery-sort-form {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .gallery-sort-form select,
  .gallery-sort-form button {
    width: 100%;
  }

  .client-gallery-sort-form {
    margin: 0 0 28px;
  }

  .gallery-sort-row {
    margin: 0 0 28px;
  }

  .portal-gallery-card-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-header-account {
    width: 100%;
    justify-content: space-between;
  }

  .gallery-view-header .portal-header-account {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .notification-settings-heading,
  .session-log-heading,
  .download-log-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-log-heading > p,
  .download-log-heading > p {
    text-align: left;
  }

  .download-log-entry summary {
    grid-template-columns: 1fr;
  }

  .general-download-log .download-log-entry summary {
    grid-template-columns: 1fr;
  }

  .download-log-columns {
    display: none;
  }

  .download-log-time::before,
  .download-log-location::before,
  .download-log-count::before {
    color: var(--soft-ink);
    content: "Date / time and client";
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
  }

  .download-log-location,
  .download-log-count {
    display: grid;
    gap: 4px;
  }

  .download-log-location::before {
    content: "Approximate location";
  }

  .download-log-count::before {
    content: "Photo count";
  }

  .general-log-gallery {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    gap: 4px;
  }

  .general-log-gallery::before {
    color: var(--soft-ink);
    content: "Gallery";
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .general-download-log .download-log-location {
    grid-row: 3;
  }

  .general-download-log .download-log-count {
    grid-row: 4;
  }

  .general-download-log .download-log-expand {
    grid-row: 5;
  }

  .download-log-location {
    grid-column: 1;
    grid-row: 2;
  }

  .download-log-count {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
  }

  .download-log-expand {
    grid-column: 1;
    grid-row: 4;
    text-align: left;
  }

  .pagination {
    gap: 12px;
    font-size: 0.64rem;
  }

  .private-photo-grid {
    column-count: 1;
  }

  .portal-lightbox {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    padding-right: 4px;
    padding-left: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-gallery-card,
  .portal-gallery-card img,
  .private-photo img {
    transition-duration: 0.001ms !important;
  }
}
.gallery-upload { margin: 24px 0; padding: 22px; border: 1px solid #d7d7d7; border-radius: 12px; text-align: left; }
.gallery-upload-label { display: block; font-weight: 700; margin-bottom: 12px; }
.gallery-upload input { max-width: 100%; margin: 0 12px 12px 0; }
.gallery-upload p { font-size: .9rem; margin: 12px 0 0; overflow-wrap: anywhere; }
.gallery-upload progress { display: block; width: 100%; height: 18px; margin-top: 18px; accent-color: #264a39; }
.gallery-upload [data-upload-error] { color: #a32222; white-space: pre-line; }
.gallery-upload-toast { position: fixed; bottom: 24px; right: 24px; left: 24px; margin-left: auto; max-width: 440px; background: #203e30; color: white; padding: 20px 24px; border-radius: 10px; box-shadow: 0 8px 32px #0003; z-index: 10000; }
.gallery-upload-toast[hidden] { display: none; }
