/* Apple-inspired design system */
:root {
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  letter-spacing: -0.011em;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0,113,227,0.06), transparent 60%),
    radial-gradient(900px 400px at -10% 110%, rgba(118,118,255,0.05), transparent 60%),
    #f5f5f7;
  background-attachment: fixed;
}

h1, h2, h3, .display { font-family: 'Inter Tight', 'Inter', system-ui, sans-serif; letter-spacing: -0.025em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px; font-size: .875rem; font-weight: 600; line-height: 1; transition: all .15s cubic-bezier(.4,0,.2,1); cursor: pointer; border: none; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: #1d1d1f; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-accent { background: #0071e3; color: #fff; }
.btn-accent:hover:not(:disabled) { background: #0058b8; }
.btn-secondary { background: #fff; color: #1d1d1f; border: 1px solid #d2d2d7; }
.btn-secondary:hover { background: #fbfbfd; border-color: #a1a1a6; }
.btn-ghost { background: transparent; color: #3a3a3d; }
.btn-ghost:hover { background: rgba(0,0,0,.04); }
.btn-danger { background: #ff3b30; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #d70015; }
.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }
.btn-xs { padding: .3rem .65rem; font-size: .75rem; }

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  padding: .65rem .85rem;
  background: #fff;
  border: 1px solid #d2d2d7;
  border-radius: var(--r);
  font-size: .9375rem;
  color: #1d1d1f;
  font-family: inherit;
  transition: all .12s ease;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0,113,227,.15);
}
.input::placeholder, .textarea::placeholder { color: #a1a1a6; }
.textarea { font-family: inherit; resize: vertical; line-height: 1.5; }
.label { display: block; font-size: .8125rem; font-weight: 600; color: #3a3a3d; margin-bottom: .375rem; letter-spacing: -0.005em; }
.help { font-size: .75rem; color: #6e6e73; margin-top: .25rem; }

/* Cards / surfaces */
.card { background: #fff; border-radius: var(--r-lg); box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 0 0 1px rgb(0 0 0 / 0.04); }
.card-flat { background: #fff; border: 1px solid #eeeef0; border-radius: var(--r-lg); }
.card-tinted { background: linear-gradient(180deg, #fbfbfd, #f5f5f7); border: 1px solid #eeeef0; border-radius: var(--r-lg); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .55rem; border-radius: 999px; font-size: .6875rem; font-weight: 600; letter-spacing: .01em; text-transform: uppercase; }
.badge-ok { background: #e6f9eb; color: #1d6b3a; }
.badge-warn { background: #fff4e6; color: #985200; }
.badge-err { background: #feeceb; color: #b71d10; }
.badge-info { background: #e8f1fe; color: #0058b8; }
.badge-neutral { background: #eeeef0; color: #3a3a3d; }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }

/* Sidebar */
.sidebar { background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-right: 1px solid #eeeef0; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .55rem .85rem; border-radius: var(--r); font-size: .9rem; font-weight: 500; color: #3a3a3d; transition: all .12s ease; }
.nav-item:hover { background: rgba(0,0,0,.04); color: #1d1d1f; }
.nav-item.active { background: #1d1d1f; color: #fff; }
.nav-item .ico { width: 18px; height: 18px; flex-shrink: 0; }

/* Sidebar: per-account sub-list */
.nav-section-label { padding: .85rem .85rem .35rem; font-size: .65rem; font-weight: 700; color: #86868b; letter-spacing: .06em; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; }
.nav-section-label a { color: #6e6e73; font-weight: 600; text-transform: none; letter-spacing: 0; font-size: .7rem; padding: .15rem .4rem; border-radius: 6px; transition: all .12s; }
.nav-section-label a:hover { background: rgba(0,0,0,.05); color: #1d1d1f; }
.nav-sub { display: flex; align-items: center; gap: .65rem; padding: .45rem .85rem; border-radius: var(--r); font-size: .8125rem; font-weight: 500; color: #3a3a3d; transition: all .12s ease; min-width: 0; }
.nav-sub:hover { background: rgba(0,0,0,.04); color: #1d1d1f; }
.nav-sub.active { background: #1d1d1f; color: #fff; }
.nav-sub .nav-avatar { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #d2d2d7, #a1a1a6); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; flex-shrink: 0; font-family: 'Inter Tight', sans-serif; }
.nav-sub.active .nav-avatar { background: linear-gradient(135deg, #fff, #e5e5e7); color: #1d1d1f; }
.nav-sub .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sub .nav-status { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.nav-sub .nav-status.ok { background: #34c759; }
.nav-sub .nav-status.off { background: #d2d2d7; }

/* Tabs */
.tabbar { display: inline-flex; gap: 4px; padding: 4px; background: #eeeef0; border-radius: 999px; }
.tab { padding: .4rem 1rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: #3a3a3d; transition: all .15s ease; cursor: pointer; }
.tab:hover { color: #1d1d1f; }
.tab.active { background: #fff; color: #1d1d1f; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Page header */
.page-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.page-sub { font-size: .9375rem; color: #6e6e73; margin-top: .25rem; }

/* Stats */
.stat-card { padding: 1.25rem 1.25rem 1.25rem; }
.stat-label { font-size: .75rem; font-weight: 500; color: #6e6e73; letter-spacing: 0.01em; text-transform: uppercase; }
.stat-num { font-family: 'Inter Tight', 'Inter', sans-serif; font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin-top: .35rem; }
.stat-sub { font-size: .8125rem; color: #86868b; font-weight: 500; }

/* Toast */
#toast > div { pointer-events: auto; min-width: 220px; padding: .65rem 1rem; border-radius: var(--r); font-size: .875rem; font-weight: 500; color: #fff; box-shadow: 0 12px 32px -4px rgba(0,0,0,.18); animation: toast-in .25s cubic-bezier(.4,0,.2,1); }
.toast-info { background: rgba(29,29,31,.95); backdrop-filter: blur(20px); }
.toast-success { background: #34c759; }
.toast-error { background: #ff3b30; }
.toast-warn { background: #ff9500; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Spinner */
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,.1); border-top-color: #1d1d1f; animation: spin .7s linear infinite; display: inline-block; }
.spinner.light { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Slot pill (jam posting) */
.slot-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; background: #1d1d1f; color: #fff; border-radius: 999px; font-family: 'Inter Tight', monospace; font-size: .75rem; font-weight: 600; }
.slot-pill button { color: rgba(255,255,255,.5); transition: color .1s; }
.slot-pill button:hover { color: #fff; }

/* Thread post (preview chain) */
.thread-post { padding: .85rem 1rem; background: #fbfbfd; border: 1px solid #eeeef0; border-radius: var(--r); font-size: .9rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.thread-post-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: #eeeef0; color: #6e6e73; border-radius: 999px; font-family: 'Inter Tight', monospace; font-size: .65rem; font-weight: 700; margin-right: .5rem; vertical-align: middle; }

/* Range slider */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: #eeeef0; border-radius: 999px; outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; background: #fff; border: 1px solid #d2d2d7; border-radius: 50%; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .1s; }
.range::-webkit-slider-thumb:hover { transform: scale(1.08); }
.range::-moz-range-thumb { width: 22px; height: 22px; background: #fff; border: 1px solid #d2d2d7; border-radius: 50%; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fade .2s ease; }
.modal { background: #fff; border-radius: var(--r-xl); width: 100%; max-width: 36rem; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 48px -12px rgba(0,0,0,.25); animation: pop-in .22s cubic-bezier(.34,1.56,.64,1); }

/* Animations */
.fade-in { animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

/* Auth screen background */
.auth-bg {
  background:
    radial-gradient(800px 400px at 80% 10%, rgba(0,113,227,.10), transparent 70%),
    radial-gradient(600px 300px at 20% 90%, rgba(120,80,250,.08), transparent 70%),
    #f5f5f7;
  min-height: 100vh;
}

/* iOS-style toggle (bulletproof: button + aria-pressed + ::after knob) */
.ios-toggle {
  display: inline-block;
  position: relative;
  width: 52px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  margin: 0;
  background: #d2d2d7;
  transition: background .2s ease;
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
  outline: none;
}
.ios-toggle:focus-visible { box-shadow: 0 0 0 4px rgba(0,113,227,.3); }
.ios-toggle::after {
  content: '';
  display: block;
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .2s cubic-bezier(.4,0,.2,1);
}
.ios-toggle[aria-pressed="true"] { background: #34c759; }
.ios-toggle[aria-pressed="true"]::after { transform: translateX(20px); }
.ios-toggle:active::after { width: 32px; }

/* Status row that lights up when toggle is ON */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-radius: 14px; border: 1px solid #eeeef0; background: #fbfbfd; transition: all .18s ease; cursor: pointer; }
.toggle-row:hover { border-color: #d2d2d7; background: #fff; }
.toggle-row.is-on { background: #e6f9eb; border-color: #b6ebc4; }
.toggle-row .label-block { min-width: 0; flex: 1; }
.toggle-row .label-title { font-weight: 600; color: #1d1d1f; font-size: .9375rem; display: flex; align-items: center; gap: .5rem; }
.toggle-row .label-help { font-size: .8125rem; color: #6e6e73; margin-top: .15rem; }
.toggle-row .right-block { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.toggle-row .status-pill { font-size: .65rem; font-weight: 700; letter-spacing: .04em; padding: .25rem .55rem; border-radius: 999px; background: #d2d2d7; color: #6e6e73; text-transform: uppercase; transition: all .18s ease; }
.toggle-row.is-on .status-pill { background: #34c759; color: #fff; }

/* Mobile nav */
.mobile-header { background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid #eeeef0; }

/* Subtle divider */
.hr { height: 1px; background: linear-gradient(to right, transparent, #d2d2d7, transparent); border: 0; margin: 1.5rem 0; }

/* Sticky save bar (floating bottom) */
.sticky-save { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 40; max-width: 38rem; width: calc(100% - 2rem); animation: slide-up .25s cubic-bezier(.34,1.56,.64,1); }
.sticky-save.hidden { display: none; }
.sticky-save-content { background: rgba(29,29,31,.96); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); color: #fff; padding: .85rem 1.1rem; border-radius: 18px; box-shadow: 0 16px 48px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.08) inset; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sticky-save .pulse-dot { width: 8px; height: 8px; background: #ff9500; border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }
@keyframes slide-up { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sticky-save .btn { white-space: nowrap; }
.sticky-save .btn-primary-on-dark { background: #fff; color: #1d1d1f; }
.sticky-save .btn-primary-on-dark:hover { background: #f5f5f7; }
.sticky-save .btn-ghost-on-dark { background: transparent; color: rgba(255,255,255,.7); }
.sticky-save .btn-ghost-on-dark:hover { background: rgba(255,255,255,.08); color: #fff; }

/* When sticky save bar visible, add bottom padding to main so content not hidden */
.has-sticky-save main { padding-bottom: 5rem; }

/* Utility */
.divider { border-top: 1px solid #eeeef0; }
.muted { color: #6e6e73; }
.hover-lift { transition: transform .15s ease, box-shadow .15s ease; }
.hover-lift:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -4px rgb(0 0 0 / 0.08), 0 0 0 1px rgb(0 0 0 / 0.04); }

/* Empty state */
.empty { padding: 3rem 1.5rem; text-align: center; color: #6e6e73; }
.empty-icon { font-size: 2.25rem; margin-bottom: .5rem; }

/* Tutorial / Accordion */
details.tut { border-radius: var(--r-lg); background: #fff; border: 1px solid #eeeef0; overflow: hidden; transition: box-shadow .15s ease; }
details.tut[open] { box-shadow: 0 4px 16px -2px rgb(0 0 0 / 0.06), 0 0 0 1px rgb(0 0 0 / 0.04); }
details.tut > summary { list-style: none; padding: 1rem 1.25rem; cursor: pointer; display: flex; align-items: center; gap: .75rem; user-select: none; }
details.tut > summary::-webkit-details-marker { display: none; }
details.tut > summary::after {
  content: ''; width: 10px; height: 10px; margin-left: auto;
  border-right: 2px solid #6e6e73; border-bottom: 2px solid #6e6e73;
  transform: rotate(45deg); transition: transform .2s ease; flex-shrink: 0;
}
details.tut[open] > summary::after { transform: rotate(-135deg); }
details.tut > summary:hover { background: #fbfbfd; }
details.tut .tut-body { padding: 0 1.25rem 1.25rem; }

details.step { border-top: 1px solid #eeeef0; }
details.step > summary { list-style: none; padding: .85rem 0; cursor: pointer; display: flex; align-items: center; gap: .75rem; font-weight: 500; user-select: none; }
details.step > summary::-webkit-details-marker { display: none; }
details.step > summary::after { content: ''; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid #a1a1a6; border-bottom: 2px solid #a1a1a6; transform: rotate(45deg); transition: transform .2s ease; flex-shrink: 0; }
details.step[open] > summary::after { transform: rotate(-135deg); }
details.step .step-body { padding: 0 0 1rem 2.5rem; font-size: .9rem; color: #3a3a3d; line-height: 1.6; }
details.step .step-body p { margin-bottom: .65rem; }
details.step .step-body ul, details.step .step-body ol { padding-left: 1.25rem; margin-bottom: .65rem; }
details.step .step-body ul { list-style: disc; }
details.step .step-body ol { list-style: decimal; }
details.step .step-body li { margin-bottom: .35rem; }
details.step .step-body code { background: #eeeef0; padding: .15rem .4rem; border-radius: 6px; font-size: .8125rem; font-family: 'Inter Tight', monospace; }
details.step .step-body a { color: #0071e3; }
details.step .step-body a:hover { text-decoration: underline; }
details.step .step-body strong { color: #1d1d1f; font-weight: 600; }

.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: #1d1d1f; color: #fff; font-family: 'Inter Tight', sans-serif; font-size: .8125rem; font-weight: 700; flex-shrink: 0; }

.tip-box { padding: .85rem 1rem; background: #e8f1fe; border-radius: var(--r); border: 1px solid #c8def8; font-size: .85rem; color: #003d80; line-height: 1.55; margin: .65rem 0; }
.tip-box strong { color: #003d80; }
.warn-box { padding: .85rem 1rem; background: #fff4e6; border-radius: var(--r); border: 1px solid #ffd9a8; font-size: .85rem; color: #6b3a00; line-height: 1.55; margin: .65rem 0; }
.warn-box strong { color: #6b3a00; }

.kbd-link { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .55rem; background: #fff; border: 1px solid #d2d2d7; border-radius: 8px; color: #0071e3 !important; font-family: 'Inter Tight', monospace; font-size: .8125rem; text-decoration: none; transition: all .12s; }
.kbd-link:hover { background: #f5f5f7; border-color: #a1a1a6; text-decoration: none !important; }
.kbd-link::after { content: '↗'; font-size: .7rem; opacity: .6; }

/* Section anchor / header (Apple Settings-style) */
.section-head { display: flex; align-items: center; gap: .65rem; margin-bottom: 1rem; padding: 0 .25rem; }
.section-head .num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: #eeeef0; color: #1d1d1f; font-family: 'Inter Tight', sans-serif; font-size: .75rem; font-weight: 700; }
.section-head h3 { font-family: 'Inter Tight', sans-serif; font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; }
.section-head .status { margin-left: auto; }

/* Setup completion strip */
.setup-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .setup-strip { grid-template-columns: repeat(2, 1fr); } }
.setup-strip .step-cell { display: flex; align-items: center; gap: .65rem; padding: .65rem .85rem; background: #fff; border: 1px solid #eeeef0; border-radius: 14px; font-size: .8125rem; cursor: pointer; transition: all .12s; text-align: left; color: #1d1d1f; font-family: inherit; }
.setup-strip .step-cell:hover { border-color: #a1a1a6; background: #fbfbfd; }
.setup-strip .step-cell.done { background: #e6f9eb; border-color: #b6ebc4; color: #1d6b3a; }
.setup-strip .step-cell.done:hover { background: #d3f4dc; }
.setup-strip .step-cell .dot { width: 18px; height: 18px; border-radius: 50%; background: #d2d2d7; color: #fff; font-size: .65rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.setup-strip .step-cell.done .dot { background: #34c759; }

/* Product card */
.product-card { padding: 1.1rem 1.25rem; border-radius: 16px; background: #fff; border: 1px solid #eeeef0; transition: all .15s ease; }
.product-card:hover { border-color: #d2d2d7; }
.product-card.inactive { opacity: .55; background: #fbfbfd; }
.product-meta { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .75rem; color: #6e6e73; margin-top: .5rem; }
.meta-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .65rem; background: #f5f5f7; color: #3a3a3d; border: 1px solid #eeeef0; border-radius: 999px; font-size: .75rem; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Analytics dashboard */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.metric-card { padding: 1rem 1.15rem; background: #fff; border-radius: 16px; border: 1px solid #eeeef0; }
.metric-card .lbl { font-size: .7rem; font-weight: 600; color: #6e6e73; text-transform: uppercase; letter-spacing: .03em; }
.metric-card .val { font-family: 'Inter Tight', sans-serif; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin-top: .25rem; line-height: 1.1; }
.metric-card .sub { font-size: .75rem; color: #86868b; margin-top: .15rem; }

.advice-card { padding: 1.1rem 1.2rem; border-radius: 14px; background: #fff; border: 1px solid #eeeef0; }
.advice-card.priority-high { border-left: 4px solid #ff3b30; }
.advice-card.priority-medium { border-left: 4px solid #ff9500; }
.advice-card.priority-low { border-left: 4px solid #34c759; }
.advice-card .cat { font-size: .65rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6e6e73; }
.advice-card .title { font-family: 'Inter Tight', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: -.01em; margin-top: .3rem; }
.advice-card .detail { font-size: .875rem; color: #3a3a3d; line-height: 1.5; margin-top: .4rem; }
.advice-card .prio-pill { display: inline-flex; align-items: center; padding: .15rem .5rem; border-radius: 999px; font-size: .65rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; margin-left: .5rem; vertical-align: middle; }
.prio-pill.high { background: #feeceb; color: #b71d10; }
.prio-pill.medium { background: #fff4e6; color: #985200; }
.prio-pill.low { background: #e6f9eb; color: #1d6b3a; }

.post-perf-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .85rem 1rem; border-radius: 12px; border: 1px solid #eeeef0; background: #fff; transition: border-color .12s; }
.post-perf-row:hover { border-color: #d2d2d7; }
.post-perf-row .post-text { font-size: .875rem; color: #1d1d1f; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-perf-row .post-meta { font-size: .7rem; color: #6e6e73; margin-top: .25rem; }
.post-perf-row .post-stats { display: flex; gap: .85rem; font-size: .8125rem; font-weight: 600; color: #3a3a3d; align-self: center; flex-shrink: 0; }
.post-perf-row .post-stats span { display: flex; flex-direction: column; align-items: center; min-width: 50px; }
.post-perf-row .post-stats .num { font-family: 'Inter Tight', sans-serif; font-size: 1rem; line-height: 1; }
.post-perf-row .post-stats .lbl { font-size: .6rem; color: #86868b; text-transform: uppercase; margin-top: .15rem; letter-spacing: .03em; }

/* Account filter pills (chains view) */
.acc-filter { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; background: #fff; border: 1px solid #d2d2d7; font-size: .8125rem; font-weight: 500; cursor: pointer; transition: all .12s; color: #3a3a3d; white-space: nowrap; }
.acc-filter:hover { border-color: #a1a1a6; background: #fbfbfd; }
.acc-filter.active { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }
.acc-filter .mini-avatar { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #d2d2d7, #a1a1a6); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 700; flex-shrink: 0; }
.acc-filter.active .mini-avatar { background: rgba(255,255,255,.25); color: #fff; }
.acc-filter .count { font-size: .7rem; opacity: .65; font-variant-numeric: tabular-nums; }

/* Frequency selector pills */
.freq-pill { padding: .55rem .85rem; border-radius: 12px; border: 1px solid #d2d2d7; background: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .12s; min-width: 60px; text-align: center; }
.freq-pill:hover { border-color: #a1a1a6; }
.freq-pill.active { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }
.freq-pill .lbl { display: block; font-size: .65rem; font-weight: 500; opacity: .6; margin-top: .1rem; text-transform: uppercase; }

/* Day-of-week pills */
.dow-pill { min-width: 52px; padding: .55rem .65rem; border-radius: 12px; border: 1px solid #d2d2d7; background: #fff; font-weight: 600; font-size: .8125rem; color: #3a3a3d; cursor: pointer; transition: all .12s; text-align: center; user-select: none; }
.dow-pill:hover { border-color: #a1a1a6; }
.dow-pill.active { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }

/* Custom freq input (styled as a pill with editable number) */
.freq-pill-custom { display: inline-flex; flex-direction: column; align-items: center; padding: .4rem .85rem; border-radius: 12px; border: 1.5px dashed #a1a1a6; background: #fff; min-width: 76px; cursor: text; transition: all .12s; }
.freq-pill-custom:hover { border-color: #1d1d1f; }
.freq-pill-custom:focus-within { border-color: #0071e3; border-style: solid; box-shadow: 0 0 0 4px rgba(0,113,227,.15); }
.freq-pill-custom.active { background: #1d1d1f; border-color: #1d1d1f; border-style: solid; }
.freq-pill-custom.active input { color: #fff; }
.freq-pill-custom.active .lbl { color: #fff; opacity: .65; }
.freq-pill-custom input { width: 60px; border: 0; outline: 0; background: transparent; font-weight: 700; font-size: 1rem; text-align: center; color: #1d1d1f; font-family: inherit; padding: 0; -moz-appearance: textfield; }
.freq-pill-custom input::-webkit-outer-spin-button, .freq-pill-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.freq-pill-custom .lbl { display: block; font-size: .65rem; font-weight: 500; opacity: .6; margin-top: .1rem; text-transform: uppercase; color: #6e6e73; }

/* Quick-pick time presets */
.preset-chip { padding: .35rem .75rem; border-radius: 999px; border: 1px solid #d2d2d7; background: #fff; font-size: .75rem; font-weight: 500; color: #3a3a3d; cursor: pointer; transition: all .12s; }
.preset-chip:hover { background: #f5f5f7; border-color: #a1a1a6; color: #1d1d1f; }

/* Chip multi-select */
.chip-input { padding: .5rem; min-height: 48px; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; background: #fff; border: 1px solid #d2d2d7; border-radius: var(--r); transition: all .12s; }
.chip-input:focus-within { border-color: #0071e3; box-shadow: 0 0 0 4px rgba(0,113,227,.15); }
.chip-input input { flex: 1; min-width: 120px; border: 0; outline: 0; background: transparent; padding: .25rem .35rem; font-size: .9rem; color: #1d1d1f; }
.chip-input input::placeholder { color: #a1a1a6; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .25rem .25rem .65rem; background: #1d1d1f; color: #fff; border-radius: 999px; font-size: .8125rem; font-weight: 500; }
.chip button { color: rgba(255,255,255,.6); transition: all .12s; padding: 2px 6px; line-height: 1; font-size: 1.05rem; cursor: pointer; border-radius: 999px; background: transparent; border: 0; }
.chip button:hover { color: #fff; background: rgba(255,255,255,.18); }
.suggest-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .75rem; border: 1px dashed #d2d2d7; background: transparent; border-radius: 999px; font-size: .75rem; font-weight: 500; color: #6e6e73; cursor: pointer; transition: all .12s; }
.suggest-chip:hover { background: #f5f5f7; color: #1d1d1f; border-style: solid; border-color: #a1a1a6; }
.suggest-chip.added { opacity: .35; pointer-events: none; }
.suggest-chip::before { content: '+'; font-size: .85rem; color: inherit; }

/* Truncate helper */
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 999px; border: 2px solid #f5f5f7; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.25); }
