/* ============================================================
   ourclubsale — Vendor Portal stylesheet
   Design tokens and base styles match the placeholder site
   and club admin portal (phase3/clubs/static/clubs/style.css).
   Vendor-specific components are added below.
   ============================================================ */

/* ── Tokens (identical to placeholder site) ───────────── */
:root {
    --navy:       #1e3a5f;
    --navy-dark:  #152d4a;
    --teal:       #0891b2;
    --teal-dark:  #0e7490;
    --teal-light: #cffafe;
    --bg:         #f8fafc;
    --white:      #ffffff;
    --text:       #1e293b;
    --muted:      #64748b;
    --border:     #e2e8f0;
    --amber-bg:   #fef3c7;
    --amber-text: #92400e;
    --red-bg:     #fef2f2;
    --red-border: #fecaca;
    --red-text:   #991b1b;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
}

/* ── Reset & base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
    background: var(--navy);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.header-inner {
    max-width: 1140px;
    margin: 0 auto;
    height: 62px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--teal); }

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    list-style: none;
    margin-left: auto;
    flex-wrap: wrap;
}

.nav-user {
    font-size: 0.85rem;
    color: #94a3b8;
    padding: 0.4rem 0.7rem;
}

.nav-link {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.7rem;
    border-radius: 5px;
    transition: color 0.15s, background 0.15s;
}
.nav-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.09);
    text-decoration: none;
}

/* Club Dashboard link — visible only to club admins in vendor portal */
.nav-link--highlight {
    color: #7dd3fc;
    border: 1px solid rgba(125,211,252,0.35);
}
.nav-link--highlight:hover {
    color: #ffffff;
    background: rgba(125,211,252,0.15);
}

/* Sign out as a button-styled link */
.nav-link--btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* ── Main content ──────────────────────────────────────── */
.main-content {
    flex: 1;
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* ── Messages ──────────────────────────────────────────── */
.messages { margin-bottom: 1.5rem; }
.message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.message--success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.message--warning { background: var(--amber-bg); color: var(--amber-text); border: 1px solid #fcd34d; }
.message--error   { background: var(--red-bg); color: var(--red-text); border: 1px solid var(--red-border); }
.message--info    { background: var(--teal-light); color: #0c4a6e; border: 1px solid #7dd3fc; }

/* ── Page header ───────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.page-header h1 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 0.15rem;
}

.page-header .muted { font-size: 0.9rem; }

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.breadcrumb {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.3rem;
}
.breadcrumb:hover { color: var(--teal); }

/* ── Info strip ────────────────────────────────────────── */
.info-strip {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.65rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-block;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.6rem 1.25rem;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    line-height: 1.4;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn--primary {
    background: var(--teal);
    color: white;
    box-shadow: 0 4px 12px rgba(8,145,178,0.28);
}
.btn--primary:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
    color: white;
}

.btn--teal {
    background: var(--teal-dark);
    color: white;
    box-shadow: 0 4px 12px rgba(14,116,144,0.28);
}
.btn--teal:hover {
    background: #0c6480;
    transform: translateY(-1px);
    color: white;
}

.btn--outline {
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--border);
}
.btn--outline:hover { border-color: var(--teal); color: var(--teal); }

.btn--small { padding: 0.32rem 0.75rem; font-size: 0.8rem; }

.btn--full { width: 100%; text-align: center; display: block; }

.btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Status badges ─────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Registration statuses (vendor-facing) */
.status-badge--confirmed  { background: #d1fae5; color: #065f46; }
.status-badge--pending    { background: var(--amber-bg); color: var(--amber-text); }
.status-badge--rejected   { background: var(--red-bg); color: var(--red-text); }
.status-badge--withdrawn  { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

/* List submission statuses */
.status-badge--submitted  { background: #ede9fe; color: #5b21b6; }
.status-badge--draft      { background: var(--amber-bg); color: var(--amber-text); }

/* List submission states (used in event_items.html) */
.status-badge--list-submitted { background: #ede9fe; color: #5b21b6; }
.status-badge--list-draft     { background: var(--amber-bg); color: var(--amber-text); }

/* Item statuses */
.status-badge--item-submitted    { background: var(--teal-light); color: #0c4a6e; }
.status-badge--item-available    { background: #d1fae5; color: #065f46; }
.status-badge--item-reserved     { background: var(--amber-bg); color: var(--amber-text); }
.status-badge--item-sold         { background: #ede9fe; color: #5b21b6; }
.status-badge--item-rejected     { background: var(--red-bg); color: var(--red-text); }
.status-badge--item-not_presented{ background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.status-badge--item-returned     { background: #fde8d8; color: #7c2d12; }
.status-badge--item-missing      { background: var(--red-bg); color: #991b1b; }

/* ── Data table ────────────────────────────────────────── */
.data-table-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    padding: 0.6rem 0.85rem;
    background: var(--bg);
    color: var(--muted);
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #fafafa; }

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Formset table (add_items) ─────────────────────────── */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.data-table--form th,
.data-table--form td {
    white-space: nowrap;
    vertical-align: top;
}

.data-table--form td { padding: 0.4rem 0.5rem; }

.col-seq  { width: 2.5rem; color: var(--muted); font-size: 0.8rem; text-align: center; }
.col-desc { min-width: 220px; white-space: normal; }
.col-price { width: 90px; }
.col-cat  { min-width: 140px; }
.col-char { min-width: 130px; }

.item-row--error td { background: #fef2f2; }

/* Form fields inside the formset table */
.data-table--form input[type="text"],
.data-table--form input[type="number"],
.data-table--form select {
    width: 100%;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.data-table--form input:focus,
.data-table--form select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(8,145,178,0.14);
}

/* ── Forms ─────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(8,145,178,0.14);
}

.form-layout {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem 2.5rem;
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.form-group--error input,
.form-group--error select,
.form-group--error textarea {
    border-color: #f87171;
}

.form-error {
    font-size: 0.8rem;
    color: var(--red-text);
    margin-top: 0.25rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.form-intro {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.5rem;
}

.form-actions--spaced {
    margin-top: 1.25rem;
}

.required { color: #dc2626; margin-left: 2px; }

/* ── Auth pages (login) ────────────────────────────────── */
.auth-page {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
}

.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.auth-footer {
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--muted);
    text-align: center;
}

/* ── Event grid (public event list) ────────────────────── */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.event-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: box-shadow 0.15s, transform 0.15s;
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.event-card__club {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-card__name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.01em;
}

.event-card__date {
    font-size: 0.875rem;
    color: var(--muted);
    flex: 1;
}

/* ── Empty state ───────────────────────────────────────── */
/* ── Alert banners ─────────────────────────────────────────────────────── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.alert a { text-decoration: underline; }
.alert--info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}
.alert--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.alert--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.empty-state {
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ── Mono / code ───────────────────────────────────────── */
.mono, code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    color: var(--navy);
}

/* ── Utility ───────────────────────────────────────────── */
.muted { color: var(--muted); }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
    background: var(--navy-dark);
    padding: 1.5rem 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.86rem;
    margin-top: auto;
}
.site-footer strong { color: white; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .main-content  { padding: 1.25rem; }
    .page-header   { flex-direction: column; }
    .page-header__actions { width: 100%; }
    .form-card     { padding: 1.5rem; }
    .auth-card     { padding: 1.75rem 1.5rem; }
    .event-grid    { grid-template-columns: 1fr; }
    .info-strip    { gap: 0.75rem; }
    .data-table th,
    .data-table td { padding: 0.5rem 0.6rem; }
}
/* ============================================================
   Registration feature — CSS additions
   Append these rules to BOTH:
     sales/static/sales/style.css
     clubs/static/clubs/style.css
   ============================================================ */

/* ── Nav-inline registration prompt ───────────────────────── */

.nav-register-prompt {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
    margin-right: 0.25rem;
}

.nav-register-select {
    font-size: 0.82rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    cursor: pointer;
    flex: 0 0 auto;
    width: 160px;
    max-width: 160px;
}
.nav-register-select option {
    background: #0f1923;   /* match nav background */
    color: #ffffff;
}
.nav-register-select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.6);
}

.nav-register-btn {
    font-size: 0.82rem;
    padding: 0.3rem 0.85rem;
    background: var(--teal, #0891b2);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 0.5rem;
}
.nav-register-btn:hover {
    background: var(--teal-dark, #0e7490);
}

.nav-divider {
    color: rgba(255,255,255,0.75);
    margin: 0 0.6rem;
    font-size: 0.85rem;
}

/* ── Form field base styles (needed by clubs CSS, harmless dupe in sales) ── */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(8,145,178,0.14);
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.form-group--error input,
.form-group--error select,
.form-group--error textarea {
    border-color: #f87171;
}

.field-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

.field-error {
    display: block;
    font-size: 0.8rem;
    color: var(--red-text, #dc2626);
    margin-top: 0.3rem;
}

/* ── Registration form pages ──────────────────────────────── */

.reg-container {
    max-width: 640px;
    margin: 2rem auto;
}

.reg-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-sm);
}

.reg-header {
    margin-bottom: 1.75rem;
}

.reg-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 0.4rem;
}

.reg-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}
.reg-subtitle a {
    color: var(--teal)
/* ── Screen ID (footer) ──────────────────────────────────────────────────── */
.screen-id {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-muted, #9ca3af);
  letter-spacing: 0.05em;
}

/* ── Event list filter bar (OCS3003) ──────────────────────────────────────── */
.filter-bar {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 160px;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 0.875rem;
  color: var(--text, #1e293b);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal-light);
}

/* ── CSS tooltip (sitewide utility — UI_TODO #22) ─────────────────────────── */
/* Usage: add class="has-tooltip" and data-tooltip="Your text" to any element. */
.has-tooltip {
  position: relative;
  display: inline-block;
}
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  transform: none;
  background: var(--navy-dark);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 200;
}
.has-tooltip:hover::after {
  opacity: 1;
}
