body.dashboard-page {
  min-height: 100vh;
  background: #f4f1ea;
  font-size: 16px;
}

.dashboard-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px var(--pad);
  border-bottom: 1px solid var(--line);
}

.dashboard-header__actions { display: flex; align-items: center; gap: 22px; }
.dashboard-header__actions a,
.dashboard-header__actions button { font-size: 15px; font-weight: 600; }
.dashboard-header__actions a { text-decoration: underline; text-underline-offset: 4px; }
.dashboard-shell { width: min(1120px, calc(100% - 2 * var(--pad))); margin: 56px auto 96px; }
.dashboard-shell h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 500; }
.dashboard-shell h2 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 500; }
.section-label { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.login-panel { width: min(520px, 100%); margin: 8vh auto; padding: clamp(28px, 5vw, 56px); background: #fffdf8; border: 1px solid var(--line); }
.login-panel > p:not(.section-label) { max-width: 42ch; margin: 18px 0 30px; font-size: 17px; color: var(--ink-2); }
.login-panel .login-help { margin-top: 0; font-size: 15px; line-height: 1.55; }
.login-help code { display: block; overflow-wrap: anywhere; margin-top: 8px; padding: 10px; background: var(--paper); font-size: 14px; }
.login-panel form { display: grid; gap: 12px; }
.login-panel label,
.project-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
.login-panel input,
.project-form input { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--line-strong); background: #fff; font-size: 16px; }
.primary-button { min-height: 48px; padding: 11px 18px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 650; cursor: pointer; }
.primary-button:hover { background: var(--rust-dark); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.form-message { min-height: 24px; margin: 0; color: var(--rust-dark); font-size: 14px; }
.dashboard[hidden], .login-panel[hidden], .manager-panel[hidden] { display: none; }
.dashboard-heading,
.panel-heading,
.manager-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.dashboard-heading { margin-bottom: 34px; }
.dashboard-intro { max-width: 64ch; margin: 15px 0 0; color: var(--ink-2); font-size: 17px; }
.project-total { white-space: nowrap; padding: 7px 12px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.create-panel,
.manager-panel { margin-bottom: 50px; padding: clamp(22px, 3.2vw, 36px); border: 1px solid var(--line); background: #fffdf8; }
.panel-heading { margin-bottom: 24px; }
.step-mark { color: var(--muted); font-size: 13px; }
.project-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-items: end; }
.project-form .primary-button { justify-self: start; }
.project-form .form-message { align-self: center; }
.quiet-button { min-height: 42px; padding: 8px 13px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; cursor: pointer; }
.quiet-button:hover { background: var(--paper); }
.project-list { display: grid; gap: 12px; }
.project-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(130px, .7fr) minmax(120px, .65fr) auto; gap: 22px; align-items: center; padding: 20px; background: #fffdf8; border-bottom: 1px solid var(--line); }
.project-row__name { min-width: 0; }
.project-row__name strong { display: block; overflow-wrap: anywhere; font-size: 19px; font-weight: 650; }
.project-row__name span,
.project-row__meta { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.project-row__meta strong { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.project-row__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.project-row__actions button { min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; cursor: pointer; }
.project-row__actions button:first-child { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.project-row__actions button:hover { border-color: var(--rust); }
.empty-state { padding: 28px; border: 1px dashed var(--line-strong); color: var(--ink-2); font-size: 16px; }
.manager-heading { align-items: start; margin-bottom: 24px; }
.manager-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.share-panel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; padding: 18px; background: var(--paper); }
.share-panel > div { display: grid; gap: 3px; }
.share-panel > div span { color: var(--muted); font-size: 13px; }
.share-panel strong { font-family: var(--mono); font-size: 23px; letter-spacing: .12em; }
#copy-status { flex-basis: 100%; margin: 0; color: var(--olive); font-size: 14px; }
.drop-zone { display: grid; justify-items: center; gap: 8px; min-height: 186px; padding: 26px; border: 1px dashed var(--line-strong); text-align: center; cursor: pointer; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--rust); background: #f8f0e5; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone__icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 28px; line-height: 1; }
.drop-zone strong { font-size: 19px; }
.drop-zone > span:last-child { color: var(--muted); font-size: 14px; }
.upload-status { min-height: 28px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.managed-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.managed-photo { min-width: 0; border: 1px solid var(--line); background: #f8f5ee; }
.managed-photo__image { aspect-ratio: 4 / 5; background: var(--paper-2); }
.managed-photo__image img { width: 100%; height: 100%; object-fit: cover; }
.managed-photo__foot { display: grid; gap: 8px; padding: 11px; }
.managed-photo__foot strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.managed-photo__foot button { min-height: 40px; border: 1px solid #b43b2c; color: #8e2d22; font-size: 14px; font-weight: 600; cursor: pointer; }
.managed-photo__foot button:hover { background: #b43b2c; color: #fff; }
.server-note { max-width: 78ch; margin: 28px 0 0; color: var(--muted); font-size: 14px; }
.portfolio-intro { max-width: 70ch; margin: -8px 0 20px; color: var(--ink-2); font-size: 16px; }
.portfolio-upload-row { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.portfolio-upload-row > label:first-child { display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
.portfolio-upload-row select { min-width: 190px; min-height: 48px; padding: 9px 12px; border: 1px solid var(--line-strong); background: #fff; font-size: 16px; }
.portfolio-add { position: relative; display: inline-flex; cursor: pointer; }
.portfolio-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.portfolio-add .primary-button { display: inline-flex; align-items: center; }

/* Keep helper text and labels readable at normal viewing distance. */
.dashboard-page .section-label,
.dashboard-page .step-mark,
.dashboard-page .project-row__name span,
.dashboard-page .project-row__meta,
.dashboard-page .share-panel > div span,
.dashboard-page #copy-status,
.dashboard-page .drop-zone > span:last-child,
.dashboard-page .upload-status,
.dashboard-page .server-note { font-size: 15px; }
.dashboard-page .managed-photo__foot strong { font-size: 16px; }
.dashboard-page .managed-photo__foot button,
.dashboard-page .project-row__actions button,
.dashboard-page .portfolio-upload-row > label:first-child { font-size: 15px; }

@media (max-width: 760px) {
  .dashboard-shell { margin-top: 32px; }
  .dashboard-heading, .panel-heading, .manager-heading { align-items: start; }
  .project-row { grid-template-columns: 1fr 1fr; gap: 13px; }
  .project-row__actions { grid-column: 1 / -1; }
  .project-row__actions button { flex: 1; }
  .portfolio-upload-row { align-items: stretch; flex-direction: column; }
  .portfolio-upload-row select, .portfolio-add, .portfolio-add .primary-button { width: 100%; }
  .managed-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-panel { align-items: start; }
  .share-panel .primary-button { width: 100%; }
}

@media (max-width: 520px) {
  .dashboard-header { min-height: 66px; }
  .dashboard-header .brand__name { font-size: 14px; }
  .dashboard-header .brand__name span { font-size: 10px; }
  .dashboard-header__actions { gap: 12px; }
  .dashboard-header__actions a, .dashboard-header__actions button { font-size: 13px; }
  .dashboard-shell h2 { font-size: 24px; }
  .project-form { grid-template-columns: 1fr; }
  .project-form .primary-button { width: 100%; }
  .manager-heading { display: grid; }
  .managed-photos { gap: 9px; }
  .managed-photo__foot { padding: 8px; }
  .managed-photo__foot button { font-size: 13px; }
}
