.portal-cabinet {
  width: min(1500px, 100%);
  min-height: calc(100dvh - 72px);
  margin: 0 auto;
  padding: 20px;
}

.portal-cabinet-nav {
  display: flex;
  width: fit-content;
  margin: 0 auto 16px;
  padding: 4px;
  border: 1px solid #dce1e4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 25, 28, .06);
}

.portal-cabinet-nav a {
  min-width: 140px;
  padding: 10px 18px;
  border-radius: 7px;
  color: #59616a;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.portal-cabinet-nav a.is-current { color: #fff; background: #91384e; }
.portal-cabinet-panel[hidden] { display: none !important; }

.portal-projects-panel {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.portal-projects-intro {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  border: 1px solid #dce1e4;
  border-radius: 8px;
  background: #fff;
}

.portal-projects-eyebrow {
  margin: 0 0 7px;
  color: #b74e67;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-projects-intro h1,
.portal-project-detail h2,
.portal-project-gallery-heading h3 {
  margin: 0;
  color: #241b1e;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.portal-projects-intro h1 { font-size: 34px; }
.portal-projects-intro > div > p:last-child { max-width: 670px; margin: 8px 0 0; color: #69717a; }

.portal-projects-summary {
  display: flex;
  margin: 0;
  border: 1px solid #e2e5e7;
  border-radius: 7px;
  overflow: hidden;
}

.portal-projects-summary div { min-width: 92px; padding: 11px 14px; text-align: center; }
.portal-projects-summary div + div { border-left: 1px solid #e2e5e7; }
.portal-projects-summary dt { color: #271c20; font: 700 22px/1 Georgia, serif; }
.portal-projects-summary dd { margin: 5px 0 0; color: #717881; font-size: 11px; }

.portal-project-list {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 12px;
}

.portal-project-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 20px;
  gap: 11px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
  border: 1px solid #dce1e4;
  border-radius: 8px;
  color: #281d20;
  background: #fff;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.portal-project-card:hover { border-color: #c895a3; transform: translateY(-1px); }
.portal-project-card.is-current { border-color: #c16279; background: #fbecf0; }
.portal-project-card > img { width: 54px; height: 54px; border-radius: 6px; object-fit: cover; }
.portal-project-card:not(:has(> img))::before {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  background: linear-gradient(145deg, #efe3e6, #d9dde1);
  content: "";
}
.portal-project-card-copy { display: grid; gap: 3px; min-width: 0; }
.portal-project-card-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.portal-project-card-copy > span { color: #737a82; font-size: 11px; }
.portal-project-card-arrow { color: #9a5363; font-size: 26px; }

.portal-project-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  color: #675b60;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.portal-project-status::before { width: 7px; height: 7px; border-radius: 50%; background: #9aa1a8; content: ""; }
.portal-project-status--shooting::before { background: #dc8a2c; }
.portal-project-status--processing::before { background: #467fb8; }
.portal-project-status--ready::before { background: #2d9a6d; }
.portal-project-status--archive::before { background: #797d83; }

.portal-project-detail {
  min-width: 0;
  border: 1px solid #dce1e4;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.portal-project-hero {
  position: relative;
  display: flex;
  min-height: 190px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  background: #f4edef;
  isolation: isolate;
}
.portal-project-hero.has-cover::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--project-cover) center 42% / cover no-repeat;
  content: "";
}
.portal-project-hero.has-cover::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(24, 15, 18, .82), rgba(24, 15, 18, .24));
  content: "";
}
.portal-project-hero.has-cover .portal-project-hero-copy h2,
.portal-project-hero.has-cover .portal-project-hero-copy p,
.portal-project-hero.has-cover .portal-project-status { color: #fff; }
.portal-project-hero-copy { max-width: 720px; }
.portal-project-hero-copy h2 { margin-top: 10px; font-size: 34px; }
.portal-project-hero-copy p { margin: 9px 0 0; color: #655c61; line-height: 1.55; }
.portal-project-download {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border-radius: 7px;
  color: #fff;
  background: #91384e;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(55, 21, 30, .2);
}
.portal-project-download span { font-size: 20px; }

.portal-project-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid #e4e7e9;
}
.portal-project-meta div { padding: 16px 20px; }
.portal-project-meta div + div { border-left: 1px solid #e4e7e9; }
.portal-project-meta dt { color: #7a8188; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.portal-project-meta dd { margin: 5px 0 0; color: #2c2225; font-weight: 700; }

.portal-project-gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 14px;
}
.portal-project-gallery-heading h3 { font-size: 24px; }
.portal-project-selection { display: flex; gap: 14px; color: #707780; font-size: 12px; }
.portal-project-selection strong { color: #91384e; }

.portal-project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px 26px;
}
.portal-project-file {
  min-width: 0;
  border: 1px solid #e0e3e5;
  border-radius: 7px;
  overflow: hidden;
  background: #f8f9f9;
}
.portal-project-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: #e9ecee;
}
.portal-project-preview img { width: 100%; height: 100%; object-fit: cover; }
.portal-project-video { display: block; width: 100%; aspect-ratio: 4 / 3; background: #111; }
.portal-project-document {
  display: grid;
  min-height: 170px;
  place-content: center;
  gap: 10px;
  padding: 18px;
  color: #403539;
  text-align: center;
  text-decoration: none;
}
.portal-project-document > span { color: #a34359; font: 800 24px/1 sans-serif; }
.portal-project-document strong { overflow-wrap: anywhere; }
.portal-project-file > footer { display: flex; gap: 8px; justify-content: space-between; padding: 9px 10px; }
.portal-project-file > footer > span { overflow: hidden; color: #343033; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.portal-project-file > footer small { flex: 0 0 auto; color: #8a9096; font-size: 10px; }
.portal-project-file .portal-proofing { margin: 0 9px 10px; }

.portal-project-empty,
.portal-projects-empty,
.portal-project-locked {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 48px 22px;
  color: #707780;
  text-align: center;
}
.portal-projects-empty { grid-column: 1 / -1; border: 1px dashed #cbd1d5; border-radius: 8px; background: #fff; }
.portal-project-empty { grid-column: 1 / -1; }
.portal-project-locked { margin: 22px; border: 1px solid #ead6db; border-radius: 7px; background: #fff7f9; }
.portal-project-empty strong,
.portal-projects-empty strong,
.portal-project-locked strong { color: #33282c; font-family: Georgia, serif; font-size: 20px; }
.portal-project-empty span,
.portal-projects-empty p,
.portal-project-locked p { margin: 0; }
.portal-project-link { color: #91384e; font-weight: 800; }

.portal-chat-panel > .portal-chat {
  width: min(1180px, 100%);
  height: calc(100dvh - 156px);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .portal-cabinet { padding: 12px; }
  .portal-projects-panel { grid-template-columns: 1fr; }
  .portal-projects-intro { display: grid; padding: 20px; }
  .portal-projects-summary { width: 100%; }
  .portal-projects-summary div { min-width: 0; flex: 1; }
  .portal-project-list { display: flex; position: static; overflow-x: auto; scroll-snap-type: x mandatory; }
  .portal-project-card { min-width: 260px; scroll-snap-align: start; }
  .portal-project-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-project-meta div:nth-child(3) { border-left: 0; border-top: 1px solid #e4e7e9; }
  .portal-project-meta div:nth-child(4) { border-top: 1px solid #e4e7e9; }
}

@media (max-width: 600px) {
  .portal-cabinet { min-height: calc(100dvh - 60px); padding: 8px 0 0; }
  .portal-cabinet-nav { width: calc(100% - 20px); margin-bottom: 8px; }
  .portal-cabinet-nav a { min-width: 0; flex: 1; }
  .portal-projects-panel { gap: 8px; }
  .portal-projects-intro { border-inline: 0; border-radius: 0; }
  .portal-projects-intro h1 { font-size: 28px; }
  .portal-projects-intro > div > p:last-child { font-size: 13px; }
  .portal-project-list { padding: 0 10px; }
  .portal-project-card { min-width: 242px; }
  .portal-project-detail { border-inline: 0; border-radius: 0; }
  .portal-project-hero { min-height: 230px; align-items: end; padding: 20px; }
  .portal-project-hero-copy h2 { font-size: 28px; }
  .portal-project-download { position: absolute; right: 14px; bottom: 14px; min-height: 40px; padding-inline: 13px; }
  .portal-project-hero-copy { padding-bottom: 48px; }
  .portal-project-gallery-heading { display: grid; padding: 19px 12px 11px; }
  .portal-project-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 0 4px 14px; }
  .portal-project-file { border-radius: 4px; }
  .portal-project-file > footer { display: none; }
  .portal-project-file .portal-proofing { margin: 4px; }
  .portal-project-selection { justify-content: space-between; }
  .portal-chat-panel > .portal-chat { height: calc(100dvh - 116px); border-radius: 0; }
}
