/* SMMP dashboard design system */

:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #738097;
  --line: #e8edf5;
  --surface: #fff;
  --accent: #6558f5;
  --accent-dark: #5144db;
  --shadow-card: 0 8px 28px rgba(27, 39, 74, .055);
}

[x-cloak] { display: none !important; }

html { min-height: 100%; background: #f5f7fc; }

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(ellipse at 78% 0%, rgba(115, 101, 255, .075), transparent 30rem),
    #f5f7fc;
}

::selection { color: #fff; background: #7065f5; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd3e1; border: 2px solid transparent; border-radius: 99px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #aab4c7; }

/* ── Dashboard shell ── */
body > .flex.min-h-screen { gap: 0; }
body > .flex.min-h-screen > aside {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 258px;
  min-width: 258px;
  height: 100vh;
  background: linear-gradient(178deg, #171b36 0%, #202449 56%, #28215a 100%);
  border: 0;
  color: #fff;
  box-shadow: 12px 0 36px rgba(20, 25, 57, .08);
}

body > .flex.min-h-screen > aside > div:first-child {
  min-height: 82px;
  padding: 20px 22px;
  border-color: rgba(255, 255, 255, .09);
}

body > .flex.min-h-screen > aside > div:first-child > div:first-child {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #8c75ff, #5d50ed);
  box-shadow: 0 7px 20px rgba(112, 92, 255, .35);
}

body > .flex.min-h-screen > aside > div:first-child .font-semibold { color: #fff; letter-spacing: -.02em; }
body > .flex.min-h-screen > aside > div:first-child .text-xs { color: #a5add0; }
body > .flex.min-h-screen > aside nav { padding: 22px 13px; }
body > .flex.min-h-screen > aside nav a {
  position: relative;
  min-height: 44px;
  margin: 3px 0;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #b8bfd9;
  transition: color .18s ease, background .18s ease, transform .18s ease, border-color .18s ease;
}
body > .flex.min-h-screen > aside nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .075);
  transform: translateX(2px);
}
body > .flex.min-h-screen > aside nav a.bg-blue-50 {
  color: #fff;
  background: linear-gradient(100deg, rgba(117, 101, 255, .28), rgba(117, 101, 255, .12));
  border-color: rgba(160, 148, 255, .18);
  box-shadow: inset 3px 0 #9b8cff;
}
body > .flex.min-h-screen > aside nav a.bg-blue-50::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b4a9ff;
  content: "";
  transform: translateY(-50%);
}
body > .flex.min-h-screen > aside > div:last-child {
  padding: 14px;
  border-color: rgba(255, 255, 255, .1);
}
body > .flex.min-h-screen > aside > div:last-child .bg-slate-200 {
  color: #fff;
  background: linear-gradient(145deg, #fc8eae, #e664ae);
}
body > .flex.min-h-screen > aside > div:last-child .text-sm { color: #f1f2ff; }
body > .flex.min-h-screen > aside > div:last-child .text-xs { color: #a5add0; }
body > .flex.min-h-screen > aside > div:last-child > a {
  color: #fda4af;
  background: rgba(244, 63, 94, .08);
  transition: background .18s ease, color .18s ease;
}
body > .flex.min-h-screen > aside > div:last-child > a:hover { color: #fff; background: rgba(244, 63, 94, .2); }

body > .flex.min-h-screen > main { min-height: 100vh; }
body > .flex.min-h-screen > main > header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 74px;
  padding: 15px clamp(20px, 3vw, 42px);
  background: rgba(255, 255, 255, .82);
  border-color: rgba(225, 230, 240, .85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
body > .flex.min-h-screen > main > header h1 {
  color: #1c2540;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.025em;
}
body > .flex.min-h-screen > main > header a { color: #68748c; }
body > .flex.min-h-screen > main > header a:hover { color: var(--accent); }
body > .flex.min-h-screen > main > header a > span {
  min-width: 17px;
  height: 17px;
  border: 2px solid #fff;
  border-radius: 99px;
  background: #f05f86;
  font-size: 10px;
  line-height: 13px;
  text-align: center;
}
body > .flex.min-h-screen > main > header > div > span {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: #59657b;
  font-weight: 600;
}
body > .flex.min-h-screen > main > div.flex-1 { padding: clamp(20px, 3vw, 38px); }

/* ── Shared surfaces ── */
.bg-white {
  border-color: var(--line);
  box-shadow: var(--shadow-card);
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
.bg-white.rounded-xl:hover { border-color: #dce2f2; box-shadow: 0 13px 36px rgba(27, 39, 74, .085); }
.bg-white.rounded-xl h2 { color: #202943; letter-spacing: -.02em; }
.grid > .bg-white.rounded-xl,
.grid > .bg-white.rounded-2xl { animation: surface-in .45s both; }
.grid > :nth-child(2) { animation-delay: .045s; }
.grid > :nth-child(3) { animation-delay: .09s; }
.grid > :nth-child(4) { animation-delay: .135s; }

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, [type="submit"] { transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
button:hover, [type="submit"]:hover { filter: saturate(1.08); }
button:active, [type="submit"]:active { transform: translateY(1px); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  border-color: #dce2ed;
  border-radius: 10px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: #8b7dff !important;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(112, 96, 245, .12) !important;
}
table { border-collapse: separate; border-spacing: 0; }
thead { color: #758198; }
tbody tr { transition: background .16s ease; }
tbody tr:hover, .row-hover:hover { background: #f7f8ff; }

.fade-enter { opacity: 0; }
.fade-enter-active { opacity: 1; transition: opacity .2s; }
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Login ── */
.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(20px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(177, 166, 255, .42), transparent 30rem),
    radial-gradient(ellipse at 92% 88%, rgba(255, 169, 199, .3), transparent 28rem),
    #f6f7fc;
}
.login-shell {
  display: grid;
  grid-template-columns: minmax(300px, .92fr) minmax(360px, 1.08fr);
  width: min(100%, 1000px);
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 100px rgba(45, 49, 98, .16), 0 4px 16px rgba(45, 49, 98, .05);
  animation: surface-in .55s both;
}
.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 600px;
  padding: clamp(34px, 5vw, 58px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .21), transparent 12rem),
    linear-gradient(145deg, #594be4 0%, #7762f4 48%, #a34ddb 100%);
}
.login-showcase::before,
.login-showcase::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .19);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.login-showcase::before { width: 420px; height: 420px; right: -185px; bottom: -140px; }
.login-showcase::after { width: 300px; height: 300px; right: -125px; bottom: -80px; }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font-size: 1.1rem; font-weight: 750; }
.login-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  background: rgba(255, 255, 255, .17);
  box-shadow: 0 8px 20px rgba(41, 26, 123, .18);
  font-size: 1.2rem;
}
.login-pitch { position: relative; z-index: 1; max-width: 410px; margin: auto 0; padding: 60px 0; }
.login-pitch .eyebrow { margin-bottom: 17px; color: #e2ddff; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.login-pitch h2 { margin: 0; font-size: clamp(2.25rem, 4vw, 3.45rem); font-weight: 750; letter-spacing: -.055em; line-height: 1.07; }
.login-pitch p { max-width: 340px; margin-top: 20px; color: rgba(255, 255, 255, .79); font-size: 1rem; line-height: 1.7; }
.login-pitch .login-orbit {
  position: absolute;
  right: 0;
  bottom: 20px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 16px rgba(255, 255, 255, .055), 0 0 0 32px rgba(255, 255, 255, .04);
}
.login-footnote { position: relative; z-index: 1; color: rgba(255, 255, 255, .72); font-size: .78rem; }
.login-form-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 6vw, 76px); }
.login-form-panel h1 { margin: 0; color: #1c2440; font-size: 2rem; font-weight: 750; letter-spacing: -.04em; }
.login-form-panel .login-subtitle { margin: 9px 0 32px; color: #818ba0; font-size: .94rem; }
.login-form-panel label { display: block; margin-bottom: 8px; color: #34405a; font-size: .83rem; font-weight: 650; }
.login-form-panel input { width: 100%; min-height: 48px; padding: 11px 14px; background: #fbfcff; }
.login-form-panel .login-error {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #fecdd3;
  border-radius: 11px;
  color: #be123c;
  background: #fff1f2;
  font-size: .86rem;
}
.login-submit {
  width: 100%;
  min-height: 49px;
  margin-top: 6px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(100deg, #6757ed, #805ae9);
  box-shadow: 0 9px 20px rgba(105, 85, 234, .23);
  font-size: .94rem;
  font-weight: 700;
  cursor: pointer;
}
.login-submit:hover { box-shadow: 0 12px 26px rgba(105, 85, 234, .32); transform: translateY(-1px); }
.login-default-note { margin-top: 23px; color: #a0a8b8; font-size: .75rem; line-height: 1.6; text-align: center; }

@keyframes surface-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  body > .flex.min-h-screen { flex-direction: column; }
  body > .flex.min-h-screen > aside {
    position: relative;
    width: 100%;
    min-width: 0;
    height: auto;
  }
  body > .flex.min-h-screen > aside > div:first-child { min-height: 68px; padding: 13px 18px; }
  body > .flex.min-h-screen > aside nav {
    display: flex;
    gap: 4px;
    padding: 8px 12px 12px;
    overflow-x: auto;
  }
  body > .flex.min-h-screen > aside nav a { flex: 0 0 auto; min-height: 40px; margin: 0; padding: 0 13px; }
  body > .flex.min-h-screen > aside nav a.bg-blue-50::after { display: none; }
  body > .flex.min-h-screen > aside > div:last-child { display: none; }
  body > .flex.min-h-screen > main { min-height: 0; }
  body > .flex.min-h-screen > main > header { position: relative; min-height: 62px; }
  body > .flex.min-h-screen > main > div.flex-1 { padding: 20px 16px 28px; }
}

@media (max-width: 640px) {
  .login-page { padding: 15px; }
  .login-shell { display: block; min-height: auto; border-radius: 22px; }
  .login-showcase { min-height: 210px; padding: 22px 25px; }
  .login-pitch { padding: 30px 0 17px; }
  .login-pitch .eyebrow { margin-bottom: 8px; font-size: .65rem; }
  .login-pitch h2 { max-width: 280px; font-size: 2rem; }
  .login-pitch p, .login-pitch .login-orbit, .login-footnote { display: none; }
  .login-form-panel { padding: 30px 25px 32px; }
  .login-form-panel h1 { font-size: 1.7rem; }
  .login-form-panel .login-subtitle { margin-bottom: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .no-print { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   CREATE POST PAGE
   ═══════════════════════════════════════════════════════════ */

.cp-content { overflow: visible !important; }
.cp-page {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 20px;
}
.cp-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  align-items: start;
  gap: 20px;
}
.cp-form { display: flex; min-width: 0; flex-direction: column; gap: 16px; }
.cp-preview { min-width: 0; }
.cp-preview__inner { position: sticky; top: 94px; }

.cp-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.cp-label {
  display: block;
  margin-bottom: 8px;
  color: #34405a;
  font-size: .82rem;
  font-weight: 650;
}

.cp-target {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #e0e5ef;
  border-radius: 10px;
  background: #fff;
  color: #647089;
  font-size: .8rem;
  font-weight: 650;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.cp-target:hover:not(:disabled) { border-color: #b9c1d2; color: #27334d; }
.cp-target:disabled { opacity: .45; cursor: not-allowed; }
.cp-target--active { box-shadow: 0 2px 8px rgba(27, 39, 74, .08); }
.cp-target--instagram { border-color: #d9b5e5; color: #9d287c; background: #fff7fd; }
.cp-target--tiktok { border-color: #aeb8c9; color: #141a28; background: #f5f7fa; }
.cp-target__check {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: .7rem;
  line-height: 1;
}

/* Brand chips */
.cp-brand-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 14px 8px 8px;
  border: 1.5px solid #e3e7f2;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all .18s ease;
}
.cp-brand-chip:hover {
  border-color: #c9c0ff;
  background: #fafaff;
  transform: translateY(-1px);
}
.cp-brand-chip--active {
  border-color: var(--accent);
  background: linear-gradient(135deg, #f2f0ff, #faf9ff);
  box-shadow: 0 4px 14px rgba(101, 88, 245, .13);
}
.cp-brand-chip__avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #e8e4ff, #d7d0ff);
  color: #5344d6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.cp-brand-chip__avatar img { width: 100%; height: 100%; object-fit: cover; }
.cp-brand-chip__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}
.cp-brand-chip__name {
  font-size: .85rem;
  font-weight: 600;
  color: #1c2440;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.cp-brand-chip__meta { display: flex; gap: 4px; margin-top: 3px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd3e1; }
.dot--ok { background: #10b981; box-shadow: 0 0 0 2px rgba(16, 185, 129, .18); }
.dot--off { background: #cbd3e1; }

/* Tabs */
.cp-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: .82rem;
  font-weight: 600;
  color: #6b7691;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all .16s ease;
}
.cp-tab:hover:not(:disabled) { color: #1c2440; }
.cp-tab--active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(28, 36, 64, .08);
}
.cp-tab:disabled { opacity: .4; cursor: not-allowed; }

/* Media grid */
.cp-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 2px dashed #dfe5f0;
  border-radius: 14px;
  background: #fbfcff;
  transition: all .2s ease;
}
.cp-media-grid--drag {
  border-color: var(--accent);
  background: #f5f2ff;
  transform: scale(1.005);
}
.cp-media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f3f9;
  box-shadow: 0 2px 6px rgba(28, 36, 64, .06);
  animation: cp-pop-in .3s ease both;
}
@keyframes cp-pop-in {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
.cp-media-item__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cp-media-item__badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.cp-media-item__order {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.cp-media-item__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .16s ease, transform .16s ease;
}
.cp-media-item:hover .cp-media-item__remove { opacity: 1; }
.cp-media-item__remove:hover { background: #ef4444; transform: scale(1.1); }

.cp-media-item__ring {
  position: absolute;
  inset: 0;
  background: rgba(28, 36, 64, .55);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cp-media-item__ring svg {
  width: 44px;
  height: 44px;
  transition: transform .2s;
}
.cp-media-item__ring-text {
  margin-top: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.cp-media-item__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, .9);
  color: #fff;
  padding: 4px;
}

.cp-media-add {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff;
  border: 1.5px dashed #d7dded;
  cursor: pointer;
  transition: all .18s ease;
  text-align: center;
  padding: 6px;
}
.cp-media-add:hover {
  border-color: var(--accent);
  background: #faf9ff;
  transform: translateY(-2px);
}
.cp-media-add--lg {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  min-height: 130px;
}

.cp-empty-media {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fc, #eef0f7);
}
.cp-empty-media--dark {
  background: linear-gradient(135deg, #1a1a1a, #2d2d3a);
}

/* Instagram preview */
.cp-ig {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.cp-ig__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.cp-ig__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(45deg, #f9ce34, #ee2a7b 45%, #6228d7);
  flex-shrink: 0;
}
.cp-ig__avatar > * {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #5344d6;
  object-fit: cover;
  border: 2px solid #fff;
}
.cp-ig__media {
  position: relative;
  background: #000;
  overflow: hidden;
  width: 100%;
}
.cp-ig__media.aspect-square { aspect-ratio: 1; }
.cp-ig__media.aspect-\[9\/16\] { aspect-ratio: 9/16; }

.cp-ig__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px;
}
.cp-ig__body { padding: 4px 12px 14px; }

.cp-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  color: #1c2440;
  transition: transform .16s ease;
}
.cp-carousel__arrow:hover { transform: translateY(-50%) scale(1.1); }
.cp-carousel__arrow--left { left: 8px; }
.cp-carousel__arrow--right { right: 8px; }
.cp-carousel__counter {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.cp-dots { display: flex; justify-content: center; gap: 5px; padding: 10px 0 2px; }
.cp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d1d8e6;
  cursor: pointer;
  transition: all .18s ease;
}
.cp-dot--active { background: #3b82f6; width: 18px; border-radius: 3px; }

.cp-story-bars {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 3px;
  z-index: 3;
}
.cp-story-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,.35);
  border-radius: 2px;
  overflow: hidden;
}
.cp-story-bar__fill {
  height: 100%;
  background: #fff;
  transition: width .3s ease;
}

/* TikTok preview */
.cp-tt {
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.cp-tt__media {
  position: relative;
  aspect-ratio: 9/16;
  background: #000;
  overflow: hidden;
}
.cp-tt__media video,
.cp-tt__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cp-tt__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,.35) 0%,
    transparent 22%,
    transparent 60%,
    rgba(0,0,0,.65) 100%);
  pointer-events: none;
}
.cp-tt__actions {
  position: absolute;
  right: 10px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 2;
}
.cp-tt__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8e4ff, #d7d0ff);
  color: #5344d6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  border: 2px solid #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  margin-bottom: 2px;
}
.cp-tt__avatar img { width: 100%; height: 100%; object-fit: cover; }
.cp-tt__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.cp-tt__action svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.cp-tt__caption {
  position: absolute;
  left: 12px;
  right: 68px;
  bottom: 14px;
  color: #fff;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.cp-tt__caption .line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action bar */
.cp-actionbar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  margin: 0 calc(0px - clamp(20px, 3vw, 38px)) calc(0px - clamp(20px, 3vw, 38px));
  background: rgba(255, 255, 255, .92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -8px 24px rgba(27, 39, 74, .05);
}

.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: all .16s ease;
}
.cp-btn:disabled { opacity: .55; cursor: not-allowed; }
.cp-btn--ghost { background: #f1f3f9; color: #59657b; }
.cp-btn--ghost:hover:not(:disabled) { background: #e6e9f2; color: #1c2440; }
.cp-btn--primary {
  background: linear-gradient(100deg, #6757ed, #805ae9);
  color: #fff;
  box-shadow: 0 8px 20px rgba(105, 85, 234, .25);
}
.cp-btn--primary:hover:not(:disabled) {
  box-shadow: 0 12px 26px rgba(105, 85, 234, .35);
  transform: translateY(-1px);
}

/* Submit modal */
.cp-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 25, 57, .55);
  backdrop-filter: blur(6px);
}
.cp-modal {
  width: 100%;
  max-width: 400px;
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(20, 25, 57, .35);
  text-align: center;
  animation: cp-modal-in .3s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes cp-modal-in {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.cp-modal__icon { display: flex; justify-content: center; margin-bottom: 16px; }
.cp-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1c2440;
  margin: 0 0 6px;
  letter-spacing: -.02em;
}
.cp-modal__subtitle {
  font-size: .85rem;
  color: #7a869c;
  margin: 0 0 20px;
}
.cp-progress {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #eef0f6;
  overflow: hidden;
}
.cp-progress__bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #6757ed, #805ae9, #a34ddb);
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 12px rgba(128, 90, 233, .5);
}
.cp-stages {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.cp-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #a0a8b8;
  font-size: .83rem;
  transition: color .2s ease;
}
.cp-stage--active { color: #1c2440; font-weight: 600; }
.cp-stage--done { color: #10b981; }
.cp-stage__dot {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef0f6;
  font-size: 11px;
  font-weight: 700;
  transition: all .2s ease;
}
.cp-stage--active .cp-stage__dot { background: #e0dcff; color: var(--accent); }
.cp-stage--done .cp-stage__dot { background: #d1fae5; color: #059669; }

@media (max-width: 1024px) {
  .cp-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .cp-brand-chip__name { max-width: 100px; }
}
@media (max-width: 900px) {
  .cp-layout { grid-template-columns: minmax(0, 1fr); }
  .cp-preview__inner { position: static; }
  .cp-preview { width: min(100%, 400px); margin-inline: auto; }
}
@media (max-width: 760px) {
  .cp-actionbar { margin: 0 -16px -28px; }
}
@media (max-width: 640px) {
  .cp-media-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .cp-actionbar { flex-direction: column; align-items: stretch; }
  .cp-actionbar__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-btn { width: auto; min-width: 0; padding-inline: 12px; }
}