:root {
  --ink: #182132;
  --muted: #6f7888;
  --line: #e7e9ef;
  --page: #f5f6f9;
  --panel: #ffffff;
  --purple: #6f50d8;
  --purple-dark: #5336b7;
  --purple-soft: #eeeafd;
  --coral: #f06f5f;
  --amber: #f0a83c;
  --green: #34a979;
  --red: #e65353;
  --sidebar: #151b2a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
  background: #f5f6f9;
}
.auth-visual {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px;
  color: white;
  background:
    radial-gradient(circle at 75% 30%, rgba(141,114,231,.38), transparent 24%),
    linear-gradient(145deg, #141a29, #29234e);
}
.auth-brand { margin: 0; }
.auth-visual > div { max-width: 590px; }
.auth-visual h1 { margin: 14px 0; font: 800 44px/1.18 "Manrope", sans-serif; letter-spacing: -.035em; }
.auth-visual p { margin: 0; color: #c3c6d1; font-size: 17px; line-height: 1.7; }
.auth-visual small { color: #9299aa; font-size: 13px; line-height: 1.5; }
.auth-panel { min-height: 100vh; display: grid; place-items: center; padding: 36px; }
.auth-card {
  width: min(100%, 520px);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 20px 55px rgba(27,32,52,.1);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 30px; padding: 5px; border-radius: 10px; background: #f0f1f5; }
.auth-tabs button { min-height: 42px; color: #687180; border: 0; border-radius: 7px; background: transparent; font-size: 14px; font-weight: 600; }
.auth-tabs button.active { color: #5336b7; background: white; box-shadow: 0 2px 8px rgba(28,34,54,.08); }
.auth-form { display: grid; gap: 17px; }
.auth-form h2 { margin: 7px 0 0; font: 700 28px "Manrope", sans-serif; }
.auth-form label { display: grid; gap: 7px; color: #424c5c; font-size: 14px; font-weight: 600; }
.auth-form input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  color: var(--ink);
  outline: 0;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  background: white;
  font-size: 15px;
}
.auth-form input:focus { border-color: #947de5; box-shadow: 0 0 0 3px rgba(111,80,216,.1); }
.auth-submit { min-height: 52px; color: white; border: 0; border-radius: 8px; background: linear-gradient(100deg, #7658dc, #5c3bc2); font-size: 15px; font-weight: 700; }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-error { min-height: 20px; margin: 14px 0 0; color: #d14e48; font-size: 13px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 250px;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 20px;
  color: #aeb5c3;
  background:
    radial-gradient(circle at 10% 85%, rgba(111,80,216,.18), transparent 26%),
    var(--sidebar);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 10px 35px;
  color: white;
  font: 700 19px "Manrope", sans-serif;
  text-decoration: none;
}
.brand > span:last-child span { color: #9c88eb; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 10px;
  background: linear-gradient(145deg, #8a70eb, #6040ca);
  box-shadow: 0 7px 18px rgba(90, 61, 195, .35);
}
.brand-mark svg { width: 21px; }
.nav-list { flex: 1; }
.nav-label {
  margin: 0 12px 10px;
  color: #646d7e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-label-spaced { margin-top: 30px; }
.nav-item {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding: 0 12px;
  color: #aeb5c3;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: .2s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.05); }
.nav-item.active { color: white; background: rgba(122, 94, 223, .16); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: #8e74e9;
}
.nav-item svg { width: 18px; }
.nav-badge {
  margin-left: auto;
  padding: 3px 5px;
  color: #c5b8f4;
  border: 1px solid rgba(143,116,233,.35);
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}
.sidebar-note {
  display: flex;
  gap: 10px;
  margin: 12px 2px 18px;
  padding: 13px;
  border: 1px solid rgba(246,174,64,.16);
  border-radius: 10px;
  background: rgba(240,168,60,.06);
}
.note-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #ffc264;
  border: 1px solid #8b6d38;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.sidebar-note strong { color: #e6e8ed; font-size: 11px; }
.sidebar-note p { margin: 4px 0 0; color: #7c8494; font-size: 10px; line-height: 1.45; }
.profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: linear-gradient(145deg, #db7668, #8a4db6);
  font-size: 10px;
  font-weight: 700;
}
.profile strong, .profile span { display: block; }
.profile strong { color: #e7e9ed; font-size: 11px; }
.profile span { margin-top: 3px; color: #686f7e; font-size: 9px; }
.logout-button {
  min-height: 34px;
  padding: 0 11px;
  color: #f2edff;
  border: 1px solid rgba(156,136,235,.4);
  border-radius: 8px;
  background: rgba(111,80,216,.18);
  font-size: 12px;
  font-weight: 700;
}
.logout-button:hover { color: white; background: rgba(111,80,216,.32); }

.main-content { min-width: 0; width: calc(100% - 250px); margin-left: 250px; }
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.breadcrumb { color: var(--ink); font-size: 12px; font-weight: 600; }
.breadcrumb span, .breadcrumb b { color: #a4aab5; font-weight: 400; }
.breadcrumb b { padding: 0 9px; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.topbar-logout {
  min-height: 38px;
  padding: 0 14px;
  color: #6040ca;
  border: 1px solid #ddd4f7;
  border-radius: 999px;
  background: #f8f5ff;
  font-size: 12px;
  font-weight: 800;
}
.topbar-logout:hover { background: #eee8ff; }
.status-pill {
  padding: 7px 11px;
  color: #74622d;
  border: 1px solid #f1dfad;
  border-radius: 20px;
  background: #fff9e9;
  font-size: 10px;
  font-weight: 600;
}
.status-pill i, .live-badge i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(240,168,60,.13);
}
.icon-button { position: relative; padding: 3px; color: #7c8391; border: 0; background: none; }
.icon-button svg { width: 18px; }
.icon-button i { position: absolute; top: 1px; right: 1px; width: 5px; height: 5px; border: 1px solid white; border-radius: 50%; background: var(--coral); }
.mobile-menu { display: none; border: 0; background: transparent; }
.mobile-menu span { width: 20px; height: 2px; display: block; margin: 4px; background: var(--ink); }
.page-content { max-width: 1500px; margin: 0 auto; padding: 34px 36px 24px; }
.page-view[hidden] { display: none !important; }
.page-view.active { animation: page-in .25s ease; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.composer-panel, .automation-panel { max-width: 920px; margin: 0 auto; }
.composer-panel.page-view, .automation-panel.page-view { min-height: calc(100vh - 145px); }

.hero {
  position: relative;
  min-height: 215px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 36px 46px;
  color: white;
  border-radius: 14px;
  background:
    linear-gradient(110deg, rgba(20,25,42,.97) 0%, rgba(35,31,64,.96) 48%, rgba(86,57,164,.89) 100%),
    #151b2a;
  box-shadow: 0 8px 26px rgba(27,30,50,.12);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, transparent, black);
}
.hero > div:first-child { position: relative; z-index: 1; max-width: 690px; }
.eyebrow { display: block; color: #8c72e5; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.hero .eyebrow { margin-bottom: 12px; color: #b19df2; }
.hero h1 {
  margin: 0;
  font: 700 35px/1.18 "Manrope", sans-serif;
  letter-spacing: -.025em;
}
.hero h1 em { color: #a88ff1; font-style: normal; }
.hero p { max-width: 650px; margin: 15px 0 0; color: #b9bdc9; font-size: 13px; line-height: 1.6; }
.hero-visual { position: absolute; top: 50%; right: 9%; width: 180px; height: 180px; transform: translateY(-50%); }
.radar-ring { position: absolute; inset: 0; border: 1px solid rgba(183,163,244,.2); border-radius: 50%; }
.ring-one { inset: 20px; border-color: rgba(183,163,244,.3); }
.ring-two { inset: 47px; border-color: rgba(183,163,244,.4); }
.radar-ring::before, .radar-ring::after { content: ""; position: absolute; background: rgba(183,163,244,.12); }
.radar-ring::before { top: 50%; left: 0; width: 100%; height: 1px; }
.radar-ring::after { top: 0; left: 50%; width: 1px; height: 100%; }
.radar-core {
  position: absolute;
  inset: 67px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: linear-gradient(145deg, #8d72e7, #6141ca);
  box-shadow: 0 0 34px rgba(126,91,224,.75);
}
.radar-core svg { width: 24px; }
.orbit-dot { position: absolute; width: 7px; height: 7px; border: 2px solid #c0aff7; border-radius: 50%; background: #6c50cd; box-shadow: 0 0 9px #b39df4; }
.dot-one { top: 25px; left: 40px; }
.dot-two { right: 6px; bottom: 62px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.metric-card, .panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 3px 12px rgba(24,33,50,.035);
}
.metric-card { min-height: 176px; padding: 18px 19px 15px; }
.metric-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; }
.metric-icon svg { width: 16px; }
.metric-icon.purple { color: var(--purple); background: var(--purple-soft); }
.metric-icon.coral { color: var(--coral); background: #feeeeb; }
.metric-icon.amber { color: var(--amber); background: #fff6e6; }
.metric-icon.green { color: var(--green); background: #e9f8f2; }
.trend { padding: 4px 7px; border-radius: 5px; font-size: 8px; font-weight: 700; }
.trend.up { color: #d24b4b; background: #fff0ef; }
.trend.down { color: #c78320; background: #fff5e3; }
.trend.safe { color: #25845f; background: #e9f8f2; }
.trend.neutral { color: #7c8492; background: #f3f4f6; }
.metric-label { color: #828996; font-size: 10px; }
.metric-value { margin: 5px 0 10px; line-height: 1; }
.metric-value strong { font: 700 28px "Manrope", sans-serif; }
.metric-value small { color: #a4aab5; font-size: 11px; }
.metric-card p { margin: 9px 0 0; color: #9197a2; font-size: 9px; }
.progress { height: 4px; overflow: hidden; border-radius: 3px; background: #ececf1; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--amber), var(--red)); transition: width .4s ease; }
.mini-bars { height: 26px; display: flex; align-items: end; gap: 4px; }
.mini-bars i { flex: 1; border-radius: 2px 2px 0 0; background: #f6b1a8; }
.mini-bars i:nth-last-child(-n+2) { background: var(--coral); }
.alert-dots { display: flex; gap: 5px; height: 26px; align-items: center; }
.alert-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.alert-dots i:nth-child(4), .alert-dots i:nth-child(5) { opacity: .25; }
.guardrail-list { display: flex; gap: 12px; height: 26px; align-items: center; color: #66726f; font-size: 8px; }
.guardrail-list i { display: inline-block; width: 5px; height: 5px; margin-right: 3px; border-radius: 50%; background: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr); gap: 18px; }
.panel { padding: 24px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-header h2 { margin: 6px 0 0; font: 700 19px "Manrope", sans-serif; letter-spacing: -.015em; }
.lab-tag { padding: 5px 7px; color: #7f68ce; border: 1px solid #ddd5f7; border-radius: 4px; background: #f7f4ff; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.field-group { margin-bottom: 15px; }
.field-group label { display: block; margin-bottom: 7px; color: #555f6f; font-size: 10px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap span { position: absolute; top: 50%; right: 12px; color: #aaaeba; font-size: 8px; transform: translateY(-50%); }
input[type="text"], select {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  color: var(--ink);
  outline: 0;
  border: 1px solid #dde0e7;
  border-radius: 7px;
  background: white;
  font-size: 11px;
  transition: .2s;
}
input[type="datetime-local"], textarea {
  width: 100%;
  padding: 0 13px;
  color: var(--ink);
  outline: 0;
  border: 1px solid #dde0e7;
  border-radius: 7px;
  background: white;
  font: inherit;
}
input[type="datetime-local"] { height: 50px; font-size: 15px; }
textarea { min-height: 120px; padding: 13px; resize: vertical; }
input[type="datetime-local"]:focus, textarea:focus { border-color: #9b84e9; box-shadow: 0 0 0 3px rgba(111,80,216,.09); }
input[type="text"] { padding-right: 55px; }
input[type="text"]:focus, select:focus { border-color: #9b84e9; box-shadow: 0 0 0 3px rgba(111,80,216,.09); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
select { appearance: none; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23747b88' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat calc(100% - 12px) center; }
.generate-button, .simulate-button {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(100deg, #7658dc, #5c3bc2);
  box-shadow: 0 5px 14px rgba(94,62,193,.2);
  font-size: 11px;
  font-weight: 600;
  transition: .2s;
}
.generate-button:hover, .simulate-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(94,62,193,.25); }
.generate-button:active, .simulate-button:active { transform: translateY(0); }
.generate-button svg { width: 16px; }
.content-preview { margin-top: 17px; padding: 16px; border: 1px solid #e5e7ed; border-radius: 9px; background: #fbfbfd; }
.preview-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.avatar.small { width: 29px; height: 29px; font-size: 8px; }
.preview-top strong, .preview-top span { display: block; }
.preview-top strong { font-size: 10px; }
.preview-top span { margin-top: 2px; color: #999faa; font-size: 8px; }
.preview-top button { color: #858c99; border: 0; background: transparent; }
.preview-media {
  position: relative;
  height: 285px;
  overflow: hidden;
  margin: 14px -16px 0;
  background: #ddd;
}
.preview-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 38%;
}
.preview-media span {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 8px;
  color: white;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 5px;
  background: rgba(22,27,42,.68);
  backdrop-filter: blur(6px);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .09em;
}
.content-preview > p { margin: 13px 0 9px; color: #434d5d; font-size: 10px; line-height: 1.6; }
.preview-tags { color: #6e53ce; font-size: 9px; }
.preview-stats { display: flex; gap: 18px; margin-top: 13px; padding-top: 11px; color: #7d8490; border-top: 1px solid #eaebef; font-size: 8px; }
.content-preview [contenteditable="true"] { outline: 0; border-radius: 5px; }
.content-preview [contenteditable="true"]:focus { box-shadow: 0 0 0 3px rgba(111,80,216,.09); }
.schedule-composer { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e8eaf0; }
.composer-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 11px; }
.secondary-action, .primary-action {
  min-height: 50px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}
.secondary-action { color: #5f47ba; border: 1px solid #d8d0f3; background: #faf8ff; }
.primary-action { color: white; border: 0; background: linear-gradient(100deg, #7658dc, #5c3bc2); }
.primary-action.compact { min-height: 44px; padding: 0 16px; }
.form-feedback { min-height: 20px; margin: 10px 0 0; color: #4f7e68; font-size: 13px; }
.character-heading p { margin: 8px 0 0; color: #7e8795; font-size: 14px; }
.character-grid {
  display: grid;
  grid-template-columns: minmax(320px, .58fr) minmax(680px, 1.42fr);
  gap: 24px;
}
.character-builder,
.character-sheet-card {
  padding: 22px;
  border: 1px solid #e2e4eb;
  border-radius: 14px;
  background: #fbfbfd;
}
.character-generate-button { margin-top: 8px; }
.character-preview { min-width: 0; }
.character-sheet-card {
  position: sticky;
  top: 88px;
  overflow: hidden;
  padding: 16px;
  color: #d9bd7a;
  border-color: #3b2f20;
  background:
    radial-gradient(circle at 15% 5%, rgba(181,139,74,.15), transparent 28%),
    linear-gradient(145deg, #11100e, #1d1a16);
  box-shadow: 0 24px 55px rgba(19,16,12,.22);
}
.sheet-main-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr .82fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #3f3322;
  background: #3f3322;
}
.sheet-portrait,
.sheet-info,
.sheet-fullbody {
  min-height: 430px;
  position: relative;
  padding: 22px;
  background:
    radial-gradient(circle at 45% 26%, rgba(174,134,80,.2), transparent 30%),
    linear-gradient(180deg, #171512, #0f0f0e);
}
.sheet-portrait {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
}
.sheet-face {
  width: min(74%, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #f0dfbb;
  border: 1px solid rgba(217,189,122,.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at 52% 38%, rgba(246,228,189,.22), transparent 24%),
    radial-gradient(circle at 64% 45%, rgba(151,58,53,.5), transparent 18%),
    linear-gradient(145deg, #d9c8aa, #6c5f4c 64%, #211d18);
  box-shadow: inset 0 0 40px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.28);
  font: 800 56px "Manrope", sans-serif;
}
.sheet-portrait span,
.sheet-fullbody span {
  color: #b99a5b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
}
.sheet-title { padding-bottom: 14px; border-bottom: 1px solid #3d3325; text-align: center; }
.sheet-title h3 {
  margin: 0;
  color: #d9bd7a;
  font: 800 44px/1 "Manrope", sans-serif;
  letter-spacing: .08em;
}
.sheet-title p { margin: 9px 0 0; color: #c7a86b; font-size: 15px; }
.sheet-info dl { display: grid; gap: 9px; margin: 18px 0 16px; }
.sheet-info dl div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; }
.sheet-info dt { color: #c7a86b; font-weight: 800; }
.sheet-info dd { margin: 0; color: #e4cf9b; line-height: 1.45; }
.sheet-detail-list {
  margin: 0;
  padding: 16px 0 0 18px;
  color: #e0c58b;
  border-top: 1px solid #3d3325;
  line-height: 1.6;
}
.sheet-detail-list li { margin-bottom: 5px; }
.sheet-fullbody {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  gap: 13px;
}
.sheet-body-figure {
  width: min(72%, 210px);
  height: 340px;
  position: relative;
  border-radius: 45% 45% 12% 12%;
  background:
    linear-gradient(90deg, transparent 0 38%, rgba(232,216,186,.72) 38% 62%, transparent 62%),
    linear-gradient(180deg, #d7cab4 0 14%, #6b5944 14% 46%, #3d3028 46% 100%);
  box-shadow: inset 0 -70px 50px rgba(0,0,0,.42), 0 18px 35px rgba(0,0,0,.28);
}
.sheet-body-figure::before {
  content: "";
  position: absolute;
  top: -42px;
  left: 50%;
  width: 78px;
  height: 88px;
  border-radius: 45%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 62% 43%, rgba(151,58,53,.64), transparent 22%),
    #d8c7aa;
  box-shadow: 0 8px 15px rgba(0,0,0,.22);
}
.sheet-turnaround {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 1px;
  border: 1px solid #3f3322;
  background: #3f3322;
}
.sheet-turnaround > div {
  min-height: 170px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px;
  background: #13120f;
}
.sheet-turnaround span,
.sheet-bottom-grid h4 {
  margin: 0;
  color: #c7a86b;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.mini-head {
  width: 84px;
  height: 100px;
  border-radius: 46%;
  background:
    radial-gradient(circle at 64% 48%, rgba(151,58,53,.56), transparent 18%),
    linear-gradient(145deg, #d9c8aa, #7e6c54);
  box-shadow: inset 0 -22px 22px rgba(0,0,0,.22);
}
.mini-head.side-left { transform: rotateY(58deg); }
.mini-head.side-right { transform: rotateY(-58deg); }
.sheet-bottom-grid {
  display: grid;
  grid-template-columns: 1.35fr .95fr;
  gap: 1px;
  margin-top: 1px;
  border: 1px solid #3f3322;
  background: #3f3322;
}
.sheet-bottom-grid > div {
  padding: 14px;
  background: #11100e;
}
.expression-row,
.accessory-row {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.expression-row { grid-template-columns: repeat(5, 1fr); }
.accessory-row { grid-template-columns: repeat(4, 1fr); }
.expression-row span,
.accessory-row span {
  min-height: 124px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  color: #d9bd7a;
  border: 1px solid #3d3325;
  background: #171512;
  text-align: center;
}
.expression-row i {
  width: 56px;
  height: 64px;
  display: grid;
  place-items: center;
  color: #1c1611;
  border-radius: 44%;
  background:
    radial-gradient(circle at 66% 42%, rgba(151,58,53,.58), transparent 20%),
    #d8c7aa;
  font-style: normal;
  font-weight: 800;
}
.accessory-row i {
  width: 70px;
  height: 70px;
  display: block;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 45%, rgba(217,189,122,.44), transparent 32%),
    linear-gradient(145deg, #534431, #1f1a14);
  box-shadow: inset 0 0 0 1px rgba(217,189,122,.17);
}
.expression-row strong,
.accessory-row strong {
  color: #d9bd7a;
  font-size: 12px;
  line-height: 1.35;
}
.sheet-prompt-block {
  margin-top: 12px;
  border-color: #3d3325;
  background: #15130f;
}
.sheet-prompt-block small { color: #d9bd7a; }
.sheet-prompt-block p {
  color: #e0c58b;
  font-size: 13px;
}
.sheet-prompt-block .text-button {
  color: #e0c58b;
  border-color: #4b3c27;
  background: #211b13;
}
.character-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.character-tags span {
  padding: 7px 10px;
  color: #6040ca;
  border: 1px solid #ded6f6;
  border-radius: 999px;
  background: #f8f5ff;
  font-size: 12px;
  font-weight: 700;
}
.character-copy-block {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e6e7ed;
  border-radius: 11px;
  background: white;
}
.character-copy-block small {
  display: block;
  color: #7c64d2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.character-copy-block p {
  margin: 8px 0 0;
  color: #404a59;
  font-size: 14px;
  line-height: 1.65;
}
.block-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.visual-prompt-block p {
  overflow-wrap: anywhere;
  color: #2d3544;
}
.character-angles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.character-angles span {
  padding: 11px;
  border: 1px solid #e4e1f2;
  border-radius: 10px;
  background: #fff;
}
.character-angles small,
.character-angles strong { display: block; }
.character-angles small {
  color: #9097a2;
  font-size: 10px;
  font-weight: 700;
}
.character-angles strong {
  margin-top: 5px;
  color: #2f3949;
  font-size: 12px;
  line-height: 1.35;
}
.video-heading p { margin: 8px 0 0; color: #7e8795; font-size: 14px; }
.video-studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr); gap: 24px; }
.textarea-wrap { position: relative; }
.textarea-wrap textarea { min-height: 150px; padding-bottom: 32px; font-size: 15px; line-height: 1.55; }
.textarea-wrap > span {
  position: absolute;
  right: 12px;
  bottom: 11px;
  color: #9098a5;
  font-size: 11px;
}
.field-help { display: block; margin-top: 7px; color: #7d8694; font-size: 12px; line-height: 1.5; }
.optional-label { display: inline-block; margin-left: 5px; color: #8c72e5; font-size: 11px; }
.video-upload {
  min-height: 145px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  margin: 0 !important;
  padding: 20px;
  color: #667080 !important;
  text-align: center;
  cursor: pointer;
  border: 1.5px dashed #cfc6ed;
  border-radius: 10px;
  background: #faf8ff;
  transition: .2s;
}
.video-upload:hover, .video-upload.has-file { border-color: #8d72e5; background: #f6f2ff; }
.video-upload strong { color: #2b3444; font-size: 15px; }
.video-upload > span:last-child { font-size: 12px; }
.upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #7658dc;
  border-radius: 11px;
  background: white;
  box-shadow: 0 5px 18px rgba(77,55,153,.1);
}
.upload-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.remove-reference {
  margin-top: 8px;
  padding: 7px 10px;
  color: #c64c4c;
  border: 1px solid #f0d1d1;
  border-radius: 6px;
  background: #fff8f8;
  font-size: 12px;
}
.video-notice {
  display: flex;
  gap: 9px;
  margin: 3px 0 16px;
  padding: 11px 13px;
  color: #91661f;
  border: 1px solid #f2dfb9;
  border-radius: 8px;
  background: #fffbf2;
  font-size: 12px;
  line-height: 1.5;
}
.video-notice svg { width: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.video-result-card { padding: 18px; border: 1px solid #e2e4eb; border-radius: 12px; background: #f9fafc; }
.video-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.video-result-head span { color: #8b93a0; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.video-result-head strong { display: block; margin-top: 4px; color: #252e3e; font-size: 15px; }
.video-job-state { padding: 6px 8px; color: #7357d6 !important; border: 1px solid #ddd4f7; border-radius: 5px; background: #f5f1ff; }
.video-job-state.processing { color: #a46c18 !important; border-color: #f0ddb9; background: #fff8e9; }
.video-job-state.completed { color: #247b5c !important; border-color: #cde8dd; background: #ecf8f3; }
.video-job-state.failed { color: #bd4f4f !important; border-color: #f0cece; background: #fff1f1; }
.video-stage {
  position: relative;
  width: min(100%, 360px);
  overflow: hidden;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, #171b2a, #30265d);
  box-shadow: 0 18px 40px rgba(26,24,41,.16);
}
.video-stage.portrait { aspect-ratio: 9 / 16; }
.video-stage.landscape { width: 100%; aspect-ratio: 16 / 9; }
.video-stage img, .video-stage video { width: 100%; height: 100%; display: block; object-fit: cover; }
.video-stage.demo-motion img { animation: videoDemoMotion 5s ease-in-out infinite alternate; }
.video-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  color: white;
  text-align: center;
}
.video-empty > span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); }
.video-empty svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.video-empty strong { margin-top: 16px; font-size: 15px; }
.video-empty p { margin: 7px 0 0; color: #c9c5da; font-size: 12px; line-height: 1.5; }
.video-preview-label {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 8px;
  color: white;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 5px;
  background: rgba(19,22,33,.65);
  backdrop-filter: blur(6px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.video-progress-wrap { margin-top: 18px; }
.video-progress-copy { display: flex; justify-content: space-between; gap: 12px; color: #687281; font-size: 12px; }
.video-progress-copy strong { color: #5740ad; }
.video-progress { height: 7px; overflow: hidden; margin-top: 8px; border-radius: 99px; background: #e8e7ee; }
.video-progress span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #8667eb, #6040ca); transition: width .5s ease; }
.video-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.video-meta span { padding: 10px; border: 1px solid #e6e7ec; border-radius: 8px; background: white; }
.video-meta small, .video-meta strong { display: block; }
.video-meta small { color: #9097a2; font-size: 10px; }
.video-meta strong { margin-top: 3px; color: #343d4c; font-size: 12px; }
.video-download { display: grid; place-items: center; margin-top: 14px; text-decoration: none; }
.video-api-note { margin: 22px 0 0; color: #888f9a; text-align: center; font-size: 11px; }
.podcast-video-grid .textarea-wrap textarea { min-height: 168px; }
.podcast-script-button {
  width: 100%;
  margin: 0 0 16px;
  color: #6040ca;
  background: #f8f5ff;
}
.podcast-preview-card { background: linear-gradient(180deg, #fbfbff, #f8f9fc); }
.podcast-scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.podcast-scene-grid span {
  min-height: 70px;
  padding: 11px;
  border: 1px solid #e4e1f2;
  border-radius: 10px;
  background: white;
}
.podcast-scene-grid small,
.podcast-scene-grid strong {
  display: block;
}
.podcast-scene-grid small {
  color: #8064dc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.podcast-scene-grid strong {
  margin-top: 6px;
  color: #2f3949;
  font-size: 12px;
  line-height: 1.35;
}
.podcast-stage { background: linear-gradient(145deg, #151a2b, #453280); }
.podcast-note { margin-bottom: 16px; }
@keyframes videoDemoMotion {
  from { transform: scale(1.02) translateX(-1%); }
  to { transform: scale(1.12) translateX(2%); }
}
.comment-dm-heading p { margin: 8px 0 0; color: #697382; font-size: 15px; }
.comment-dm-setup {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 15px;
  border: 1px solid #ddd6f5;
  border-radius: 11px;
  background: #faf8ff;
}
.comment-dm-setup-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #6f53cf;
  border-radius: 11px;
  background: white;
  box-shadow: 0 5px 18px rgba(77,55,153,.1);
}
.comment-dm-setup-icon svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.comment-dm-setup strong { display: block; color: #343d4d; font-size: 15px; }
.comment-dm-setup p { margin: 5px 0 0; color: #747d8b; font-size: 12px; }
.comment-dm-setup code { color: #6348c1; overflow-wrap: anywhere; }
.compact-action { min-height: 42px; padding: 0 14px; }
.comment-dm-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 20px; }
.comment-dm-builder, .comment-dm-demo {
  padding: 20px;
  border: 1px solid #e1e4ea;
  border-radius: 12px;
  background: #fbfbfd;
}
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.section-title h3 { margin: 5px 0 0; color: #283141; font: 700 19px "Manrope", sans-serif; }
.section-title > span { color: #747d8b; font-size: 13px; }
.text-button {
  padding: 7px 10px;
  color: #674bc5;
  border: 1px solid #dcd3f6;
  border-radius: 6px;
  background: #f8f5ff;
  font-size: 12px;
  font-weight: 600;
}
.comment-dm-options { align-items: end; }
.rule-enabled {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
  padding: 0 14px;
  border: 1px solid #dde0e7;
  border-radius: 7px;
  background: white;
}
.rule-enabled > span:first-child strong, .rule-enabled > span:first-child small { display: block; }
.rule-enabled > span:first-child strong { color: #485260; font-size: 14px; }
.rule-enabled > span:first-child small { margin-top: 2px; color: #858d99; font-size: 11px; }
.comment-dm-save { width: 100%; }
.demo-chip {
  padding: 6px 8px;
  color: #9a681d !important;
  border: 1px solid #efd8ad;
  border-radius: 5px;
  background: #fff8e9;
  font-size: 10px !important;
  font-weight: 700;
  letter-spacing: .06em;
}
.sales-post-preview { overflow: hidden; border: 1px solid #e0e3e9; border-radius: 10px; background: white; }
.sales-post-preview img { width: 100%; height: 210px; display: block; object-fit: cover; object-position: center 34%; }
.sales-post-caption { padding: 12px 14px; }
.sales-post-caption strong { font-size: 13px; }
.sales-post-caption p { margin: 5px 0 0; color: #687180; font-size: 12px; line-height: 1.5; }
.comment-dm-flow { padding: 17px 2px; }
.flow-message { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; }
.flow-message > span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: #7a5cda;
  font-size: 11px;
  font-weight: 700;
}
.flow-message.public > span { background: #dc8c29; }
.flow-message.private > span { background: #29916b; }
.flow-message > div { padding: 10px 12px; border: 1px solid #e2e4ea; border-radius: 9px; background: white; }
.flow-message small { color: #898f9a; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.flow-message p { margin: 4px 0 0; color: #414b59; font-size: 12px; line-height: 1.5; }
.flow-line { width: 2px; height: 15px; margin-left: 14px; background: #dcd7ec; }
.comment-dm-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e5e7ec; }
.comment-dm-rule-list, .comment-dm-event-list { display: grid; gap: 10px; }
.comment-dm-rule-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e1e4ea;
  border-radius: 10px;
  background: #fbfbfd;
}
.comment-dm-rule-card.disabled { opacity: .62; }
.comment-dm-rule-card h4 { margin: 0; color: #293243; font: 700 15px "Manrope", sans-serif; }
.comment-dm-rule-card p { margin: 6px 0 0; color: #687280; font-size: 12px; line-height: 1.5; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rule-chips span { padding: 5px 7px; color: #664bc2; border-radius: 5px; background: #f0ecfd; font-size: 10px; font-weight: 600; }
.rule-card-actions { display: flex; align-items: flex-start; gap: 7px; }
.rule-card-actions button { padding: 7px 9px; border: 1px solid #dddfe6; border-radius: 6px; background: white; font-size: 11px; }
.rule-card-actions .delete-rule { color: #c64d49; }
.comment-dm-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid #e3e5ea;
  border-radius: 9px;
  background: white;
}
.comment-event-icon { width: 38px; height: 38px; display: grid; place-items: center; color: white; border-radius: 10px; background: linear-gradient(145deg, #8265e1, #5a3cba); font-size: 11px; font-weight: 800; }
.comment-dm-event strong, .comment-dm-event span { display: block; }
.comment-dm-event strong { color: #343d4c; font-size: 13px; }
.comment-dm-event p { margin: 4px 0 0; color: #6f7885; font-size: 12px; }
.comment-dm-event small { display: block; margin-top: 5px; color: #979da7; font-size: 10px; }
.delivery-states { display: flex; gap: 6px; }
.delivery-states span { padding: 5px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.delivery-states .sent { color: #277d5d; background: #eaf7f2; }
.delivery-states .demo_sent { color: #6d52c8; background: #efebfc; }
.delivery-states .failed { color: #c24e4e; background: #fff0f0; }
.delivery-states .ignored { color: #747d89; background: #eef0f3; }
.delivery-states .pending { color: #a06a18; background: #fff5e3; }
.warning-strip { display: flex; gap: 10px; margin-top: 14px; padding: 11px 13px; border: 1px solid #f5dfb7; border-radius: 7px; background: #fffaf0; }
.warning-strip svg { flex: 0 0 auto; width: 16px; color: #d6922d; }
.warning-strip strong, .warning-strip span { display: block; font-size: 9px; }
.warning-strip strong { color: #93631d; }
.warning-strip span { margin-top: 3px; color: #aa8959; }

.reset-button { padding: 5px 9px; color: #7b63ce; border: 1px solid #ded7f3; border-radius: 5px; background: #faf8ff; font-size: 8px; font-weight: 600; }
.panel-copy { margin: -10px 0 18px; color: #8c929d; font-size: 10px; }
.account-selector {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #e7e8ee;
  border-radius: 10px;
  background: #fafafd;
}
.account-selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}
.account-selector-head strong, .account-selector-head span { display: block; }
.account-selector-head strong { font-size: 10px; }
.account-selector-head > div:first-child span { margin-top: 3px; color: #969ca7; font-size: 8px; }
.account-selector-actions { display: flex; align-items: center; gap: 9px; }
.account-selector-actions span { color: #7258d0; font-size: 8px; font-weight: 600; }
.account-selector-actions button {
  padding: 5px 8px;
  color: #7055d0;
  border: 1px solid #ddd5f7;
  border-radius: 5px;
  background: #f7f4ff;
  font-size: 8px;
  font-weight: 600;
}
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #e5e7ed;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: .18s ease;
}
.account-card:hover { border-color: #cfc5f2; }
.account-card.selected { border-color: #9178e5; background: #f8f6ff; box-shadow: 0 0 0 2px rgba(111,80,216,.06); }
.account-card input { position: absolute; width: 0; height: 0; opacity: 0; }
.account-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 9px;
  font-size: 8px;
  font-weight: 700;
}
.purple-account { background: linear-gradient(145deg, #8366e3, #5e40c2); }
.coral-account { background: linear-gradient(145deg, #f28b7d, #d95b51); }
.blue-account { background: linear-gradient(145deg, #62a6df, #3479b5); }
.amber-account { background: linear-gradient(145deg, #efb354, #d78720); }
.account-info { min-width: 0; }
.account-info strong, .account-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-info strong { color: #394354; font-size: 9px; }
.account-info small { margin-top: 3px; color: #9a9faa; font-size: 7px; }
.account-check {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  color: transparent;
  border: 1px solid #d8dbe3;
  border-radius: 5px;
  font-size: 8px;
  transition: .18s ease;
}
.account-card.selected .account-check { color: white; border-color: var(--purple); background: var(--purple); }
.accounts-panel { max-width: 1100px; margin: 0 auto; }
.calendar-panel { max-width: 1100px; margin: 0 auto; }
.calendar-heading { align-items: center; }
.calendar-heading p { margin: 7px 0 0; color: #687180; font-size: 14px; }
.pipeline-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid #e6e8ed; }
.pipeline-tabs button { padding: 8px 13px; color: #687180; border: 1px solid #e0e2e8; border-radius: 20px; background: white; font-size: 13px; font-weight: 600; }
.pipeline-tabs button.active { color: white; border-color: var(--purple); background: var(--purple); }
.content-list { display: grid; gap: 12px; }
.content-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 1px solid #e1e4ea;
  border-radius: 10px;
  background: #fbfbfd;
}
.content-platform { width: 46px; height: 46px; display: grid; place-items: center; color: white; border-radius: 11px; background: linear-gradient(145deg, #8063df, #5b3aba); font-size: 11px; font-weight: 800; }
.content-row-main { min-width: 0; }
.content-row-main h3 { margin: 0; overflow: hidden; color: #273142; font: 700 15px "Manrope", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.content-row-main p { margin: 5px 0 0; overflow: hidden; color: #697280; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.content-meta { display: flex; align-items: center; gap: 9px; margin-top: 9px; color: #8a919d; font-size: 11px; }
.content-status { padding: 5px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.content-status.draft { color: #6b7280; background: #eceef2; }
.content-status.scheduled { color: #7a5acb; background: #eeeafd; }
.content-status.ready { color: #25815e; background: #e8f6f0; }
.content-actions { display: flex; gap: 7px; }
.content-actions button { padding: 8px 10px; border: 1px solid #dfe1e7; border-radius: 6px; background: white; font-size: 12px; }
.content-actions .delete-content { color: #c64d49; }
.empty-state { padding: 55px 20px; text-align: center; border: 1px dashed #d9dce4; border-radius: 10px; background: #fafafd; }
.empty-state strong { font-size: 16px; }
.empty-state p { margin: 6px 0 0; color: #747d8b; font-size: 13px; }
.accounts-heading { align-items: center; }
.accounts-heading p { margin: 8px 0 0; color: #626c7a; font-size: 15px; }
.connected-total {
  min-width: 150px;
  padding: 14px 18px;
  text-align: center;
  border: 1px solid #ded7f5;
  border-radius: 10px;
  background: #f8f6ff;
}
.connected-total strong { display: block; color: var(--purple); font: 700 28px "Manrope", sans-serif; }
.connected-total span { display: block; margin-top: 3px; color: #626c7a; font-size: 12px; }
.accounts-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 14px;
}
.accounts-section-head h3 { margin: 0; font: 700 18px "Manrope", sans-serif; }
.accounts-section-head p { margin: 4px 0 0; color: #6f7886; font-size: 13px; }
.sync-button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  color: #5f47ba;
  border: 1px solid #dcd4f6;
  border-radius: 7px;
  background: #faf8ff;
  font-size: 13px;
  font-weight: 600;
}
.sync-button svg { width: 16px; }
.connected-list { overflow: hidden; border: 1px solid #e3e5eb; border-radius: 11px; }
.connected-account-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 16px;
  border-top: 1px solid #e9eaf0;
  background: white;
}
.connected-account-row:first-child { border-top: 0; }
.platform-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
}
.instagram-logo { background: linear-gradient(145deg, #8b4bd7, #ec5d70 60%, #f5ad3e); }
.facebook-logo { background: #1877f2; font: 800 24px Arial, sans-serif; }
.tiktok-logo { color: white; background: #15171b; }
.youtube-logo { background: #ff3030; }
.linkedin-logo { background: #0a66c2; font: 800 17px Arial, sans-serif; }
.threads-logo { color: #fff; background: #15171b; font-size: 20px; }
.connected-account-info { min-width: 0; }
.connected-account-info strong, .connected-account-info span { display: block; }
.connected-account-info strong { font-size: 15px; }
.connected-account-info span { margin-top: 4px; color: #6f7886; font-size: 12px; }
.connected-state { color: #27845f; font-size: 12px; font-weight: 600; }
.connected-state i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); }
.disconnect-button {
  padding: 8px 10px;
  color: #6b7380;
  border: 1px solid #dfe1e7;
  border-radius: 6px;
  background: white;
  font-size: 12px;
}
.integrations-head { margin-top: 34px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.integration-card { padding: 18px; border: 1px solid #e2e4ea; border-radius: 11px; background: #fbfbfd; }
.integration-top { display: flex; align-items: flex-start; justify-content: space-between; }
.platform-count { padding: 5px 8px; color: #277f5c; border-radius: 20px; background: #e9f7f1; font-size: 11px; font-weight: 600; }
.platform-count.available { color: #6f7886; background: #eef0f4; }
.integration-card h3 { margin: 15px 0 6px; font: 700 17px "Manrope", sans-serif; }
.integration-card p { min-height: 42px; margin: 0 0 16px; color: #626c7a; font-size: 13px; line-height: 1.5; }
.connect-button {
  width: 100%;
  min-height: 42px;
  color: white;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(100deg, #7658dc, #5c3bc2);
  font-size: 13px;
  font-weight: 600;
}
.connect-button.secondary { color: #6047bd; border: 1px solid #d9d0f5; background: #f7f4ff; }
.connect-button.connected { color: #287d5d; border: 1px solid #bfe5d6; background: #eaf7f2; }
.demo-connect-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 13px 15px; border-radius: 8px; background: #fff8e8; }
.demo-connect-note > span { width: 24px; height: 24px; display: grid; place-items: center; color: #a66c18; border: 1px solid #e8c984; border-radius: 50%; font-weight: 700; }
.demo-connect-note p { margin: 0; color: #806226; font-size: 13px; }
.automation-item { padding: 14px 0; border-top: 1px solid #eceef2; }
.automation-item[hidden] { display: none; }
.automation-item.active { animation: automation-in .24s ease; }
@keyframes automation-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.automation-title { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.action-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; }
.action-icon svg { width: 15px; }
.action-icon.post { color: #785ddd; background: #f0ecfd; }
.action-icon.comment { color: #ea6b5d; background: #feeeeb; }
.action-icon.like { color: #db9328; background: #fff5e5; }
.automation-title strong, .automation-title span { display: block; }
.automation-title strong { font-size: 10px; }
.automation-title div > span { margin-top: 3px; color: #969ca7; font-size: 8px; }
.switch { position: relative; width: 31px; height: 17px; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #d6d8de; transition: .2s; }
.switch span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: white; transition: .2s; }
.switch input:checked + span { background: var(--purple); }
.switch input:checked + span::before { transform: translateX(14px); }
.range-row { display: grid; grid-template-columns: 1fr 35px; align-items: center; gap: 11px; margin: 12px 0 8px; }
input[type="range"] { width: 100%; height: 4px; appearance: none; border-radius: 3px; background: linear-gradient(90deg, var(--purple) 0 var(--range-progress, 50%), #e7e8ed var(--range-progress, 50%) 100%); }
input[type="range"]::-webkit-slider-thumb { width: 13px; height: 13px; appearance: none; border: 3px solid white; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.range-row output { padding: 6px 0; text-align: center; border: 1px solid #e1e3e9; border-radius: 5px; font-size: 9px; font-weight: 600; }
.risk-hint { font-size: 8px; }
.risk-hint i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; }
.risk-hint.high { color: #ce8221; }.risk-hint.high i { background: var(--amber); }
.risk-hint.critical { color: #d9574a; }.risk-hint.critical i { background: var(--coral); }
.risk-hint.medium { color: #8c73dc; }.risk-hint.medium i { background: var(--purple); }
.simulate-button { margin-top: 13px; }
.play { font-size: 8px; }
.simulation-footnote { margin: 8px 0 0; color: #a1a6af; text-align: center; font-size: 8px; }

.risk-section { margin-top: 18px; }
.panel-header a { color: #6c51cc; font-size: 9px; font-weight: 600; text-decoration: none; }
.risk-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.risk-card { position: relative; min-height: 200px; overflow: hidden; padding: 20px 17px 17px; border: 1px solid #eceef2; border-radius: 9px; background: #fcfcfd; }
.risk-card::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: currentColor; opacity: .035; }
.risk-number { position: absolute; top: 15px; right: 15px; color: #d9dce2; font: 700 19px "Manrope"; }
.risk-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; }
.risk-card-icon svg { width: 18px; }
.risk-card.red { color: var(--red); }.risk-card.red .risk-card-icon { background: #feeeee; }
.risk-card.orange { color: #df8f25; }.risk-card.orange .risk-card-icon { background: #fff5e6; }
.risk-card.purple-card { color: var(--purple); }.risk-card.purple-card .risk-card-icon { background: var(--purple-soft); }
.risk-card.blue { color: #4289c8; }.risk-card.blue .risk-card-icon { background: #eaf4fc; }
.risk-card h3 { margin: 15px 0 7px; color: var(--ink); font: 700 12px "Manrope"; }
.risk-card p { min-height: 55px; margin: 0; color: #7c8491; font-size: 9px; line-height: 1.55; }
.severity { display: inline-block; margin-top: 14px; padding: 4px 6px; color: currentColor; border: 1px solid currentColor; border-radius: 4px; font-size: 7px; font-weight: 700; letter-spacing: .06em; }

.activity-section { margin-top: 18px; overflow: hidden; }
.live-badge { color: #379c75; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.live-badge i { background: var(--green); box-shadow: 0 0 0 3px rgba(52,169,121,.14); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.activity-table { margin: 0 -24px -24px; border-top: 1px solid #eaecf0; }
.table-head, .table-row { display: grid; grid-template-columns: .7fr 1.4fr .7fr 1.4fr .6fr; align-items: center; gap: 16px; padding: 0 24px; }
.table-head { height: 34px; color: #999faa; background: #fafafd; font-size: 8px; font-weight: 600; }
.table-row { min-height: 45px; color: #656e7c; border-top: 1px solid #eff0f3; font-size: 9px; }
.table-row:first-child { border-top: 0; }
.event-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; }
.event-dot.coral { background: var(--coral); }.event-dot.purple { background: var(--purple); }.event-dot.amber { background: var(--amber); }
.status { width: fit-content; padding: 4px 7px; border-radius: 4px; font-size: 7px; font-weight: 700; }
.status.blocked { color: #d04c46; background: #feeeee; }
.status.review { color: #6e54ce; background: #efebfc; }
.status.warning { color: #c47f20; background: #fff4e2; }

.safety-guide {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
  margin-top: 18px;
  padding: 30px 36px;
  color: white;
  border-radius: 12px;
  background: linear-gradient(115deg, #20283a, #292644);
}
.safety-guide .eyebrow { color: #a996ed; }
.safety-guide h2 { margin: 8px 0 0; font: 700 19px/1.35 "Manrope"; }
.guide-points { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-content: center; }
.guide-points span { color: #c2c6d0; font-size: 9px; }
.guide-points i { display: inline-grid; width: 17px; height: 17px; margin-right: 7px; place-items: center; color: #aa98ed; border-radius: 50%; background: rgba(126,96,218,.22); font-style: normal; font-size: 8px; }
footer { display: flex; justify-content: space-between; padding: 22px 2px 0; color: #9ca2ad; font-size: 8px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  padding: 14px 16px;
  opacity: 0;
  color: white;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: #202637;
  box-shadow: 0 14px 35px rgba(20,25,37,.28);
  transform: translateY(20px);
  pointer-events: none;
  transition: .3s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--green); font-size: 12px; }
.toast strong { display: block; font-size: 10px; }
.toast p { margin: 3px 0 0; color: #9da4b1; font-size: 8px; }

/* Readable classroom sizing */
.sidebar { width: 280px; }
.main-content { width: calc(100% - 280px); margin-left: 280px; }
.brand { font-size: 22px; }
.nav-label { font-size: 12px; }
.nav-item { min-height: 49px; font-size: 16px; }
.nav-item svg { width: 21px; }
.nav-badge { font-size: 10px; }
.sidebar-note strong { font-size: 14px; }
.sidebar-note p { color: #aeb5c3; font-size: 12px; }
.profile strong { font-size: 14px; }
.profile span { color: #9ca4b3; font-size: 12px; }
.breadcrumb { font-size: 15px; }
.status-pill { padding: 9px 14px; font-size: 13px; }
.page-content { max-width: 1600px; }
.composer-panel, .automation-panel, .video-panel, .podcast-video-panel, .comment-dm-panel { max-width: 1200px; }
.character-panel { max-width: 1480px; }
.eyebrow { font-size: 12px; }
.hero h1 { font-size: 42px; }
.hero p { font-size: 17px; }
.metric-card { min-height: 195px; padding: 22px; }
.trend { font-size: 11px; }
.metric-label { color: #646d7b; font-size: 14px; }
.metric-value strong { font-size: 33px; }
.metric-value small { font-size: 14px; }
.metric-card p { color: #737c8a; font-size: 13px; }
.guardrail-list { font-size: 12px; }
.panel { padding: 32px; }
.panel-header h2 { font-size: 28px; }
.lab-tag { padding: 7px 10px; font-size: 11px; }
.field-group label { font-size: 14px; }
.input-wrap span { font-size: 12px; }
input[type="text"], select { height: 50px; padding: 0 16px; font-size: 16px; }
.generate-button, .simulate-button { height: 54px; font-size: 16px; }
.avatar.small { width: 38px; height: 38px; font-size: 11px; }
.preview-top strong { font-size: 15px; }
.preview-top span { color: #747d8b; font-size: 12px; }
.preview-media span { font-size: 10px; }
.content-preview > p { font-size: 15px; }
.preview-tags { font-size: 13px; }
.preview-stats { font-size: 12px; }
.reset-button { padding: 8px 13px; font-size: 13px; }
.panel-copy { color: #626c7a; font-size: 15px; }
.account-selector { padding: 20px; }
.account-selector-head strong { font-size: 16px; }
.account-selector-head > div:first-child span { color: #66707f; font-size: 13px; }
.account-selector-actions span { font-size: 13px; }
.account-selector-actions button { padding: 8px 11px; font-size: 12px; }
.account-grid { gap: 11px; }
.account-card { gap: 12px; padding: 14px; }
.account-avatar { width: 42px; height: 42px; font-size: 12px; }
.account-info strong { font-size: 15px; }
.account-info small { color: #6f7886; font-size: 12px; }
.account-check { width: 24px; height: 24px; font-size: 12px; }
.automation-item { padding: 22px 0; }
.automation-title { gap: 13px; }
.action-icon { width: 42px; height: 42px; }
.action-icon svg { width: 20px; }
.automation-title strong { font-size: 16px; }
.automation-title div > span { color: #66707f; font-size: 13px; }
.switch { width: 44px; height: 24px; }
.switch span::before { top: 4px; left: 4px; width: 16px; height: 16px; }
.switch input:checked + span::before { transform: translateX(20px); }
.range-row { grid-template-columns: 1fr 52px; margin: 18px 0 13px; }
input[type="range"] { height: 6px; }
input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; }
.range-row output { padding: 9px 0; font-size: 14px; }
.risk-hint { font-size: 13px; }
.simulation-footnote { color: #6f7886; font-size: 12px; }
.live-badge { font-size: 12px; }
.table-head { height: 45px; color: #626c7a; font-size: 12px; }
.table-row { min-height: 58px; color: #3f4958; font-size: 14px; }
.status { padding: 6px 9px; font-size: 11px; }
footer { color: #747d8b; font-size: 12px; }
.toast strong { font-size: 14px; }
.toast p { font-size: 12px; }

@media (max-width: 1100px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { min-height: auto; padding: 38px; }
  .auth-visual > div { margin: 70px 0; }
  .auth-panel { min-height: auto; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .risk-cards { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .character-grid { grid-template-columns: 1fr; }
  .character-sheet-card { position: static; }
  .sheet-main-grid, .sheet-bottom-grid { grid-template-columns: 1fr; }
  .video-studio-grid { grid-template-columns: 1fr; }
  .video-result-card { max-width: 680px; width: 100%; margin: 0 auto; }
  .comment-dm-grid { grid-template-columns: 1fr; }
  .hero-visual { right: 4%; opacity: .65; }
  .hero > div:first-child { max-width: 70%; }
}
@media (max-width: 760px) {
  .auth-visual { padding: 28px 22px; }
  .auth-visual h1 { font-size: 33px; }
  .auth-panel { padding: 20px 14px; }
  .auth-card { padding: 24px 18px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 15px 0 40px rgba(15,20,32,.24); }
  .main-content { width: 100%; margin-left: 0; }
  .mobile-menu { display: block; }
  .breadcrumb { display: none; }
  .topbar { padding: 0 18px; }
  .page-content { padding: 20px 16px; }
  .hero { min-height: 260px; padding: 30px 24px; }
  .hero > div:first-child { max-width: 100%; }
  .hero h1 { font-size: 28px; }
  .hero-visual { right: -60px; opacity: .18; }
  .metrics-grid, .risk-cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .safety-guide { grid-template-columns: 1fr; gap: 25px; padding: 28px 24px; }
  .guide-points { grid-template-columns: 1fr; }
  .activity-table { overflow-x: auto; }
  .table-head, .table-row { min-width: 700px; }
  footer { gap: 10px; flex-direction: column; }
  .toast { right: 16px; bottom: 16px; left: 16px; min-width: 0; }
  .preview-media { height: 220px; }
  .account-selector-head { align-items: flex-start; flex-direction: column; }
  .account-grid { grid-template-columns: 1fr; }
  .accounts-heading { align-items: flex-start; flex-direction: column; }
  .connected-total { width: 100%; }
  .accounts-section-head { align-items: flex-start; flex-direction: column; }
  .connected-account-row { grid-template-columns: auto minmax(0, 1fr); }
  .connected-state, .disconnect-button { grid-column: 2; }
  .integration-grid { grid-template-columns: 1fr; }
  .composer-actions { grid-template-columns: 1fr; }
  .character-builder, .character-sheet-card { padding: 15px; }
  .sheet-portrait, .sheet-info, .sheet-fullbody { min-height: auto; }
  .sheet-fullbody { min-height: 360px; }
  .sheet-turnaround { grid-template-columns: 1fr; }
  .expression-row, .accessory-row { grid-template-columns: 1fr; }
  .video-options { grid-template-columns: 1fr; }
  .video-meta { grid-template-columns: 1fr; }
  .video-result-card { padding: 14px; }
  .podcast-scene-grid { grid-template-columns: 1fr; }
  .comment-dm-setup { grid-template-columns: auto minmax(0, 1fr); }
  .comment-dm-setup button { grid-column: 1 / -1; width: 100%; }
  .comment-dm-builder, .comment-dm-demo { padding: 15px; }
  .comment-dm-rule-card { grid-template-columns: 1fr; }
  .comment-dm-event { grid-template-columns: auto minmax(0, 1fr); }
  .delivery-states { grid-column: 2; flex-wrap: wrap; }
  .calendar-heading { align-items: flex-start; flex-direction: column; }
  .pipeline-tabs { overflow-x: auto; }
  .content-row { grid-template-columns: auto minmax(0, 1fr); }
  .content-actions { grid-column: 2; }
}
