/* InstaOrbit · Violet Glass theme (loaded after app.css) — a LunarDMS product */
:root {
  --ink: #1e1238; --ink-2: #4b3f66; --muted: #6a5f84;
  --brand: #7c3aed; --brand-d: #6d28d9; --pink: #db2777; --orange: #f97316;
  --brand-soft: rgba(124, 58, 237, .10);
  --line: rgba(124, 58, 237, .12);
  --glass: rgba(255, 255, 255, .58); --glass-solid: rgba(255, 255, 255, .94); --edge: rgba(255, 255, 255, .88);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 30px rgba(91, 33, 182, .10);
  --grad: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 45%, #db2777 100%);
  --ok: #15803d; --ok-soft: #dcfce7; --bad: #be123c; --bad-soft: #ffe4e6; --warn: #b45309; --warn-soft: #fef3c7;
  --draft: #8b84a0; --scheduled: #7c3aed; --processing: #db2777; --sent: #15803d; --error: #be123c;
  --accent: var(--brand); --ig: #db2777;
  --spring: cubic-bezier(.34, 1.45, .5, 1); --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- background ---------- */
html { background: #f1ebff; -webkit-text-size-adjust: 100%; }
body { font: 15px/1.55 var(--font); color: var(--ink); background: linear-gradient(160deg, #f1ebff 0%, #fbf4ff 45%, #ffeef7 100%) fixed; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.io-orb { position: fixed; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: -1; animation: io-float 26s ease-in-out infinite alternate; }
.io-orb.o1 { width: 560px; height: 560px; top: -180px; left: -120px; background: radial-gradient(circle, rgba(139, 92, 246, .5), transparent 70%); }
.io-orb.o2 { width: 520px; height: 520px; top: 28%; right: -140px; background: radial-gradient(circle, rgba(236, 72, 153, .36), transparent 70%); animation-duration: 32s; }
.io-orb.o3 { width: 620px; height: 620px; bottom: -240px; left: 28%; background: radial-gradient(circle, rgba(251, 146, 60, .26), transparent 70%); animation-duration: 36s; }
@keyframes io-float { 50% { transform: translate(50px, 30px) scale(1.06); } 100% { transform: translate(-30px, 60px) scale(.96); } }
a { color: var(--brand-d); }
h1, h2, h3 { color: var(--ink); letter-spacing: -.02em; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 20px; font-weight: 800; } h3 { font-size: 15px; font-weight: 700; }
code { background: rgba(124, 58, 237, .08); color: #4c1d95; border-radius: 6px; }
.meta { color: var(--muted); }

/* ---------- glass surfaces ---------- */
.card, .glass { background: var(--glass); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
.card { padding: 22px; position: relative; }
.flash { border-radius: 16px; border: 1px solid transparent; font-weight: 600; animation: io-pop .45s var(--spring) both; }
.flash.ok { background: rgba(220, 252, 231, .9); border-color: rgba(21, 128, 61, .18); color: var(--ok); }
.flash.error { background: rgba(255, 228, 230, .92); border-color: rgba(190, 18, 60, .18); color: var(--bad); }
.warn { background: rgba(254, 243, 199, .9); color: #92400e; border-radius: 10px; }
@keyframes io-pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 14px;
  font-weight: 650; color: var(--ink); background: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 2px 8px rgba(91, 33, 182, .08); position: relative; overflow: hidden; isolation: isolate; text-decoration: none;
  transition: transform .15s, background .2s, box-shadow .25s; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button:hover, .btn:hover { background: rgba(255, 255, 255, .95); }
button:active, .btn:active { transform: scale(.96); }
button.primary, .btn.primary { color: #fff; border: 0; background: var(--grad); box-shadow: 0 10px 24px rgba(124, 58, 237, .32); }
button.primary:hover, .btn.primary:hover { background: var(--grad); filter: brightness(1.06); }
button.primary::after, .btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg); animation: io-sweep 3.8s ease-in-out infinite; }
@keyframes io-sweep { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
.btn.ig { color: #fff; border: 0; background: linear-gradient(120deg, #f97316, #db2777 45%, #7c3aed); box-shadow: 0 10px 24px rgba(219, 39, 119, .3); }
.btn.big, button.big { min-height: 50px; padding: 12px 22px; border-radius: 16px; font-size: 15.5px; }
.btn.ghost { background: rgba(255, 255, 255, .62); }
button.danger, .btn.danger { color: var(--bad); }
button.danger:hover { background: rgba(255, 228, 230, .9); }
button:disabled { opacity: .55; }
.io-rip { position: absolute; border-radius: 50%; pointer-events: none; z-index: -1; transform: scale(0); animation: io-rip .65s var(--ease) forwards;
  background: radial-gradient(circle, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, .2) 45%, transparent 70%); }
button:not(.primary) .io-rip, .btn:not(.primary):not(.ig) .io-rip { background: radial-gradient(circle, rgba(124, 58, 237, .22) 0%, rgba(124, 58, 237, .06) 45%, transparent 70%); }
@keyframes io-rip { to { transform: scale(2.6); opacity: 0; } }

/* ---------- inputs ---------- */
input[type=text], input[type=url], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  background: rgba(255, 255, 255, .78); border: 1px solid rgba(124, 58, 237, .18); border-radius: 14px; padding: 10px 13px; color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(30, 18, 56, .05); transition: border-color .2s, box-shadow .25s var(--ease), background .2s; font-size: 15px; }
input:focus, select:focus, textarea:focus { outline: 0; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(124, 58, 237, .15); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
label.f { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
details summary { cursor: pointer; }

/* ---------- app shell ---------- */
.shell { display: flex; min-height: 100vh; position: relative; }
.sidebar { width: 252px; flex: 0 0 252px; margin: 16px 0 16px 16px; height: calc(100vh - 32px); position: sticky; top: 16px; display: flex; flex-direction: column;
  border-radius: 24px; padding: 20px 14px; color: #fff;
  background: linear-gradient(165deg, rgba(67, 20, 140, .92) 0%, rgba(109, 40, 217, .86) 52%, rgba(219, 39, 119, .82) 100%);
  border: 1px solid rgba(255, 255, 255, .25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 20px 40px rgba(76, 29, 149, .3);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); }
.sidebar .brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; padding: 2px 6px 16px; }
.sidebar .brand small { display: block; font-size: 11.5px; font-weight: 500; opacity: .78; letter-spacing: 0; }
.io-tile { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(160deg, #fff, #f3e8ff);
  border: 1px solid rgba(255, 255, 255, .7); box-shadow: inset 0 1px 0 #fff, 0 8px 20px rgba(236, 72, 153, .45); transition: transform .5s var(--spring); }
.brand:hover .io-tile { transform: rotate(-8deg) scale(1.06); }
.nav-group { color: rgba(255, 255, 255, .62); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 14px 12px 4px; }
.sidebar nav { position: relative; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; scrollbar-width: none; }
.sidebar nav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 14px;
  color: rgba(255, 255, 255, .9); font-weight: 550; text-decoration: none; overflow: hidden; transition: color .35s, transform .15s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .sidebar nav a:not(.active):hover { background: rgba(255, 255, 255, .1); color: #fff; } }
.sidebar nav a:active { transform: scale(.96); }
.sidebar nav a.active { color: var(--brand-d); font-weight: 750; }
.sidebar nav a .ic { flex: 0 0 24px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); transition: transform .3s var(--spring); }
.sidebar nav a.active .ic { transform: scale(1.12); }
.sidebar nav a.new-link { background: rgba(255, 255, 255, .14); border: 1px dashed rgba(255, 255, 255, .45); }
.io-bubble { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 14px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .86));
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(40, 10, 70, .28), 0 0 0 1px rgba(255, 255, 255, .6);
  transition: translate .6s var(--spring), height .3s, width .3s; }
.io-bubble.still { transition: none; }
.io-bubble.jelly { animation: io-jelly .6s cubic-bezier(.3, .7, .4, 1); }
@keyframes io-jelly { 0% { scale: 1 1; } 25% { scale: .93 1.22; } 55% { scale: 1.04 .93; } 80% { scale: .99 1.03; } 100% { scale: 1 1; } }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .2); padding: 12px 8px 0; font-size: 13px; }
.plan-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .14); margin-bottom: 10px; font-weight: 700; }
.plan-chip a { color: #fde68a; font-weight: 700; text-decoration: none; }
.sidebar-foot .who { display: flex; flex-direction: column; margin-bottom: 6px; min-width: 0; }
.sidebar-foot .who b { color: #fff; } .sidebar-foot .who small { opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.sidebar-foot .logout { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 650; opacity: .88; text-decoration: none; }
.sidebar-foot .logout:hover { opacity: 1; }
.powered { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; text-decoration: none !important; opacity: .85; transition: opacity .2s; }
.powered:hover { opacity: 1; }
.powered img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 8px rgba(167, 139, 250, .5); }
.powered.side { display: flex; margin-top: 12px; color: rgba(255, 255, 255, .88); }
.powered.auth { color: var(--muted); }
.auth-powered { display: flex; justify-content: center; margin: -6px 0 24px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 22px 28px 6px; }
.topbar h1 { margin: 0; flex: 1; font-size: 28px; letter-spacing: -.025em; min-width: 0; }
.menu-btn { display: none; width: 44px; height: 44px; padding: 0; border-radius: 14px; }
.content { padding: 14px 28px 56px; width: 100%; max-width: 1240px; }
.content.wide { max-width: 1480px; }
.io-app .content > h1 { display: none; }
.topbar .top-new { display: none; }
.nav-overlay { display: none; }

/* ---------- segmented controls with liquid bubble ---------- */
.tabs, .seg { position: relative; isolation: isolate; display: inline-flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; gap: 4px; padding: 5px;
  border: 1px solid var(--edge); border-radius: 16px; background: rgba(255, 255, 255, .5); scrollbar-width: none; margin-bottom: 16px; }
.tabs::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
.tabs a, .seg button { position: relative; z-index: 1; flex: 0 0 auto; border: 0; background: none; box-shadow: none; min-height: 36px; padding: 7px 14px;
  border-radius: 12px; color: var(--muted); font-weight: 650; text-decoration: none; white-space: nowrap; transition: color .3s; }
.tabs a.on, .seg button.on { color: var(--brand-d); background: none; border: 0; }
.tabs:not(.io-lq-on) a.on, .seg:not(.io-lq-on) button.on { background: #fff; }
.seg { border-radius: 14px; } .seg button { overflow: visible; }
.io-lq { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: 12px; opacity: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(255, 255, 255, .86)); box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(91, 33, 182, .18);
  transition: translate .55s var(--spring), width .55s var(--spring), height .55s var(--spring), opacity .2s; }
.io-lq.still { transition: none; }
.io-lq.jelly { animation: io-lqj .7s cubic-bezier(.3, .7, .4, 1); }
@keyframes io-lqj { 0% { scale: 1 1; } 22% { scale: 1.02 .88; } 48% { scale: .99 1.07; } 75% { scale: 1 .97; } 100% { scale: 1 1; } }

/* ---------- calendar ---------- */
.cal-layout { gap: 20px; }
.toolbar h2 { font-size: 22px; letter-spacing: -.02em; }
.toolbar > button { min-width: 40px; }
.grid { border: 0; gap: 6px; }
.dow { border: 0; background: none; font-weight: 700; color: var(--muted); letter-spacing: .06em; padding: 4px 6px; }
.day { border: 1px solid rgba(255, 255, 255, .9); border-radius: 14px; background: rgba(255, 255, 255, .5); min-height: 116px; padding: 6px;
  transition: transform .25s var(--spring), background .2s, box-shadow .25s; }
.day:hover { background: rgba(255, 255, 255, .88); box-shadow: 0 8px 20px rgba(91, 33, 182, .1); transform: translateY(-2px); }
.day.other { background: rgba(255, 255, 255, .22); color: #b9b0cc; }
.day.past { background: rgba(255, 255, 255, .3); }
.day.today { background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 2px rgba(124, 58, 237, .45), 0 10px 24px rgba(124, 58, 237, .16); }
.day.today .num { background: var(--grad); color: #fff; }
.day.drop { outline: 2px dashed var(--brand); }
.num { font-weight: 700; border-radius: 999px; }
.add { color: var(--brand); font-weight: 700; }
.pill { border: 0; border-left: 0; border-radius: 10px; padding: 4px 7px; font-weight: 600; background: rgba(124, 58, 237, .1); color: #4c1d95;
  box-shadow: inset 3px 0 0 var(--scheduled); animation: io-pill .5s var(--spring) both; }
.pill.draft { background: rgba(139, 132, 160, .14); color: #4b3f66; box-shadow: inset 3px 0 0 var(--draft); }
.pill.processing { background: rgba(219, 39, 119, .12); color: #9d174d; box-shadow: inset 3px 0 0 var(--processing); }
.pill.sent { background: rgba(21, 128, 61, .12); color: #14532d; box-shadow: inset 3px 0 0 var(--sent); }
.pill.error { background: rgba(190, 18, 60, .12); color: #881337; box-shadow: inset 3px 0 0 var(--error); }
@keyframes io-pill { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: none; } }
.tag { background: var(--grad); border-radius: 6px; }
.legend i { border-radius: 4px; }
aside .card + .card { margin-top: 16px; }
.meter { border-bottom-color: var(--line); }
.meter b { font-variant-numeric: tabular-nums; }
.log div { border-bottom-color: var(--line); }

dialog { border: 1px solid var(--edge); border-radius: 26px; background: rgba(255, 255, 255, .96); box-shadow: 0 30px 80px rgba(46, 16, 101, .35); color: var(--ink); }
dialog[open] { animation: io-dlg .45s var(--spring); }
@keyframes io-dlg { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
dialog::backdrop { background: rgba(30, 18, 56, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dlg-h, .dlg-f { border-color: var(--line); }
.dlg-h button { min-height: 36px; width: 36px; padding: 0; border-radius: 12px; }
.bar { background: rgba(124, 58, 237, .12); } .bar i { background: var(--grad); }

/* ---------- accounts, plans, tables ---------- */
.acct { border-top-color: var(--line); }
.avatar { background: var(--grad); box-shadow: 0 6px 14px rgba(124, 58, 237, .3); }
.plans { gap: 18px; }
.plan { border-radius: 24px; transition: transform .35s var(--spring), box-shadow .3s; }
.plan.featured { border: 0; color: #fff; background: var(--grad); box-shadow: 0 20px 44px rgba(124, 58, 237, .35); }
.plan.featured h3, .plan.featured .price, .plan.featured li, .plan.featured .meta, .plan.featured .u { color: #fff !important; }
.plan.selectable:hover { transform: translateY(-4px); }
.plan .price { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.plan li { padding: 4px 0; }
.tbl th { color: var(--muted); font-size: 12.5px; font-weight: 700; border-top: 0; border-bottom: 1px solid var(--line); }
.tbl td { border-top-color: var(--line); }
.tbl tr:hover td { background: rgba(255, 255, 255, .45); }
.table-wrap, .card:has(> .tbl) { overflow-x: auto; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 60; max-width: 90vw; padding: 11px 18px; border-radius: 14px;
  background: rgba(30, 18, 56, .92); color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- public pages (login, sign up, legal) ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 10; padding: 12px max(12px, env(safe-area-inset-left)) 0; }
.nav { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo img { filter: drop-shadow(0 4px 10px rgba(124, 58, 237, .35)); transition: transform .5s var(--spring); }
.logo:hover img { transform: rotate(-12deg) scale(1.08); }
.nav .links { display: flex; gap: 4px; margin: 0 auto; }
.nav .links a { padding: 8px 12px; border-radius: 11px; color: var(--muted); font-weight: 600; text-decoration: none; }
.nav .links a:hover { color: var(--brand-d); background: rgba(255, 255, 255, .7); }
.nav-cta { display: flex; gap: 8px; }
.page { max-width: 1180px; padding: 28px 18px 40px; }
.io-auth .page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 260px); }
.card.narrow { width: 100%; max-width: 440px; margin: 20px auto 22px; padding: 32px 30px; border-radius: 28px; background: rgba(255, 255, 255, .66); }
.card.narrow h1 { font-size: 28px; text-align: center; }
.card.narrow h1::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 14px; background: url(logo.svg) center / contain no-repeat;
  filter: drop-shadow(0 8px 16px rgba(124, 58, 237, .35)); animation: io-bob 5s ease-in-out infinite; }
@keyframes io-bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
.legal { padding: 34px 38px; }
.legal h2 { font-size: 17px; margin-top: 26px; }
footer.foot { display: block; background: none; border: 0; padding: 26px 18px 30px; max-width: 1180px; margin: 0 auto; width: 100%; font-size: 13px; color: var(--muted); }
.frow { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.fbrand { display: flex; flex-direction: column; gap: 6px; }
.fbrand .logo { font-size: 17px; }
.byline { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; text-decoration: none; }
.byline img { border-radius: 50%; }
.byline:hover { color: var(--brand-d); }
footer.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer.foot nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
footer.foot nav a:hover { color: var(--brand-d); }
.disc { margin: 14px 0 0; font-size: 12px; line-height: 1.6; }
.disc a { color: var(--muted); }

/* ---------- flip-in ---------- */
.io-pre { opacity: 0; }
.io-flipping { will-change: transform, opacity; }
.io-flipping.card, .io-flipping .card { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--glass-solid) !important; }

.tabbar { display: none; }

/* ---------- phones ---------- */
@media (max-width: 1000px) {
  .cal-layout, .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; margin: 0; height: 100vh; height: 100dvh; width: 280px; border-radius: 0 24px 24px 0;
    transform: translateX(-105%); transition: transform .32s var(--ease); background: linear-gradient(165deg, #43148c 0%, #6d28d9 52%, #db2777 100%);
    padding-top: calc(env(safe-area-inset-top) + 18px); padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-overlay { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(30, 18, 56, .45); }
  body.nav-open .tabbar { visibility: hidden; }

  .topbar { position: sticky; top: 0; z-index: 20; padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; gap: 10px;
    background: rgba(245, 239, 255, .9); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
    border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s; }
  .topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(91, 33, 182, .08); }
  .topbar h1 { font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .top-new { display: inline-flex; min-height: 38px; padding: 6px 14px; font-size: 14px; }
  .content { padding: 12px 14px calc(100px + env(safe-area-inset-bottom)); }
  .card { padding: 18px; border-radius: 20px; }
  .card.narrow { padding: 26px 20px; }
  .legal { padding: 24px 18px; }

  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; z-index: 25; left: 0; right: 0; bottom: 0;
    padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px); border-radius: 22px 22px 0 0; background: #fff;
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(91, 33, 182, .1); }
  .tabbar a, .tabbar button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 54px; padding: 4px 2px; border: 0; background: none; box-shadow: none; border-radius: 18px; font: 650 11px/1.1 var(--font);
    color: #6a5f84; text-decoration: none; -webkit-user-select: none; user-select: none; overflow: visible; }
  .tabbar .ic { width: 25px; height: 25px; transition: transform .35s var(--spring); }
  .tabbar .active { color: var(--brand-d); }
  .tabbar .active .ic { transform: translateY(-1px) scale(1.08); }
  .tabbar .io-lq { border-radius: 18px; background: linear-gradient(160deg, #f3e8ff, #e9d5ff); box-shadow: 0 4px 12px rgba(124, 58, 237, .18), inset 0 1px 0 #fff; }
  .tabbar .tb-new .plus { display: grid; place-items: center; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; background: var(--grad);
    box-shadow: 0 10px 22px rgba(124, 58, 237, .4), 0 0 0 5px #fff; }
  .tabbar .tb-new .plus .ic { width: 30px; height: 30px; }
  .tabbar .tb-new .plus circle { fill: transparent; }
  .toast { bottom: calc(env(safe-area-inset-bottom) + 90px); }

  /* calendar on a phone */
  .toolbar { gap: 6px; }
  .toolbar h2 { order: -1; width: 100%; margin: 0 0 4px; font-size: 20px; min-width: 0; }
  .toolbar .spacer { display: none; }
  .toolbar #newBtn { display: none; }
  .toolbar select { flex: 1; min-width: 0; }
  .grid { gap: 3px; }
  .dow { font-size: 10px; padding: 2px; text-align: center; }
  .day { min-height: 64px; padding: 3px; border-radius: 10px; }
  .num { font-size: 11px; min-width: 20px; }
  .add { display: none; }
  .pill { font-size: 0; padding: 0; height: 7px; margin-top: 3px; border-radius: 4px; box-shadow: none; background: var(--scheduled); }
  .pill.draft { background: var(--draft); } .pill.processing { background: var(--processing); } .pill.sent { background: var(--sent); } .pill.error { background: var(--error); }
  .pill .t, .pill .c, .pill .tag { display: none; }
  .drafts .pill { font-size: 13px; height: auto; padding: 6px 8px; background: rgba(124, 58, 237, .1); }
  .drafts .pill .c, .drafts .pill .t { display: inline; }
  .legend { display: flex; flex-wrap: wrap; gap: 4px 10px; }
  dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog[open] { animation: io-sheet .45s var(--ease); }
  @keyframes io-sheet { from { transform: translateY(100%); } to { transform: none; } }
  .dlg-b { max-height: calc(92dvh - 140px); }
  .row { flex-wrap: wrap; } .row > * { min-width: 140px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .tbl { font-size: 13px; }

  /* public pages */
  .nav .links { display: none; }
  .nav { gap: 8px; padding: 8px 8px 8px 12px; }
  .nav .logo span { font-size: 17px; }
  .nav-cta .btn { min-height: 38px; padding: 6px 12px; font-size: 14px; }
  .frow { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) { .nav-cta .ghost { display: none; } }

/* phones and touch screens: same look, lighter effects so scrolling stays smooth */
@media (max-width: 820px), (hover: none) {
  .io-orb { animation: none; opacity: .8; }
  .card, .glass, .flash, button, .btn, .tabs, .seg { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card { background: rgba(255, 255, 255, .86); }
  button.primary::after, .btn.primary::after { animation: none; }
  .sidebar { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .io-pre { opacity: 1; }
}
@media print { .sidebar, .topbar, .tabbar, .io-orb, .nav-wrap { display: none !important; } body { background: #fff; } }
.io-app .content .card > h1:first-child { display: none; }
input[type=file] { width: 100%; padding: 10px; border-radius: 14px; border: 1.5px dashed rgba(124, 58, 237, .35); background: rgba(255, 255, 255, .6); font: inherit; font-size: 14px; }
input[type=file]::file-selector-button { margin-right: 10px; padding: 7px 12px; border: 0; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; font-family: inherit; }
@media (max-width: 820px) {
  dialog .row > div:has(.seg) { flex: 1 1 100%; }
  dialog .seg { display: flex; width: 100%; }
  dialog .seg button { flex: 1; }
}

/* =============== InstaOrbit 3.1 feature styles =============== */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sidebar nav a .badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #fde68a; color: #7a4a00; font: 800 11px/18px var(--font); text-align: center; font-style: normal; }
.sidebar nav a.active .badge { background: var(--brand); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; background: rgba(255, 255, 255, .8); border: 1px solid rgba(124, 58, 237, .18); color: var(--ink-2); }
.chip:hover { background: #fff; border-color: var(--brand); }
.chip.add { border-style: dashed; color: var(--brand-d); }
.chip .x { margin-left: 2px; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; background: rgba(124, 58, 237, .1); font-size: 12px; }
.tag-sets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.empty { text-align: center; padding: 26px 10px; }
.spacer { flex: 1; }
.warn { display: block; padding: 8px 10px; }

/* calendar extras */
.pill.approval { box-shadow: inset 3px 0 0 #f59e0b; background: rgba(245, 158, 11, .14); color: #78350f; outline: 1px dashed rgba(245, 158, 11, .6); }
.pill.changes { box-shadow: inset 3px 0 0 var(--error); background: rgba(190, 18, 60, .1); outline: 1px dashed rgba(190, 18, 60, .5); }
.c-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; margin-top: 10px; }
.c-item { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #ede9fe; cursor: grab; box-shadow: 0 4px 10px rgba(91, 33, 182, .12); }
.c-item img, .c-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-item .n { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; border-radius: 999px; background: rgba(30, 18, 56, .7); color: #fff; font: 700 11px/20px var(--font); text-align: center; }
.c-item .x { position: absolute; right: 4px; top: 4px; min-height: 24px; width: 24px; padding: 0; border-radius: 50%; font-size: 14px; }
.ai-row select { width: auto; }

/* bulk upload */
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; border-radius: 20px; border: 2px dashed rgba(124, 58, 237, .35); background: rgba(255, 255, 255, .5); cursor: pointer; text-align: center; transition: transform .35s var(--spring), background .2s; }
.drop:hover, .drop.on { background: rgba(237, 233, 254, .8); transform: scale(1.01); }
.drop-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; color: #fff; background: var(--grad); box-shadow: 0 10px 20px rgba(124, 58, 237, .3); margin-bottom: 6px; }
.bulk-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bulk-row { display: flex; gap: 12px; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .7); border: 1px solid var(--edge); animation: io-pill .45s var(--spring) both; }
.bthumb { position: relative; flex: 0 0 74px; height: 98px; border-radius: 12px; overflow: hidden; background: #ede9fe; }
.bthumb img, .bthumb video { width: 100%; height: 100%; object-fit: cover; }
.bthumb .n { position: absolute; left: 5px; top: 5px; background: rgba(30, 18, 56, .7); color: #fff; border-radius: 999px; font: 700 11px/18px var(--font); padding: 0 6px; }
.bprog { position: absolute; left: 8px; right: 8px; bottom: 44px; height: 6px; border-radius: 6px; background: rgba(124, 58, 237, .15); overflow: hidden; } .bprog i { display: block; height: 100%; background: var(--grad); }
.bbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .bmeta b { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmeta select { width: auto; padding: 5px 8px; font-size: 13px; }
.bbody textarea { min-height: 64px; font-size: 14px; }
button.small, .btn.small { min-height: 32px; padding: 4px 11px; font-size: 13px; border-radius: 11px; }

/* ideas */
.idea-day { margin: 18px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-d); }
.idea { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .72); border: 1px solid var(--edge); margin-bottom: 10px; transition: transform .3s var(--spring); }
.idea:hover { transform: translateY(-2px); }
.idea.used { opacity: .7; }
.idea-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .idea-h b { font-size: 15px; }
.idea-h .tag { color: #fff; padding: 1px 7px; font-size: 10.5px; font-weight: 800; }
.idea .used { margin-left: auto; color: var(--ok); font-weight: 700; font-size: 12.5px; }
.idea .hook { margin: 8px 0 4px; font-weight: 600; color: #4c1d95; }
.idea details { margin: 4px 0; } .idea summary { font-size: 13px; color: var(--brand-d); font-weight: 650; }
.idea .script { background: rgba(124, 58, 237, .06); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.idea .cap, .cap { font-size: 14px; white-space: normal; }
.idea-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fest-list { display: grid; gap: 8px; margin: 12px 0; }
.fest { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .72); border: 1px solid var(--edge); text-decoration: none; color: var(--ink); transition: transform .3s var(--spring); }
.fest:hover { transform: translateX(4px); }
.fd { width: 52px; height: 56px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: var(--grad); box-shadow: 0 8px 16px rgba(124, 58, 237, .28); line-height: 1.05; }
.fd b { font-size: 20px; } .fd small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.fn { flex: 1; display: flex; flex-direction: column; } .fn small { color: var(--muted); }
.fgo { color: var(--brand-d); font-weight: 700; font-size: 13.5px; }
.hooks { padding-left: 20px; } .hooks li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.script-t { display: grid; gap: 8px; }
.sc { display: flex; gap: 12px; padding: 10px; border-radius: 12px; background: rgba(124, 58, 237, .06); }
.sc .tm { flex: 0 0 62px; font-weight: 800; color: var(--brand-d); font-size: 13px; }

/* automations */
.auto-top { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 14px; margin-bottom: 16px; }
.stat-mini { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-mini > span { font-size: 13px; font-weight: 650; color: var(--muted); }
.stat-mini > b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.meter-bar { height: 8px; border-radius: 8px; background: rgba(124, 58, 237, .12); overflow: hidden; } .meter-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .8s var(--ease); }
.wh { display: inline-flex; align-items: center; gap: 6px; margin: 2px 14px 2px 0; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.auto { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .75); border: 1px solid var(--edge); margin-bottom: 10px; transition: opacity .3s; }
.auto.off { opacity: .55; }
.auto-h { display: flex; align-items: center; gap: 10px; } .auto-h b { flex: 1; min-width: 0; }
.trig { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(219, 39, 119, .1); color: #9d174d; white-space: nowrap; }
.auto-b { margin-top: 6px; } .auto-dm { margin: 8px 0 0; padding: 8px 10px; border-radius: 12px; background: rgba(124, 58, 237, .06); font-size: 13.5px; }
.auto-f { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 46px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #d4cde3; transition: background .25s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .35s var(--spring); }
.switch input:checked + i { background: var(--grad); } .switch input:checked + i::after { transform: translateX(20px); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 8px; max-height: 280px; overflow: auto; }
.mg { flex-direction: column; min-height: 0; padding: 4px; border-radius: 12px; gap: 4px; align-items: stretch; }
.mg img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; } .mg small { font-size: 10.5px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg.on { outline: 3px solid var(--brand); background: #f5f3ff; }
.log div.bad { color: var(--bad); }

/* inbox */
.inbox { display: grid; grid-template-columns: 320px 1fr; padding: 0; overflow: hidden; height: calc(100vh - 150px); min-height: 480px; }
.threads { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.th-tools { display: flex; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); } .th-tools input { flex: 1; min-width: 0; } .th-tools select { width: auto; max-width: 130px; }
input[type=search] { background: rgba(255, 255, 255, .78); border: 1px solid rgba(124, 58, 237, .18); border-radius: 14px; padding: 9px 12px; font: inherit; }
.th-list { overflow-y: auto; flex: 1; }
.th { display: flex; width: 100%; gap: 10px; align-items: center; padding: 11px 14px; border: 0; border-radius: 0; background: none; box-shadow: none; text-align: left; border-bottom: 1px solid var(--line); min-height: 64px; }
.th:hover, .th.on { background: rgba(124, 58, 237, .07); }
.th.new b { color: var(--brand-d); }
.av { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--grad); }
.tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .tx small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.th .tm { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.th .tm em { font-style: normal; background: var(--grad); color: #fff; border-radius: 999px; padding: 0 7px; font-weight: 800; }
.convo { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.empty-convo { margin: auto; text-align: center; max-width: 340px; padding: 20px; } .empty-convo .big { font-size: 48px; }
.cv-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); } .cv-h small { display: block; }
.cv-h .back { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: rgba(250, 245, 255, .5); }
.msg { max-width: 76%; padding: 9px 13px; border-radius: 18px; background: #fff; box-shadow: 0 2px 6px rgba(30, 18, 56, .06); align-self: flex-start; animation: io-pill .35s var(--spring) both; overflow-wrap: anywhere; }
.msg.out { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; } .msg.in { border-bottom-left-radius: 6px; }
.msg.auto { opacity: .92; }
.msg small { display: block; font-size: 10.5px; opacity: .7; margin-top: 3px; }
.reply { padding: 12px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .7); }
.reply textarea { min-height: 54px; } .reply-a { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

/* analytics */
.an-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; } .an-tools select { width: auto; }
.rep-head { display: none; align-items: center; gap: 12px; margin-bottom: 14px; } .rep-head b { display: block; font-size: 18px; }
.io-pdf-box .rep-head { display: flex; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--edge); box-shadow: var(--shadow); animation: io-pill .5s var(--spring) both; }
.kpi:nth-child(2) { animation-delay: .06s } .kpi:nth-child(3) { animation-delay: .12s } .kpi:nth-child(4) { animation-delay: .18s } .kpi:nth-child(5) { animation-delay: .24s } .kpi:nth-child(6) { animation-delay: .3s }
.kpi span { font-size: 12.5px; font-weight: 650; color: var(--muted); } .kpi b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; } .kpi small { font-size: 11.5px; color: var(--muted); }
.kpi.on { background: var(--grad); color: #fff; border: 0; box-shadow: 0 14px 30px rgba(124, 58, 237, .3); } .kpi.on span, .kpi.on small { color: rgba(255, 255, 255, .88); }
.an-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.an-grid .card h3, #report .card h3 { margin-top: 0; }
.chart svg { width: 100%; height: auto; display: block; } .area .grid line { stroke: rgba(124, 58, 237, .1); } .area text { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.area .ln { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: io-draw 1.6s var(--ease) forwards; } @keyframes io-draw { to { stroke-dashoffset: 0; } }
.best-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bt { padding: 8px 14px; border-radius: 14px; font-weight: 800; background: rgba(124, 58, 237, .1); color: var(--brand-d); } .bt.top { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(124, 58, 237, .3); }
.hours { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: 12px; }
.hours i { flex: 1; border-radius: 4px 4px 0 0; background: rgba(124, 58, 237, .22); transform-origin: bottom; animation: io-grow .8s var(--spring) both; } .hours i.hot { background: var(--grad); }
@keyframes io-grow { from { transform: scaleY(0); } }
.hours-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.tp { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); min-width: 220px; }
.tp img, .tp .noimg { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: 0 0 44px; background: #ede9fe; } .tp small { display: block; }
.rep-foot { margin-top: 10px; }

/* team, bio, approve */
.copy-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; } .copy-line code { flex: 1; min-width: 0; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-prev { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; } .brand-prev img { border-radius: 12px; object-fit: cover; }
.slug-row { display: flex; align-items: center; gap: 4px; padding-left: 12px; border-radius: 14px; background: rgba(255, 255, 255, .78); border: 1px solid rgba(124, 58, 237, .18); }
.slug-row input { border: 0; background: none; box-shadow: none; padding-left: 0; } .slug-row span { white-space: nowrap; }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.theme { position: relative; height: 64px; border-radius: 14px; display: flex; align-items: flex-end; padding: 8px; font-size: 12px; font-weight: 700; cursor: pointer; border: 2px solid transparent; }
.theme input { position: absolute; opacity: 0; } .theme:has(input:checked) { border-color: var(--brand); box-shadow: 0 6px 14px rgba(124, 58, 237, .25); }
.t-violet { background: linear-gradient(160deg, #ede4ff, #fff0f8); } .t-sunset { background: linear-gradient(160deg, #ffe7d6, #ffe0ef); } .t-midnight { background: linear-gradient(160deg, #120b26, #3b1d5e); color: #fff; } .t-light { background: #fff; border-color: #eee; }
.link-row { margin-top: 6px; }
.bio-stats { display: flex; gap: 12px; margin: 12px 0; } .bio-stats div { flex: 1; padding: 12px; border-radius: 14px; background: rgba(124, 58, 237, .07); text-align: center; } .bio-stats b { display: block; font-size: 22px; } .bio-stats span { font-size: 12px; color: var(--muted); }
.bio-prev { width: 100%; height: 520px; border: 0; border-radius: 22px; box-shadow: 0 12px 30px rgba(91, 33, 182, .18); margin-top: 8px; background: #fff; }
.appr-list { display: grid; gap: 16px; }
.appr { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.appr.approved { opacity: .75; }
.appr-media { display: grid; gap: 6px; } .appr-media video, .appr-media img { width: 100%; border-radius: 14px; background: #000; max-height: 360px; object-fit: contain; }
.appr-media .noimg { height: 160px; border-radius: 14px; display: grid; place-items: center; background: #ede9fe; color: var(--muted); }
.appr-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13.5px; color: var(--muted); } .appr-meta .tag { color: #fff; padding: 1px 7px; font-size: 10.5px; font-weight: 800; }
.appr-cap { white-space: normal; }
.appr-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; } .appr-a details { flex: 1; min-width: 200px; } .appr-a summary { list-style: none; display: inline-flex; } .appr-a summary::-webkit-details-marker { display: none; }
.appr-a textarea { margin: 8px 0; min-height: 70px; }
.approve-page .nav .spacer { flex: 1; }

/* PDF export */
.io-pdf-veil { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(245, 239, 255, .92); }
.io-pdf-veil > div { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-radius: 18px; background: #fff; font-weight: 700; box-shadow: 0 12px 30px rgba(91, 33, 182, .18); }
.io-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #ddd6fe; border-top-color: var(--brand); animation: io-spin .7s linear infinite; } @keyframes io-spin { to { transform: rotate(360deg); } }
.io-pdf-ready { display: grid !important; gap: 12px; justify-items: center; text-align: center; max-width: 300px; } .io-pdf-ready small { color: var(--muted); font-weight: 500; } .io-pdf-ready .btn.primary { width: 100%; }
.io-pdf-box { width: 712px !important; max-width: none !important; padding: 0 !important; margin: 0 !important; background: #faf5ff; }
.io-pdf-box > * { width: 712px !important; }
.io-pdf-box .card, .io-pdf-box .kpi:not(.on) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #fff !important; box-shadow: 0 1px 0 #ede9fe !important; animation: none !important; opacity: 1 !important; transform: none !important; }
.io-pdf-box .kpi.on { background: linear-gradient(135deg, #8b5cf6, #7c3aed 45%, #db2777) !important; animation: none !important; }
.io-pdf-box .kpis { grid-template-columns: repeat(3, 1fr) !important; } .io-pdf-box .an-grid { grid-template-columns: 1fr !important; }
.io-pdf-box .area .ln { stroke-dashoffset: 0 !important; animation: none !important; } .io-pdf-box .hours i { animation: none !important; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .an-grid { grid-template-columns: 1fr; } .auto-top { grid-template-columns: 1fr 1fr; } .auto-top .wide { grid-column: 1 / -1; } }
@media (max-width: 820px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi b { font-size: 21px; }
  .inbox { grid-template-columns: 1fr; height: calc(100dvh - 170px); }
  .convo { display: none; } body.convo-open .convo { display: flex; } body.convo-open .threads { display: none; }
  .cv-h .back { display: inline-flex; min-width: 36px; }
  .msg { max-width: 88%; }
  .appr { grid-template-columns: 1fr; }
  .themes { grid-template-columns: repeat(2, 1fr); }
  .auto-top { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tbl { display: block; overflow-x: auto; white-space: nowrap; }
  .bio-prev { height: 440px; }
}
