/* HN Designs Command Center - "Ember & Ink" theme: plum-black canvas, amber (#FF9D00, from the logo) + violet accents. */
:root {
  color-scheme: dark;
  --ink: #0b0810;
  --ink-2: #151020;
  --glass: rgba(255, 245, 255, .035);
  --glass-2: rgba(255, 245, 255, .065);
  --line: rgba(230, 214, 255, .08);
  --line-2: rgba(230, 214, 255, .14);
  --text: #f5f0f7;
  --muted: #a69cb0;
  --faint: #6c6278;
  --amber: #ff9d00;
  --amber-2: #ffb84d;
  --ember: #ff5e3a;
  --violet: #8b5cf6;
  --grad: linear-gradient(135deg, #ffb84d 0%, #ff9d00 45%, #ff5e3a 100%);
  --ok: #3ddc97;
  --bad: #ff6b6b;
  --warn: #ffc857;
  --radius: 20px;
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0; min-height: 100vh; display: flex; font-family: var(--sans); color: var(--text); font-size: 15px;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(255, 120, 0, .16), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(139, 92, 246, .14), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(255, 94, 58, .08), transparent 60%),
    var(--ink);
  background-attachment: fixed;
}
a { color: var(--amber-2); text-decoration: none; }
a:hover { color: var(--amber); }
h1 { font-family: var(--serif); font-weight: 500; font-size: 2.1rem; letter-spacing: -.02em; margin: 0 0 6px; line-height: 1.1; }
h1 em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: .98rem; font-weight: 600; margin: 0 0 14px; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
h3 { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; margin: 6px 0; }
code { background: var(--glass-2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; font-size: .85em; }
kbd { font: inherit; font-size: .72rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 7px; }
::selection { background: rgba(255, 157, 0, .35); }
.ico { flex-shrink: 0; vertical-align: -3px; }

/* ---------- icon rail ---------- */
.rail {
  width: 82px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; padding: 18px 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  background: rgba(14, 10, 20, .75); border-right: 1px solid var(--line); backdrop-filter: blur(18px);
}
.rail-logo img { width: 50px; display: block; filter: drop-shadow(0 6px 18px rgba(255, 157, 0, .4)); }
.rail nav, .rail-foot { display: flex; flex-direction: column; gap: 8px; }
.rail-foot { margin-top: auto; }
.rail a:not(.rail-logo) {
  position: relative; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center;
  color: var(--muted); border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.rail a:not(.rail-logo):hover { color: var(--text); background: var(--glass-2); border-color: var(--line); }
.rail a.active { color: #1a0f02; background: var(--grad); box-shadow: 0 10px 26px -8px rgba(255, 120, 0, .65); }
.rail a.active::before { content: ""; position: absolute; left: -17px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--amber); }
.rail .count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
               background: var(--ember); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: #1d1628; color: var(--text); border: 1px solid var(--line-2); padding: 6px 10px; border-radius: 8px;
  font-size: .78rem; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.rail-logo { position: relative; }

/* ---------- top bar ---------- */
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 32px; background: rgba(11, 8, 16, .7); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px);
}
.search { flex: 0 1 460px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px; border-radius: 14px;
          background: var(--glass); border: 1px solid var(--line-2); color: var(--muted); }
.search:focus-within { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 157, 0, .12); }
.search input { flex: 1; border: 0; background: transparent; margin: 0; padding: 0; height: 100%; box-shadow: none !important; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.social-row { display: flex; gap: 6px; padding-right: 6px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; cursor: pointer;
            background: var(--glass); border: 1px solid var(--line-2); color: var(--text); font: inherit; font-size: 1.1rem; }
.icon-btn:hover { background: var(--glass-2); color: var(--amber-2); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.badge-dot { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
             background: var(--ember); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; }
.profile { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 6px; border-radius: 14px; background: var(--glass);
           border: 1px solid var(--line-2); color: var(--text); }
.profile img { width: 34px; height: 34px; object-fit: contain; border-radius: 10px; background: #120d18; padding: 3px; }
.profile b { display: block; font-size: .85rem; }
.profile small { display: block; font-size: .7rem; color: var(--muted); }

/* ---------- layout ---------- */
main { flex: 1; padding: 28px 32px 60px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
  backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -30px rgba(0, 0, 0, .8);
}
a.card, .card.lift { color: var(--text); transition: transform .2s, border-color .2s, background .2s; }
a.card:hover, .card.lift:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--glass-2); }
.grid { display: grid; gap: 16px; margin: 0 0 18px; }
.grid .card { margin: 0; }
.grid.status { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.grid.stats { grid-template-columns: repeat(4, 1fr); }
.two { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: start; }
.big { font-family: var(--serif); font-size: 2.3rem; font-weight: 500; line-height: 1.1; margin-top: 8px; letter-spacing: -.02em; }
.big small { font-family: var(--sans); font-size: .78rem; color: var(--muted); letter-spacing: 0; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up { color: var(--ok); }
.down { color: var(--bad); }

/* platform cards */
.platform { display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.platform::after {
  content: ""; position: absolute; inset: auto -40% -60% auto; width: 160px; height: 160px; border-radius: 50%;
  background: var(--glow, rgba(255, 157, 0, .15)); filter: blur(40px); opacity: .55; pointer-events: none;
}
.platform .top { display: flex; align-items: center; gap: 12px; }
.platform strong { font-weight: 600; }
.pill { margin-left: auto; font-size: .68rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; }
.pill.on { color: var(--ok); background: rgba(61, 220, 151, .12); }
.pill.off { color: var(--muted); background: var(--glass-2); }
.platform .big { margin: 0; font-size: 1.8rem; }

/* stat cards */
.stat { text-align: left; color: var(--text); }
.stat .big { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 4px; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.warn .big { background: none; color: var(--bad); }

/* brand tiles */
.bi { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; flex-shrink: 0;
      background: #333; box-shadow: 0 6px 16px -6px var(--shadow, rgba(0, 0, 0, .6)); }
.bi svg { width: 55%; height: 55%; }
.bi .ico { width: 58%; height: 58%; }
.bi.sm { width: 24px; height: 24px; border-radius: 7px; vertical-align: middle; }
.bi.lg { width: 52px; height: 52px; border-radius: 15px; }
.bi-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); --shadow: rgba(214, 36, 159, .55); }
.bi-facebook { background: #0866ff; --shadow: rgba(8, 102, 255, .55); }
.bi-whatsapp { background: #25d366; --shadow: rgba(37, 211, 102, .5); }
.bi-youtube { background: #ff0000; --shadow: rgba(255, 0, 0, .5); }
.bi-telegram { background: #26a5e4; --shadow: rgba(38, 165, 228, .5); }
.bi-claude { background: #d97757; --shadow: rgba(217, 119, 87, .5); }
.bi-website { background: var(--grad); color: #1a0f02; --shadow: rgba(255, 157, 0, .5); }
.bi-scheduler { background: #2b2420; color: var(--amber-2); }
.bi-walk-in { background: #3a2f27; color: var(--amber-2); }
.glow-instagram { --glow: rgba(214, 36, 159, .35); } .glow-facebook { --glow: rgba(8, 102, 255, .35); }
.glow-whatsapp { --glow: rgba(37, 211, 102, .3); } .glow-youtube { --glow: rgba(255, 0, 0, .3); }
.glow-telegram { --glow: rgba(38, 165, 228, .3); } .glow-claude { --glow: rgba(217, 119, 87, .35); }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 220, 151, .15); }
.dot.off { background: var(--bad); box-shadow: 0 0 0 4px rgba(255, 107, 107, .15); }
.dot.inline { vertical-align: middle; margin-right: 4px; }

/* flash */
.flash { padding: 13px 16px; border-radius: 14px; margin-bottom: 18px; border: 1px solid; backdrop-filter: blur(10px); }
.flash.ok { background: rgba(61, 220, 151, .08); border-color: rgba(61, 220, 151, .3); }
.flash.err { background: rgba(255, 107, 107, .08); border-color: rgba(255, 107, 107, .3); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit;
  font-weight: 600; font-size: .9rem; padding: 11px 18px; border-radius: 12px; color: #1a0f02; background: var(--grad);
  box-shadow: 0 10px 24px -12px rgba(255, 130, 0, .7); transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); color: #1a0f02; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn.small { padding: 7px 13px; font-size: .8rem; border-radius: 10px; }
.btn.ghost { background: var(--glass-2); color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 244, 230, .1); color: var(--text); }
.btn.gold { background: var(--grad); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid rgba(255, 107, 107, .35); box-shadow: none; }
.btn.wide { width: 100%; margin-top: 12px; padding: 14px; font-size: 1rem; }
.btn.sticky { position: sticky; bottom: 14px; width: 100%; margin-top: 16px; }

/* forms */
.form label { display: block; margin-bottom: 15px; font-size: .84rem; font-weight: 500; color: var(--muted); }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
input[type=text], input[type=password], input[type=date], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; margin-top: 7px; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 12px;
  background: rgba(0, 0, 0, .28); color: var(--text); font: inherit; font-weight: 400; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 157, 0, .15); }
input[type=file] { padding: 9px; }
input[type=file]::file-selector-button { background: var(--glass-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 12px; margin-right: 10px; cursor: pointer; font: inherit; }
select option { background: var(--ink-2); }
textarea { resize: vertical; line-height: 1.55; }
::placeholder { color: var(--faint); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields.three { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.checks { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.checks label { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px;
                border: 1px solid var(--line-2); background: var(--glass); color: var(--text); cursor: pointer; }
.checks label:has(input:checked) { border-color: var(--amber); background: rgba(255, 157, 0, .1); }
input[type=checkbox] { accent-color: var(--amber); }
.actions, .schedule { display: flex; gap: 10px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.schedule input { width: auto; margin: 0; }
.form .row input { margin: 0; }
.form h2:not(:first-child) { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }

/* lists */
.list-item { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); }
.list-item:first-of-type { border-top: 0; }
.list-item img { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; }
.activity { list-style: none; padding: 0; margin: 0; max-height: 380px; overflow: auto; }
.activity li { padding: 9px 0 9px 16px; border-top: 1px solid var(--line); font-size: .86rem; position: relative; }
.activity li::before { content: ""; position: absolute; left: 0; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.activity li.error::before { background: var(--bad); }
.activity li.error { color: #ffb3b3; }
.activity li:first-child { border-top: 0; }

.tabs { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; align-items: center; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: .84rem; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--text); color: var(--ink); border-color: var(--text); }
.tabs .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 6px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.post { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 12px; color: var(--text); }
.post img, .noimg { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px; background: rgba(0, 0, 0, .3); display: grid; place-items: center; color: var(--faint); }

.badge { display: inline-block; font-size: .66rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; background: var(--glass-2); color: var(--muted); }
.badge.scheduled, .badge.pending { background: rgba(255, 157, 0, .14); color: var(--amber-2); }
.badge.published, .badge.sent, .badge.intent-lead { background: rgba(61, 220, 151, .12); color: var(--ok); }
.badge.failed, .badge.intent-spam, .badge.intent-complaint { background: rgba(255, 107, 107, .12); color: var(--bad); }
.badge.publishing, .badge.uploading { background: rgba(255, 200, 87, .14); color: var(--warn); }

/* post preview */
.phone { padding: 0; overflow: hidden; max-width: 380px; border-radius: 26px; }
.phone-head { padding: 12px 14px; font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; padding: 2px; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; background: #111; padding: 3px; }
.phone > img { width: 100%; display: block; }
.phone-cap { padding: 14px; font-size: .86rem; white-space: pre-wrap; max-height: 320px; overflow: auto; color: #e8ded2; }

.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.idea { margin: 0; }
.page-pick { padding: 12px 0; border-top: 1px solid var(--line); }

/* inbox */
.msg .bubble { padding: 10px 14px; border-radius: 16px; margin: 8px 0; max-width: 80%; width: fit-content; white-space: pre-wrap; font-size: .92rem; }
.bubble.in { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.out { background: rgba(255, 157, 0, .14); border: 1px solid rgba(255, 157, 0, .25); margin-left: auto; border-bottom-right-radius: 6px; }
.bubble.current { border-color: rgba(255, 157, 0, .5); }
.msg .form { margin-top: 12px; }
.lead.due { border-color: rgba(255, 107, 107, .45); }
.status-select { width: auto; min-width: 140px; }
details summary { cursor: pointer; }
.spark { width: 100%; height: 44px; color: var(--amber); margin-top: 10px; }
.report { white-space: pre-wrap; font-size: .9rem; padding: 10px 0; line-height: 1.6; }
ol.small { padding-left: 18px; color: var(--muted); }

/* hero on dashboard */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 28px; margin-bottom: 20px;
        background: linear-gradient(120deg, rgba(255, 157, 0, .14), rgba(255, 94, 58, .06) 50%, rgba(255, 255, 255, .02)); }
.hero img { width: 92px; filter: drop-shadow(0 10px 30px rgba(255, 157, 0, .45)); }
.hero .date { text-transform: uppercase; letter-spacing: .22em; font-size: .68rem; color: var(--amber-2); }

@media (max-width: 1100px) { .grid.stats { grid-template-columns: repeat(2, 1fr); } }
}
h1 .bi { vertical-align: -8px; margin-right: 6px; }
h2 .bi.sm + .bi.sm { margin-left: -4px; }

/* ---------- dashboard ---------- */
.flash.sample { background: rgba(139, 92, 246, .1); border-color: rgba(139, 92, 246, .35); }
.dash { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.25fr);
  grid-template-areas:
    "k1 k2 k3 k4 msgs"
    "growth growth places places insights"
    "topc topc funnel donut insights"
    "upcoming upcoming conns conns activity"; }
.dash .card { margin: 0; min-width: 0; }
.k1 { grid-area: k1; } .k2 { grid-area: k2; } .k3 { grid-area: k3; } .k4 { grid-area: k4; }
.msgs { grid-area: msgs; } .growth { grid-area: growth; } .places { grid-area: places; } .insights { grid-area: insights; }
.topc { grid-area: topc; } .funnel { grid-area: funnel; } .donut { grid-area: donut; }
.upcoming { grid-area: upcoming; } .conns { grid-area: conns; } .activity-card { grid-area: activity; }
.kpi { display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
              background: radial-gradient(circle, rgba(255, 157, 0, .18), transparent 70%); }
.k2::after, .k4::after { background: radial-gradient(circle, rgba(139, 92, 246, .22), transparent 70%); }
.kpi-head { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--text); }
.kpi-head .ico { color: var(--amber-2); padding: 7px; width: 30px; height: 30px; border-radius: 9px; background: var(--glass-2); }
.kpi-val { font-family: var(--serif); font-size: 2.3rem; font-weight: 500; letter-spacing: -.02em; line-height: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chg { font-family: var(--sans); font-size: .76rem; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 999px; }
.chg.up { color: var(--ok); background: rgba(61, 220, 151, .1); }
.chg.down { color: var(--bad); background: rgba(255, 107, 107, .1); }
.chg.down .ico { transform: scaleY(-1); }
.kpi-split { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line); }
.kpi-split .bi.sm { width: 18px; height: 18px; border-radius: 5px; margin-left: 4px; }
.msgs { background: linear-gradient(160deg, rgba(139, 92, 246, .14), var(--glass) 60%); }
.chart-sm { height: 90px; margin: 8px -6px -6px; }
.chart-lg { height: 270px; }
.legend { display: flex; gap: 16px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.legend b { color: var(--text); margin-left: 4px; }
.lg-amber { background: var(--amber); } .lg-violet { background: var(--violet); }
.center { text-align: center; padding-top: 90px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .84rem; margin-bottom: 12px; }
.bar-row .bar { grid-column: 1 / -1; }
.bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--amber)); }
.chip { display: inline-block; font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); margin: 6px 4px 0 0; color: var(--text); }
.chip.gold { background: rgba(255, 157, 0, .15); color: var(--amber-2); border-color: rgba(255, 157, 0, .3); margin: 0 0 0 auto; }
.insights { display: flex; flex-direction: column; gap: 12px; }
.insight { padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.insight p { margin: 6px 0 10px; font-size: .84rem; color: var(--muted); line-height: 1.5; }
.ins-head { display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 700; }
.lvl-high .ins-head { color: #ff8f7a; } .lvl-medium .ins-head { color: var(--amber-2); } .lvl-info .ins-head { color: #b9a4ff; }
.lvl-high { border-color: rgba(255, 94, 58, .3); }
.carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.tcard { flex: 0 0 260px; scroll-snap-align: start; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.tcard .row { justify-content: flex-start; gap: 8px; }
.tc-text { font-weight: 600; font-size: .9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.tc-stats { display: flex; gap: 12px; font-size: .76rem; color: var(--muted); }
.tc-stats b { color: var(--text); }
.rings { position: relative; height: 250px; display: grid; place-items: center; }
.ring { position: absolute; border-radius: 50%; display: flex; justify-content: center; text-align: center; font-size: .7rem; color: var(--muted);
        border: 1px solid rgba(255, 255, 255, .08); }
.ring span { padding-top: 8px; display: flex; flex-direction: column; }
.ring b { color: var(--text); font-size: .82rem; }
.r1 { width: 240px; height: 240px; top: 5px; background: radial-gradient(circle at 50% 30%, rgba(139, 92, 246, .10), rgba(139, 92, 246, .03)); }
.r2 { width: 190px; height: 190px; top: 55px; background: rgba(139, 92, 246, .12); }
.r3 { width: 140px; height: 140px; top: 105px; background: rgba(160, 110, 240, .2); }
.r4 { width: 96px; height: 96px; top: 149px; background: rgba(255, 140, 40, .28); }
.r5 { width: 56px; height: 56px; top: 189px; background: var(--grad); color: #1a0f02; align-items: center; }
.r5 span { padding: 0; } .r5 b { color: #1a0f02; }
.donut-wrap { display: grid; grid-template-columns: 1fr 140px; align-items: center; gap: 10px; }
.chart-donut { width: 140px; height: 140px; }
.dl { font-size: .82rem; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.dl b { color: var(--text); }
.dl i { width: 9px; height: 9px; border-radius: 50%; }
.sw-instagram { background: #e1306c; } .sw-facebook { background: #0866ff; } .sw-youtube { background: #ff2d2d; }
.conn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.conn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); color: var(--text); font-size: .86rem; }
.conn span:nth-child(2) { flex: 1; }
.conn:hover { border-color: var(--line-2); color: var(--text); }
.period select { margin: 0; width: auto; padding: 10px 12px; }

@media (max-width: 1350px) {
  .dash { grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas: "k1 k2 k3 k4" "growth growth growth msgs" "places places insights insights"
                         "topc topc topc topc" "funnel funnel donut donut" "upcoming upcoming conns conns" "activity activity activity activity"; }
}
@media (max-width: 860px) {
  body { flex-direction: column; }
  .rail { width: 100%; height: auto; position: static; flex-direction: row; padding: 10px 12px; gap: 10px; overflow-x: auto; }
  .rail nav, .rail-foot { flex-direction: row; margin: 0; }
  .rail a.active::before, [data-tip]:hover::after { display: none; }
  .rail-logo img { width: 40px; }
  .topbar { padding: 10px 16px; position: static; }
  .social-row, .profile span { display: none; }
  main { padding: 20px 16px; }
  .two, .fields, .fields.three { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr 1fr; grid-template-areas: "k1 k2" "k3 k4" "msgs msgs" "growth growth" "insights insights"
          "places places" "topc topc" "funnel funnel" "donut donut" "upcoming upcoming" "conns conns" "activity activity"; }
  h1 { font-size: 1.7rem; }
}
.donut .kpi-val { font-size: 1.7rem; }
.donut .kpi-val small { font-family: var(--sans); font-size: .75rem; }
.donut-wrap { grid-template-columns: minmax(0, 1fr) 110px; }
.chart-donut { width: 110px; height: 110px; }
.topbar .search input { border: 0; background: transparent; margin: 0; padding: 0; height: 100%; }
.table-wrap { overflow-x: auto; max-height: 640px; overflow-y: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tbl th { position: sticky; top: 0; background: #17111f; text-align: left; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.tbl tr.soon td { background: rgba(255, 157, 0, .05); }

.nowrap { white-space: nowrap; }
.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; }
.table-wrap { max-height: none; }
.grid.stats:has(+ .places) { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.tbl tr.clickable { cursor: pointer; }
.tbl a strong { color: var(--text); }
.tbl a:hover strong { color: var(--amber-2); }
.folders { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.folder { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line-2); color: var(--text); }
.folder:hover { color: var(--text); background: var(--glass-2); }
.folder.active { border-color: var(--amber); background: linear-gradient(135deg, rgba(255, 157, 0, .14), rgba(139, 92, 246, .06)); }
.folder-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #1a0f02; }
.folder b { display: block; } .folder small { color: var(--muted); }
.photo-card { display: flex; flex-direction: column; gap: 10px; }
.photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; display: block; }
.progress-pill { display: grid; grid-template-columns: auto 120px; gap: 2px 10px; align-items: center; padding: 8px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line-2); }
.progress-pill b { font-family: var(--serif); font-size: 1.4rem; grid-row: span 2; }

img[data-zoom] { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8, 5, 12, .92); backdrop-filter: blur(8px);
            display: flex; align-items: center; justify-content: center; gap: 16px; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(92vw, 1500px); text-align: center; }
.lightbox img { max-width: 100%; max-height: 84vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox figcaption { color: var(--muted); margin-top: 12px; font-size: .9rem; }
.lb-close { position: absolute; top: 18px; right: 22px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2);
            background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.2rem; cursor: pointer; }
.lb-close:hover { background: var(--ember); border-color: var(--ember); }
.lb-nav { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06);
          color: #fff; font-size: 1.8rem; cursor: pointer; flex-shrink: 0; }
.lb-nav:hover { background: rgba(255, 157, 0, .25); }
.lb-nav[hidden] { visibility: hidden; display: block; }

/* ---- special days ---- */
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; color: var(--amber-2); margin-bottom: 6px; }
.days-card { padding-bottom: 14px; }
.days-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.day { flex: 0 0 230px; scroll-snap-align: start; display: flex; gap: 12px; padding: 14px; border-radius: 16px;
       background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.day.soon { border-color: rgba(255, 157, 0, .5); background: linear-gradient(150deg, rgba(255, 157, 0, .12), rgba(0, 0, 0, .2)); }
.day-date { width: 50px; height: 58px; flex-shrink: 0; border-radius: 12px; background: var(--glass-2); display: flex; flex-direction: column;
            align-items: center; justify-content: center; border: 1px solid var(--line-2); }
.day-date b { font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.day-date span { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.day.soon .day-date { background: var(--grad); color: #1a0f02; border: 0; }
.day.soon .day-date span { color: #1a0f02; }
.day-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; align-items: flex-start; }
.day-body strong { font-size: .92rem; line-height: 1.25; }
.badge.kind-festival { background: rgba(255, 157, 0, .14); color: var(--amber-2); }
.badge.kind-assam { background: rgba(61, 220, 151, .12); color: var(--ok); }
.badge.kind-national { background: rgba(38, 165, 228, .14); color: #7cc8f0; }
.badge.kind-global, .badge.kind-business { background: rgba(139, 92, 246, .16); color: #c4b1ff; }
.badge.kind-custom { background: rgba(255, 94, 58, .16); color: #ff9e85; }
.styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 8px; }
.style-opt { display: flex !important; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--line-2);
             background: var(--glass); cursor: pointer; color: var(--text) !important; position: relative; }
.style-opt:has(input:checked) { border-color: var(--amber); background: rgba(255, 157, 0, .08); }
.style-opt input { position: absolute; opacity: 0; }
.style-opt small { display: block; color: var(--muted); font-weight: 400; }
.style-prev { height: 150px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--amber); }
.style-prev img { width: 54px; }
.style-prev b { font-family: var(--serif); font-style: italic; font-size: 1.3rem; }
.prev-card { background: radial-gradient(circle at 20% 10%, rgba(255, 140, 0, .5), transparent 60%), radial-gradient(circle at 90% 100%, rgba(139, 92, 246, .45), transparent 60%), #120c18; }
.prev-photo { background: linear-gradient(180deg, rgba(10, 7, 14, .1), rgba(10, 7, 14, .85)), linear-gradient(135deg, #8a6a4a, #3b2c22); }
.prev-plain { background: var(--glass-2); color: var(--muted); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pick { display: flex !important; flex-direction: column; gap: 4px; margin: 0 !important; cursor: pointer; position: relative; }
.pick input { position: absolute; opacity: 0; }
.pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 2px solid transparent; }
.pick:has(input:checked) img { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 157, 0, .25); }
.pick:has(input:checked)::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--amber); color: #1a0f02; font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
[hidden]:not(.lb-nav) { display: none !important; }
.style-prev { position: relative; }
.style-prev img { position: absolute; right: 12px; bottom: 10px; width: 40px; }
#photoHint.need { color: var(--amber-2); font-weight: 600; }
#photoStep { scroll-margin-top: 90px; }
.flash-step { animation: flashStep 1.6s ease; border-radius: 10px; }
@keyframes flashStep { 0%, 60% { background: rgba(255, 157, 0, .18); box-shadow: 0 0 0 8px rgba(255, 157, 0, .18); } 100% { background: transparent; box-shadow: none; } }

.prev-ai { background: radial-gradient(circle at 50% 110%, rgba(255, 170, 40, .55), transparent 55%),
  radial-gradient(circle at 10% 0%, rgba(255, 120, 40, .5), transparent 40%), radial-gradient(circle at 90% 0%, rgba(255, 120, 40, .5), transparent 40%), #f3e2c6; color: #8b1a1a; }
.prev-ai i { font-style: normal; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #8a5a1a; }
.style-ai { border-color: rgba(255, 157, 0, .35); }
.ai-box { padding: 14px 16px; margin: 4px 0 18px; border-radius: 14px; background: rgba(255, 157, 0, .06); border: 1px dashed rgba(255, 157, 0, .35); }
.ai-box label { margin-bottom: 6px; }

/* ---- generate buttons ---- */
.gen-field { position: relative; }
.gen-btn { position: absolute; top: -2px; right: 0; background: transparent; border: 1px solid var(--line-2); color: var(--amber-2);
           border-radius: 8px; padding: 3px 10px; font: inherit; font-size: .75rem; cursor: pointer; }
.gen-btn:hover { background: rgba(255, 157, 0, .1); }
.gen-btn:disabled { opacity: .5; cursor: wait; }
.form .filled { border-color: rgba(61, 220, 151, .45); }
.gen-status { padding: 10px 14px; border-radius: 10px; background: var(--glass-2); margin: 0 0 14px; }
.gen-status.ok { background: rgba(61, 220, 151, .1); color: var(--ok); }
.gen-status.err { background: rgba(255, 107, 107, .1); color: var(--bad); }

/* ---- logo panel ---- */
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; padding: 8px;
            border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.pos-grid .pos-opt:nth-child(n+4) { align-self: end; }
.pos-opt { margin: 0 !important; position: relative; }
.pos-opt input { position: absolute; opacity: 0; }
.pos-opt span { display: block; text-align: center; padding: 9px 4px; border-radius: 10px; border: 1px solid var(--line-2);
                background: var(--glass); color: var(--muted); font-size: .74rem; cursor: pointer; }
.pos-opt:has(input:checked) span { background: var(--grad); color: #1a0f02; border-color: transparent; font-weight: 700; }
.logo-panel input[type=range] { padding: 0; accent-color: var(--amber); }
.switch { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; color: var(--text) !important; }

.logo-pick { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; margin-bottom: 14px; }
.pos-grid.small { aspect-ratio: 4 / 3; margin: 0; }
.mini-preview { position: relative; max-width: 260px; border-radius: 12px; overflow: hidden; margin-top: 6px; }
.mini-preview img:first-child { width: 100%; display: block; }
.mp-logo { position: absolute; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55)); }
@media (max-width: 860px) { .logo-pick { grid-template-columns: 1fr; } }

/* ---- login ---- */
.auth-page { display: block; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px 30px; }
.auth-card h1 { text-align: center; font-size: 2rem; margin: 6px 0 8px; }
.auth-card > p { text-align: center; }
.auth-logo { display: block; width: 86px; margin: 0 auto 10px; filter: drop-shadow(0 8px 24px rgba(255, 157, 0, .45)); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 64px; }
.pw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); margin-top: 3px; background: transparent; border: 0;
          color: var(--amber-2); font: inherit; font-size: .78rem; cursor: pointer; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.logout-btn { background: transparent; border: 1px solid var(--line-2); color: var(--muted); border-radius: 12px; height: 44px; padding: 0 14px;
              font: inherit; font-size: .82rem; cursor: pointer; }
.logout-btn:hover { color: var(--bad); border-color: rgba(255, 107, 107, .4); }

/* likes & comments card on a published post */
.post-stats h3 { margin: 0; font-size: 1rem; }
.ps-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ps-platform { padding: 12px 0; border-top: 1px solid var(--line); }
.ps-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.ps-name a { margin-left: auto; font-weight: 500; }
.ps-nums { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 4px; }
.ps-nums div { display: flex; flex-direction: column; }
.ps-nums b { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; line-height: 1.1; color: var(--amber-2); }
.ps-nums span { color: var(--muted); font-size: .76rem; }
.ps-comment { font-size: .84rem; padding: 7px 10px; margin-top: 6px; border-radius: 10px; background: var(--glass-2); overflow-wrap: anywhere; }
