/* ─────────────────────────────────────────────────────────────
   glp1.party // Design System v8 (Refined & Flowing)
   Natural typography · Subtle surfaces · Smooth mobile transitions
   ───────────────────────────────────────────────────────────── */

/* ── SELF-HOSTED DM MONO FONT ── */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dm-mono-normal-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/dm-mono-normal-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/dm-mono-italic-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── DESIGN TOKENS ── */
:root {
  --bg:              #f8fafc;
  --surface:         #ffffff;
  --surface-subtle:  #f1f5f9;
  --surface-raised:  #e2e8f0;
  --border:          #e2e8f0;
  --border-strong:   #cbd5e1;
  --border-subtle:   #f1f5f9;
  --text:            #0f172a;
  --text-secondary:  #334155;
  --text-muted:      #64748b;
  --text-subtle:     #94a3b8;
  --pink:            #e11d48;
  --pink-hover:      #be185d;
  --pink-dark:       #9f1239;
  --pink-bg:         #fff1f2;
  --pink-border:     #fecdd3;
  --green:           #059669;
  --green-hover:     #047857;
  --green-bg:        #ecfdf5;
  --green-border:    #a7f3d0;
  --green-text:      #065f46;
  --amber:           #d97706;
  --amber-bg:        #fffbeb;
  --amber-border:    #fde68a;
  --amber-text:      #92400e;
  --red:             #dc2626;
  --red-bg:          #fef2f2;
  --red-border:      #fecaca;
  --red-text:        #991b1b;
  --blue:            #2563eb;
  --blue-bg:         #eff6ff;
  --blue-border:     #bfdbfe;
  --blue-text:       #1e40af;
  --discord:         #5865F2;
  --discord-hover:   #4752c4;
  --font-sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:       'JetBrains Mono', 'DM Mono', monospace;
  --text-xs:         11px;
  --text-sm:         12.5px;
  --text-base:       14px;
  --text-md:         16px;
  --text-lg:         18px;
  --text-xl:         22px;
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --layout-wide:   1140px;
  --layout-main:   980px;
  --layout-narrow: 640px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;
  --shadow-sm:   0 1px 3px rgba(15,23,42,0.05), 0 1px 2px rgba(15,23,42,0.02);
  --shadow-md:   0 4px 12px rgba(15,23,42,0.05), 0 1px 3px rgba(15,23,42,0.02);
  --shadow-lg:   0 10px 25px -3px rgba(15,23,42,0.06), 0 4px 6px -2px rgba(15,23,42,0.02);
  --shadow-pink: 0 4px 14px rgba(225,29,72,0.18);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fast:   cubic-bezier(0.2, 0, 0, 1);
}

/* ── RESET & TYPOGRAPHY HYGIENE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
}

.roster-avatar img,
.customer-avatar-lg img,
.slip-avatar img,
.gb-member img,
.user-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  border-radius: 9999px !important;
  display: block !important;
}

ul, ol, menu {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0;
}

/* Strip default summary markers */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* ── BASE BODY ── */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 719px) { body { padding-bottom: 64px; } }

/* ── MOBILE TOUCH DISCIPLINE (MIN 44PX TARGETS) ── */
button, input, select, textarea, .btn, .role-btn {
  font-family: inherit;
  font-size: inherit;
  touch-action: manipulation;
}

button, .btn, .role-btn, select, input[type="button"], input[type="submit"] {
  min-height: 40px;
}

@media (max-width: 640px) {
  button, .btn, select, input[type="button"], input[type="submit"] {
    min-height: 44px;
  }
}

/* ── FOCUS RINGS ── */
:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── ANIMATIONS ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseSubtle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

.animate-fade {
  animation: fadeIn 0.3s var(--ease-smooth) forwards;
}

/* ── SITE HEADER ── */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-4);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 1px 2px rgba(15,23,42,0.02);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  line-height: 1;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}
.header-brand:hover { opacity: 0.85; text-decoration: none; }

.brand-logo-img {
  width: 22px; height: 22px;
  border-radius: 5px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand-title-wrap { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.brand-name   { font-size: var(--text-md); font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.brand-subtitle { font-size: 11px; font-weight: 500; color: var(--text-muted); }

/* ── DESKTOP NAV ── */
.nav-links { display: none; align-items: center; gap: 3px; }
@media (min-width: 720px) { .nav-links { display: flex; } }

.nav-tab {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  transition: color 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.nav-tab:hover { color: var(--text); background: var(--surface-subtle); text-decoration: none; }
.nav-tab.active { background: var(--pink-bg); color: var(--pink); border-color: var(--pink-border); }
.nav-tab.admin-tab { color: var(--pink); border-color: var(--pink-border); }

/* ── HEADER USER ── */
.header-user { display: flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; }
.user-display-name { font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.user-avatar {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--pink-bg);
  border: 1px solid var(--pink-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: var(--pink);
  overflow: hidden; flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.header-logout { color: var(--text-muted); text-decoration: none; font-size: 11.5px; transition: color 0.15s; }
.header-logout:hover { color: var(--text); }
.header-login { color: var(--pink); font-weight: 700; text-decoration: none; font-size: 12px; transition: color 0.15s; }
.header-login:hover { color: var(--pink-hover); }

/* ── MOBILE BOTTOM NAV ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 600;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(15,23,42,0.04);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (max-width: 719px) { .mobile-bottom-nav { display: flex; } }

.mobile-nav-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 6px 4px; height: 52px;
  text-decoration: none; color: var(--text-muted);
  font-size: 11px; font-weight: 600; letter-spacing: -0.01em;
  transition: color 0.15s ease, background 0.15s ease;
  position: relative; border: none; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-sans);
}
.mobile-nav-tab:hover, .mobile-nav-tab.active { color: var(--pink); text-decoration: none; }
.mobile-nav-tab.active::before {
  content: '';
  position: absolute; top: 0; left: 16px; right: 16px;
  height: 2px; background: var(--pink); border-radius: 0 0 2px 2px;
}
.mobile-nav-icon { font-size: 17px; line-height: 1; }

/* ── PAGE CONTAINERS ── */
.page        { max-width: var(--layout-main); margin: 0 auto; padding: 18px var(--sp-4) var(--sp-12); display: flex; flex-direction: column; gap: 16px; animation: fadeIn 0.25s var(--ease-smooth); }
.page-main   { max-width: var(--layout-main); margin: 0 auto; padding: 18px var(--sp-4) var(--sp-12); display: flex; flex-direction: column; gap: 16px; animation: fadeIn 0.25s var(--ease-smooth); }
.page-narrow { max-width: var(--layout-narrow); margin: 0 auto; padding: 18px var(--sp-4) var(--sp-12); display: flex; flex-direction: column; gap: 16px; animation: fadeIn 0.25s var(--ease-smooth); }

/* ── HERO HEADER ── */
.hero-header { display: flex; flex-direction: column; gap: 4px; }
.hero-title  { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; line-height: 1.2; }
.hero-desc   { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  height: 38px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; text-decoration: none; white-space: nowrap; line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-pink        { background: var(--pink);    color: #fff; box-shadow: var(--shadow-pink); }
.btn-pink:hover  { background: var(--pink-hover); text-decoration: none; }
.btn-green       { background: var(--green);   color: #fff; }
.btn-green:hover { background: var(--green-hover); text-decoration: none; }
.btn-secondary       { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-subtle); border-color: var(--border-strong); text-decoration: none; }
.btn-ghost       { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-subtle); color: var(--text); text-decoration: none; }
.btn-discord       { background: var(--discord); color: #fff; }
.btn-discord:hover { background: var(--discord-hover); text-decoration: none; }
.btn-sm  { height: 30px; font-size: var(--text-xs); padding: 0 10px; }
.btn-lg  { height: 42px; font-size: 13px; padding: 0 18px; }
.btn-full { width: 100%; }
.btn-disabled, .btn[disabled] {
  background: var(--surface-raised) !important; color: var(--text-subtle) !important;
  cursor: not-allowed !important; box-shadow: none !important;
  pointer-events: none !important; transform: none !important; border-color: transparent !important;
}

/* ── STATUS TAGS ── */
.tag-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  padding: 2.5px 7px; border-radius: 4px; letter-spacing: 0.04em; line-height: 1;
}
.status-confirmed { background: var(--green-bg);  color: var(--green);     border: 1px solid var(--green-border); }
.status-paid      { background: #dcfce7;           color: #15803d;           border: 1px solid #86efac; }
.status-shipped   { background: var(--blue-bg);    color: var(--blue-text);  border: 1px solid var(--blue-border); }
.status-cancelled { background: var(--red-bg);     color: var(--red-text);   border: 1px solid var(--red-border); }
.status-pending   { background: var(--amber-bg);   color: var(--amber-text); border: 1px solid var(--amber-border); }
.status-private   { background: var(--surface-raised); color: var(--text-muted); border: 1px solid var(--border); }

/* ── TOOLBAR / SEARCH ── */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-box { flex: 1 1 220px; position: relative; }
.search-input {
  width: 100%; height: 38px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0 12px 0 34px; font-family: var(--font-sans); font-size: 13px;
  color: var(--text); outline: none; transition: border-color 0.15s ease, background 0.15s ease;
}
.search-input:focus { border-color: var(--pink); background: #ffffff; }
.search-input::placeholder { color: var(--text-subtle); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-muted); pointer-events: none; }
.filter-select {
  height: 38px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 0 10px; font-family: var(--font-sans);
  font-size: 13px; font-weight: 600; color: var(--text); outline: none; cursor: pointer;
  transition: border-color 0.15s ease;
}
.filter-select:focus { border-color: var(--pink); }

/* ── CARDS GRID ── */
.cards-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px)  { .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 960px)  { .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

/* ── GROUP BUY CARDS ── */
.gb-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s var(--ease-smooth), box-shadow 0.15s var(--ease-smooth), border-color 0.15s ease;
  position: relative;
}
.gb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15,23,42,0.06);
  border-color: var(--border-strong);
}
.gb-card.private-locked { opacity: 0.8; }
.gb-card.private-locked:hover { transform: none; box-shadow: 0 1px 3px rgba(15,23,42,0.03); }

/* ── CARD ORDER BUTTONS ── */
.btn-order {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 40px; background: var(--pink); color: #fff;
  font-family: var(--font-sans); font-weight: 600; font-size: 13px;
  text-decoration: none; border-radius: var(--radius-md); border: none; cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-order:hover { background: var(--pink-hover); text-decoration: none; transform: translateY(-1px); }
.btn-order.btn-manage       { background: var(--green); }
.btn-order.btn-manage:hover { background: var(--green-hover); text-decoration: none; }

/* ── SECTION TITLES ── */
.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── FORMS ── */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: var(--text-xs); font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.form-input, .form-select, .form-textarea {
  font-family: var(--font-sans); font-size: 13.5px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); outline: none; width: 100%;
  transition: border-color 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--pink); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-subtle); }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

/* ── ALERTS ── */
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 12px; display: flex; align-items: flex-start; gap: 8px; line-height: 1.45; }
.alert-error   { background: var(--red-bg);   border: 1px solid var(--red-border);   color: var(--red-text); }
.alert-success { background: var(--green-bg);  border: 1px solid var(--green-border); color: var(--green-text); }
.alert-warning { background: var(--amber-bg);  border: 1px solid var(--amber-border); color: var(--amber-text); }
.alert-info    { background: var(--blue-bg);   border: 1px solid var(--blue-border);  color: var(--blue-text); }

/* ── MODALS ── */
.modal-overlay,
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: 999; display: none; align-items: center; justify-content: center; padding: var(--sp-4);
}
.modal-overlay.is-open,
.modal-overlay.is-active,
.modal-backdrop.is-open,
.modal-backdrop.is-active { display: flex !important; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px;
  animation: fadeIn 0.2s var(--ease-smooth);
}

/* ── EMPTY STATES ── */
.empty-state {
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-md);
  padding: 32px 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted);
}
.empty-state-icon  { font-size: 26px; opacity: .7; line-height: 1; }
.empty-state-title { font-size: 14px; font-weight: 700; color: var(--text); }
.empty-state-desc  { font-size: 12px; max-width: 380px; line-height: 1.5; }

/* ── LIVE COUNTDOWN ── */
.live-countdown {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--pink);
  background: var(--pink-bg); border: 1px solid var(--pink-border);
  padding: 3px 10px; border-radius: var(--radius-sm);
}

/* ── UTILITIES ── */
.text-pink   { color: var(--pink); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 800; }
.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; }

