:root {
  --bg: #07101b;
  --surface: #0e1a2b;
  --surface-2: #14243b;
  --text: #f3f7fd;
  --muted: #93a3bb;
  --line: rgba(255,255,255,.11);
  --accent: #697cff;
  --success: #28c58b;
  --warning: #f0a44c;
  --danger: #f06a73;
  --shadow: 0 24px 70px rgba(0,0,0,.35);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --text: #172034;
  --muted: #69778b;
  --line: rgba(23,32,52,.12);
  --shadow: 0 20px 60px rgba(35,49,75,.13);
  color-scheme: light;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(
      circle at 75% 0%,
      color-mix(in srgb,var(--accent) 15%,transparent),
      transparent 32%
    ),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 750;
  transition: transform .16s ease, border-color .16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb,var(--accent) 55%,var(--line));
}

button.primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.topbar-link {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 14px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.topbar-link:hover {
  border-color:
    color-mix(in srgb,var(--accent) 55%,var(--line));
}

button.danger {
  color: var(--danger);
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px
    color-mix(in srgb,var(--accent) 16%,transparent);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.spacer {
  flex: 1;
}

.message {
  min-height: 24px;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 11px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 950;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-lockup strong {
  display: block;
}

.brand-lockup span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.brand-lockup.compact .logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.fatal {
  max-width: 650px;
  margin: 80px auto;
  padding: 28px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
}

.auth-story {
  min-height: 100vh;
  padding: clamp(38px,7vw,90px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(
      180deg,
      rgba(3,7,14,.12),
      rgba(3,7,14,.92)
    ),
    radial-gradient(
      circle at 34% 24%,
      color-mix(in srgb,var(--accent) 58%,#16345c),
      transparent 40%
    ),
    #06101f;
}

.security-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  color: #c2cde0;
}

.auth-story h1 {
  font-size: clamp(43px,6vw,82px);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 18px 0 22px;
  max-width: 900px;
}

.auth-story p {
  max-width: 700px;
  color: #aebdd2;
  font-size: 18px;
  line-height: 1.65;
}

.security-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.security-grid span {
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 11px;
}

.auth-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 26px;
  background: #0a1220;
}

.auth-card {
  width: min(410px,100%);
}

.auth-card h2 {
  margin: 42px 0 6px;
  font-size: 30px;
}

.auth-switch-button {
  width: 100%;
  margin: 4px 0 18px;
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.auth-consent-label {
  grid-template-columns: 18px 1fr;
  align-items: start;
  margin: 4px 0 14px;
  line-height: 1.5;
}

.auth-consent-label input {
  width: 16px;
  margin-top: 2px;
}

.auth-consent-label a {
  color: var(--accent);
}

.auth-card form {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.auth-form-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.auth-text-button {
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--accent) 82%, white);
  padding: 3px 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 850;
}

.auth-text-button:hover:not(:disabled) {
  transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-text-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.auth-card small {
  color: var(--muted);
  font-size: 9px;
}

.auth-status-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 20px;
  background:
    radial-gradient(
      circle at 50% 0%,
      color-mix(in srgb, var(--accent) 20%, transparent),
      transparent 38%
    ),
    linear-gradient(180deg, #081221, var(--bg));
}

.auth-status-shell {
  width: min(520px, 100%);
  display: grid;
  gap: 18px;
}

.auth-status-brand {
  justify-content: center;
}

.auth-status-card {
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--surface) 96%, white 4%),
      var(--surface)
    );
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-status-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 22px;
  border: 1px solid
    color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 21px;
  display: grid;
  place-items: center;
  background:
    color-mix(in srgb, var(--accent) 14%, var(--surface-2));
  color: color-mix(in srgb, var(--accent) 82%, white);
  font-size: 28px;
  font-weight: 950;
}

.auth-status-card[data-status="processing"]
  .auth-status-icon::before {
  content: "";
  width: 25px;
  height: 25px;
  border: 3px solid
    color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: auth-status-spin .85s linear infinite;
}

.auth-status-card[data-status="success"]
  .auth-status-icon {
  border-color:
    color-mix(in srgb, var(--success) 45%, var(--line));
  background:
    color-mix(in srgb, var(--success) 14%, var(--surface-2));
  color: var(--success);
}

.auth-status-card[data-status="error"]
  .auth-status-icon {
  border-color:
    color-mix(in srgb, var(--danger) 45%, var(--line));
  background:
    color-mix(in srgb, var(--danger) 12%, var(--surface-2));
  color: var(--danger);
}

.auth-status-card h1 {
  margin: 11px 0 10px;
  font-size: clamp(30px, 7vw, 42px);
  letter-spacing: -.04em;
}

.auth-status-description {
  margin: 0 auto;
  max-width: 410px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.auth-email-chip {
  width: fit-content;
  max-width: 100%;
  margin: 18px auto 0;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.auth-status-steps {
  display: grid;
  gap: 10px;
  margin: 26px 0 20px;
  text-align: left;
}

.auth-status-steps > div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.auth-status-steps strong {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background:
    color-mix(in srgb, var(--accent) 15%, var(--surface-2));
  color: var(--text);
  font-size: 10px;
}

.auth-status-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  text-align: left;
}

.auth-status-form > button,
.auth-status-primary {
  width: 100%;
}

.auth-status-message {
  min-height: 18px;
  margin: 0;
  text-align: center;
}

.auth-status-message.danger {
  color: var(--danger);
}

.auth-status-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}

.auth-status-help {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.auth-status-shell > small {
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

@keyframes auth-status-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  .auth-status-page {
    align-items: start;
    padding: 22px 14px;
  }

  .auth-status-card {
    border-radius: 20px;
  }

  .auth-status-actions {
    align-items: center;
    flex-direction: column;
    gap: 2px;
  }
}

.topbar {
  height: 70px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background:
    color-mix(in srgb,var(--bg) 88%,transparent);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.security-status {
  color: var(--success);
  font-size: 10px;
  font-weight: 850;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 270px minmax(0,1fr);
  min-height: calc(100vh - 70px);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 17px 13px;
  background:
    color-mix(in srgb,var(--surface) 76%,transparent);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-card {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
}

.studio-card strong,
.studio-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-card span {
  color: var(--muted);
  font-size: 10px;
}

.nav-button {
  text-align: left;
  background: transparent;
}

.nav-button.active {
  background:
    color-mix(in srgb,var(--accent) 17%,transparent);
}

.gallery-list {
  display: grid;
  gap: 6px;
  overflow: auto;
}

.gallery-item {
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
}

.gallery-item:hover,
.gallery-item.active {
  background: var(--surface-2);
  border-color: var(--line);
}

.gallery-item strong {
  display: block;
  font-size: 12px;
}

.gallery-item span {
  color: var(--muted);
  font-size: 10px;
}

.security-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  background: var(--surface-2);
}

.security-note strong,
.security-note span {
  display: block;
}

.security-note strong {
  margin-bottom: 8px;
  font-size: 11px;
}

.security-note span {
  color: var(--muted);
  font-size: 9px;
  margin: 4px 0;
}

.content {
  padding: 24px;
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.overview {
  display: grid;
  gap: 16px;
}

.hero-card {
  padding: 28px;
  min-height: 230px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "🔒";
  position: absolute;
  right: 28px;
  top: 15px;
  font-size: 120px;
  opacity: .06;
}

.hero-card h1 {
  font-size: clamp(30px,4vw,50px);
  letter-spacing: -.045em;
  margin: 16px 0 10px;
  max-width: 800px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
}

.stat {
  padding: 17px;
}

.stat strong {
  display: block;
  font-size: 30px;
  margin: 13px 0 4px;
}

.stat span {
  color: var(--muted);
  font-size: 10px;
}

.workspace-hero {
  min-height: 260px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.workspace-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.58);
}

.workspace-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(3,7,14,.93)
    );
}

.workspace-hero-content {
  position: relative;
  z-index: 2;
  padding: 26px;
  width: 100%;
}

.workspace-hero h1 {
  font-size: 45px;
  letter-spacing: -.045em;
  margin: 10px 0 5px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.event-list {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.event-card {
  padding: 17px;
}

.event-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.event-header strong {
  display: block;
}

.event-header span {
  color: var(--muted);
  font-size: 10px;
}

.photo-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 125px;
  gap: 8px;
  overflow: auto;
  margin-top: 12px;
}

.photo-mini {
  height: 92px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}

.photo-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-mini button {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 5px 7px;
  font-size: 9px;
  background: rgba(4,9,18,.78);
  color: white;
}

.upload-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

progress {
  width: 100%;
  height: 14px;
  accent-color: var(--accent);
}

dialog {
  width: min(540px,calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0,0,0,.70);
  backdrop-filter: blur(5px);
}

.dialog-body {
  padding: 22px;
  display: grid;
  gap: 14px;
}

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

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 300;
  max-width: 430px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.toast.danger {
  color: var(--danger);
}

.gallery-access {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.access-card {
  width: min(430px,100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.lock-icon {
  font-size: 44px;
  margin-bottom: 16px;
}

.access-card form {
  display: grid;
  gap: 14px;
  text-align: left;
  margin: 22px 0;
}

.access-card small {
  color: var(--muted);
  font-size: 9px;
}

.gallery-header {
  min-height: 70px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background:
    color-mix(in srgb,var(--bg) 86%,transparent);
  backdrop-filter: blur(18px);
}

.gallery-header strong,
.gallery-header span {
  display: block;
}

.gallery-header span {
  color: var(--muted);
  font-size: 10px;
}

.session-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
}

.gallery-root {
  width: min(1550px,100%);
  margin: auto;
  padding: 20px;
}

.client-hero {
  min-height: 360px;
  border-radius: 25px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  background: var(--surface-2);
}

.client-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.60);
}

.client-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(3,7,14,.94)
    );
}

.client-hero-content {
  position: relative;
  z-index: 2;
  padding: 32px;
}

.client-hero h1 {
  font-size: clamp(36px,6vw,72px);
  letter-spacing: -.055em;
  margin: 8px 0 5px;
}

.event-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 17px 0 12px;
  position: sticky;
  top: 70px;
  z-index: 20;
  background:
    color-mix(in srgb,var(--bg) 91%,transparent);
}

.event-tab.active {
  background: var(--accent);
  color: white;
}

.selection-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 12px;
}

.photo-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fill,minmax(220px,1fr));
  gap: 9px;
}

.gallery-photo {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface-2);
  cursor: zoom-in;
}

.gallery-photo.selected {
  border-color: var(--accent);
}

.gallery-photo img {
  width: 100%;
  display: block;
}

.select-circle {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  padding: 0;
  background: rgba(4,9,18,.80);
  color: white;
  border: 2px solid rgba(255,255,255,.78);
}

.gallery-photo.selected .select-circle {
  background: var(--accent);
}

.load-more {
  display: block;
  margin: 18px auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2,5,11,.97);
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
}

.lightbox header,
.lightbox footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.lightbox-image {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
}

.lightbox-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 58px;
}

.nav-arrow.previous {
  left: 12px;
}

.nav-arrow.next {
  right: 12px;
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 420px;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .gallery-list {
    display: flex;
    overflow: auto;
  }

  .gallery-item {
    min-width: 200px;
  }

  .security-note {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 560px) {
  .auth-story {
    min-height: 350px;
    padding: 28px 22px;
  }

  .auth-story h1 {
    font-size: 44px;
  }

  .content,
  .gallery-root {
    padding: 12px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 6px;
  }

  .selection-bar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
/* EasyImage Cloud v1.1 access and gallery-layout corrections */

.content {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
}

.workspace-hero-content {
  max-width: 1180px;
}

.secure-link-card {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 6px;
  margin: 0 26px 24px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 11, 22, .72);
  backdrop-filter: blur(12px);
}

.secure-link-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.secure-link-card code {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.photo-strip {
  grid-auto-flow: initial;
  grid-auto-columns: initial;
  grid-template-columns:
    repeat(auto-fill, minmax(112px, 1fr));
  max-height: 330px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.inline-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.inline-check input {
  width: auto;
  accent-color: var(--accent);
}

.access-warning {
  border: 1px solid
    color-mix(in srgb, var(--warning) 48%, var(--line));
  border-radius: 11px;
  padding: 10px 12px;
  background:
    color-mix(in srgb, var(--warning) 10%, transparent);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .secure-link-card {
    margin: 0 16px 18px;
  }

  .photo-strip {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}
/* ============================================================
   EasyImage Cloud v1.2 — Professional client gallery
   ============================================================ */

body.viewer-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.gallery-root {
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: clamp(12px, 1.5vw, 24px);
}

.client-hero {
  min-height: clamp(230px, 31vh, 340px);
  border-radius: 24px;
  isolation: isolate;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, .24);
}

.client-hero img {
  transform: scale(1.01);
  filter:
    brightness(.57)
    saturate(.92);
}

.client-hero::after {
  background:
    linear-gradient(
      90deg,
      rgba(3, 7, 14, .92) 0%,
      rgba(3, 7, 14, .55) 50%,
      rgba(3, 7, 14, .20) 100%
    ),
    linear-gradient(
      180deg,
      transparent 25%,
      rgba(3, 7, 14, .92) 100%
    );
}

.client-hero-content {
  max-width: 920px;
  padding:
    clamp(22px, 4vw, 46px);
}

.client-hero-content p {
  color: rgba(238, 243, 255, .78);
  margin: 0;
}

.client-hero h1 {
  max-width: 950px;
  font-size:
    clamp(38px, 5.4vw, 76px);
}

.security-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.security-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 0 14px currentColor;
}

.event-tabs {
  top: 70px;
  gap: 9px;
  padding: 14px 0 11px;
  scrollbar-width: none;
}

.event-tabs::-webkit-scrollbar {
  display: none;
}

.event-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.event-complete {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .20);
  font-size: 10px;
}

.selection-bar {
  position: sticky;
  top: 125px;
  z-index: 18;
  min-height: 72px;
  margin-bottom: 14px;
  padding: 12px 15px;
  border-color:
    color-mix(
      in srgb,
      var(--line) 78%,
      transparent
    );
  background:
    color-mix(
      in srgb,
      var(--surface) 91%,
      transparent
    );
  backdrop-filter:
    blur(18px) saturate(1.25);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, .16);
}

.selection-bar.locked {
  border-color:
    color-mix(
      in srgb,
      var(--success) 30%,
      var(--line)
    );
}

.selection-copy {
  min-width: 0;
}

.selection-copy strong,
.selection-copy span {
  display: block;
}

.selection-copy strong {
  font-size: 14px;
}

.selection-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.selection-count {
  display: flex;
  align-items: baseline;
  min-width: 72px;
  justify-content: flex-end;
}

.selection-count strong {
  font-size: 19px;
}

.selection-count span {
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}

/* Real responsive masonry: mixed orientations no longer
   create blank blocks or stretched rows. */
.photo-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(
        clamp(170px, 16vw, 245px),
        1fr
      )
    );
  grid-auto-flow: dense;
  grid-auto-rows: 8px;
  align-items: start;
  gap: 10px;
}

.gallery-photo {
  position: relative;
  min-width: 0;
  min-height: 130px;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
  cursor: zoom-in;
  contain: layout paint;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, .18);
  transition:
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.gallery-photo:hover {
  transform: translateY(-2px);
  box-shadow:
    0 15px 36px rgba(0, 0, 0, .27);
}

.gallery-photo.selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px
      color-mix(
        in srgb,
        var(--accent) 70%,
        transparent
      ),
    0 15px 36px rgba(0, 0, 0, .25);
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 1;
  transition:
    opacity .25s ease,
    transform .35s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-photo:hover img {
  transform: scale(1.018);
}

.gallery-photo.is-loading img {
  opacity: 0;
}

.photo-shimmer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      110deg,
      var(--surface-2) 20%,
      color-mix(
        in srgb,
        var(--surface-2) 62%,
        white
      ) 36%,
      var(--surface-2) 52%
    );
  background-size: 220% 100%;
  animation:
    easyimage-shimmer 1.25s linear infinite;
}

.gallery-photo:not(.is-loading)
.photo-shimmer {
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.gallery-photo.image-error
.photo-shimmer {
  opacity: 1;
  animation: none;
}

.photo-hover-label {
  position: absolute;
  z-index: 2;
  left: 9px;
  right: 54px;
  bottom: 8px;
  overflow: hidden;
  color: white;
  font-size: 9px;
  font-weight: 700;
  opacity: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(4px);
  transition:
    opacity .18s ease,
    transform .18s ease;
  text-shadow:
    0 1px 5px rgba(0, 0, 0, .95);
}

.gallery-photo::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 35%;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(
      transparent,
      rgba(0, 0, 0, .65)
    );
  transition: opacity .18s ease;
}

.gallery-photo:hover::after,
.gallery-photo:hover
.photo-hover-label {
  opacity: 1;
}

.gallery-photo:hover
.photo-hover-label {
  transform: translateY(0);
}

.select-circle {
  z-index: 4;
  right: 9px;
  top: 9px;
  width: 36px;
  height: 36px;
  border-width: 2px;
  box-shadow:
    0 5px 16px rgba(0, 0, 0, .28);
  cursor: pointer;
}

.select-circle:disabled {
  cursor: default;
  opacity: .92;
}

.gallery-skeleton-grid {
  pointer-events: none;
}

.gallery-skeleton {
  min-height: 155px;
  border-radius: 14px;
  background:
    linear-gradient(
      110deg,
      var(--surface-2) 20%,
      color-mix(
        in srgb,
        var(--surface-2) 62%,
        white
      ) 36%,
      var(--surface-2) 52%
    );
  background-size: 220% 100%;
  aspect-ratio:
    var(--skeleton-ratio, 1.5);
  animation:
    easyimage-shimmer 1.25s linear infinite;
}

@keyframes easyimage-shimmer {
  to {
    background-position-x: -220%;
  }
}

.gallery-empty-state {
  display: grid;
  min-height: 310px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background:
    color-mix(
      in srgb,
      var(--surface) 72%,
      transparent
    );
}

.gallery-empty-state strong {
  color: var(--text);
  font-size: 17px;
}

.gallery-empty-state span {
  max-width: 480px;
  line-height: 1.55;
}

.gallery-empty-state button {
  margin-top: 10px;
}

.load-more {
  min-width: 210px;
  margin: 24px auto 4px;
}

/* Sealed fullscreen viewer. The underlying page can no longer
   scroll or show through the toolbar/footer. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows:
    minmax(62px, auto)
    minmax(0, 1fr)
    minmax(72px, auto);
  color: #f7f9ff;
  background: #02050b;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.lightbox-toolbar,
.lightbox-actions {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding:
    11px
    max(16px, env(safe-area-inset-right))
    11px
    max(16px, env(safe-area-inset-left));
  background:
    rgba(4, 8, 16, .98);
  backdrop-filter:
    blur(18px) saturate(1.25);
}

.lightbox-toolbar {
  border-bottom:
    1px solid rgba(255, 255, 255, .10);
}

.lightbox-actions {
  justify-content: space-between;
  border-top:
    1px solid rgba(255, 255, 255, .10);
  padding-bottom:
    max(
      11px,
      env(safe-area-inset-bottom)
    );
}

.lightbox-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.lightbox-title strong {
  max-width: min(56vw, 760px);
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-title span,
.lightbox-hint {
  color: rgba(236, 241, 255, .63);
  font-size: 9px;
}

.lightbox-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.lightbox-position {
  color: rgba(244, 247, 255, .78);
  font-size: 11px;
  font-weight: 700;
}

.lightbox-close {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
}

.lightbox-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns:
    66px
    minmax(0, 1fr)
    66px;
  align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(47, 62, 91, .18),
      transparent 48%
    ),
    #02050b;
}

.lightbox-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 12px;
}

.lightbox-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  opacity: 1;
  transition: opacity .18s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox.is-loading
.lightbox-media img {
  opacity: .16;
}

.lightbox-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  pointer-events: none;
}

.lightbox.is-loading
.lightbox-loader {
  display: grid;
}

.lightbox-loader span {
  width: 38px;
  height: 38px;
  border:
    3px solid rgba(255, 255, 255, .18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation:
    easyimage-spin .75s linear infinite;
}

@keyframes easyimage-spin {
  to {
    transform: rotate(360deg);
  }
}

.nav-arrow {
  position: static;
  width: 48px;
  height: 64px;
  align-self: center;
  justify-self: center;
  transform: none;
  padding: 0;
  border-radius: 15px;
  color: white;
  background:
    rgba(14, 25, 45, .92);
  font-size: 32px;
  line-height: 1;
}

.nav-arrow.previous,
.nav-arrow.next {
  left: auto;
  right: auto;
}

.nav-arrow:hover {
  border-color: var(--accent);
  background:
    color-mix(
      in srgb,
      var(--accent) 25%,
      rgba(14, 25, 45, .94)
    );
}

.lightbox-actions > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lightbox-actions strong {
  font-size: 12px;
}

#lightboxSelect.selected {
  background:
    color-mix(
      in srgb,
      var(--accent) 30%,
      #22142f
    );
  border-color: var(--accent);
}

@media (max-width: 900px) {
  .client-hero {
    min-height: 260px;
  }

  .selection-bar {
    top: 123px;
  }

  .photo-grid {
    grid-template-columns:
      repeat(
        auto-fill,
        minmax(165px, 1fr)
      );
    gap: 8px;
  }

  .lightbox-stage {
    grid-template-columns:
      54px
      minmax(0, 1fr)
      54px;
  }

  .nav-arrow {
    width: 42px;
    height: 58px;
  }
}

@media (max-width: 620px) {
  .gallery-header {
    padding-inline: 12px;
  }

  .gallery-header > div:nth-child(2)
  span {
    display: none;
  }

  .session-badge {
    display: none !important;
  }

  .gallery-root {
    padding: 10px;
  }

  .client-hero {
    min-height: 220px;
    border-radius: 18px;
  }

  .client-hero-content {
    padding: 22px 18px;
  }

  .client-hero h1 {
    font-size: clamp(34px, 12vw, 52px);
  }

  .event-tabs {
    top: 65px;
    padding-top: 11px;
  }

  .selection-bar {
    position: relative;
    top: auto;
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .selection-actions {
    width: 100%;
    margin-left: 0;
  }

  .selection-count {
    justify-content: flex-start;
  }

  .selection-actions button {
    margin-left: auto;
  }

  .photo-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    grid-auto-rows: 6px;
    gap: 6px;
  }

  .gallery-photo {
    min-height: 100px;
    border-radius: 10px;
  }

  .select-circle {
    top: 6px;
    right: 6px;
    width: 33px;
    height: 33px;
  }

  .photo-hover-label {
    display: none;
  }

  .lightbox {
    grid-template-rows:
      auto
      minmax(0, 1fr)
      auto;
  }

  .lightbox-toolbar {
    padding: 9px 10px;
  }

  .lightbox-title strong {
    max-width: 52vw;
  }

  .lightbox-hint {
    display: none;
  }

  .lightbox-stage {
    grid-template-columns:
      44px
      minmax(0, 1fr)
      44px;
  }

  .lightbox-media {
    padding: 6px;
  }

  .nav-arrow {
    width: 38px;
    height: 52px;
    border-radius: 12px;
    font-size: 27px;
  }

  .lightbox-actions {
    gap: 10px;
    padding: 9px 10px;
  }

  .lightbox-actions strong {
    font-size: 10px;
  }

  #lightboxSelect {
    min-height: 40px;
    padding-inline: 12px;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-photo,
  .gallery-photo img,
  .photo-hover-label,
  .photo-shimmer,
  .gallery-skeleton,
  .lightbox-loader span {
    animation: none !important;
    transition: none !important;
  }
}
/* ============================================================
   EasyImage Cloud v1.3 — portrait display and admin controls
   ============================================================ */

/* Studio settings permanently lives in the left navigation. */
#studioSettingsSidebarButton {
  margin-bottom: 10px;
}

/* Event settings and submitted-selection status. */
.event-title-block {
  min-width: 0;
}

.event-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.event-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.event-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: .02em;
}

.event-status-chip.open {
  color: var(--success);
  border-color:
    color-mix(
      in srgb,
      var(--success) 38%,
      var(--line)
    );
  background:
    color-mix(
      in srgb,
      var(--success) 9%,
      transparent
    );
}

.event-status-chip.locked {
  color: var(--warning);
  border-color:
    color-mix(
      in srgb,
      var(--warning) 40%,
      var(--line)
    );
  background:
    color-mix(
      in srgb,
      var(--warning) 10%,
      transparent
    );
}

.event-card.event-submitted {
  border-color:
    color-mix(
      in srgb,
      var(--warning) 24%,
      var(--line)
    );
}

.submitted-selection-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid
    color-mix(
      in srgb,
      var(--warning) 38%,
      var(--line)
    );
  border-radius: 13px;
  background:
    color-mix(
      in srgb,
      var(--warning) 8%,
      transparent
    );
}

.submitted-selection-panel > div {
  display: grid;
  gap: 4px;
}

.submitted-selection-panel span,
.submitted-selection-panel small {
  color: var(--muted);
  line-height: 1.5;
}

.reset-selection-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  margin: 0;
  color: var(--text);
}

.reset-selection-control input {
  width: auto;
  margin-top: 2px;
  accent-color: var(--warning);
}

/* Admin preview thumbnails show the entire image.
   Portrait photographs are no longer centre-cropped. */
.photo-strip {
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(128px, 1fr)
    ) !important;
  align-items: start;
}

.photo-mini {
  width: 100%;
  height: auto !important;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #030711;
}

.photo-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  background: #030711;
}

/* Client masonry cards use the calculated photo aspect.
   Object-fit contain guarantees the complete portrait remains visible. */
.gallery-photo {
  background: #02050b;
}

.gallery-photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #02050b;
}

/* Robust fullscreen fitting:
   the media box has an explicit size and the image uses object-fit contain.
   No portrait or landscape photograph can extend under the toolbars. */
.lightbox-stage {
  min-height: 0 !important;
  height: 100% !important;
}

.lightbox-media {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding:
    clamp(8px, 1.35vw, 20px) !important;
  box-sizing: border-box;
}

.lightbox-media img,
#lightboxPhoto {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #02050b;
}

@media (max-width: 760px) {
  .event-header {
    flex-direction: column;
  }

  .event-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .event-actions button {
    flex: 1 1 145px;
  }

  .photo-strip {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      ) !important;
  }
}

/* ============================================================
   EasyImage Cloud v2.5 — studio storage quota visibility
   ============================================================ */

.storage-usage-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  padding: clamp(20px, 2.4vw, 30px);
  border-color:
    color-mix(in srgb, var(--accent) 20%, var(--line));
}

.storage-usage-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--success);
}

.storage-usage-card.storage-state-warning::before {
  background: var(--warning);
}

.storage-usage-card.storage-state-critical::before,
.storage-usage-card.storage-state-full::before {
  background: var(--danger);
}

.storage-usage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.storage-usage-header > div {
  max-width: 760px;
}

.storage-usage-header h2 {
  margin: 6px 0 7px;
  font-size: clamp(22px, 2.5vw, 34px);
  letter-spacing: -.035em;
}

.storage-usage-header p {
  margin: 0;
  line-height: 1.55;
}

.storage-usage-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid
    color-mix(in srgb, var(--success) 36%, var(--line));
  border-radius: 999px;
  background:
    color-mix(in srgb, var(--success) 9%, transparent);
  color: var(--success);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.storage-usage-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px
    color-mix(in srgb, currentColor 12%, transparent);
}

.storage-state-warning .storage-usage-status {
  border-color:
    color-mix(in srgb, var(--warning) 42%, var(--line));
  background:
    color-mix(in srgb, var(--warning) 10%, transparent);
  color: var(--warning);
}

.storage-state-critical .storage-usage-status,
.storage-state-full .storage-usage-status {
  border-color:
    color-mix(in srgb, var(--danger) 42%, var(--line));
  background:
    color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
}

.storage-usage-numbers {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.storage-used-amount,
.storage-remaining-amount {
  display: grid;
  gap: 4px;
}

.storage-used-amount strong {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.055em;
}

.storage-remaining-amount {
  text-align: right;
}

.storage-remaining-amount strong {
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -.04em;
}

.storage-used-amount span,
.storage-remaining-amount span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.storage-meter-shell {
  display: grid;
  gap: 8px;
}

.storage-meter-track {
  position: relative;
  height: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.storage-meter-used,
.storage-meter-reserved {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 0;
}

.storage-meter-used {
  left: 0;
  background:
    linear-gradient(90deg, var(--accent), #8796ff);
}

.storage-meter-reserved {
  background:
    repeating-linear-gradient(
      135deg,
      var(--warning) 0 7px,
      color-mix(in srgb, var(--warning) 65%, #fff) 7px 12px
    );
}

.storage-state-critical .storage-meter-used,
.storage-state-full .storage-meter-used {
  background:
    linear-gradient(90deg, var(--accent), var(--danger));
}

.storage-meter-labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.storage-usage-footer {
  display: grid;
  grid-template-columns:
    minmax(160px, .9fr)
    minmax(160px, .8fr)
    minmax(250px, 1.25fr);
  gap: 12px;
}

.storage-usage-fact,
.storage-usage-actions {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.storage-usage-fact {
  display: grid;
  gap: 5px;
}

.storage-usage-fact > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.storage-usage-fact > strong {
  font-size: 16px;
}

.storage-usage-fact small,
.storage-owner-note {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.storage-usage-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.storage-usage-actions button,
.storage-plan-link,
.storage-upgrade-link {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}

.storage-plan-link:hover {
  border-color:
    color-mix(in srgb, var(--accent) 55%, var(--line));
}

.storage-upgrade-link {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.storage-state-critical .storage-upgrade-link,
.storage-state-full .storage-upgrade-link {
  background: var(--danger);
}

.storage-refresh-error {
  margin: -6px 0 0;
  color: var(--warning);
  font-size: 10px;
}

.storage-loading {
  min-height: 220px;
  align-content: center;
}

.storage-loading-line {
  width: min(620px, 80%);
  height: 24px;
  border-radius: 8px;
  background:
    linear-gradient(
      90deg,
      var(--surface-2),
      color-mix(in srgb, var(--accent) 18%, var(--surface-2)),
      var(--surface-2)
    );
  background-size: 200% 100%;
  animation: storage-loading-shimmer 1.3s linear infinite;
}

.storage-loading-line.short {
  width: min(390px, 55%);
  height: 13px;
}

@keyframes storage-loading-shimmer {
  to { background-position: -200% 0; }
}

@media (max-width: 900px) {
  .storage-usage-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storage-usage-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .storage-usage-header,
  .storage-usage-numbers {
    align-items: flex-start;
    flex-direction: column;
  }

  .storage-remaining-amount {
    text-align: left;
  }

  .storage-usage-status {
    order: -1;
  }

  .storage-meter-labels {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .storage-usage-footer {
    grid-template-columns: 1fr;
  }

  .storage-usage-actions {
    grid-column: auto;
  }

  .storage-usage-actions button,
  .storage-plan-link,
  .storage-upgrade-link {
    flex: 1 1 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .storage-loading-line {
    animation: none;
  }
}

/* ============================================================
   EasyImage Cloud v2.2.1 — bounded gallery catalogue navigation
   ============================================================ */

@media (min-width: 901px) {
  #appView {
    height: 100dvh;
    overflow: hidden;
  }

  .dashboard-shell {
    height: calc(100dvh - 70px);
    min-height: 0;
  }

  .sidebar {
    min-height: 0;
    overflow: hidden;
  }

  .sidebar .gallery-list {
    flex: 1 1 160px;
    min-height: 96px;
    max-height: none;
    padding-right: 3px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .content {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.gallery-list {
  scrollbar-color:
    color-mix(in srgb, var(--accent) 55%, var(--line))
    transparent;
  scrollbar-width: thin;
}

.gallery-list::-webkit-scrollbar,
.overview-gallery-results::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.gallery-list::-webkit-scrollbar-thumb,
.overview-gallery-results::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    color-mix(in srgb, var(--accent) 55%, var(--line));
  background-clip: padding-box;
}

.overview-catalogue {
  padding: 19px;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.overview-catalogue-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.overview-catalogue-header > div:first-child {
  min-width: 0;
  max-width: 780px;
}

.overview-catalogue-header h2 {
  margin: 5px 0 7px;
  font-size: clamp(20px, 2vw, 29px);
}

.overview-catalogue-header p {
  margin: 0;
  max-width: 720px;
  line-height: 1.55;
}

.overview-lifecycle-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.overview-lifecycle-tabs button {
  min-width: 92px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
}

.overview-lifecycle-tabs button.active {
  border-color:
    color-mix(in srgb, var(--accent) 58%, var(--line));
  background:
    color-mix(in srgb, var(--accent) 15%, transparent);
}

.overview-lifecycle-tabs strong {
  color: var(--text);
  font-size: 11px;
}

.overview-catalogue-tools {
  display: grid;
  grid-template-columns:
    minmax(250px, 2fr)
    minmax(165px, .85fr)
    minmax(170px, .85fr)
    auto;
  align-items: end;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.overview-catalogue-tools label {
  min-width: 0;
  gap: 5px;
}

.overview-catalogue-tools label > span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.overview-catalogue-tools input,
.overview-catalogue-tools select,
.overview-catalogue-tools button {
  min-height: 42px;
}

.overview-retention-note {
  padding: 10px 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    color-mix(in srgb, var(--surface-2) 88%, transparent);
}

.overview-retention-note.state-active {
  border-color:
    color-mix(in srgb, var(--success) 36%, var(--line));
}

.overview-retention-note.state-archived {
  border-color:
    color-mix(in srgb, var(--warning) 42%, var(--line));
}

.overview-retention-note.state-trashed {
  border-color:
    color-mix(in srgb, var(--danger) 42%, var(--line));
}

.overview-retention-note strong {
  flex: 0 0 auto;
  font-size: 10px;
}

.overview-retention-note span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.overview-catalogue-summary,
.overview-catalogue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.overview-gallery-results {
  min-height: 210px;
  max-height: min(48dvh, 530px);
  padding-right: 4px;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color:
    color-mix(in srgb, var(--accent) 55%, var(--line))
    transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.overview-gallery-row {
  display: grid;
  grid-template-columns:
    minmax(230px, 1.35fr)
    minmax(165px, .8fr)
    minmax(260px, 1.3fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    color-mix(in srgb, var(--surface-2) 82%, transparent);
}

.overview-gallery-row:hover {
  border-color:
    color-mix(in srgb, var(--accent) 40%, var(--line));
}

.overview-gallery-open {
  min-width: 0;
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border-color: transparent;
  background: transparent;
}

.overview-gallery-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.overview-gallery-identity strong,
.overview-gallery-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-gallery-identity strong {
  font-size: 12px;
}

.overview-gallery-identity span,
.overview-gallery-facts span,
.overview-gallery-retention span {
  color: var(--muted);
  font-size: 9px;
}

.overview-gallery-facts,
.overview-gallery-retention {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.overview-gallery-facts strong,
.overview-gallery-retention strong {
  margin-right: 5px;
  color: var(--text);
  font-size: 9px;
}

.overview-gallery-retention {
  padding-left: 11px;
  border-left: 2px solid var(--line);
}

.overview-gallery-retention.state-active {
  border-color: var(--success);
}

.overview-gallery-retention.state-archived {
  border-color: var(--warning);
}

.overview-gallery-retention.state-trashed {
  border-color: var(--danger);
}

.overview-gallery-retention span {
  line-height: 1.45;
}

.overview-gallery-empty {
  min-height: 210px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.overview-gallery-empty strong {
  color: var(--text);
}

.overview-gallery-empty span {
  max-width: 420px;
  font-size: 10px;
  line-height: 1.5;
}

.overview-catalogue-footer {
  min-height: 35px;
}

.overview-catalogue-footer button {
  flex: 0 0 auto;
  padding: 8px 10px;
  font-size: 9px;
}

@media (max-width: 1180px) {
  .overview-catalogue-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-catalogue-tools {
    grid-template-columns:
      minmax(220px, 2fr)
      minmax(155px, 1fr)
      minmax(155px, 1fr);
  }

  .overview-catalogue-tools button {
    grid-column: 1 / -1;
  }

  .overview-gallery-row {
    grid-template-columns:
      minmax(220px, 1.4fr)
      minmax(165px, 1fr);
  }

  .overview-gallery-retention {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .sidebar .gallery-list {
    max-height: 96px;
    overscroll-behavior-x: contain;
  }

  .overview-gallery-results {
    max-height: min(58dvh, 520px);
  }
}

@media (max-width: 720px) {
  .overview-catalogue {
    padding: 13px;
  }

  .overview-lifecycle-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .overview-lifecycle-tabs button {
    flex: 1 0 96px;
  }

  .overview-catalogue-tools {
    grid-template-columns: 1fr;
  }

  .overview-catalogue-tools button {
    grid-column: auto;
  }

  .overview-retention-note,
  .overview-catalogue-summary,
  .overview-catalogue-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-gallery-row {
    grid-template-columns: 1fr;
  }

  .overview-gallery-retention {
    grid-column: auto;
  }

  .overview-catalogue-footer button {
    width: 100%;
  }
}

/* ============================================================
   EasyImage Cloud v2.2 — recoverable gallery lifecycle
   ============================================================ */

.lifecycle-filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.lifecycle-filter {
  min-width: 0;
  padding: 8px 7px;
  display: grid;
  gap: 3px;
  justify-items: start;
  background: transparent;
}

.lifecycle-filter span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.lifecycle-filter strong {
  font-size: 12px;
}

.lifecycle-filter.active {
  border-color:
    color-mix(in srgb, var(--accent) 55%, var(--line));
  background:
    color-mix(in srgb, var(--accent) 14%, transparent);
}

.gallery-catalogue-status {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.gallery-catalogue-status button {
  padding: 6px 8px;
  font-size: 9px;
}

.gallery-list-empty {
  padding: 12px 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.gallery-item-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.gallery-item-title strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-state-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.gallery-state-dot.state-active {
  background: var(--success);
}

.gallery-state-dot.state-archived {
  background: var(--warning);
}

.gallery-state-dot.state-trashed {
  background: var(--danger);
}

.lifecycle-banner {
  margin-top: 15px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 11, 22, .67);
  backdrop-filter: blur(12px);
}

:root[data-theme="light"] .lifecycle-banner {
  background: rgba(255, 255, 255, .78);
}

.lifecycle-banner.state-active {
  border-color:
    color-mix(in srgb, var(--success) 42%, var(--line));
}

.lifecycle-banner.state-archived {
  border-color:
    color-mix(in srgb, var(--warning) 42%, var(--line));
}

.lifecycle-banner.state-trashed {
  border-color:
    color-mix(in srgb, var(--danger) 48%, var(--line));
}

.lifecycle-banner > div:first-child {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}

.lifecycle-banner strong {
  font-size: 11px;
}

.lifecycle-banner span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.lifecycle-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.preview-page-control {
  margin-top: 12px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.preview-page-control span {
  min-width: 0;
  flex: 1;
  color: var(--muted);
  font-size: 9px;
}

.preview-page-control strong {
  color: var(--success);
  font-size: 9px;
}

.preview-page-control button {
  padding: 7px 9px;
  font-size: 9px;
}

.preview-empty-state {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.gallery-loading-state {
  min-height: 120px;
  display: grid;
  align-content: center;
}

@media (max-width: 900px) {
  .lifecycle-filter-tabs {
    grid-template-columns: repeat(3, minmax(115px, 1fr));
    overflow-x: auto;
  }

  .gallery-catalogue-status {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .lifecycle-banner,
  .preview-page-control {
    align-items: flex-start;
    flex-direction: column;
  }

  .lifecycle-actions,
  .lifecycle-actions button,
  .preview-page-control button {
    width: 100%;
  }
}

/* ============================================================
   EasyImage Cloud v1.4 — submitted selection and RAW export
   ============================================================ */

.submitted-selection-dialog {
  width: min(1380px, calc(100vw - 30px));
  max-width: none;
  height: min(900px, calc(100dvh - 30px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--text);
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, #171330), var(--surface));
  box-shadow: 0 34px 100px rgba(0, 0, 0, .48);
}

.submitted-selection-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.submitted-selection-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--line);
}

.submitted-selection-header > div { min-width: 0; }
.submitted-selection-header h2 { margin: 4px 0 5px; font-size: clamp(22px, 3vw, 34px); }
.secure-review-label { color: var(--success); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.dialog-close-button { width: 42px; height: 42px; margin-left: auto; padding: 0; border-radius: 50%; flex: 0 0 auto; }

.submission-metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
}

.submission-metadata-grid article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.submission-metadata-grid span { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .07em; }
.submission-metadata-grid strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.submitted-export-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.submitted-export-bar > div:first-child { min-width: 0; display: grid; gap: 4px; }
.submitted-export-bar span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.submitted-export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }

.submitted-selection-message {
  margin: 16px 24px 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.submitted-selection-grid {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  align-content: start;
  gap: 11px;
  padding: 18px 24px 24px;
  scrollbar-gutter: stable;
}

.submitted-photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .15);
}

.submitted-photo-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #02050b;
}

.submitted-photo-preview img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.submitted-order { position: absolute; top: 8px; left: 8px; min-width: 28px; height: 28px; display: grid; place-items: center; padding: 0 7px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: white; background: rgba(4,8,17,.82); backdrop-filter: blur(9px); font-size: 10px; font-weight: 900; }
.submitted-photo-info { min-width: 0; display: grid; gap: 5px; padding: 10px 11px 12px; }
.submitted-photo-info strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.submitted-photo-info span { color: var(--muted); font-size: 8px; line-height: 1.4; }
.submitted-preview-missing, .submitted-empty-state { color: var(--muted); text-align: center; }
.submitted-empty-state { grid-column: 1 / -1; min-height: 240px; display: grid; place-content: center; gap: 7px; padding: 28px; border: 1px dashed var(--line); border-radius: 16px; }
.submitted-empty-state strong { color: var(--text); }

.submitted-selection-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 95%, black);
}

.submitted-selection-footer > div:first-child { min-width: 0; display: grid; gap: 4px; }
.submitted-selection-footer span { color: var(--muted); font-size: 9px; }
.submitted-footer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
#reopenSubmittedSelectionButton { border-color: color-mix(in srgb, var(--warning) 46%, var(--line)); color: var(--warning); }

@media (max-width: 900px) {
  .submission-metadata-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submitted-export-bar, .submitted-selection-footer { align-items: flex-start; flex-direction: column; }
  .submitted-export-actions, .submitted-footer-actions { width: 100%; margin-left: 0; justify-content: flex-start; }
}

@media (max-width: 620px) {
  .submitted-selection-dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .submitted-selection-shell {
    min-height: 100%;
    height: auto;
    display: block;
  }

  .submitted-selection-header, .submission-metadata-grid, .submitted-export-bar, .submitted-selection-grid, .submitted-selection-footer { padding-left: 13px; padding-right: 13px; }
  .submission-metadata-grid { grid-template-columns: 1fr; }
  .submitted-selection-grid {
    min-height: auto;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .submitted-export-actions button, .submitted-footer-actions button { flex: 1 1 145px; }
}


/* ============================================================
   EasyImage Phase 2A — Team Management
   ============================================================ */

.dialog-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.team-role-hint {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    color-mix(in srgb, var(--accent) 7%, var(--surface-2));
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.invite-password-dialog {
  width: min(470px, calc(100% - 28px));
}

.auth-flow-dialog {
  width: min(500px, calc(100% - 28px));
}

.auth-flow-dialog .dialog-body {
  gap: 15px;
}

.auth-flow-dialog .security-label {
  margin-bottom: -5px;
}

.auth-flow-dialog .message {
  line-height: 1.55;
}

.team-page {
  display: grid;
  gap: 14px;
}

.team-hero {
  min-height: 210px;
  padding: 26px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  overflow: hidden;
  position: relative;
}

.team-hero::after {
  content: "TEAM";
  position: absolute;
  right: 22px;
  top: 4px;
  font-size: clamp(70px, 10vw, 145px);
  font-weight: 950;
  letter-spacing: -.08em;
  color:
    color-mix(in srgb, var(--accent) 9%, transparent);
  pointer-events: none;
}

.team-hero > div {
  position: relative;
  z-index: 2;
}

.team-hero > div:first-child {
  max-width: 780px;
}

.team-hero h1 {
  margin: 11px 0 7px;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: -.05em;
}

.team-hero-actions {
  margin-left: auto;
  min-width: 210px;
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.team-current-role {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
}

.team-current-role strong {
  color: var(--text);
}

.team-role-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.team-role-card {
  min-height: 135px;
  padding: 16px;
  box-shadow: none;
}

.team-role-card.current {
  border-color:
    color-mix(in srgb, var(--accent) 58%, var(--line));
  background:
    color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.team-role-card > span {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.team-role-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.team-directory {
  overflow: hidden;
}

.team-directory-header {
  padding: 19px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.team-directory-header h2 {
  margin: 4px 0 3px;
}

.team-directory-header button {
  margin-left: auto;
}

.team-member-list {
  display: grid;
}

.team-member-row {
  min-width: 0;
  display: grid;
  grid-template-columns:
    44px
    minmax(200px, 1.35fr)
    110px
    minmax(250px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.team-member-row:last-child {
  border-bottom: 0;
}

.team-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background:
    color-mix(in srgb, var(--accent) 22%, var(--surface-2));
  color: var(--text);
  font-size: 10px;
  font-weight: 950;
}

.team-member-identity {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.team-member-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.team-member-name-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-identity > span {
  color: var(--muted);
  font-size: 9px;
}

.team-you-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  background:
    color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
  font-size: 8px;
  font-weight: 900;
}

.team-role-badge {
  justify-self: start;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}

.role-owner {
  color: var(--warning);
}

.role-admin {
  color: var(--accent);
}

.role-staff {
  color: var(--success);
}

.role-viewer {
  color: var(--muted);
}

.team-member-actions {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.team-member-actions select {
  width: 115px;
  padding: 9px 10px;
}

.team-member-actions button {
  white-space: nowrap;
  padding: 9px 10px;
  font-size: 10px;
}

.team-protected-label {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.team-empty-state {
  min-height: 190px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.team-empty-state strong {
  color: var(--text);
}

.team-empty-state span {
  font-size: 10px;
}

.team-empty-state.danger-state strong {
  color: var(--danger);
}

.team-safety-note {
  padding: 14px 17px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  box-shadow: none;
}

.team-safety-note strong {
  flex: 0 0 auto;
  color: var(--success);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.team-safety-note span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .team-role-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .team-member-row {
    grid-template-columns:
      44px
      minmax(180px, 1fr)
      100px;
  }

  .team-member-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .team-protected-label {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .team-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-hero-actions {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .team-role-grid {
    grid-template-columns: 1fr;
  }

  .team-directory-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-directory-header button {
    margin-left: 0;
  }

  .team-member-row {
    grid-template-columns:
      40px minmax(0, 1fr);
  }

  .team-role-badge {
    grid-column: 2;
  }

  .team-member-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .team-member-actions select {
    flex: 1 1 130px;
  }

  .team-member-actions button {
    flex: 1 1 120px;
  }

  .team-safety-note {
    align-items: flex-start;
    flex-direction: column;
  }
}
