/* Admin portal — same tokens as the website (stilltyping style). */
:root {
  --paper: #fbf8f2; --card: #fff; --tint: #f3f0eb; --side: #f7f2ea;
  --lav-50: #fdf6e6; --lav-100: #f8e8c2; --lav-200: #f0d590; --lavender: #e0b04a;
  --violet: #7d1a2b; --violet-deep: #5e1220; --gold: #d49a1f; --gold-hi: #f2c14e; --maroon: #7d1a2b;
  --ink: #121212; --body: #5c5c5c; --muted: #8a8a8a;
  --line: rgba(18,18,18,.1); --line-2: rgba(18,18,18,.16);
  --ok: #0f7a4d; --ok-bg: #e6f4ec; --warn: #9a5b00; --warn-bg: #fff3df; --bad: #c9225a; --bad-bg: #fdecef;
  --lift: 0 1px 2px rgba(18,18,18,.05), 0 10px 24px rgba(18,18,18,.06);
  --lift-lg: 0 24px 60px rgba(18,18,18,.16);
  --display: 'Syne', 'Plus Jakarta Sans', system-ui, sans-serif;
  --text: 'Plus Jakarta Sans', 'Noto Sans Tamil', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
:is(h1, h2, h3, h4, p, ul, ol, dl, dd) { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { flex: none; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 8px; }
.ta { font-family: 'Noto Sans Tamil', var(--text); }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--side); border-right: 1px solid var(--line); }
.word { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font: 700 20px var(--display); letter-spacing: -0.04em; }
.word small { display: block; font: 600 11px var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.logo { width: 36px; height: 36px; display: block; flex: none; } .logo img { display: block; width: 36px; height: 36px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; font-weight: 600; color: #3a3a3a; transition: background .14s; }
.nav a:hover { background: #ece8e2; }
.nav a.on { background: #fff; color: var(--ink); box-shadow: var(--lift); }
.nav a.on svg { color: var(--violet); }
.nav-sep { margin: 14px 12px 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.side-foot { margin-top: auto; display: grid; gap: 6px; }
.side-foot a, .side-foot button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-weight: 600; color: var(--body); background: none; border: 0; cursor: pointer; text-align: left; }
.side-foot a:hover, .side-foot button:hover { background: #ece8e2; color: var(--ink); }
.main { min-width: 0; padding: 30px 40px 80px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.top h1 { font: 700 34px var(--display); letter-spacing: -0.04em; line-height: 1.05; }
.top p { margin-top: 8px; color: var(--body); max-width: 70ch; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: var(--ink); color: #fff; font: 700 14.5px var(--text); cursor: pointer; transition: background .14s, transform .14s, border-color .14s; white-space: nowrap; }
.btn:hover { background: #2b2930; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: #fff; border-color: var(--ink); }
.btn-soft { background: var(--lav-50); color: var(--violet-deep); border-color: var(--lav-100); }
.btn-soft:hover { background: var(--lav-100); }
.btn-danger { background: #fff; color: var(--bad); border-color: #f2c3d1; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--body); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--lift); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font: 800 17px var(--text); letter-spacing: -0.01em; }
.card-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 18px 20px; }
.stat dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat dd { margin-top: 6px; font: 700 30px var(--display); letter-spacing: -0.03em; }
.stat small { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.empty { padding: 36px; text-align: center; color: var(--muted); }
.hint { display: flex; gap: 12px; align-items: flex-start; background: var(--lav-50); border: 1px solid var(--lav-100); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #4a2a22; }
.hint.warn { background: var(--warn-bg); border-color: #f4d9a8; color: #5c3b00; }
.hint.ok { background: var(--ok-bg); border-color: #bfe3cd; color: #0b4d30; }
.hint svg { margin-top: 2px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #f1eee9; color: #4a4458; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.lav { background: var(--lav-50); color: var(--violet-deep); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -22px -22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fcfbf9; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fbfaf8; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }

/* forms */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13.5px; font-weight: 700; color: #3a3a3a; }
.field small { font-size: 12.5px; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font: 500 14.5px var(--text); color: var(--ink); transition: border-color .14s, box-shadow .14s; }
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--lav-100); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--violet); }
.input-pre { position: relative; }
.input-pre b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.input-pre input { padding-left: 28px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: #f1eee9; border-radius: 12px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: #4a4458; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #d8d3cc; transition: background .16s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .16s; }
.switch input:checked + span { background: var(--violet); }
.switch input:checked + span::after { transform: translateX(16px); }
.choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.choice button { text-align: left; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; display: grid; gap: 4px; }
.choice button b { font-size: 14px; }
.choice button small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.choice button.on { border-color: var(--violet); background: var(--lav-50); box-shadow: 0 0 0 3px var(--lav-100); }
.choice button:disabled { opacity: .45; cursor: not-allowed; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 46px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; cursor: text; }
.chips-input:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px var(--lav-100); }
.chips-input input { flex: 1; min-width: 140px; border: 0; min-height: 30px; padding: 4px; box-shadow: none !important; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--lav-50); border: 1px solid var(--lav-100); font-size: 13px; font-weight: 700; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; padding: 0 2px; }
.tokens { display: flex; gap: 6px; flex-wrap: wrap; }
.tokens button { border: 1px dashed var(--line-2); background: #fff; border-radius: 999px; padding: 3px 10px; font: 600 12px var(--text); cursor: pointer; color: var(--violet-deep); }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(18,18,18,.35); backdrop-filter: blur(2px); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: var(--paper); z-index: 51; box-shadow: var(--lift-lg); transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 26px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-head h2 { font: 700 22px var(--display); letter-spacing: -0.03em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px 26px 40px; display: grid; gap: 18px; align-content: start; }
.drawer-foot { display: flex; justify-content: space-between; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line); background: #fff; }
.step { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.step-top { display: flex; align-items: center; gap: 10px; }
.step-top span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--lav-50); color: var(--violet); font: 700 13px var(--display); }
.step-top b { font-size: 15px; }
.step-top small { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* toast */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--lift-lg); animation: tin .2s ease; }
.toast.bad { background: var(--bad); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* product list */
.plist { display: grid; gap: 10px; }
.prow { display: grid; grid-template-columns: 30px minmax(0,1fr) 220px 130px 70px auto; gap: 16px; align-items: center; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.psvc { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; } .psvc .pill { max-width: 100%; white-space: normal; }
.prow.off { background: #fbfaf8; }
.prow.off .pname { opacity: .55; }
.prow.drag { opacity: .4; }
.prow.over { border-color: var(--violet); box-shadow: 0 0 0 3px var(--lav-100); }
.handle { cursor: grab; color: var(--muted); display: grid; place-items: center; }
.pname b { display: block; font-size: 15px; }
.pname small { display: block; color: var(--muted); font-size: 13px; }
.pprice b { font: 700 20px var(--display); letter-spacing: -0.02em; }
.pprice s { color: var(--muted); font-size: 13px; margin-left: 6px; }
.pact { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.preview-card { border-radius: 20px; border: 1px solid var(--line); background: #fff; padding: 18px; box-shadow: var(--lift); display: grid; gap: 8px; }
.preview-card h3 { font-size: 17px; font-weight: 800; }
.preview-card p { color: var(--body); font-size: 14px; }
.preview-card .pr { display: flex; align-items: baseline; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.preview-card .pr b { font: 700 24px var(--display); }
.preview-card .pr s { color: var(--muted); }
.preview-card .pr em { font-style: normal; color: var(--ok); font-weight: 800; font-size: 13px; }

/* automations */
.auto { display: grid; grid-template-columns: 28px 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.auto.off { background: #fbfaf8; }
.auto.off .sentence { opacity: .55; }
.auto.drag { opacity: .4; } .auto.over { border-color: var(--violet); }
.sentence { font-size: 15px; line-height: 1.7; }
.sentence .k { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 8px; background: var(--lav-50); color: var(--violet-deep); font-weight: 700; }
.sentence .w { display: inline-block; padding: 0 7px; margin: 1px 2px; border-radius: 6px; background: #f1eee9; font-weight: 700; font-size: 13.5px; }
.auto-meta { display: flex; gap: 10px; margin-top: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.phone { width: 300px; max-width: 100%; margin: 0 auto; border-radius: 40px; background: #121212; padding: 10px; box-shadow: var(--lift-lg); }
.phone-in { border-radius: 31px; background: #fff; min-height: 420px; display: flex; flex-direction: column; overflow: hidden; }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 16px 14px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ph-ava { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), #8a5a12); color: #fff; display: grid; place-items: center; font-weight: 800; }
.ph-chat { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bub { max-width: 84%; padding: 8px 12px; border-radius: 16px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.bub-me { align-self: flex-end; background: var(--violet); color: #fff; border-bottom-right-radius: 5px; }
.bub-them { align-self: flex-start; background: #efefef; border-bottom-left-radius: 5px; }
.bub-img { align-self: flex-start; width: 62%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.bub-img img { width: 100%; display: block; }
.ph-note { font-size: 11px; color: var(--muted); text-align: center; }
.public-reply { margin: 0 12px 12px; padding: 10px 12px; border-radius: 12px; background: #f7f7f7; font-size: 12.5px; }
.activity li { display: grid; grid-template-columns: 110px 140px 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--muted); font-size: 12.5px; }
.activity .who { font-weight: 700; }
.activity .said { color: var(--body); }
.activity .replies { margin-top: 6px; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.copy { display: flex; gap: 8px; align-items: center; }
.copy code { flex: 1; padding: 9px 12px; border-radius: 10px; background: #f4f1ec; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.checklist { display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.checklist li .ck { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #eee; color: #fff; flex: none; }
.checklist li.done .ck { background: var(--ok); }
.checklist li a { margin-left: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gallery a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.gallery img { width: 100%; display: block; aspect-ratio: 4/5; object-fit: cover; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.bar i { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: #f1eee9; overflow: hidden; }
.bar i b { display: block; height: 100%; background: linear-gradient(90deg, var(--lavender), var(--violet)); border-radius: inherit; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 80% 0%, rgba(242,193,78,.28), transparent 50%), var(--paper); }
.login .card { width: min(420px, 100%); padding: 32px; }
.login h1 { font: 700 30px var(--display); letter-spacing: -0.04em; margin: 18px 0 6px; }
.login p { color: var(--body); margin-bottom: 20px; }
.err { color: var(--bad); font-weight: 600; font-size: 14px; min-height: 20px; margin-top: 8px; }

.loading { display: grid; place-items: center; padding: 80px; }
.spin { width: 22px; height: 22px; border: 2.5px solid var(--lav-200); border-top-color: var(--violet); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prow { grid-template-columns: 26px 1fr auto; }
  .prow .psvc, .prow .psold { display: none; }
  .activity li { grid-template-columns: 1fr auto; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-sep, .side-foot { display: none; }
  .main { padding: 22px 16px 60px; }
  .g2, .g3 { grid-template-columns: 1fr; }
}
.grid > .card { margin-top: 0; }

.req { border-top: 1px solid var(--line); padding: 16px 0; } .req:first-child { border-top: 0; }
.req textarea { border: 1px solid var(--line-2, #ddd); border-radius: 10px; padding: 10px; font: inherit; }
.btn.danger { color: #a3122f; }

/* ---- Instagram area ---- */
.tabs { display: flex; gap: 4px; margin: 18px 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--body); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--maroon); border-bottom-color: var(--maroon); }
.flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.flow-side { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.flow-step { flex: 1 1 150px; display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.flow-step svg { color: var(--maroon); }
.flow-step small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.flow-step:hover { border-color: var(--maroon); box-shadow: 0 0 0 3px var(--lav-100); }
.flow-arrow { align-self: center; color: var(--gold); font-weight: 700; }
.ph-state { margin-bottom: 10px; }
.ph-chat { max-height: 560px; overflow-y: auto; }
.qr { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.qr button { border: 1px solid #3797f0; color: #3797f0; background: #fff; border-radius: 999px; padding: 5px 11px; font: 600 12.5px var(--text); cursor: pointer; }
.qr button:hover { background: #eef6ff; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.modal-bg { position: fixed; inset: 0; background: rgba(18,18,18,.4); display: grid; place-items: center; z-index: 90; padding: 20px; }
.modal-bg .modal { background: #fff; border-radius: 20px; padding: 20px; width: min(900px, 100%); max-height: 88vh; overflow: auto; box-shadow: var(--lift-lg); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media { position: relative; border: 2px solid transparent; border-radius: 14px; background: var(--tint); padding: 0; cursor: pointer; text-align: left; overflow: hidden; display: grid; }
.media img, .media-ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: grid; place-items: center; color: var(--muted); }
.media-meta { padding: 8px 10px; font-size: 12px; display: grid; gap: 2px; }
.media-meta small { color: var(--muted); }
.media-check { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: transparent; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.media.on { border-color: var(--maroon); }
.media.on .media-check { background: var(--maroon); color: #fff; }
.msg .card-head h2 { font-size: 15px; text-transform: capitalize; }
.msg textarea { min-height: 64px; }
.day-head { font: 700 13px var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.post { margin-bottom: 12px; }
.slides { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.slides img { height: 150px; width: auto; border-radius: 8px; border: 1px solid var(--line); }
.cap { margin-top: 12px; }
.cap summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--maroon); margin-bottom: 8px; }
.cap .field { margin-top: 8px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--lav-50); }
.ledger { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.ledger li { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: baseline; }
.ledger .plus { color: var(--ok); } .ledger .minus { color: var(--bad); }
.ledger time { color: var(--muted); font-size: 12px; }
.convo { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; margin-top: 8px; }
.cm { display: grid; gap: 2px; max-width: 85%; }
.cm span { padding: 8px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.cm time { font-size: 11px; color: var(--muted); }
.cm.in { justify-self: end; text-align: right; } .cm.in span { background: #3797f0; color: #fff; }
.cm.out span { background: #efefef; }
.ev-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; }
.ev-row.off { opacity: .55; }
.ev-swatch { width: 40px; height: 40px; border-radius: 12px; display: inline-block; flex: none; background: #8a1830; }
.ev-newyear { background: linear-gradient(135deg, #1b1f4a, #0b0d24); box-shadow: inset 0 0 0 3px #f3d58a; }
.ev-pongal { background: linear-gradient(135deg, #2f6b3a, #173d1e); box-shadow: inset 0 0 0 3px #f6c945; }
.ev-festival, .ev-ganesha { background: linear-gradient(135deg, #8a1830, #4a0816); box-shadow: inset 0 0 0 3px #f3d58a; }
.ev-lakshmi { background: linear-gradient(135deg, #9c2f5a, #4d0f2a); box-shadow: inset 0 0 0 3px #f8d98e; }
.ev-murugan { background: linear-gradient(135deg, #b4471a, #5c1e06); box-shadow: inset 0 0 0 3px #fde2a0; }
.ev-saraswati { background: linear-gradient(135deg, #2b4f86, #122544); box-shadow: inset 0 0 0 3px #f2e6c4; }
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 6px; }
.theme-pick label { position: relative; }
.theme-pick input { position: absolute; opacity: 0; }
.theme-pick span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 12px; font-size: 13px; cursor: pointer; }
.theme-pick .ev-swatch { width: 28px; height: 28px; border-radius: 8px; }
.theme-pick input:checked + span { border-color: var(--maroon); box-shadow: 0 0 0 3px var(--lav-100); }
.ev-prev img { width: 100%; max-width: 360px; border-radius: 12px; margin-top: 10px; display: block; }
.btn[hidden], .icon-btn[hidden] { display: none; }

/* ---------- Instagram workflow graph ---------- */
.wf-card { padding: 0; overflow: hidden; background: radial-gradient(circle at 1px 1px, rgba(125,26,43,.09) 1px, transparent 0) 0 0 / 22px 22px, #fffdf9; }
.wf-scroll { overflow-x: auto; padding: 22px 22px 26px; }
.wf { min-width: 1040px; }
.wf-heads, .wf-grid { display: grid; grid-template-columns: minmax(145px, .9fr) 44px minmax(175px, 1.1fr) minmax(160px, 1fr) minmax(150px, .95fr) minmax(160px, 1fr); column-gap: 30px; }
.wf-heads { margin-bottom: 14px; }
.wf-heads div { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.wf-heads span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #f3e6e8; color: #7d1a2b; font-size: 11px; letter-spacing: 0; }
.wf-grid { position: relative; }
.wf-col { display: flex; flex-direction: column; justify-content: center; gap: 12px; position: relative; z-index: 2; }
.wf-svg { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: visible; color: #cdbfc1; }
.wf-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.wf-e { fill: none; stroke: currentColor; stroke-width: 1.6; transition: stroke .2s, opacity .2s, stroke-width .2s; }
.wf-l { position: absolute; opacity: 0; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #fff; border: 1px solid #ead9dc; color: #7d1a2b; white-space: nowrap; transition: opacity .2s; }
.wf-node { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 32px 1fr; gap: 3px 10px; align-items: center; padding: 10px 12px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(18,18,18,.04), 0 6px 16px -8px rgba(18,18,18,.12); transition: transform .18s, box-shadow .18s, opacity .2s, border-color .18s; position: relative; }
.wf-node:hover, .wf-node:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(94,18,32,.35); }
.wf-node:focus-visible { outline: 2px solid #7d1a2b; outline-offset: 2px; }
.wf-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; grid-row: span 2; }
.wf-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wf-t b { font-size: 13.5px; line-height: 1.2; }
.wf-t small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.wf-node > .wf-c { grid-column: 2; justify-self: start; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: #f5f1ea; color: #5c5c5c; margin-top: 3px; }
.wf-entry .wf-ic { background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); color: #fff; }
.wf-rule { border-left: 3px solid #d49a1f; } .wf-rule .wf-ic, .wf-words .wf-ic, .wf-fallback .wf-ic { background: #fbf1da; color: #8a5a12; }
.wf-words, .wf-fallback { border-style: dashed; }
.wf-action .wf-ic { background: #7d1a2b; color: #fff6e3; }
.wf-step .wf-ic { background: #fff3df; color: #9a5b00; }
.wf-result .wf-ic { background: #e6f4ec; color: #0f7a4d; }
.wf-band { all: unset; box-sizing: border-box; cursor: pointer; position: relative; z-index: 0; align-self: stretch; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, rgba(125,26,43,.06), rgba(212,154,31,.12), rgba(125,26,43,.06)); border: 1.5px dashed rgba(125,26,43,.35); color: #7d1a2b; transition: background .2s, opacity .2s; }
.wf-band:hover, .wf-band.hl { background: linear-gradient(180deg, rgba(125,26,43,.1), rgba(212,154,31,.24), rgba(125,26,43,.1)); }
.wf-band span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #7d1a2b; color: #fff; }
.wf-band b, .wf-band small { writing-mode: vertical-rl; transform: rotate(180deg); }
.wf-band b { font-size: 13px; letter-spacing: .04em; } .wf-band small { font-size: 11px; color: #8a5a12; }
/* tracing a path */
.wf-grid.tracing .wf-node:not(.hl) { opacity: .28; }
.wf-grid.tracing .wf-band:not(.hl) { opacity: .4; }
.wf-grid.tracing .wf-e:not(.hl) { opacity: .15; }
.wf-grid.tracing .wf-l.hl { opacity: 1; }
.wf-e.hl { stroke: #7d1a2b; stroke-width: 2.2; stroke-dasharray: 6 5; animation: wf-flow .8s linear infinite; }
.wf-grid .wf-svg:has(.wf-e.hl) { color: #7d1a2b; }
.wf-node.hl { border-color: #d49a1f; }
.wf-l.hl { background: #7d1a2b; color: #fff; border-color: #7d1a2b; }
@keyframes wf-flow { to { stroke-dashoffset: -22; } }
@media (prefers-reduced-motion: reduce) { .wf-e.hl { animation: none; } }
.wf-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--body); }
.wf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg-entry { background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); } .lg-rule { background: #f2c14e; } .lg-built { background: #fff; border: 1.5px dashed #c9a24a; } .lg-action { background: #7d1a2b; } .lg-step { background: #ffd79a; } .lg-result { background: #78c59a; }
.wf-route { display: grid; gap: 8px; margin-top: 12px; } .wf-route div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .wf-route .label { margin-right: 4px; }
button.wf-rulebtn { all: unset; cursor: pointer; display: block; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 13px; line-height: 1.6; }
button.wf-rulebtn:hover { border-color: #d49a1f; }
.hint.bad { background: var(--bad-bg); border-color: #f5c2cf; color: #7a1036; }
