@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bg-grad-a: #f8f1df;
  --bg-grad-b: #dceee6;
  --text: #1c2521;
  --muted: #52605a;
  --line: #d8d0bf;
  --surface: rgba(255, 252, 245, 0.93);
  --surface-soft: rgba(255, 255, 255, 0.52);
  --field-bg: #ffffff;
  --field-text: #1b2220;
  --field-border: #c9c2b2;
  --link: #106e76;
  --shadow: 0 16px 38px rgba(16, 26, 23, 0.08);

  --primary: #0f766e;
  --primary-dark: #095951;
  --accent: #d95f19;
  --accent-dark: #b54b0e;
  --danger: #b42318;
  --success: #18794e;
  --warning: #9e5d00;

  --btn-bg: #f5f8f6;
  --btn-hover: #e7efeb;
  --btn-text: #17211d;
  --btn-border: #bfd2ca;
}

:root[data-theme="dark"] {
  --bg-grad-a: #121a24;
  --bg-grad-b: #0d131b;
  --text: #e7edf4;
  --muted: #b3bdca;
  --line: #39495d;
  --surface: rgba(19, 27, 38, 0.9);
  --surface-soft: rgba(17, 27, 40, 0.65);
  --field-bg: #172333;
  --field-text: #edf2f9;
  --field-border: #4c627d;
  --link: #8ed8f2;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.36);

  --primary: #56ccb8;
  --primary-dark: #2ba28f;
  --accent: #f08b4f;
  --accent-dark: #d8773f;
  --warning: #ffc061;

  --btn-bg: #1c2a36;
  --btn-hover: #25384b;
  --btn-text: #e9eef4;
  --btn-border: #41566f;
}

:root[data-theme="cosmos"] {
  --bg-grad-a: #120d2e;
  --bg-grad-b: #050814;
  --text: #e7e9ff;
  --muted: #b5bbde;
  --line: #3d3d73;
  --surface: rgba(18, 18, 44, 0.82);
  --surface-soft: rgba(26, 22, 56, 0.64);
  --field-bg: #16153d;
  --field-text: #edf0ff;
  --field-border: #5556a5;
  --link: #9addff;
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.42);

  --primary: #57b4ff;
  --primary-dark: #2e90e0;
  --accent: #f58f3d;
  --accent-dark: #dc7a2f;
  --warning: #ffd17e;

  --btn-bg: #1f1d4c;
  --btn-hover: #2b2863;
  --btn-text: #eff1ff;
  --btn-border: #5f62b8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 18% 18%, #fffcf3, var(--bg-grad-a) 35%, var(--bg-grad-b) 100%);
  min-height: 100vh;
}

:root[data-theme="dark"] body,
:root[data-theme="cosmos"] body {
  background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--bg-grad-a) 80%, #ffffff 20%), var(--bg-grad-a) 38%, var(--bg-grad-b) 100%);
}

.background-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.1)),
    url("/static/img/grid.svg");
  background-size: auto, 420px;
  background-repeat: no-repeat, repeat;
  opacity: 0.78;
}

:root[data-theme="dark"] .background-layer {
  opacity: 0.56;
  filter: invert(1) hue-rotate(185deg) saturate(0.7);
}

:root[data-theme="cosmos"] .background-layer {
  opacity: 0.52;
  filter: invert(1) hue-rotate(248deg) saturate(0.9) brightness(0.75);
}

a {
  color: var(--link);
}

.container {
  width: min(1120px, 94vw);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 40px;
  height: 40px;
}

.brand-copy strong {
  display: block;
  font-family: "Archivo Black", sans-serif;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.brand-copy small {
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.content-wrap {
  padding-bottom: 1.7rem;
}

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

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: center;
  overflow: hidden;
}

.hero h1 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
}

.hero .eyebrow {
  margin: 0;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.hero-media {
  align-self: stretch;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.section-header {
  margin: 1.2rem 0 0.7rem;
}

.section-header h1,
.section-header h2 {
  margin: 0;
}

.section-header p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.feature-grid h3 {
  margin: 0 0 0.45rem;
}

.product-card h3 {
  margin: 0;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.mini-grid label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.mini-grid strong {
  font-size: 1.05rem;
}

.price-row {
  margin: 0.8rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.price-row span {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  color: color-mix(in srgb, var(--primary) 75%, #ffffff 25%);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.progress-track {
  margin-top: 0.8rem;
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 68%, transparent);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 30%, #ffffff 70%));
}

.progress-track-split {
  display: flex;
}

.progress-track-split .progress-fill {
  flex: 0 0 auto;
}

.progress-fill-reserve {
  background: linear-gradient(90deg, #0f9d58, #62d99a);
}

.progress-fill-notify {
  background: linear-gradient(90deg, #1d63d8, #73a8ff);
}

.progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.legend-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  vertical-align: -0.04rem;
}

.legend-reserve {
  background: #32be7a;
}

.legend-notify {
  background: #3d7eff;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.stacked-form {
  display: grid;
  gap: 0.75rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
  font-size: 0.93rem;
}

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

input,
select,
textarea {
  margin-top: 0.3rem;
  width: 100%;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: var(--field-bg);
  color: var(--field-text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, #ffffff 55%);
  outline-offset: 0;
}

input[type="checkbox"] {
  width: auto;
  margin-right: 0.45rem;
}

.input-readonly {
  background: color-mix(in srgb, var(--field-bg) 80%, var(--line) 20%);
  cursor: not-allowed;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  background: var(--btn-hover);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-accent {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background: var(--accent-dark);
}

.btn-small {
  padding: 0.36rem 0.7rem;
  font-size: 0.84rem;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  color: var(--text);
}

.badge-interest {
  background: #fff3dd;
  color: #8f4b08;
}

.badge-ordered {
  background: #ddf4ee;
  color: #0b6140;
}

.badge-closed {
  background: #ede9ff;
  color: #4b3ea3;
}


.badge-public {
  background: #d9f8eb;
  color: #0e6640;
}

.badge-draft {
  background: #ffe8cc;
  color: #8f4d12;
}

.badge-availability-available {
  background: #dff5ea;
  color: #0d6a42;
}

.badge-availability-soft_ban {
  background: #fff1d8;
  color: #91520a;
}

.badge-availability-hard_ban {
  background: #fde4e3;
  color: #9f2318;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.65rem 0.45rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

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

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.row-gap {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.activity-feed li {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 0.55rem 0.7rem;
}

.compact-feed {
  max-height: 260px;
  overflow: auto;
}

.compact-feed li {
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.game-form {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem;
  background: var(--surface-soft);
}

.flash-stack {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.flash {
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  font-weight: 600;
}

.flash-success {
  background: color-mix(in srgb, var(--success) 20%, #ffffff 80%);
  color: var(--success);
}

.flash-error {
  background: color-mix(in srgb, var(--danger) 18%, #ffffff 82%);
  color: var(--danger);
}

.flash-warning {
  background: color-mix(in srgb, #ffb55e 20%, #ffffff 80%);
  color: var(--warning);
}

.flash-info {
  background: color-mix(in srgb, #49a6ff 18%, #ffffff 82%);
  color: #0d63b9;
}

.alert {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 0.7rem 0.8rem;
  margin-top: 0.7rem;
  font-size: 0.92rem;
}

.alert-warning {
  border-color: color-mix(in srgb, #ffbd5a 45%, var(--line) 55%);
}

.alert-info {
  border-color: color-mix(in srgb, #5eb7ff 35%, var(--line) 65%);
}

.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 1.2rem;
}

.auth-shell {
  width: min(460px, 100%);
  margin-inline: auto;
}

.empty-state {
  text-align: center;
}

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

.small {
  font-size: 0.84rem;
}

.estimate {
  margin: 0;
  color: var(--primary-dark);
  font-weight: 700;
}

.product-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 0.8rem;
  background: color-mix(in srgb, var(--line) 45%, transparent);
}

.product-header {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  align-items: start;
}

.product-hero-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--line) 45%, transparent);
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.table-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--line) 45%, transparent);
}

.image-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.preview-image {
  width: min(420px, 100%);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
}

.gallery-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--line) 45%, transparent);
}

.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.7rem;
}

.gallery-admin-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem;
  display: grid;
  gap: 0.45rem;
  background: var(--surface-soft);
}

.gallery-admin-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.preline {
  white-space: pre-line;
}

.stacked-list {
  display: grid;
  gap: 0.75rem;
}

.request-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: var(--surface-soft);
}

.request-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.request-image-grid a {
  display: block;
}

.request-image-grid img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--line) 45%, transparent);
}

.compact-form {
  margin-top: 0.4rem;
}

.activity-actions-cell {
  min-width: 260px;
  white-space: normal;
}

.activity-actions-cell input[type="number"] {
  max-width: 150px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.faq-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--surface-soft);
}

.faq-grid h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.ban-reason {
  white-space: normal;
  max-width: 280px;
}

.compact-card {
  padding: 0.75rem;
}

.compact-card label {
  display: block;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}

@media (max-width: 870px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

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

  .product-header {
    grid-template-columns: 1fr;
  }

  .product-hero-image {
    max-height: 220px;
  }
}


.chat-thread {
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
  background: color-mix(in srgb, var(--surface-soft) 75%, transparent);
}

.chat-thread h4 {
  margin: 0 0 0.5rem;
}

.chat-msg {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
}

.chat-msg:last-child {
  margin-bottom: 0;
}

.chat-msg-admin {
  border-color: color-mix(in srgb, #4ea8ff 42%, var(--line) 58%);
}

.chat-msg-customer {
  border-color: color-mix(in srgb, #53d58f 42%, var(--line) 58%);
}
