/* web/public/shared/theme.css */
/* Shared light theme, matched to home.css palette */

/* Base palette from home.css */
:root {
  /* Home-style tokens */
  --bg: #f7fafc;
  --ink: #0b1220;
  --muted: #5b6a7d;
  --card: #ffffff;
  --border: #e6ecf3;
  --ring: #cfe9ff;
  --pop1: #15a1ff;   /* cyan blue */
  --pop2: #ff7ad9;   /* pink */
  --pop3: #ffd34d;   /* gold */
  --shadow: 0 10px 30px rgba(15, 38, 70, 0.08);

  /* Shared theme tokens (mapped onto same light palette) */
  --bg-main: var(--bg);
  --bg-elevated: #ffffff;
  --bg-soft: #f3f6fc;
  --accent: var(--pop3);
  --accent-soft: rgba(255, 211, 77, 0.15);
  --accent-strong: #ffb300;
  --text-main: var(--ink);
  --text-muted: var(--muted);
  --danger: #ff4a6a;
  --border-subtle: var(--border);
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: var(--shadow);
  --shadow-soft-strong: 0 18px 45px rgba(15, 38, 70, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text-main);
  background: var(--bg-main);
  min-height: 100%;
}

body {
  display: flex;
  justify-content: center;
  padding: 32px 16px 40px;
}

/* Main app shell used on shop, admin, etc. */
.app-shell {
  width: 100%;
  max-width: 1180px;
  background: radial-gradient(circle at top left,
      rgba(21, 161, 255, 0.12) 0,
      transparent 55%),
    var(--bg-elevated);
  border-radius: 28px;
  box-shadow: var(--shadow-soft-strong);
  border: 1px solid var(--border-subtle);
  padding: 22px 26px 28px;
  position: relative;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(21, 161, 255, 0.11) 0, transparent 55%),
    radial-gradient(circle at 100% 0, rgba(255, 122, 217, 0.16) 0, transparent 50%);
  opacity: 0.85;
  mix-blend-mode: normal;
  pointer-events: none;
}

.app-shell-inner {
  position: relative;
  z-index: 1;
}

/* Top nav */

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.app-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo-pill {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #fff 0, var(--pop3) 30%, #ff7a18 70%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3),
    0 12px 24px rgba(15, 38, 70, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #3a2b00;
  font-size: 18px;
}

.app-nav-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-nav-title-main {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--ink);
}

.app-nav-title-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-nav-link {
  font-size: 12px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.16s ease;
}

.app-nav-link:hover {
  border-color: var(--border);
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.app-nav-link.primary {
  background: linear-gradient(120deg, var(--pop1), #51e0ff);
  color: #052a3b;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(15, 38, 70, 0.25);
}

.app-nav-link.primary:hover {
  filter: saturate(1.05);
  transform: translateY(-0.5px);
}

/* Generic buttons / inputs */

.btn {
  border-radius: 999px;
  padding: 9px 15px;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.16s ease;
  box-shadow: var(--shadow-soft);
}

.btn:hover:not(:disabled) {
  background: #f9fbff;
  transform: translateY(-0.5px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--pop1), #51e0ff);
  color: #052a3b;
  border-color: transparent;
  font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
  filter: saturate(1.06);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

/* Forms */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 18px;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 16px 16px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.form-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.form-card-title {
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.form-card-sub {
  font-size: 11px;
  color: var(--muted);
}

.field-group {
  margin-bottom: 10px;
}

.field-row {
  display: flex;
  gap: 10px;
}

label.field-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 4px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="url"],
textarea,
select {
  width: 100%;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  padding: 7px 9px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--pop1);
  box-shadow: 0 0 0 1px var(--ring);
  background: #ffffff;
}

.helper-text {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chip {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #f3f6fc;
  border: 1px dashed var(--border-subtle);
  color: var(--muted);
}

.status-bar {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

/* Item profile visuals (used across pages) */

.item-profile-shell {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  background: var(--card);
}

.item-profile-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.04);
}

.item-profile-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(247, 250, 252, 0.08),
      rgba(247, 250, 252, 0.9)),
    radial-gradient(circle at top left,
      rgba(21, 161, 255, 0.08),
      transparent 55%);
  mix-blend-mode: normal;
}

.item-profile-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 16px 16px 16px;
}

.item-profile-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-module {
  background: #ffffff;
  border-radius: 18px;
  padding: 10px 11px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.item-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.item-module-title {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
}

.item-module-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f6fc;
  color: var(--muted);
}

.item-module-body {
  font-size: 12px;
  color: var(--ink);
}

.item-overview-main {
  display: flex;
  gap: 10px;
}

.item-overview-image-wrap {
  width: 84px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #f1f5fb;
  position: relative;
}

.item-overview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-overview-meta {
  flex: 1;
}

.item-tagline {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.item-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--ink);
}

.item-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.item-pill {
  background: #f3f6fc;
  border-radius: 999px;
  padding: 3px 8px;
}

.item-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.item-actions-row .btn {
  font-size: 10px;
  padding: 6px 10px;
}

/* Production + build modules */

.item-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 6px;
  font-size: 11px;
}

.item-meta-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
}

.item-meta-value {
  color: var(--ink);
  margin-top: 2px;
}

/* Small owner strip */

.item-owner-strip {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.item-owner-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #f1f5fb;
  flex-shrink: 0;
}

.item-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-owner-name {
  color: var(--ink);
}

/* Simple responsive tweak */

@media (max-width: 880px) {
  .app-shell {
    padding: 18px 16px 22px;
  }
  .form-grid,
  .item-profile-content {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Shared auth buttons – mirrored from home header, using blue gradient */

.app-nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-auth-btn {
  border-radius: 999px;
  padding: 6px 12px;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.app-auth-btn--primary {
  background: linear-gradient(90deg, var(--pop1), #51e0ff);
  color: #052a3b;
  border-color: transparent;
}

.app-auth-btn--ghost {
  background: #ffffff;
}

.app-auth-btn:hover {
  filter: saturate(1.06);
  transform: translateY(-0.5px);
}

#sharedSignOutBtn {
  display: none;
}
