@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --color-primary: #22c55e;
  --color-primary-hover: #16a34a;
  --color-secondary: #3b82f6;
  --color-secondary-hover: #2563eb;
  --color-accent: #facc15;
  --color-danger: #f87171;
  --ink: #f8fafc;
  --ink-muted: #cbd5e1;
  --surface: #1e293b;
  --surface-muted: #172235;
  --line: rgba(255, 255, 255, 0.12);
  --page: #0f172a;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --radius-md: 0.7rem;
  --radius-lg: 1.1rem;
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.18);
}

html { background: var(--page); }
body, body, html {
  font-family: var(--font-sans) !important;
  color: var(--ink) !important;
  background: var(--page) !important;
  line-height: 1.55;
}

h1, h2, h3, h4, .navbar h1, .hero-content h1, .card-header h1 {
  font-family: var(--font-display) !important;
  letter-spacing: -0.025em !important;
  color: var(--ink) !important;
}

p, .hub-title p, .page-header p, .card-header p, .app-card p, .select-card p,
.form-hint, .form-label, th, .item-desc, .toast, .footer-link { color: var(--ink-muted) !important; }

.navbar {
  background: rgba(30, 41, 59, 0.94) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}
.navbar h1 { color: #4ade80 !important; font-size: 1.2rem !important; }
.nav-actions { gap: 0.6rem !important; }
.btn-nav, .btn-back {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--line) !important;
  color: #f8fafc !important;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.btn-nav:hover, .btn-back:hover { border-color: var(--color-primary) !important; background: rgba(255, 255, 255, 0.14) !important; transform: translateY(-1px); }

.container { max-width: 1180px !important; }
.hub-title, .page-header, .header-bar { margin-bottom: 2.25rem !important; }
.hub-title h2, .page-header h2, .header-bar h2 { font-size: clamp(1.8rem, 4vw, 2.55rem) !important; }

.app-grid, .selection-grid { gap: 1.15rem !important; }
.app-card, .select-card, .data-card, .user-row, .den-group, .cart-card, .order-summary-banner {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card);
}
.app-card, .select-card { color: var(--ink) !important; }
.app-card:hover, .select-card:hover { background: #26364c !important; border-color: var(--color-primary) !important; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24) !important; }
.app-icon, .card-icon { filter: saturate(0.8); }

.btn, .btn-submit, .btn-action, .btn-primary, .btn-order, .btn-approve, .btn-edit, .btn-secondary, .btn-parent, .btn-leader {
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}
.btn:hover:not(:disabled), .btn-submit:hover:not(:disabled), .btn-action:hover, .btn-primary:hover:not(:disabled), .btn-order:hover:not(:disabled), .btn-approve:hover:not(:disabled), .btn-edit:hover, .btn-secondary:hover, .btn-parent:hover, .btn-leader:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important; }
.btn-primary, .btn-submit, .btn-action, .btn-order, .btn-approve, .btn-leader { background: var(--color-primary) !important; }
.btn-secondary, .btn-parent, .btn-edit { background: var(--color-secondary) !important; }
.btn-primary:hover, .btn-submit:hover, .btn-action:hover, .btn-order:hover, .btn-approve:hover, .btn-leader:hover { background: var(--color-primary-hover) !important; }
.btn-secondary:hover, .btn-parent:hover, .btn-edit:hover { background: var(--color-secondary-hover) !important; }

.auth-card {
  background: rgba(30, 41, 59, 0.96) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
}
.page-wrapper { padding-top: 5vh !important; padding-bottom: 4rem !important; }
.form-control, .code-input, .size-dropdown {
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
input::placeholder, textarea::placeholder { color: #94a3b8 !important; }
.form-control:focus, .code-input:focus, .size-dropdown:focus { border-color: var(--color-primary) !important; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18) !important; }
select.form-control option, .size-dropdown option { background: #0f172a !important; color: #ffffff !important; }

.tab-bar, .method-tabs { border-color: var(--line) !important; background: rgba(15, 23, 42, 0.5) !important; }
.tab-btn.active { background: var(--color-primary) !important; color: #fff !important; }
.data-card, .cart-card { padding: 1.35rem !important; }
.data-card h3, .cart-card h3 { color: var(--color-primary) !important; }
th { color: var(--ink-muted) !important; }
th, td { border-color: var(--line) !important; }
.item-card, .kid-row, .passkey-box, .password-rules, .gdpr-group { background: rgba(15, 23, 42, 0.5) !important; border-color: var(--line) !important; }
.den-group.priority { border-color: var(--color-primary) !important; box-shadow: 0 10px 24px rgba(31, 122, 77, 0.12) !important; }
summary { background: rgba(30, 41, 59, 0.8) !important; color: var(--ink) !important; }
.modal-card { background: var(--surface) !important; border-color: var(--line) !important; }
.toast { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; }

body > .container > header,
section {
  background: var(--surface) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow-card) !important;
}
body > .container > header { border-left-color: var(--color-primary) !important; }
section h2, .color-name, .card h3 { color: var(--ink) !important; }
.color-info { background: var(--surface) !important; }
.color-hex, .card p { color: var(--ink-muted) !important; }

/* Order pages use calmer, roomier layouts because users read and compare data here. */
.platform-order-page .container {
  max-width: 1240px !important;
  gap: 1.5rem !important;
  margin-top: 2rem !important;
}
.platform-order-page #catalog-container { grid-column: 1 / -1; }
.platform-order-page .custom-item-section {
  grid-column: 1 / -1;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 1rem 1.25rem !important;
}
.platform-order-page .custom-item-section h3 {
  margin-bottom: 0.25rem !important;
  color: #4ade80 !important;
  font-family: var(--font-display) !important;
  font-size: 1.05rem !important;
  line-height: 1.25 !important;
}
.platform-order-page .custom-item-help {
  margin-bottom: 0.75rem !important;
  color: #94a3b8 !important;
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
}
.platform-order-page .custom-item-form {
  display: flex;
  gap: 0.6rem;
  max-width: 520px;
  align-items: stretch;
}
.platform-order-page .custom-item-form .form-control {
  flex: 1;
  min-width: 0;
  height: 2.6rem;
  padding: 0.55rem 0.75rem !important;
  font-size: 0.9rem !important;
}
.platform-order-page .custom-item-form .btn-action {
  flex: 0 0 auto;
  height: 2.6rem;
  min-width: 7.4rem;
  padding: 0.55rem 0.9rem !important;
  background: var(--color-primary) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap;
  cursor: pointer;
}
.platform-order-page .custom-item-form .btn-action:hover {
  background: var(--color-primary-hover) !important;
}
.platform-order-page #custom-item-preview { margin-top: 0.85rem; }
.platform-order-page .custom-item-preview-card {
  width: min(100%, 520px);
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.platform-order-page .custom-item-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  color: #f8fafc;
}
.platform-order-page .custom-item-preview-description {
  margin: 0.45rem 0 0.7rem !important;
  font-size: 0.8rem !important;
  line-height: 1.4;
}
.platform-order-page .custom-item-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.platform-order-page .custom-item-preview-price { color: #4ade80; font-weight: 700; }
.platform-order-page .custom-item-preview-footer .btn-add { width: auto; padding: 0.45rem 0.8rem; }
.platform-order-page .den-group {
  margin-bottom: 1.75rem !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
}
.platform-order-page summary {
  padding: 1.35rem 1.6rem !important;
  font-size: 1.25rem !important;
}
.platform-order-page .items-grid {
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)) !important;
  gap: 1rem !important;
  padding: 1.25rem !important;
}
.platform-order-page .item-card {
  width: 100%;
  height: 360px;
  padding: 1rem !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.platform-order-page .item-image { height: 170px !important; object-fit: contain !important; margin-bottom: 0.8rem !important; }
.platform-order-page .item-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 1rem !important;
  line-height: 1.35 !important;
  margin-bottom: 0.5rem !important;
}
.platform-order-page .item-desc { font-size: 0.86rem !important; line-height: 1.5 !important; margin-bottom: 1rem !important; }
.platform-order-page .item-price { margin-top: 1rem; margin-bottom: 0.85rem !important; }
.platform-order-page .cart-card {
  grid-column: 1 / -1;
  width: 100%;
  padding: 1.5rem !important;
  position: relative;
  top: auto;
}
.platform-order-page .cart-card h3 { padding-bottom: 0.85rem !important; margin-bottom: 1.25rem !important; }
.platform-order-page .cart-item { padding: 0.65rem 0; margin-bottom: 0.35rem !important; line-height: 1.45; }

.leader-order-page .container {
  max-width: 1240px !important;
  margin-top: 3rem !important;
}
.leader-order-page .header-bar { margin-bottom: 2.75rem !important; }
.leader-order-page .tab-bar { margin-bottom: 2rem !important; padding: 0 0 0.75rem !important; }
.leader-order-page .tab-btn { padding: 0.75rem 1.25rem !important; }
.leader-order-page .data-card {
  padding: 1.75rem !important;
  margin-bottom: 2rem !important;
}
.leader-order-page .data-card h3 { margin-bottom: 1.35rem !important; }
.leader-order-page table { font-size: 0.95rem !important; }
.leader-order-page th { padding: 0.9rem 1rem !important; line-height: 1.35 !important; }
.leader-order-page td { padding: 1.15rem 1rem !important; line-height: 1.5 !important; vertical-align: middle; }
.leader-order-page td:first-child, .leader-order-page th:first-child { padding-left: 0.75rem !important; }
.leader-order-page .badge-sku { white-space: nowrap; }
.leader-order-page .order-item-summary { min-width: 230px; }
.leader-order-page .order-item-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.3rem 0;
  white-space: nowrap;
}
.leader-order-page .order-item-line strong { color: #4ade80; }

.leader-order-page .export-modal { z-index: 600; }
.leader-order-page .export-modal-card {
  max-width: 760px;
  padding: 1.5rem !important;
}
.leader-order-page .export-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.leader-order-page .export-modal-header h2 { margin: 0.2rem 0 0.35rem; }
.leader-order-page .export-modal-header p,
.leader-order-page .export-fields-heading p { margin: 0; font-size: 0.85rem; color: #94a3b8; }
.leader-order-page .export-eyebrow {
  color: #4ade80;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.leader-order-page .export-close {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.leader-order-page .export-controls-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.leader-order-page .export-control-group,
.leader-order-page .export-fields-section {
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.leader-order-page .export-control-group h3,
.leader-order-page .export-fields-heading h3 { margin-bottom: 0.65rem; color: #f8fafc !important; font-size: 0.95rem; }
.leader-order-page .export-select-label { display: block; color: #94a3b8; font-size: 0.78rem; margin-bottom: 0.35rem; }
.leader-order-page .export-status-options { display: grid; gap: 0.55rem; }
.leader-order-page .export-status-options label,
.leader-order-page .export-field-row label { display: flex; align-items: center; gap: 0.55rem; color: #cbd5e1; font-size: 0.85rem; cursor: pointer; }
.leader-order-page .export-status-options input,
.leader-order-page .export-field-row input { accent-color: #22c55e; }
.leader-order-page .export-fields-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 0.75rem; }
.leader-order-page .export-preview-count { color: #4ade80; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.leader-order-page .export-fields-list { display: grid; gap: 0.35rem; }
.leader-order-page .export-field-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.42rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.leader-order-page .export-field-row:last-child { border-bottom: 0; }
.leader-order-page .export-field-arrows { display: flex; gap: 0.25rem; }
.leader-order-page .export-field-arrows button { width: 1.7rem; height: 1.7rem; border: 1px solid var(--line); border-radius: 0.35rem; background: rgba(255,255,255,0.08); color: #cbd5e1; cursor: pointer; }
.leader-order-page .export-field-arrows button:hover { background: #2563eb; color: #fff; }
.leader-order-page .export-note { margin: 1rem 0; color: #94a3b8; font-size: 0.78rem; line-height: 1.45; }
.leader-order-page .export-actions { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }

@media (max-width: 680px) {
  .leader-order-page .export-controls-grid { grid-template-columns: 1fr; }
  .leader-order-page .export-modal-card { padding: 1rem !important; }
  .leader-order-page .export-actions > button { flex: 1 1 100%; }
}

.platform-order-page .item-card { cursor: pointer; }
.platform-order-page .item-card:hover { border-color: rgba(96, 165, 250, 0.7) !important; }
.platform-order-page .item-detail-modal { z-index: 500; }
.platform-order-page .item-detail-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) 1.1fr;
  gap: 1.75rem;
  max-width: 760px;
  padding: 1.25rem !important;
  text-align: left;
}
.platform-order-page .item-detail-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #0f172a;
}
.platform-order-page .item-detail-content { align-self: center; padding: 1rem 1rem 1rem 0; }
.platform-order-page .item-detail-den {
  display: inline-block;
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.platform-order-page .item-detail-content h2 { margin-bottom: 0.75rem; }
.platform-order-page .item-detail-content p { line-height: 1.65; margin-bottom: 1.5rem; }
.platform-order-page .item-detail-sizes { color: #cbd5e1; font-size: 0.88rem; line-height: 1.5; margin-top: 1rem; }
.platform-order-page .item-detail-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.platform-order-page .item-detail-meta strong { color: #4ade80; font-size: 1.2rem; }
.platform-order-page .item-detail-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.platform-order-page .item-detail-close:hover { background: #334155; }
.platform-order-page .cart-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}
.platform-order-page .navbar .nav-actions {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.65rem !important;
}
.platform-order-page .deadline-badge {
  background: transparent !important;
  border: 0 !important;
  color: #94a3b8 !important;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0;
  white-space: nowrap;
}
.platform-order-page .deadline-badge span { color: #94a3b8 !important; }
.platform-order-page .item-card .badge-sku {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.platform-order-page .item-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(4.2rem, 0.6fr);
  align-items: start;
  gap: 0.45rem;
  min-height: 3.1rem;
}
.platform-order-page .item-heading .item-title { min-width: 0; }
.platform-order-page .item-heading .item-sku {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.2;
}
.platform-order-page .cart-icon { font-size: 1.15rem; }
.platform-order-page .cart-count {
  position: absolute;
  top: -0.45rem;
  right: -0.45rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.2rem;
  border: 2px solid #1e293b;
  border-radius: 50%;
  background: #22c55e;
  color: #0f172a;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 0.9rem;
}
.platform-order-page .cart-modal-card { position: relative; max-width: 560px; text-align: left; }
.platform-order-page .cart-modal-card h2 { margin-bottom: 1rem; }
.platform-order-page .cart-modal-items { max-height: 55vh; overflow-y: auto; padding-right: 0.25rem; }
.platform-order-page .cart-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.platform-order-page .cart-modal-item-info { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.platform-order-page .cart-modal-item-info strong { flex-basis: 100%; }
.platform-order-page .cart-size-select {
  min-width: 7rem;
  padding: 0.3rem 0.45rem;
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  color: #fff;
}
.platform-order-page .cart-no-size { color: #94a3b8; font-size: 0.8rem; }
.platform-order-page .cart-modal-order { margin-top: 1.25rem; }
.platform-order-page .cart-empty-message { color: #cbd5e1; padding: 1rem 0; }
.platform-order-page .size-picker-card { position: relative; max-width: 360px; text-align: left; }
.platform-order-page .size-picker-card h2 { margin-bottom: 1.1rem; font-size: 1.25rem; }
.platform-order-page .size-picker-options { display: grid; gap: 0.6rem; }
.platform-order-page .size-picker-option {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.15);
  color: #f8fafc;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.platform-order-page .size-picker-option:hover { background: #2563eb; border-color: #60a5fa; }

/* Second-Hand Store follows the same parent-platform surfaces and controls. */
.secondhand-page .navbar {
  display: flex !important;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 0;
  margin: 0;
  padding: 1.25rem 2rem !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
}
.secondhand-page .navbar h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  font-size: 1.35rem !important;
  line-height: normal !important;
  white-space: nowrap;
}
.secondhand-page .navbar .nav-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  flex: 0 0 auto;
  gap: 0.6rem !important;
}
.secondhand-page .navbar .btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 0;
  font-size: 0.85rem !important;
  white-space: nowrap;
}
.secondhand-page .modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(8px);
}
.secondhand-page .modal-overlay[style*="display: flex"] { display: flex !important; }
.secondhand-page .container {
  max-width: 1180px !important;
  margin: 2.5rem auto !important;
  padding: 0 1.5rem 4rem !important;
}
.secondhand-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start !important;
  gap: 1rem;
  margin-bottom: 2rem !important;
}
.secondhand-page .page-header h2 { margin-bottom: 0.45rem; font-size: clamp(1.8rem, 4vw, 2.45rem) !important; }
.secondhand-page .page-header p { max-width: 680px; line-height: 1.6; }
.secondhand-page .eyebrow {
  margin-bottom: 0.5rem;
  color: #4ade80 !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.secondhand-page .listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.35rem;
  padding: 1.25rem;
}
.secondhand-page .listing-group {
  grid-column: 1 / -1;
  overflow: hidden;
  margin-bottom: 0.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.72);
}
.secondhand-page .listing-group summary {
  padding: 1rem 1.2rem;
  background: transparent !important;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.secondhand-page .listing-group summary span {
  margin-left: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.secondhand-page .listing-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.35rem;
  padding: 0 1.2rem 1.2rem;
}
.secondhand-page .listing-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.secondhand-page .listing-card:hover {
  background: #26364c !important;
  border-color: var(--color-primary) !important;
  transform: translateY(-2px);
}
.secondhand-page .listing-image {
  display: block;
  width: 100%;
  height: 170px !important;
  background: #0f172a;
  margin-bottom: 0.8rem;
  object-fit: contain !important;
  object-position: center;
}
.secondhand-page .listing-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.45rem;
  min-height: 3.1rem;
}
.secondhand-page .listing-heading .item-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.secondhand-page .listing-heading .item-sku {
  max-width: 7rem;
  text-align: center;
}
.secondhand-page .listing-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 0.8rem;
}
.secondhand-page .listing-description { min-height: 4.1rem; font-size: 0.88rem; line-height: 1.55; }
.secondhand-page .listing-contact {
  margin-top: 0.75rem;
  padding: 0.8rem;
  background: rgba(15, 23, 42, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--ink-muted) !important;
  font-size: 0.8rem;
  line-height: 1.5;
}
.secondhand-page .listing-contact strong { color: var(--ink) !important; }
.secondhand-page .listing-seller-name { color: var(--ink) !important; font-weight: 700; }
.secondhand-page .listing-meta { border-color: var(--line) !important; }
.secondhand-page .listing-meta span:last-child { color: #4ade80 !important; }
.secondhand-page .listing-owner-actions { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 0.85rem; }
.secondhand-page .listing-owner-actions .btn-delete {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(248, 113, 113, 0.65);
  border-radius: var(--radius-md);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  font-weight: 700;
  cursor: pointer;
}
.secondhand-page .listing-owner-actions .btn-delete:hover { background: var(--color-danger); color: #fff; }
.secondhand-page .empty-state {
  background: var(--surface) !important;
  border: 1px dashed var(--line) !important;
  border-radius: var(--radius-lg) !important;
}
.secondhand-page .modal-card {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 2rem));
  overflow-y: auto;
  padding: 1.5rem !important;
}
.secondhand-page .delete-confirm-card {
  max-width: 420px;
  text-align: left;
}
.secondhand-page .delete-confirm-card h2 { margin-bottom: 0.45rem; }
.secondhand-page .delete-confirm-card p { margin-bottom: 1.25rem; }
.secondhand-page .delete-confirm-card .modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
}
.secondhand-page .delete-confirm-card .modal-actions button {
  flex: 1 1 0;
  min-height: 2.55rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.secondhand-page .btn-delete-confirm {
  border: 0;
  background: var(--color-danger);
  color: #fff;
}
.secondhand-page .btn-delete-confirm:hover { background: #dc2626; }
.secondhand-page .btn-delete-confirm:disabled { opacity: 0.6; cursor: wait; }
.secondhand-page .container { display: block !important; }
.secondhand-page .form-control {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: var(--radius-md) !important;
  color: #fff !important;
  font-family: var(--font-sans) !important;
}
.secondhand-page .form-control:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18) !important;
}
.secondhand-page .item-detail-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.secondhand-page .item-detail-close:hover { background: #334155; }
.secondhand-page .modal-card .form-control {
  display: block;
  width: 100%;
  min-height: 2.7rem;
  padding: 0.65rem 0.8rem !important;
  font-size: 0.9rem !important;
}
.secondhand-page .modal-card textarea.form-control { min-height: 7rem; resize: vertical; }
.secondhand-page .modal-card input[type="file"] { padding: 0.45rem 0.6rem !important; }
.secondhand-page .form-actions .btn-action,
.secondhand-page .form-actions .btn-back {
  flex: 1 1 0;
  min-height: 2.55rem;
  padding: 0.5rem 0.75rem !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.secondhand-page .form-actions .btn-back {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: var(--ink) !important;
}
.secondhand-page .form-actions .btn-back:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  transform: translateY(-1px);
}
.secondhand-page .form-actions .btn-action {
  background: var(--color-secondary) !important;
  border: 0 !important;
  color: #fff !important;
}
.secondhand-page .form-actions .btn-action:hover {
  background: var(--color-secondary-hover) !important;
  transform: translateY(-1px);
}
.secondhand-page .modal-card h2 { color: var(--ink) !important; }
.secondhand-page .modal-card > p { color: var(--ink-muted) !important; }
.secondhand-page .form-label { color: var(--ink-muted) !important; }
.secondhand-page .form-hint { color: #94a3b8 !important; }
.secondhand-page .form-group { margin-bottom: 1rem; }
.secondhand-page .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.secondhand-page .form-actions { gap: 0.65rem; }
.secondhand-page .status-message { color: #fca5a5 !important; }

@media (max-width: 868px) {
  .platform-order-page .items-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important; }
  .leader-order-page { overflow-x: hidden; }
  .leader-order-page .data-card { overflow-x: auto; }
  .leader-order-page table { min-width: 720px; }
  .platform-order-page .item-detail-card { grid-template-columns: 1fr; gap: 0.75rem; }
  .platform-order-page .item-detail-image { height: 260px; object-fit: contain !important; }
  .platform-order-page .item-detail-content { padding: 0.5rem; }
  .platform-order-page .item-detail-content p { max-height: 9rem; overflow-y: auto; padding-right: 0.5rem; }
  .platform-order-page .cart-modal-row { align-items: flex-start; }
}

@media (max-width: 680px) {
  .platform-order-page .navbar .nav-actions { flex-direction: row !important; align-items: center !important; }
  .platform-order-page .deadline-badge { font-size: 0.72rem; padding: 0.4rem 0.55rem; }
  .platform-order-page .deadline-badge span { display: inline; }
  .platform-order-page .custom-item-form { max-width: none; }
  .platform-order-page .custom-item-form .btn-action { white-space: nowrap; }
  .platform-order-page .item-card { height: 345px; }
  .platform-order-page .item-image { height: 165px !important; }
  .platform-order-page .cart-modal-row { flex-direction: column; }
}

@media (max-width: 430px) {
  .platform-order-page .custom-item-form { flex-direction: column; }
  .platform-order-page .custom-item-form .btn-action { width: 100%; }
}

.hero-container {
  background: linear-gradient(110deg, rgba(24, 48, 42, 0.88), rgba(31, 95, 139, 0.65)), url('https://images.unsplash.com/photo-1504280390367-361c6d9f38f4?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat !important;
  justify-content: center;
  padding-top: 12vh !important;
}
.hero-content { max-width: 720px; padding: 2rem; }
.hero-content h1 { color: #fff !important; font-size: clamp(2.5rem, 7vw, 5rem) !important; }
.hero-content p { color: #e8f0ea !important; }
.gdpr-cookie-banner { background: rgba(24, 48, 42, 0.96) !important; border-color: rgba(255,255,255,0.16) !important; }
.gdpr-cookie-banner span { color: #e8f0ea !important; }

@media (max-width: 680px) {
  .navbar { padding: 1rem !important; align-items: flex-start; gap: 0.8rem; }
  .navbar h1 { font-size: 1rem !important; }
  .nav-actions { flex-wrap: wrap; justify-content: flex-end; }
  .container { margin-top: 1.5rem !important; padding: 0 1rem !important; }
  .auth-card { padding: 1.35rem !important; }
  .header-bar { align-items: flex-start !important; }
  .app-grid { grid-template-columns: 1fr !important; }
  .gdpr-cookie-banner { flex-direction: column; align-items: stretch; text-align: center; padding: 0.85rem 1rem !important; }
  .toast-container { right: 1rem !important; left: 1rem !important; bottom: 1rem !important; }
  .toast { text-align: center; }
  .secondhand-page .container { margin-top: 1.5rem !important; padding: 0 1rem 3rem !important; }
  .secondhand-page .page-header { margin-bottom: 1.4rem !important; }
  .secondhand-page .listing-grid { grid-template-columns: 1fr; gap: 1rem; }
  .secondhand-page .listing-image { height: 220px; }
  .secondhand-page .contact-grid { grid-template-columns: 1fr; }
  .secondhand-page .form-actions { flex-direction: column-reverse; }
  .secondhand-page .form-actions button { width: 100%; }
  .secondhand-page .navbar { align-items: flex-start !important; margin: 0; padding: 1rem !important; }
  .secondhand-page .navbar h1 { white-space: normal; }
  .secondhand-page .navbar .nav-actions { width: auto; flex: 0 0 auto; }
}
