:root {
  --bg: #090b10;
  --bg-soft: #0d1017;
  --surface: #11151d;
  --surface-2: #161b25;
  --surface-3: #1b212c;
  --line: #252c39;
  --line-soft: rgba(255, 255, 255, 0.065);
  --text: #f6f7f9;
  --text-soft: #d7dae0;
  --muted: #858d9d;
  --muted-2: #5f6776;
  --accent: #c6ff4a;
  --accent-ink: #111706;
  --accent-soft: rgba(198, 255, 74, 0.11);
  --danger: #ff626d;
  --danger-soft: rgba(255, 98, 109, 0.11);
  --success: #6ee7a0;
  --sidebar: 276px;
  --radius: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 70% -20%, rgba(93, 115, 171, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.locked {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button {
  appearance: none;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(198, 255, 74, 0.35);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(198, 255, 74, 0.22), rgba(198, 255, 74, 0.03));
  box-shadow: inset 0 0 18px rgba(198, 255, 74, 0.05);
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 850;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.73rem;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 680;
  transition: 160ms ease;
}

.button:hover:not(:disabled) {
  border-color: #3a4353;
  background: var(--surface-3);
  color: var(--text);
  transform: translateY(-1px);
}

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

.button.primary:hover:not(:disabled) {
  border-color: #d3ff72;
  background: #d3ff72;
  color: var(--accent-ink);
}

.button.danger {
  border-color: rgba(255, 98, 109, 0.38);
  background: var(--danger);
  color: #190204;
}

.button.danger:hover:not(:disabled) {
  border-color: #ff7b84;
  background: #ff7b84;
  color: #190204;
}

.button.danger-subtle {
  border-color: rgba(255, 98, 109, 0.18);
  background: var(--danger-soft);
  color: #ff8d95;
}

.button.danger-subtle:hover:not(:disabled) {
  border-color: rgba(255, 98, 109, 0.35);
  background: rgba(255, 98, 109, 0.16);
  color: #ffadb2;
}

.button.compact {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 0.78rem;
}

.button svg {
  width: 17px;
  height: 17px;
}

.icon-button,
.round-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  transition: 160ms ease;
}

.icon-button:hover,
.icon-button.active,
.round-button:hover {
  border-color: #3a4353;
  background: var(--surface-3);
  color: var(--text);
}

.icon-button svg,
.round-button svg {
  width: 18px;
  height: 18px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(110, 231, 160, 0.09);
}

/* Authentication */
.auth-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 34px 20px 70px;
  background:
    linear-gradient(rgba(9, 11, 16, 0.72), rgba(9, 11, 16, 0.94)),
    radial-gradient(circle at 50% 0%, #1c2531 0, #090b10 56%);
}

.auth-shell::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}

.auth-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
}

.auth-glow-a {
  top: -230px;
  left: 12%;
  background: var(--accent);
}

.auth-glow-b {
  right: 4%;
  bottom: -300px;
  background: #6386c7;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(17, 21, 29, 0.82);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(22px);
}

.auth-brand {
  margin-bottom: 56px;
}

.auth-copy h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 7vw, 2.72rem);
  font-weight: 710;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.auth-copy > p:last-child {
  max-width: 350px;
  margin-bottom: 32px;
  color: var(--muted);
}

.pin-form > label {
  display: block;
  margin-bottom: 9px;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 680;
}

.pin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.pin-field {
  position: relative;
}

.pin-field svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  transform: translateY(-50%);
}

.pin-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #0d1118;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  transition: 160ms ease;
}

.pin-field input::placeholder {
  color: #505866;
}

.pin-field input:focus {
  border-color: rgba(198, 255, 74, 0.6);
  box-shadow: 0 0 0 3px rgba(198, 255, 74, 0.07);
}

.auth-submit {
  min-width: 114px;
  height: 48px;
}

.form-error {
  margin: 10px 0 0;
  color: #ff858e;
  font-size: 0.78rem;
}

.pin-form.shake {
  animation: shake 280ms ease-in-out;
}

.auth-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 28px 0 0;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.auth-footer {
  position: absolute;
  bottom: 24px;
  z-index: 1;
  color: var(--muted-2);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* Application shell */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  min-height: 620px;
  flex-direction: column;
  padding: 22px 18px;
  border-right: 1px solid var(--line-soft);
  background: rgba(12, 15, 21, 0.98);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.collection-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 28px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.collection-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.collection-icon svg {
  width: 18px;
  height: 18px;
}

.collection-card > div:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.collection-card span {
  color: var(--muted);
  font-size: 0.67rem;
}

.collection-card strong {
  margin-top: 1px;
  font-size: 0.8rem;
  font-weight: 700;
}

.sidebar-label {
  margin: 0 10px 9px;
  color: var(--muted-2);
  font-size: 0.63rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.model-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.model-button {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: 160ms ease;
}

.model-button:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
}

.model-button.active {
  border-color: rgba(198, 255, 74, 0.13);
  background: var(--accent-soft);
  color: var(--text);
}

.model-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(145deg, #27303d, #151a22);
  color: #cbd1da;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.theme-brener-stiff .model-avatar,
.hero-avatar.theme-brener-stiff {
  background: linear-gradient(145deg, #3d3527, #1a1814);
  color: #e2c997;
}

.theme-joao-evangelista .model-avatar,
.hero-avatar.theme-joao-evangelista {
  background: linear-gradient(145deg, #253747, #121a22);
  color: #a9d4f0;
}

.theme-luciano-guedes .model-avatar,
.hero-avatar.theme-luciano-guedes {
  background: linear-gradient(145deg, #3a293d, #19131b);
  color: #ddb5e0;
}

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

.model-info strong {
  overflow: hidden;
  color: inherit;
  font-size: 0.77rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-info span {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.65rem;
}

.model-button.active .model-info span {
  color: #919c7b;
}

.model-chevron {
  width: 15px;
  height: 15px;
  opacity: 0;
}

.model-button.active .model-chevron {
  color: var(--accent);
  opacity: 1;
}

.sidebar-foot {
  margin-top: auto;
}

.private-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.private-note > svg {
  width: 19px;
  height: 19px;
  color: var(--muted-2);
}

.private-note > div {
  display: flex;
  flex-direction: column;
}

.private-note strong {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.private-note span {
  color: var(--muted-2);
  font-size: 0.6rem;
}

.logout-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.73rem;
  text-align: left;
  transition: 160ms ease;
}

.logout-button:hover {
  background: var(--danger-soft);
  color: #ff949b;
}

.logout-button svg {
  width: 17px;
  height: 17px;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 3.2vw, 50px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(9, 11, 16, 0.82);
  backdrop-filter: blur(18px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 0.73rem;
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
}

.breadcrumb strong {
  color: var(--text-soft);
  font-weight: 620;
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar .icon-button {
  width: 35px;
  height: 35px;
  background: transparent;
}

.online-pill {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.67rem;
}

.online-pill .status-dot {
  width: 6px;
  height: 6px;
}

.content {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 36px clamp(20px, 3.2vw, 50px) 80px;
}

/* Model header */
.model-hero {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 15%, rgba(198, 255, 74, 0.07), transparent 280px),
    linear-gradient(135deg, #141922, #10141b);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.14);
}

.model-hero::after {
  position: absolute;
  top: -42px;
  right: 18%;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.hero-avatar {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  background: linear-gradient(145deg, #2d3644, #151a22);
  color: #d5dae2;
  font-size: 1rem;
  font-weight: 820;
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.hero-main h1 {
  overflow: hidden;
  margin: 0 0 3px;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-weight: 710;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-note {
  overflow: hidden;
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 22px;
}

.hero-stats > div {
  display: flex;
  min-width: 54px;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 1.26rem;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.65rem;
}

.hero-stats i {
  width: 1px;
  height: 36px;
  background: var(--line);
}

.hero-actions {
  display: flex;
  gap: 9px;
}

/* Lots */
.lots-section {
  margin: 35px 0 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 690;
}

.lot-select {
  display: none;
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.75rem;
}

.lot-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-color: var(--line) transparent;
  scrollbar-width: thin;
}

.lot-button {
  display: flex;
  min-width: 112px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.71rem;
  transition: 160ms ease;
}

.lot-button span:last-child {
  color: var(--muted-2);
  font-size: 0.63rem;
}

.lot-button:hover {
  border-color: #384150;
  background: var(--surface-2);
  color: var(--text-soft);
}

.lot-button.active {
  border-color: rgba(198, 255, 74, 0.4);
  background: var(--accent-soft);
  color: var(--accent);
}

.lot-button.active span:last-child {
  color: #8d9b72;
}

/* Gallery */
.gallery-panel {
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 19, 26, 0.74);
}

.gallery-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
}

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

.gallery-title h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 680;
}

.count-badge {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.62rem;
}

.gallery-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-field {
  position: relative;
  display: block;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transform: translateY(-50%);
}

.search-field input {
  width: 210px;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: #0c1016;
  color: var(--text-soft);
  font-size: 0.73rem;
  transition: 160ms ease;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-field input:focus {
  width: 245px;
  border-color: rgba(198, 255, 74, 0.38);
}

.density-control {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c1016;
}

.density-control .icon-button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.density-control .icon-button.active {
  background: var(--surface-3);
  color: var(--text-soft);
}

.density-control svg {
  width: 15px;
  height: 15px;
}

.lot-actions {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.012);
}

.select-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  user-select: none;
}

.select-all input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.fake-check {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #3b4452;
  border-radius: 5px;
  background: var(--surface);
  transition: 150ms ease;
}

.fake-check svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  stroke-width: 2.5;
}

.select-all input:focus-visible + .fake-check {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.select-all input:checked + .fake-check,
.select-all input:indeterminate + .fake-check {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.select-all input:checked + .fake-check svg {
  opacity: 1;
}

.select-all input:indeterminate + .fake-check::after {
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent-ink);
  content: "";
}

.lot-action-buttons {
  display: flex;
  gap: 5px;
}

.text-button {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 620;
  transition: 150ms ease;
}

.text-button:hover {
  background: var(--surface-3);
  color: var(--text-soft);
}

.text-button.danger-text:hover {
  background: var(--danger-soft);
  color: #ff9299;
}

.text-button svg {
  width: 15px;
  height: 15px;
}

.selection-bar {
  position: sticky;
  top: 68px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(198, 255, 74, 0.25);
  border-radius: 11px;
  background: rgba(35, 43, 28, 0.97);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.selection-bar > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.selection-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
}

.selection-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}

.selection-bar strong {
  color: #e8f0d8;
  font-size: 0.7rem;
}

.selection-bar #clear-selection {
  padding: 3px 5px;
  border: 0;
  border-bottom: 1px solid #85926e;
  background: transparent;
  color: #a9b692;
  font-size: 0.64rem;
}

.photo-grid,
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  padding: 16px;
}

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

.photo-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 3 / 4;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--surface-2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  isolation: isolate;
  transition: 170ms ease;
}

.photo-card:hover {
  border-color: #3b4452;
  transform: translateY(-2px);
}

.photo-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(198, 255, 74, 0.1);
}

.photo-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 280ms ease, transform 400ms ease;
}

.photo-card img.loaded {
  opacity: 1;
  transform: scale(1);
}

.photo-card:hover img {
  transform: scale(1.025);
}

.photo-card::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 42%;
  background: linear-gradient(transparent, rgba(5, 7, 10, 0.84));
  content: "";
  opacity: 0.72;
  pointer-events: none;
}

.photo-check {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 5;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: rgba(7, 9, 13, 0.64);
  color: transparent;
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: 150ms ease;
}

.photo-check svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}

.photo-card:hover .photo-check,
.photo-card.selected .photo-check,
.photo-check:focus-visible {
  opacity: 1;
}

.photo-card.selected .photo-check {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.photo-meta {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  z-index: 4;
  display: flex;
  min-width: 0;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.photo-name {
  min-width: 0;
}

.photo-name strong {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.65rem;
  font-weight: 610;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-name span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.58rem;
}

.card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(4px);
  transition: 150ms ease;
}

.photo-card:hover .card-actions,
.card-actions:focus-within {
  opacity: 1;
  transform: translateY(0);
}

.card-action {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(11, 14, 19, 0.82);
  color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.card-action:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.card-action.delete:hover {
  border-color: rgba(255, 98, 109, 0.45);
  background: rgba(89, 25, 30, 0.86);
  color: #ffb6bb;
}

.card-action svg {
  width: 14px;
  height: 14px;
}

.skeleton {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 11px;
  background: var(--surface-2);
}

.skeleton::after {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.045) 50%, transparent 70%);
  content: "";
  animation: shimmer 1.2s infinite;
  transform: translateX(-100%);
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.empty-state {
  display: flex;
  min-height: 350px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  text-align: center;
}

.empty-state > div {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--muted-2);
}

.empty-state h3 {
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 76px;
  background: rgba(4, 5, 8, 0.965);
  backdrop-filter: blur(18px);
}

.lightbox-top,
.lightbox-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 3vw, 42px);
}

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

.lightbox-top p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 0.72rem;
}

.lightbox-top p span {
  color: var(--muted);
}

.lightbox .round-button {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.lightbox-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 20px 80px;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-soft);
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: 160ms ease;
}

.lightbox-nav:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.11);
}

.lightbox-nav.prev {
  left: 22px;
}

.lightbox-nav.next {
  right: 22px;
}

.lightbox-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(7, 9, 13, 0.7);
}

.lightbox-bottom > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.lightbox-bottom strong {
  overflow: hidden;
  max-width: 50vw;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-bottom span {
  color: var(--muted);
  font-size: 0.65rem;
}

.lightbox-actions {
  display: flex;
  gap: 7px;
}

/* Confirmation */
.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 5, 0.78);
  backdrop-filter: blur(10px);
}

.confirm-card {
  position: relative;
  display: grid;
  width: min(100%, 500px);
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 25px;
  border: 1px solid #3b2a30;
  border-radius: 17px;
  background: #13161d;
  box-shadow: var(--shadow);
}

.confirm-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 98, 109, 0.2);
  border-radius: 13px;
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-copy h2 {
  margin: 0 0 8px;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.confirm-copy > p:not(.eyebrow) {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.confirm-impact {
  padding: 11px 12px;
  border: 1px solid rgba(255, 98, 109, 0.12);
  border-radius: 9px;
  background: rgba(255, 98, 109, 0.055);
  color: #ffadb3;
  font-size: 0.7rem;
}

.confirm-type {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.69rem;
}

.confirm-type strong {
  color: var(--text-soft);
}

.confirm-type input {
  width: 100%;
  height: 41px;
  margin-top: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: #0c1016;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.confirm-type input:focus {
  border-color: rgba(255, 98, 109, 0.55);
}

.confirm-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Busy and notifications */
.busy-shell {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(9px);
}

.busy-shell strong {
  margin-top: 17px;
  font-size: 0.9rem;
}

.busy-shell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

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

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 140;
  display: flex;
  width: min(380px, calc(100vw - 40px));
  flex-direction: column;
  gap: 9px;
}

.toast {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(20, 25, 34, 0.97);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.3);
  animation: toast-in 220ms ease-out;
  backdrop-filter: blur(12px);
}

.toast-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(110, 231, 160, 0.1);
  color: var(--success);
}

.toast.error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast-icon svg {
  width: 16px;
  height: 16px;
}

.toast-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.toast-copy strong {
  font-size: 0.72rem;
}

.toast-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-close {
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
}

.toast-close svg {
  width: 14px;
  height: 14px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.mobile-only {
  display: none;
}

/* Responsive */
@media (max-width: 1180px) {
  .model-hero {
    grid-template-columns: minmax(250px, 1fr) auto;
  }

  .hero-stats {
    display: none;
  }

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

@media (max-width: 880px) {
  .mobile-only {
    display: grid;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    width: min(86vw, var(--sidebar));
    box-shadow: 30px 0 70px rgba(0, 0, 0, 0.45);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 29;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(3, 5, 8, 0.7);
    backdrop-filter: blur(4px);
  }

  .topbar {
    gap: 12px;
  }

  .topbar .breadcrumb {
    margin-right: auto;
  }

  .model-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 28px 23px;
    border-radius: 20px;
  }

  .auth-brand {
    margin-bottom: 42px;
  }

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

  .auth-submit {
    width: 100%;
  }

  .topbar {
    height: 60px;
    padding: 0 14px;
  }

  .online-pill {
    display: none;
  }

  .content {
    padding: 20px 12px 60px;
  }

  .model-hero {
    padding: 20px;
    border-radius: 14px;
  }

  .hero-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .hero-main {
    gap: 13px;
  }

  .hero-main h1 {
    font-size: 1.38rem;
  }

  .hero-note {
    max-width: 62vw;
  }

  .hero-actions {
    flex-direction: column;
  }

  .lots-section {
    margin: 27px 0 16px;
  }

  .lot-nav {
    display: none;
  }

  .lot-select {
    display: block;
  }

  .gallery-panel {
    border-radius: 13px;
  }

  .gallery-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .gallery-tools {
    width: 100%;
  }

  .search-field {
    flex: 1;
  }

  .search-field input,
  .search-field input:focus {
    width: 100%;
  }

  .lot-actions {
    padding: 9px 13px;
  }

  .lot-action-buttons .text-button {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .lot-action-buttons .text-button {
    font-size: 0;
  }

  .lot-action-buttons .text-button svg {
    width: 17px;
    height: 17px;
  }

  .selection-bar {
    top: 60px;
    align-items: stretch;
    flex-direction: column;
  }

  .selection-bar > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .selection-bar > div:last-child .button {
    width: 100%;
  }

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

  .photo-card {
    border-radius: 8px;
  }

  .photo-card:hover {
    transform: none;
  }

  .photo-check {
    top: 7px;
    left: 7px;
    opacity: 1;
  }

  .photo-meta {
    right: 7px;
    bottom: 7px;
    left: 7px;
  }

  .photo-name strong {
    max-width: 90px;
  }

  .card-actions {
    opacity: 1;
    transform: none;
  }

  .card-action {
    width: 27px;
    height: 27px;
  }

  .photo-name span {
    display: none;
  }

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

  .lightbox-stage {
    padding: 12px;
  }

  .lightbox-nav {
    top: 46%;
    width: 38px;
    height: 38px;
    background: rgba(4, 5, 8, 0.65);
  }

  .lightbox-nav.prev {
    left: 8px;
  }

  .lightbox-nav.next {
    right: 8px;
  }

  .lightbox-bottom {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .lightbox-bottom strong {
    max-width: 85vw;
  }

  .lightbox-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .lightbox-actions .button {
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .confirm-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 13px;
    padding: 20px;
  }

  .confirm-icon {
    width: 40px;
    height: 40px;
  }

  .confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .confirm-actions .button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .hero-main {
    align-items: flex-start;
  }

  .hero-avatar {
    width: 48px;
    height: 48px;
  }

  .lightbox-actions .button {
    font-size: 0;
  }

  .lightbox-actions .button svg {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
