:root {
  --ink: #0b0b0a;
  --panel: #11100f;
  --panel-2: #171514;
  --line: #2a2724;
  --paper: #f3eee7;
  --paper-2: #e8dfd3;
  --text: #f7f0e7;
  --muted: #aaa19a;
  --gold: #b88a49;
  --gold-2: #d7bc8a;
  --green: #7fba78;
  --danger: #d88472;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(184, 138, 73, 0.22), transparent 28rem),
    linear-gradient(135deg, #050505, #141210 52%, #090806);
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  min-height: 100vh;
}

.rail {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 7, 0.86);
  padding: 1.8rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand,
.wordmark {
  border: 0;
  background: transparent;
  color: var(--gold-2);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.08em;
}

.brand {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 1.05rem;
  margin: 0 auto 2.3rem;
  display: block;
}

.wordmark {
  font-size: 1.45rem;
}

.nav {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

.nav-item,
.icon-button,
.chip,
.small-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  border-radius: 8px;
}

.nav-item {
  width: 3rem;
  height: 2.55rem;
  color: var(--muted);
  overflow: hidden;
}

.nav-item span {
  display: block;
  max-width: 100%;
  font-size: 0.58rem;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transform: scale(0.94);
  transform-origin: center;
}

.nav-item.is-active,
.nav-item:hover,
.icon-button:hover,
.chip.is-active {
  color: var(--gold-2);
  border-color: rgba(215, 188, 138, 0.42);
  background: rgba(184, 138, 73, 0.16);
}

.main {
  min-width: 0;
}

.topbar {
  height: 5.2rem;
  display: grid;
  grid-template-columns: max-content minmax(12rem, 34rem) max-content;
  gap: 1.2rem;
  align-items: center;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 9, 0.78);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(18px);
}

.search {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  padding: 0.66rem 0.85rem;
  color: var(--muted);
}

.search span {
  font-size: 0.75rem;
  color: var(--gold-2);
}

.search input,
.dialog input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.top-actions {
  display: flex;
  gap: 0.65rem;
}

.icon-button {
  min-height: 2.35rem;
  padding: 0 0.75rem;
}

.icon-button[hidden] {
  display: none;
}

.notify-button {
  position: relative;
  width: 2.35rem;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.notify-button[hidden] {
  display: none;
}

.notify-button::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--gold);
}

.view {
  padding: 2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(18rem, 0.95fr) minmax(24rem, 1.5fr);
  min-height: calc(100vh - 7.2rem);
  gap: 2rem;
  align-items: center;
}

.login-hero {
  min-height: calc(100vh - 7.2rem);
  display: grid;
  align-items: center;
  max-width: 54rem;
}

.login-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(3.2rem, 7vw, 7rem);
  line-height: 0.95;
  margin: 0;
}

.login-hero p {
  max-width: 34rem;
  line-height: 1.7;
  font-size: 1.05rem;
}

.hero-copy h1,
.split-copy h2,
.page-title h1,
.detail-title h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 0.95;
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(3rem, 7vw, 6.8rem);
  max-width: 9ch;
}

.hero-copy p {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.eyebrow {
  color: var(--gold-2);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.hero-actions,
.filters,
.detail-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.primary-button,
.secondary-button {
  border-radius: 8px;
  padding: 0.92rem 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.primary-button {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #17110b;
}

.secondary-button {
  border: 1px solid rgba(215, 188, 138, 0.35);
  background: transparent;
  color: var(--gold-2);
}

.full-button {
  width: 100%;
  margin-top: 0.75rem;
}

.fabric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.swatch,
.fabric-image {
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--c1);
  background-position: center;
  background-size: cover;
  background-image:
    radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.58), transparent 13%),
    radial-gradient(ellipse at 72% 38%, rgba(255, 255, 255, 0.32), transparent 18%),
    radial-gradient(ellipse at 45% 72%, rgba(0, 0, 0, 0.32), transparent 22%),
    linear-gradient(135deg, var(--c1), var(--c2) 42%, var(--c3));
  position: relative;
}

.swatch::after,
.fabric-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(116deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 13px),
    radial-gradient(ellipse at 55% 55%, transparent 35%, rgba(0, 0, 0, 0.32));
  mix-blend-mode: screen;
}

.collection-tile,
.fabric-card,
.metric,
.mini-row,
.activity,
.scan-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.collection-tile,
.fabric-card {
  color: inherit;
  text-align: left;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.collection-tile {
  display: block;
  width: 100%;
}

.collection-tile .swatch {
  aspect-ratio: 1.55;
}

.tile-meta,
.fabric-meta {
  padding: 0.95rem;
  min-height: 10.5rem;
  display: flex;
  flex-direction: column;
}

.tile-meta h3,
.fabric-meta h3,
.metric strong {
  margin: 0;
  font-weight: 500;
}

.tile-meta p,
.fabric-meta p,
.muted {
  color: var(--muted);
}

.recommended,
.section {
  margin-top: 2.5rem;
}

.section-head,
.page-title,
.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.2rem;
}

.fabric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.fabric-card .swatch {
  aspect-ratio: 1.35;
  border-radius: 0;
}

.view-link {
  display: inline-block;
  margin-top: auto;
  color: var(--gold-2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.55rem 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.account-grid {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.9rem;
  text-align: left;
}

.account-card strong {
  display: block;
  color: var(--gold-2);
}

.quick-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.quick-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.95rem;
  text-align: left;
}

.quick-card strong,
.quick-card span {
  display: block;
}

.quick-card strong {
  color: var(--gold-2);
  font-weight: 500;
}

.quick-card span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.quick-card:hover,
.quick-card.is-active {
  border-color: rgba(215, 188, 138, 0.42);
  background: rgba(184, 138, 73, 0.14);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  margin: 0 0 1rem;
}

.heart-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(215, 188, 138, 0.48);
  background: rgba(8, 8, 7, 0.66);
  color: var(--gold-2);
  font-size: 1.25rem;
  line-height: 1;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}

.heart-button:hover,
.heart-button.is-saved {
  background: rgba(184, 138, 73, 0.92);
  color: #17110b;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 2.5rem -2rem -2rem;
  background: var(--paper);
  color: #171514;
}

.split-visual {
  min-height: 38rem;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.62)),
    radial-gradient(ellipse at 34% 24%, rgba(255, 255, 255, 0.8), transparent 16%),
    radial-gradient(ellipse at 68% 38%, rgba(219, 178, 122, 0.62), transparent 24%),
    linear-gradient(135deg, #2b211a, #c6a06f 45%, #16120f);
}

.split-copy {
  padding: clamp(2rem, 5vw, 5rem);
}

.split-copy h2,
.page-title h1 {
  font-size: clamp(2.6rem, 5vw, 5.2rem);
}

.feature-list {
  display: grid;
  gap: 0.2rem;
  margin-top: 2rem;
}

.feature {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 1.2rem;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(23, 21, 20, 0.14);
}

.feature-icon {
  color: var(--gold);
  font-size: 1.9rem;
}

.collection-layout,
.library-layout,
.dashboard-layout {
  display: grid;
  grid-template-columns: 17rem 1fr;
  gap: 1.5rem;
}

.side-panel {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 1rem;
}

.chip {
  padding: 0.62rem 0.75rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(10rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.catalog-toolbar label {
  display: grid;
  gap: 0.42rem;
}

.catalog-toolbar span {
  color: var(--gold-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.catalog-toolbar select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #141312;
  color: var(--text);
  padding: 0 0.8rem;
}

.small-button {
  padding: 0.52rem 0.65rem;
  color: var(--gold-2);
}

.detail {
  display: grid;
  grid-template-columns: minmax(18rem, 1.1fr) minmax(19rem, 0.9fr);
  gap: 2rem;
}

.fabric-image {
  aspect-ratio: 1.15;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.thumbs button {
  border: 2px solid transparent;
  padding: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  overflow: hidden;
}

.thumbs .is-active {
  border-color: var(--gold);
}

.thumbs .swatch {
  aspect-ratio: 1.2;
}

.thumbs span {
  display: block;
  padding-top: 0.35rem;
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specs {
  margin: 1.2rem 0;
  border-top: 1px solid var(--line);
}

.spec-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.82rem 0;
  border-bottom: 1px solid var(--line);
}

.spec-row span:first-child {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.76rem;
}

.stock {
  color: var(--green);
}

.scan-card {
  padding: 1rem;
  margin-top: 1rem;
}

.scan-card code {
  display: block;
  color: var(--gold-2);
  overflow-wrap: anywhere;
  margin-top: 0.4rem;
}

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

.metric {
  padding: 1.15rem;
}

.metric strong {
  display: block;
  font-size: 2rem;
}

.activity {
  padding: 1rem;
}

.bar {
  height: 0.58rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}

.toast {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(215, 188, 138, 0.42);
  background:
    linear-gradient(135deg, rgba(22, 19, 16, 0.94), rgba(10, 10, 9, 0.92));
  color: var(--gold-2);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(0.55rem) scale(0.98);
  transition: 0.2s ease;
  pointer-events: none;
  z-index: 20;
  backdrop-filter: blur(14px);
  font-size: 0.92rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notification-panel {
  position: fixed;
  top: 4.6rem;
  right: 7rem;
  width: min(24rem, calc(100vw - 2rem));
  border: 1px solid rgba(215, 188, 138, 0.32);
  border-radius: 8px;
  background: rgba(15, 14, 13, 0.96);
  color: var(--text);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
  z-index: 30;
  opacity: 0;
  transform: translateY(-0.45rem);
  pointer-events: none;
  transition: 0.18s ease;
  overflow: hidden;
}

.notification-panel.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.notification-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-head strong {
  color: var(--gold-2);
}

.notification-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.notification-list {
  display: grid;
}

.notification-item {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: var(--text);
  padding: 0.95rem 1rem;
  text-align: left;
}

.notification-item:hover {
  background: rgba(184, 138, 73, 0.12);
  color: var(--gold-2);
}

.dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.dialog-panel {
  width: min(28rem, calc(100vw - 2rem));
  background: #11100f;
  border: 1px solid rgba(215, 188, 138, 0.28);
  border-radius: 8px;
  padding: 1.5rem;
}

.dialog-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 400;
  margin: 0.2rem 0 0.8rem;
}

.dialog-panel label {
  display: block;
  color: var(--muted);
  margin: 1rem 0;
}

.dialog-panel input {
  margin-top: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
}

.dialog-close {
  float: right;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

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

  .rail {
    display: block;
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    height: auto;
    padding: 0.55rem 0.7rem;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 40;
  }

  .rail .brand {
    display: none;
  }

  .nav {
    display: flex;
    justify-content: space-around;
    gap: 0.45rem;
  }

  .nav-item {
    width: 4.2rem;
    height: 2.55rem;
  }

  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 1rem;
  }

  .top-actions {
    overflow-x: auto;
  }

  .view {
    padding: 1rem 1rem 5.2rem;
  }

  .hero,
  .split,
  .detail,
  .collection-layout,
  .library-layout,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .fabric-grid,
  .cards-grid,
  .fabric-strip,
  .metrics,
  .catalog-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel {
    border-right: 0;
    padding-right: 0;
  }
}

@media (max-width: 560px) {
  .fabric-grid,
  .cards-grid,
  .fabric-strip,
  .metrics,
  .thumbs,
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 3.1rem;
  }
}
