/* Etsy Reply Drafter dashboard — single stylesheet, light, compact. */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --border: #e3e6ea;
  --text: #1d2530;
  --muted: #69737f;
  --accent: #b3591f;        /* warm Etsy-ish orange, used sparingly */
  --accent-ink: #ffffff;
  --danger: #b4232a;
  --ok: #1e7a3c;
  --warn-bg: #fdf3e2;
  --warn-border: #ecd3a5;
  --err-bg: #fbeceb;
  --err-border: #eec6c4;
  --ok-bg: #e9f5ec;
  --ok-border: #bfe0c8;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 15px; margin: 0 0 10px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 10px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.empty { padding: 24px 0; }

/* ---- layout ---- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand { font-weight: 700; letter-spacing: 0.2px; }
.brand-big { font-size: 18px; margin-bottom: 18px; }

.shop-chip {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow-wrap: anywhere;
}

.sidebar nav { display: flex; flex-direction: column; gap: 2px; }

.nav-link {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text);
}
.nav-link:hover { background: var(--bg); text-decoration: none; }
.nav-link.active { background: var(--accent); color: var(--accent-ink); }

.sidebar-foot { margin-top: auto; }

.main {
  flex: 1;
  padding: 24px 28px;
  max-width: 980px;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.page-head h1 { margin-bottom: 4px; }

/* ---- auth pages ---- */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-box { width: 100%; max-width: 360px; }

.auth-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form h1 { margin: 0; }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.auth-form input { font-weight: 400; }

/* ---- cards, tiles ---- */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.tile-value { font-size: 22px; font-weight: 700; }
.tile-label { color: var(--muted); font-size: 12px; }

/* ---- badges, pills ---- */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-free { background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.badge-pro { background: var(--accent); color: var(--accent-ink); }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 12px;
}
.pill-warn { background: var(--warn-bg); border-color: var(--warn-border); }
.pill-accepted { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.pill-rejected { background: var(--err-bg); border-color: var(--err-border); color: var(--danger); }
.pill-edited { background: var(--warn-bg); border-color: var(--warn-border); }

/* ---- usage bar ---- */

.usage { margin: 8px 0 4px; }
.usage-label { display: flex; justify-content: space-between; margin-bottom: 6px; }
.bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s; }
.bar-hot { background: var(--danger); }

/* ---- tables ---- */

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
tbody tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--bg); }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions .btn { margin-left: 6px; }

/* ---- forms ---- */

input, select, textarea {
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 9px;
  width: 100%;
}
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}
textarea { resize: vertical; }

.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-weight: 600; font-size: 13px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.combo { display: block; }

/* ---- buttons ---- */

.btn {
  font: inherit;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-danger { color: var(--danger); border-color: var(--err-border); }
.btn-danger:hover { background: var(--err-bg); }
.btn-ghost { border: none; background: none; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---- notices, toast ---- */

.notice {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.notice-warn { background: var(--warn-bg); border-color: var(--warn-border); }
.notice-err { background: var(--err-bg); border-color: var(--err-border); }
.notice-ok { background: var(--ok-bg); border-color: var(--ok-border); }

#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 12px);
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--panel);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.toast-err { background: var(--danger); color: #fff; }

/* ---- conversations ---- */

.chat { display: flex; flex-direction: column; gap: 8px; }
.bubble-row { display: flex; }
.bubble-row.right { justify-content: flex-end; }
.bubble {
  max-width: 72%;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.bubble-customer { background: var(--bg); border-bottom-left-radius: 3px; }
.bubble-seller {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  border-bottom-right-radius: 3px;
}
.bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }

.reply .reply-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.grow-right { margin-left: auto; }
.reply-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-left: 3px solid var(--border);
  padding: 2px 0 2px 12px;
  margin-bottom: 10px;
}
.warnings { margin: 0 0 10px; padding-left: 18px; color: var(--danger); }
.reply-actions { display: flex; gap: 8px; align-items: center; }

.billing-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---- small screens ---- */

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: auto;
    flex: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { margin-top: 0; margin-left: auto; }
  .main { padding: 16px; }
}

/* ---- landing page (moustor.com) ---- */
.landing { max-width: 1060px; margin: 0 auto; padding: 0 20px 40px; }
.land-topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; }
.land-brand { font-weight: 800; font-size: 22px; color: var(--accent); }
.land-nav { display: flex; align-items: center; gap: 16px; }
.land-nav a { text-decoration: none; color: var(--text); }
.land-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px;
  align-items: center; padding: 44px 0 24px; }
.land-hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 14px; }
.land-sub { font-size: 17px; color: var(--muted); margin: 0 0 22px; }
.land-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.land-section { padding: 36px 0; }
.land-section h2 { font-size: 26px; margin: 0 0 18px; }
.land-lead { font-size: 16px; color: var(--muted); max-width: 720px; }
.land-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.land-step { position: relative; padding: 22px 18px 16px; }
.land-step-n { width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.land-step h3, .land-feature h3 { margin: 0 0 6px; font-size: 16px; }
.land-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.land-feature { padding: 16px; }
.land-pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 360px));
  gap: 20px; justify-content: center; margin-bottom: 14px; }
.price-card { position: relative; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.price-featured { border-color: var(--accent); box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.price-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink); font-size: 12px;
  font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.price-amount { font-size: 34px; font-weight: 800; margin: 6px 0; }
.price-per { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.price-list { list-style: none; padding: 0; margin: 14px 0 18px; }
.price-list li { padding: 5px 0 5px 24px; position: relative; }
.price-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); }
.land-byok { margin-top: 10px; }
.land-signup .auth-box { margin: 0 auto; }
.land-footer { border-top: 1px solid var(--border); margin-top: 30px;
  padding-top: 18px; text-align: center; }
.mock-chat { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mock-row { display: flex; }
.mock-buyer { justify-content: flex-start; }
.mock-seller { justify-content: flex-end; }
.mock-bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--border); font-size: 14px; }
.mock-draft { background: var(--ok-bg); border-color: var(--ok-border); }
.mock-tag { font-size: 11px; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.mock-note { text-align: right; }
.sso-divider { text-align: center; margin: 12px 0 8px; }
a.brand-big { text-decoration: none; }
@media (max-width: 860px) {
  .land-hero { grid-template-columns: 1fr; }
  .land-hero h1 { font-size: 30px; }
  .land-steps, .land-features { grid-template-columns: 1fr 1fr; }
  .land-pricing { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .land-steps, .land-features { grid-template-columns: 1fr; }
}

/* ---- products: one-click Etsy import ---- */
.import-bar { padding: 16px; margin-bottom: 16px; }
.import-bar h3 { margin: 0 0 4px; }
.import-row { display: flex; gap: 10px; margin-top: 10px; }
.import-row input { flex: 1; }
@media (max-width: 560px) { .import-row { flex-direction: column; } }

/* Reply translation (conversation detail) */
.reply-translation { margin-top: 8px; padding: 8px 12px; border-radius: 8px;
  background: #eef4fb; border: 1px solid #c9daf0; white-space: pre-wrap;
  font-size: 13px; }

/* ---- landing v2: hero card, stats, showcase, FAQ ---- */
.land-hero-card { position: relative; margin: 8px 0 12px; padding: 44px 40px 34px;
  border-radius: 22px; border: 1px solid var(--border);
  background: linear-gradient(135deg, #fff7f0 0%, #fdeee2 55%, #fbe6d7 100%); }
.land-eyebrow { display: inline-block; font-size: 12px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px; }
.land-hero-card h1 { font-size: 42px; line-height: 1.12; margin: 0 0 14px;
  max-width: 720px; }
.land-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 26px 0 14px; max-width: 640px; }
.land-stat-v { font-size: 26px; font-weight: 800; }
.land-stat-l { line-height: 1.25; }

/* showcase demo window */
.demo-wrap { max-width: 720px; }
.demo-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.demo-tab { appearance: none; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.demo-tab.active { background: #222; color: #fff; border-color: #222; }
.demo-window { border: 1px solid var(--border); border-radius: 14px;
  background: var(--panel); overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); }
.demo-titlebar { display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg); }
.demo-dot { width: 10px; height: 10px; border-radius: 50%;
  background: var(--border); }
.demo-title { margin-left: 8px; font-size: 12px; color: var(--muted); }
.demo-thread { min-height: 96px; padding: 16px 16px 4px; display: flex;
  flex-direction: column; gap: 10px; }
.demo-msg { display: flex; }
.demo-buyer { justify-content: flex-start; }
.demo-msg .demo-bubble { max-width: 82%; padding: 9px 13px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--border); font-size: 13.5px;
  animation: demo-in 0.35s ease; }
@keyframes demo-in { from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; } }
.demo-toolbar { display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 0; }
.demo-draftbtn { background: #222; color: #fff; font-size: 12.5px;
  font-weight: 600; padding: 8px 14px; border-radius: 999px; flex: none;
  transition: transform 0.15s ease; }
.demo-draftbtn.demo-clicked { transform: scale(0.96); background: #000; }
.demo-status { font-size: 12px; color: var(--muted); }
.demo-status[data-kind="ok"] { color: #1a7a3a; }
.demo-status[data-kind="warn"] { color: #8a6d1a; }
.demo-warning { margin: 8px 16px 0; padding: 8px 12px; border-radius: 10px;
  background: #fdf6dd; border: 1px solid #e9d493; color: #6b5310;
  font-size: 12.5px; line-height: 1.45; animation: demo-in 0.35s ease; }
.demo-warning::before { content: "⚠ "; }
.demo-translation { margin: 8px 16px 0; padding: 8px 12px; border-radius: 10px;
  background: #eef4fb; border: 1px solid #c9daf0; color: #2c4a6e;
  font-size: 12.5px; line-height: 1.45; white-space: pre-wrap;
  animation: demo-in 0.35s ease; }
.demo-translabel { font-weight: 700; margin-bottom: 4px; }
.demo-composerow { display: flex; gap: 10px; align-items: flex-end;
  padding: 12px 16px 16px; }
.demo-compose { flex: 1; min-height: 88px; max-height: 150px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.45; white-space: pre-wrap;
  background: var(--bg); }
.demo-send { background: #222; color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: 999px; flex: none; opacity: 0.9; }
.demo-caption { margin-top: 12px; }

/* FAQ */
.land-faq { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.faq-item { padding: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 14px 18px;
  list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--accent);
  font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }
.faq-a { padding: 0 18px 14px; line-height: 1.5; }

@media (max-width: 860px) {
  .land-hero-card { padding: 30px 22px 24px; }
  .land-hero-card h1 { font-size: 30px; }
  .land-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---- landing v3: brand type + logo + side-by-side showcase ---- */
.landing h1, .landing h2, .land-brand, .brand, .brand-big,
.price-amount, .land-stat-v {
  font-family: "Bricolage Grotesque", "Segoe UI", system-ui, Arial, sans-serif;
}
.land-brand { display: flex; align-items: center; gap: 9px;
  letter-spacing: -0.02em; color: var(--text); font-weight: 800; }
.brand-mark { width: 26px; height: 26px; display: block; }
.land-hero-card { position: relative; overflow: hidden; }
.land-hero-card::after { content: ""; position: absolute; right: -70px;
  top: -70px; width: 380px; height: 380px; opacity: 0.07;
  background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 6 C35 24 40 29 58 32 C40 35 35 40 32 58 C29 40 24 35 6 32 C24 29 29 24 32 6 Z' fill='%23b3591f'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none; }
.land-hero-card h1 { font-weight: 800; letter-spacing: -0.02em; }
.showcase-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px; align-items: start; }
.showcase-side h2 { margin-top: 6px; }
.showcase-side .demo-tabs { flex-direction: column; align-items: flex-start;
  margin-top: 16px; }
.showcase-main .demo-window { box-shadow: 0 12px 40px rgba(29, 37, 48, 0.10); }
@media (max-width: 860px) {
  .showcase-grid { grid-template-columns: 1fr; gap: 16px; }
  .showcase-side .demo-tabs { flex-direction: row; }
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-big { display: flex; align-items: center; justify-content: center; gap: 10px; }
.brand-mark-big { width: 34px; height: 34px; }
