:root {
  --primary: #8b1e5b;
  --primary-dark: #691344;
  --accent: #ef8b24;
  --ink: #241923;
  --muted: #6f6570;
  --line: #eadfe6;
  --card: rgba(255,255,255,.94);
  --bg: #f7f2f5;
  --shadow: 0 18px 50px rgba(74, 26, 54, .10);
  --radius: 20px;
}
* { box-sizing: border-box; }
@font-face {
  font-family: "NotoGujarati";
  src: url("./assets/NotoSansGujarati-Bold.ttf") format("truetype");
  font-display: swap;
}
html, body { margin:0; min-height:100%; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, #ffe7a9 0, transparent 32%),
    radial-gradient(circle at 100% 0%, #f8d5e3 0, transparent 30%),
    var(--bg);
  color: var(--ink);
}
button, input { font: inherit; }
.topbar {
  position: sticky; top:0; z-index:10;
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 22px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom:1px solid rgba(139,30,91,.08);
}
.brand { display:flex; gap:12px; align-items:center; }
.brand-icon {
  width:46px; height:46px; border-radius:14px;
  display:grid; place-items:center; color:white; background:linear-gradient(135deg,var(--primary),#c84f85);
  font-family:NotoGujarati, sans-serif; font-size:24px;
  box-shadow:0 10px 25px rgba(139,30,91,.22);
}
.brand-title { font-weight:800; letter-spacing:-.02em; }
.brand-subtitle { color:var(--muted); font-family:NotoGujarati, sans-serif; font-size:13px; margin-top:2px; }
.container { max-width:1280px; margin:0 auto; padding:28px 18px 60px; }
.hero-grid { display:grid; grid-template-columns:minmax(330px,.86fr) minmax(420px,1.14fr); gap:20px; }
.card {
  background:var(--card);
  border:1px solid rgba(139,30,91,.09);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.form-card { padding:26px; }
.section-title-row { display:flex; justify-content:space-between; gap:20px; }
.eyebrow { font-size:11px; font-weight:800; letter-spacing:.15em; color:var(--primary); }
h1, h2, p { margin:0; }
h1 { font-size:30px; letter-spacing:-.03em; margin-top:5px; }
h2 { font-size:20px; margin-top:5px; }
.muted { color:var(--muted); margin-top:8px; line-height:1.55; }
.counter, .status-pill {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:38px; height:32px; padding:0 10px; border-radius:999px;
  background:#f6e7f0; color:var(--primary); font-weight:800; font-size:12px;
}
label { display:block; font-weight:800; margin:24px 0 8px; }
input {
  width:100%; border:1px solid #d9cad3; border-radius:14px; padding:15px 16px;
  outline:none; background:white; font-family:NotoGujarati, sans-serif;
  font-size:20px; color:#59183e;
  transition:.2s border, .2s box-shadow;
}
input:focus { border-color:var(--primary); box-shadow:0 0 0 4px rgba(139,30,91,.10); }
.actions { display:grid; grid-template-columns:1fr; gap:10px; margin-top:14px; }
button {
  border:0; border-radius:12px; padding:12px 14px; cursor:pointer;
  font-weight:800; transition:transform .12s, opacity .12s, box-shadow .12s;
}
button:hover { transform:translateY(-1px); }
button:disabled { opacity:.55; cursor:not-allowed; transform:none; }
.primary { color:#fff; background:linear-gradient(135deg,var(--primary),#ae3674); box-shadow:0 12px 24px rgba(139,30,91,.18); }
.secondary { color:var(--primary); background:#f8edf3; }
.ghost { color:var(--muted); background:transparent; }
.danger:hover { color:#b42318; }
.tip {
  margin-top:16px; padding:12px 14px; background:#fff6df; border:1px solid #f2ddaa;
  border-radius:12px; color:#684c21; line-height:1.55; font-family:NotoGujarati, sans-serif; font-size:13px;
}
.preview-card { padding:18px; display:flex; flex-direction:column; min-height:680px; }
.preview-header { display:flex; justify-content:space-between; align-items:flex-start; padding:4px 4px 14px; }
.preview-wrap {
  position:relative; flex:1; min-height:580px; border-radius:16px; overflow:hidden;
  background:linear-gradient(145deg,#f4e6ed,#f8eff4); border:1px solid #e8dce3;
  display:flex; justify-content:center; align-items:center;
}
#previewCanvas { display:none; max-width:100%; max-height:100%; background:#fff; }
.preview-empty {
  position:absolute; inset:0; display:grid; place-content:center; gap:10px; text-align:center;
  color:var(--muted); pointer-events:none; font-family:NotoGujarati,sans-serif;
}
.empty-icon {
  width:70px; height:70px; margin:auto; border-radius:20px; display:grid; place-items:center;
  background:#f1dce7; color:var(--primary); font-weight:900; letter-spacing:.08em;
}
.table-card { margin-top:20px; overflow:hidden; }
.table-head { padding:20px 22px; display:flex; justify-content:space-between; align-items:center; gap:15px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:760px; }
th, td { padding:14px 16px; border-top:1px solid var(--line); text-align:left; }
th { font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); background:#fcf8fa; }
td { vertical-align:middle; }
.name-cell { font-family:NotoGujarati,sans-serif; font-size:17px; color:#5c1941; font-weight:800; }
.name-share-button {
  padding:0; border:0; border-radius:0; background:transparent;
  color:inherit; font:inherit; text-align:left;
}
.name-share-button:hover { text-decoration:underline; }
.row-actions { display:flex; gap:8px; flex-wrap:wrap; }
.table-empty { padding:28px; text-align:center; color:var(--muted); font-family:NotoGujarati,sans-serif; }
.toast {
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px);
  background:#241923; color:#fff; padding:11px 16px; border-radius:999px;
  opacity:0; pointer-events:none; transition:.25s; z-index:20; box-shadow:0 12px 28px rgba(0,0,0,.18);
  max-width:min(90vw,650px);
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns:1fr; }
  .preview-card { min-height:620px; }
}
@media (max-width: 560px) {
  .topbar { padding:12px 14px; }
  .brand-title { font-size:14px; }
  .brand-subtitle { font-size:11px; }
  .brand-icon { width:40px; height:40px; border-radius:12px; }
  .container { padding:16px 12px 42px; }
  .form-card { padding:18px; }
  h1 { font-size:24px; }
  .actions { grid-template-columns:1fr; }
  .table-head { align-items:flex-start; flex-direction:column; }
  .preview-wrap { min-height:560px; }
}
