/* ==========================================================================
   Sincerely Yours - Group Gifting Platform
   Design tokens lifted from sincerelyyourspromos.com
   navy #044F9B | red #C61719 | pale #D6DDE9 | ink #222 | Montserrat
   ========================================================================== */

:root {
  --sy-navy:       #044F9B;
  --sy-navy-dark:  #033a72;
  --sy-navy-light: #0a63bd;
  --sy-red:        #C61719;
  --sy-red-dark:   #a01214;
  --sy-pale:       #D6DDE9;
  --sy-pale-soft:  #eef2f7;
  --sy-ink:        #222222;
  --sy-muted:      #4D4D4D;
  --sy-line:       #dddddd;
  --sy-bg:         #ffffff;
  --sy-bg-alt:     #f7f9fc;
  --sy-ok:         #1a7f4b;
  --sy-warn:       #a35a00;

  --sy-radius:     5px;
  --sy-radius-lg:  10px;
  --sy-shadow:     0 1px 3px rgba(4,26,55,.08), 0 6px 20px rgba(4,26,55,.06);
  --sy-shadow-lg:  0 4px 12px rgba(4,26,55,.10), 0 18px 48px rgba(4,26,55,.10);
  --sy-font:       'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --sy-max:        1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sy-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--sy-ink);
  background: var(--sy-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sy-navy); }
a:hover { color: var(--sy-navy-dark); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 2.05rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

.wrap { max-width: var(--sy-max); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header -- */
.topbar {
  background: var(--sy-navy);
  color: #fff;
  font-size: .8rem;
  letter-spacing: .02em;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 16px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }

.masthead { border-bottom: 1px solid var(--sy-line); background: #fff; }
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap;
}
.brand img { max-height: 58px; width: auto; }
.brand { text-decoration: none; }
.masthead-meta { text-align: right; font-size: .82rem; color: var(--sy-muted); line-height: 1.5; }
.masthead-meta strong { color: var(--sy-ink); display: block; font-size: .95rem; }

.client-strip {
  background: var(--sy-pale-soft);
  border-bottom: 1px solid var(--sy-pale);
  padding: 14px 0;
}
.client-strip .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.client-strip img { max-height: 42px; width: auto; }
.client-strip .cs-name { font-weight: 700; font-size: 1rem; }
.client-strip .cs-dead { margin-left: auto; font-size: .84rem; color: var(--sy-muted); }
.client-strip .cs-dead b { color: var(--sy-red); }

/* ------------------------------------------------------------------- hero -- */
.hero {
  background: linear-gradient(180deg, var(--sy-pale-soft) 0%, #fff 100%);
  padding: 46px 0 38px;
  border-bottom: 1px solid var(--sy-line);
}
.hero h1 { color: var(--sy-red); font-size: 2.3rem; margin-bottom: .35em; }
.hero .lead { font-size: 1.05rem; color: var(--sy-muted); max-width: 640px; }

/* -------------------------------------------------------------- sections -- */
.section { padding: 40px 0; }
.section-tight { padding: 26px 0; }
.section-alt { background: var(--sy-bg-alt); }

.eyebrow {
  text-transform: uppercase; letter-spacing: .09em; font-size: .72rem;
  font-weight: 700; color: var(--sy-navy); margin-bottom: .5rem;
}

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-block; font-family: var(--sy-font); font-size: 15px; font-weight: 700;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  padding: 11px 22px; border-radius: var(--sy-radius); border: 0;
  background: var(--sy-pale); color: var(--sy-ink);
  transition: background .15s ease, color .15s ease, transform .05s ease;
  line-height: 1.3;
}
.btn:hover { background: #c3cddd; color: var(--sy-ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--sy-navy-light); outline-offset: 2px; }

.btn-primary { background: var(--sy-navy); color: #fff; }
.btn-primary:hover { background: var(--sy-navy-dark); color: #fff; }

.btn-red { background: var(--sy-red); color: #fff; }
.btn-red:hover { background: var(--sy-red-dark); color: #fff; }

.btn-ghost { background: transparent; color: var(--sy-navy); border: 2px solid var(--sy-pale); }
.btn-ghost:hover { background: var(--sy-pale-soft); }

.btn-sm { font-size: 12.5px; padding: 7px 14px; }
.btn-lg { font-size: 16px; padding: 14px 30px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }

/* ----------------------------------------------------------------- cards -- */
.card {
  background: #fff; border: 1px solid var(--sy-line);
  border-radius: var(--sy-radius-lg); box-shadow: var(--sy-shadow);
}
.card-pad { padding: 26px; }

.product-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}

.product-card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--sy-line); border-radius: var(--sy-radius-lg);
  overflow: hidden; transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
  text-decoration: none; color: inherit;
}
.product-card:hover {
  box-shadow: var(--sy-shadow-lg); border-color: var(--sy-pale);
  transform: translateY(-2px); color: inherit;
}
.product-card .pc-img {
  background: #fff; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center;
  padding: 10px; border-bottom: 1px solid var(--sy-pale-soft);
}
.product-card .pc-img img { max-height: 100%; width: auto; object-fit: contain; }
.product-card .pc-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-card .pc-name { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.product-card .pc-item { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sy-muted); }
.product-card .pc-desc { font-size: .88rem; color: var(--sy-muted); margin: 10px 0 16px; flex: 1; }
.product-card .pc-cta { margin-top: auto; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.detail-media { border: 1px solid var(--sy-line); border-radius: var(--sy-radius-lg); padding: 16px; background: #fff; }
.spec-list { padding-left: 1.1rem; margin: 0 0 1rem; }
.spec-list li { margin-bottom: .3rem; color: var(--sy-muted); font-size: .93rem; }

/* ----------------------------------------------------------------- forms -- */
.field { margin-bottom: 18px; }
.field label, .lbl {
  display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--sy-muted); margin-bottom: 6px;
}
.field .req { color: var(--sy-red); }
.field .hint { font-size: .8rem; color: var(--sy-muted); margin-top: 5px; text-transform: none; letter-spacing: 0; font-weight: 400; }

input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=date], input[type=datetime-local], input[type=search],
select, textarea {
  width: 100%; font-family: var(--sy-font); font-size: 15px; color: var(--sy-ink);
  padding: 11px 13px; border: 1px solid #c8cfda; border-radius: var(--sy-radius);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--sy-navy);
  box-shadow: 0 0 0 3px rgba(4,79,155,.14);
}
input[readonly] { background: var(--sy-pale-soft); color: var(--sy-muted); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
select { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234D4D4D' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }

.field-error input, .field-error select, .field-error textarea { border-color: var(--sy-red); }
.err-msg { color: var(--sy-red); font-size: .82rem; margin-top: 5px; font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 18px; }

.opt-row { display: flex; flex-wrap: wrap; gap: 9px; }
.opt {
  border: 2px solid var(--sy-pale); background: #fff; border-radius: var(--sy-radius);
  padding: 9px 16px; font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: all .12s ease; min-width: 52px; text-align: center;
}
.opt:hover { border-color: var(--sy-navy-light); }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt.is-selected { border-color: var(--sy-navy); background: var(--sy-navy); color: #fff; }

/* ---------------------------------------------------------------- alerts -- */
.alert {
  border-radius: var(--sy-radius); padding: 14px 18px; margin-bottom: 20px;
  font-size: .92rem; border-left: 4px solid;
}
.alert-info    { background: var(--sy-pale-soft); border-color: var(--sy-navy); color: #16324f; }
.alert-success { background: #eaf6ef; border-color: var(--sy-ok);   color: #125c36; }
.alert-warn    { background: #fdf3e4; border-color: var(--sy-warn); color: #7a4400; }
.alert-error   { background: #fdecec; border-color: var(--sy-red);  color: #8d1113; }
.alert strong { display: block; margin-bottom: 3px; }

.badge {
  display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 9px; border-radius: 999px;
}
.badge-open   { background: #eaf6ef; color: var(--sy-ok); }
.badge-closed { background: #fdecec; color: var(--sy-red); }
.badge-draft  { background: var(--sy-pale); color: var(--sy-muted); }

/* ----------------------------------------------------------------- steps -- */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 28px; flex-wrap: wrap; font-size: .76rem; }
.steps li {
  display: flex; align-items: center; gap: 7px; color: var(--sy-muted);
  text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
}
.steps li + li::before { content: ''; width: 22px; height: 2px; background: var(--sy-pale); display: block; }
.steps .num {
  width: 22px; height: 22px; border-radius: 50%; background: var(--sy-pale);
  color: var(--sy-muted); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem;
}
.steps .is-active { color: var(--sy-navy); }
.steps .is-active .num { background: var(--sy-navy); color: #fff; }
.steps .is-done .num { background: var(--sy-ok); color: #fff; }

/* -------------------------------------------------------------- summary -- */
.summary { border: 1px solid var(--sy-line); border-radius: var(--sy-radius-lg); overflow: hidden; }
.summary-head { background: var(--sy-pale-soft); padding: 14px 20px; font-weight: 700; border-bottom: 1px solid var(--sy-line); }
.summary-body { padding: 20px; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--sy-pale); font-size: .92rem; }
.summary-row:last-child { border-bottom: 0; }
.summary-row span:first-child { color: var(--sy-muted); }
.summary-row span:last-child { font-weight: 600; text-align: right; }

.confirm-code {
  font-size: 1.6rem; font-weight: 700; letter-spacing: .08em; color: var(--sy-navy);
  background: var(--sy-pale-soft); border: 2px dashed var(--sy-pale);
  border-radius: var(--sy-radius); padding: 14px 20px; display: inline-block;
}

/* ---------------------------------------------------------------- footer -- */
.footer { background: var(--sy-navy); color: rgba(255,255,255,.85); margin-top: 60px; padding: 30px 0; font-size: .85rem; }
.footer a { color: #fff; }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* =========================================================== ADMIN AREA == */
.admin-body { background: var(--sy-bg-alt); }
.admin-bar { background: var(--sy-navy); color: #fff; }
.admin-bar .wrap { display: flex; align-items: center; gap: 26px; min-height: 58px; flex-wrap: wrap; }
.admin-bar .a-logo { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .84rem; color: #fff; text-decoration: none; }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 8px; }
.admin-nav a {
  color: rgba(255,255,255,.86); text-decoration: none; font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; padding: 7px 12px; border-radius: var(--sy-radius);
}
.admin-nav a:hover { background: rgba(255,255,255,.13); color: #fff; }
.admin-nav a.is-active { background: #fff; color: var(--sy-navy); }
.admin-user { margin-left: auto; font-size: .78rem; display: flex; align-items: center; gap: 12px; }
.admin-user a { color: #fff; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head .ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: #fff; border: 1px solid var(--sy-line); border-radius: var(--sy-radius-lg); box-shadow: var(--sy-shadow); margin-bottom: 24px; }
.panel-head { padding: 16px 22px; border-bottom: 1px solid var(--sy-line); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-body { padding: 22px; }
.panel-body-flush { padding: 0; }

.table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.table th {
  text-align: left; padding: 12px 16px; background: var(--sy-pale-soft);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sy-muted);
  border-bottom: 1px solid var(--sy-line); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfe; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.t-thumb { width: 46px; height: 56px; object-fit: contain; border: 1px solid var(--sy-line); border-radius: 4px; background: #fff; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: #fff; border: 1px solid var(--sy-line); border-radius: var(--sy-radius-lg); padding: 18px 20px; box-shadow: var(--sy-shadow); }
.stat .s-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--sy-muted); font-weight: 700; }
.stat .s-value { font-size: 1.9rem; font-weight: 700; color: var(--sy-navy); line-height: 1.15; margin-top: 4px; }
.stat .s-note { font-size: .78rem; color: var(--sy-muted); }

.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters .field { margin-bottom: 0; min-width: 180px; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 20px; background: linear-gradient(160deg, var(--sy-pale-soft), #fff 60%); }
.login-card { width: 100%; max-width: 420px; }
.login-card .brand-mark { text-align: center; margin-bottom: 26px; }
.login-card .brand-mark img { max-height: 54px; margin: 0 auto; }

.copy-link { display: flex; gap: 8px; align-items: center; }
.copy-link input { font-size: .82rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pick {
  border: 2px solid var(--sy-line); border-radius: var(--sy-radius); padding: 12px;
  cursor: pointer; display: flex; gap: 12px; align-items: center; background: #fff; transition: all .12s ease;
}
.pick:hover { border-color: var(--sy-navy-light); }
.pick.is-on { border-color: var(--sy-navy); background: var(--sy-pale-soft); }
.pick img { width: 42px; height: 52px; object-fit: contain; }
.pick .p-name { font-size: .85rem; font-weight: 700; line-height: 1.25; }
.pick .p-item { font-size: .7rem; color: var(--sy-muted); text-transform: uppercase; }
.pick input { margin: 0; }

.help-note { font-size: .84rem; color: var(--sy-muted); background: var(--sy-pale-soft); border-radius: var(--sy-radius); padding: 12px 15px; }

.muted { color: var(--sy-muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.6rem; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--sy-line); border: 0; margin: 26px 0; }

.actions-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--sy-line); }

/* --------------------------------------------------------------- mobile -- */
@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero h1 { font-size: 1.8rem; }
  h1 { font-size: 1.7rem; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .masthead .wrap { justify-content: center; text-align: center; }
  .masthead-meta { text-align: center; width: 100%; }
  .client-strip .cs-dead { margin-left: 0; width: 100%; }
  .topbar .wrap { justify-content: center; }
  .product-grid { grid-template-columns: 1fr; }
  .btn-block-sm { display: block; width: 100%; text-align: center; }
}

@media print {
  .topbar, .footer, .btn, .admin-bar, .steps { display: none !important; }
  body { font-size: 12pt; }
}
