/* SupaChat Merchant Hub — deals upload portal */
body { background: var(--bg); }
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: #1c1526; color: rgba(255,255,255,.78); display: flex; flex-direction: column; padding: 20px 14px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; }
.side .brand img { width: 40px; }
.side .brand b { display: block; font-size: 16px; line-height: 1.1; }
.side .brand span { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #f3c6e2; font-weight: 700; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; font-weight: 500; }
.nav a svg { width: 20px; height: 20px; opacity: .8; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.nav a.on svg { opacity: 1; color: #f3a8d4; }
.side .foot { margin-top: auto; display: grid; gap: 8px; }
.side .foot a { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 8px 12px; border-radius: 10px; }
.side .foot a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side .foot svg { width: 16px; height: 16px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.top .who { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-3); }
.top .who .select { height: 38px; width: 230px; font-size: 14px; font-weight: 600; color: var(--ink); border-radius: 999px; }
.content { padding: 28px 32px 60px; max-width: 1240px; }

/* stepper */
.stepper { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-3); }
.step i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; background: var(--bg); }
.step.on { color: var(--ink); border-color: var(--brand); box-shadow: var(--focus); }
.step.on i { background: var(--brand); color: #fff; }
.step.done { color: var(--ink-2); }
.step.done i { background: var(--green-50); color: var(--green); }
.step.done i svg { width: 14px; height: 14px; }

/* upload */
.upload-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: stretch; }
.drop {
    display: grid; place-items: center; text-align: center; padding: 44px 28px; border-radius: var(--r-lg);
    border: 2px dashed var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; min-height: 320px;
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-50); }
.drop .ic { width: 68px; height: 68px; border-radius: 22px; background: var(--grad); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 10px 26px rgba(184,55,138,.3); }
.drop .ic svg { width: 32px; height: 32px; }
.drop h2 { margin: 0 0 6px; font-size: 20px; }
.drop p { margin: 0 0 18px; color: var(--ink-3); }
.drop .formats { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.drop.busy { pointer-events: none; opacity: .75; }
.panel { padding: 22px; }
.panel h3 { margin: 0 0 6px; font-size: 17px; }
.panel p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.req-list { display: grid; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.req-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.req-list li::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--brand); }
.tip { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--magenta-50); color: var(--ink-2); font-size: 13.5px; line-height: 1.45; margin-top: 14px; }
.tip svg { width: 18px; height: 18px; color: var(--magenta-600); flex: 0 0 auto; margin-top: 1px; }

/* tables */
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 820px; }   /* scroll sideways on phones instead of squashing */
.guide-table { min-width: 640px; }
th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.err td { background: #fffafa; }
.thumb { width: 52px; height: 52px; max-width: none; flex: none; border-radius: 10px; object-fit: cover; background: var(--bg); border: 1px solid var(--line); }
.cell-title { font-weight: 600; line-height: 1.3; max-width: 360px; }
.cell-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.sample { font-size: 13px; color: var(--ink-3); max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-select { height: 38px; font-size: 14px; min-width: 230px; border-radius: 10px; }
.map-select.req { border-color: var(--brand); }
.issues { display: grid; gap: 3px; font-size: 12.5px; }
.issues .error { color: var(--red); }
.issues .warning { color: var(--amber); }
.issues .info { color: var(--ink-3); }
.issues .filled { color: var(--green); }

/* summary cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, box-shadow .15s; text-align: left; }
.stat:hover { border-color: var(--line-2); }
.stat.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.stat b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat .dot { width: 8px; height: 8px; border-radius: 50%; }
.enrich { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r); background: linear-gradient(135deg, var(--magenta-50), var(--brand-50)); margin-bottom: 16px; flex-wrap: wrap; }
.enrich .txt { flex: 1; min-width: 240px; }
.enrich b { display: block; }
.enrich span { font-size: 13.5px; color: var(--ink-2); }
.progress { height: 8px; border-radius: 999px; background: rgba(118,75,162,.15); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .3s; }
.actions-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px; }
.banner svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.banner.red { background: var(--red-50); color: var(--red); }
.banner.green { background: var(--green-50); color: var(--green); }
.banner.purple { background: var(--brand-50); color: var(--brand-600); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px; font-size: 13.5px; color: var(--ink-3); }

/* publish */
.publish { max-width: 640px; margin: 10px auto; text-align: center; padding: 40px 32px; }
.publish .big { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; margin: 0 auto 18px; background: var(--grad); color: #fff; }
.publish .big svg { width: 40px; height: 40px; }
.publish h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.015em; }
.publish p { color: var(--ink-2); margin: 0 0 22px; }
.publish .nums { display: flex; justify-content: center; gap: 28px; margin: 0 0 26px; }
.publish .nums b { display: block; font-size: 30px; font-weight: 800; }
.publish .nums span { font-size: 13px; color: var(--ink-3); }
.publish .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* my deals */
.filters-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filters-bar .input { width: 320px; max-width: 100%; height: 42px; border-radius: 999px; }
.price-edit { width: 110px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; font-weight: 700; }
.price-edit:hover { border-color: var(--line-2); }
.price-edit:focus { border-color: var(--brand); background: var(--surface); outline: none; box-shadow: var(--focus); }
.metric { font-variant-numeric: tabular-nums; }
.row-acts { display: flex; gap: 4px; justify-content: flex-end; }
.row-acts .icon-btn { width: 34px; height: 34px; }
.row-acts .icon-btn svg { width: 18px; height: 18px; }
.guide-table td:first-child { font-weight: 600; white-space: nowrap; }
.modal-back { position: fixed; inset: 0; background: rgba(23,18,31,.45); display: grid; place-items: center; z-index: 150; padding: 20px; }
.modal { background: var(--surface); border-radius: var(--r-lg); max-width: 440px; width: 100%; padding: 24px; box-shadow: var(--shadow-3); }
.modal h3 { margin: 0 0 8px; }
.modal p { margin: 0 0 18px; color: var(--ink-2); }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 960px) {
    .app { grid-template-columns: 1fr; }
    .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 8px; overflow-x: auto; }
    .side .brand { padding: 0 8px 0 0; }
    .side .brand div { display: none; }
    .nav { display: flex; }
    .nav a { white-space: nowrap; padding: 8px 12px; }
    .side .foot { display: none; }
    .top { padding: 14px 16px; flex-wrap: wrap; }
    .top .who { width: 100%; }
    .top .who .select { flex: 1; width: auto; }
    .content { padding: 18px 16px 60px; }
    .upload-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}
