:root {
  --bg: #f8f6ff;
  --bg-deep: #f0ebff;
  --surface: #ffffff;
  --surface-2: #f5f1ff;
  --surface-3: #ede7ff;
  --text: #211636;
  --muted: #6b5f89;
  --primary: #7c3aed;
  --primary-strong: #6d28d9;
  --accent: #3b82f6;
  --danger: #c62828;
  --success: #1f8a3c;
  --border: #ded4ff;
  --focus: #7c3aed;
  --shadow: 0 20px 44px rgba(44, 18, 92, 0.14);
  --shadow-soft: 0 10px 26px rgba(44, 18, 92, 0.1);
  --shadow-elegant: 0 18px 46px rgba(74, 39, 150, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.2) 0%, transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.16) 0%, transparent 33%),
    radial-gradient(circle at 50% 100%, rgba(168, 85, 247, 0.12) 0%, transparent 36%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(20px, 2.3vw, 28px);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-strong);
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 14px 26px;
  animation: fade-up 360ms ease-out;
}

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 245, 255, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.16), transparent 46%),
    linear-gradient(165deg, #ffffff 0%, #f3edff 100%);
}

.page-head h2 {
  font-size: clamp(24px, 2.8vw, 34px);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.row.spread {
  justify-content: space-between;
  align-items: center;
}

.grid {
  display: grid;
  gap: 10px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fcfaff;
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c6b6ff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
  background: #ffffff;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: linear-gradient(130deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(109, 40, 217, 0.28);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
  box-shadow: 0 11px 22px rgba(109, 40, 217, 0.32);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

button.secondary {
  color: #2f2152;
  background: linear-gradient(150deg, #efe8ff, #e5dbff);
  box-shadow: 0 8px 16px rgba(90, 54, 167, 0.2);
}

button.danger {
  background: linear-gradient(130deg, #d63a3a, var(--danger));
  box-shadow: 0 8px 18px rgba(198, 40, 40, 0.26);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(59, 130, 246, 0.16));
  color: #3f2b77;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(124, 58, 237, 0.24);
}

.kpi {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #d8c8ff;
  background:
    radial-gradient(circle at 10% 0%, rgba(124, 58, 237, 0.18), transparent 55%),
    linear-gradient(160deg, #ffffff 0%, #f1ebff 100%);
  box-shadow: var(--shadow-soft);
}

.kpi .n {
  margin-top: 5px;
  font: 800 24px/1 "Bricolage Grotesque", sans-serif;
}

.msg {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid transparent;
}

.msg.error {
  color: #8d1f1f;
  background: #ffe8e8;
  border-color: #f7c4c4;
}

.msg.success {
  color: #125f2a;
  background: #e5f8e9;
  border-color: #c4ebcd;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--text);
  background: #ffffff;
  font-size: 14px;
  font-weight: 600;
  transition: all 150ms ease;
}

.nav a:hover {
  border-color: #c9bcff;
  background: #f6f1ff;
}

.nav a.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(59, 130, 246, 0.2));
  border-color: rgba(124, 58, 237, 0.35);
  color: #472a86;
}

.list {
  display: grid;
  gap: 8px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: #fdfbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ideas-toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 1.4fr;
}

.ideas-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.idea-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(165deg, #fff 0%, #f6f2ff 100%);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
}

.idea-card h3 {
  font-size: 20px;
}

.idea-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #efe7ff;
}

.template-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(165deg, #fff 0%, #f6f2ff 100%);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
}

.template-card h3 {
  font-size: 24px;
}

.template-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #efe7ff;
}

.template-actions {
  justify-content: flex-start;
}

.platform-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.platform-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d4c4ff;
  background: linear-gradient(180deg, #fff 0%, #f7f1ff 100%);
  font-size: 12px;
  font-weight: 700;
  color: #4c3a84;
}

.social-preview {
  width: min(430px, 100%);
  margin: 0 auto;
  border: 1px solid #d5dbe8;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(36, 49, 75, 0.1);
}

.sp-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.sp-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(130deg, #7c3aed, #5b21b6);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sp-head-meta {
  display: grid;
  gap: 2px;
}

.sp-head-meta strong {
  font-size: 13px;
}

.sp-head-meta span,
.sp-menu {
  font-size: 11px;
  color: #6b7280;
}

.sp-copy {
  padding: 0 12px 10px;
}

.sp-copy p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.sp-hash {
  color: #3b63ca;
  font-weight: 600;
}

.sp-media {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.sp-media-empty {
  margin: 0 12px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.sp-actions,
.sp-foot {
  padding: 10px 12px;
  font-size: 13px;
  color: #475569;
}

.sp-actions {
  border-top: 1px solid #e2e8f0;
}

.sp-reactions {
  border-top: 1px solid #e2e8f0;
}

.sp-gbp {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.sp-gbp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sp-gbp-head span,
.sp-copy-text {
  color: #5b6374;
  font-size: 14px;
}

.calendar-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.calendar-toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-month-gen {
  border: 1px solid #d5c6ff;
  background: radial-gradient(circle at right top, #efe7ff 0%, #ffffff 58%);
}

#cp-preview {
  background: #fff;
}

.feed-item {
  transition: transform 130ms ease, box-shadow 160ms ease;
}

.feed-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.calendar-grid-wrap {
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ded2ff;
  background: #fff;
}

.calendar-head,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-head-cell {
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #5f4b97;
  background: #f6efff;
  border-bottom: 1px solid #e7dbff;
}

.calendar-day {
  min-height: 118px;
  border: 1px solid #eee7ff;
  background: linear-gradient(175deg, #ffffff, #fcfaff);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-day.outside {
  background: #f7f4ff;
  opacity: 0.7;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px rgba(124, 58, 237, 0.35);
}

.calendar-day.drag-over {
  background: #f1e9ff;
  box-shadow: inset 0 0 0 2px rgba(124, 58, 237, 0.45);
}

.calendar-day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #eadfff;
  padding-bottom: 4px;
}

.calendar-day-num {
  font-size: 13px;
  font-weight: 800;
  color: #5c3da1;
}

.calendar-add {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 8px;
  box-shadow: none;
  font-size: 14px;
  line-height: 1;
}

.calendar-posts {
  display: grid;
  gap: 6px;
}

.calendar-chip {
  width: 100%;
  border: 1px solid #cfb9ff;
  background: linear-gradient(145deg, #fcfaff, #f4edff);
  color: #3d2b73;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(87, 56, 166, 0.08);
  padding: 6px 7px;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px;
  cursor: grab;
}

.calendar-chip-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cal-net {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  color: #1e293b;
}

.cal-net.net-instagram {
  background: linear-gradient(140deg, #f58529, #dd2a7b, #8134af);
  border-color: rgba(221, 42, 123, 0.45);
  color: #fff;
}

.cal-net.net-facebook {
  background: #1877f2;
  border-color: rgba(24, 119, 242, 0.5);
  color: #fff;
}

.cal-net.net-linkedin {
  background: #0a66c2;
  border-color: rgba(10, 102, 194, 0.55);
  color: #fff;
}

.cal-net.net-google-business-profile {
  background: #34a853;
  border-color: rgba(52, 168, 83, 0.5);
  color: #fff;
}

.calendar-chip em {
  grid-column: 1 / -1;
  justify-self: start;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #5f4b97;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 999px;
  padding: 2px 7px;
}

.chip-platform-instagram {
  border-color: rgba(225, 48, 108, 0.35);
}

.chip-platform-facebook {
  border-color: rgba(24, 119, 242, 0.35);
}

.chip-platform-linkedin {
  border-color: rgba(10, 102, 194, 0.35);
}

.chip-status-agendado em {
  background: rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
}

.chip-status-pronto-a-publicar em {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.chip-status-rascunho em {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.calendar-chip:active {
  cursor: grabbing;
}

.calendar-chip span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 700;
}

.calendar-chip small {
  font-size: 10px;
  color: #5f4b97;
}

.tiny {
  font-size: 11px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fcfaff;
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  padding: 10px;
  font-size: 14px;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0e9ff;
  color: #5f4b97;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tbody tr:nth-child(even) td {
  background: #f8f4ff;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.hero {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  backdrop-filter: blur(10px);
  background: rgba(248, 246, 255, 0.82);
  border-bottom: 1px solid rgba(155, 128, 230, 0.42);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

.app-sidebar {
  width: 258px;
  background:
    radial-gradient(circle at 15% 0%, rgba(147, 112, 255, 0.22) 0%, transparent 36%),
    linear-gradient(180deg, #2f195f 0%, #24124a 100%);
  color: #ece7ff;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: transform 220ms ease;
}

.app-brand {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-brand .brand {
  color: #f5f2ff;
}

.app-brand .brand::after {
  background: linear-gradient(90deg, #c4b5fd, #93c5fd);
}

.app-nav {
  padding: 10px;
  display: grid;
  gap: 6px;
  overflow-y: auto;
}

.app-nav-link {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  color: #d9d0ff;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
}

.app-nav-link:hover {
  color: #f1ecff;
  background: rgba(255, 255, 255, 0.08);
}

.app-nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.6), rgba(59, 130, 246, 0.4));
  border-color: rgba(196, 181, 253, 0.45);
}

.app-sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
}

.app-admin-link,
.app-plan-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f1ecff;
  font-size: 13px;
}

.app-main {
  flex: 1;
  min-width: 0;
  position: relative;
}

.app-overlay {
  display: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(155, 128, 230, 0.35);
  background: rgba(248, 246, 255, 0.8);
  backdrop-filter: blur(12px);
}

.app-wrap {
  max-width: 1320px;
}

.app-header-row {
  gap: 10px;
}

.app-header-left,
.app-header-right {
  align-items: center;
}

.app-search-wrap {
  min-width: 280px;
  max-width: 500px;
  width: 42vw;
}

.app-search {
  background: #ffffff;
}

.app-menu-btn {
  display: none;
  min-width: 44px;
}

.notif-link {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.notif-count {
  position: absolute;
  right: -5px;
  top: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(130deg, #7c3aed, #3b82f6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(130deg, #7c3aed, #3b82f6);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.app-company-line {
  margin-top: 6px;
}

.ai-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  background: linear-gradient(130deg, #7c3aed, #3b82f6);
  box-shadow: 0 16px 34px rgba(80, 41, 179, 0.44);
  animation: ai-fab-pulse 1.8s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

@keyframes ai-fab-pulse {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

.ai-assistant-overlay {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(22, 17, 34, 0.28);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.ai-assistant-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ai-assistant-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(430px, 96vw);
  z-index: 49;
  padding: 10px;
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.ai-assistant-panel.open {
  transform: translateX(0);
}

.ai-assistant-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 2px;
}

.ai-chat-shell {
  border: 1px solid #d5c6ff;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.1), transparent 46%),
    linear-gradient(170deg, #ffffff 0%, #f6f1ff 100%);
  height: calc(100vh - 20px);
  display: grid;
  grid-template-rows: 1fr auto auto;
}

.ai-chat-log {
  display: grid;
  gap: 10px;
  max-height: none;
  overflow-y: auto;
  padding: 4px;
}

.ai-row {
  display: flex;
}

.ai-row.user {
  justify-content: flex-end;
}

.ai-row.assistant {
  justify-content: flex-start;
}

.ai-bubble {
  max-width: 85%;
  border-radius: 14px;
  padding: 10px 12px;
  white-space: pre-wrap;
  line-height: 1.4;
  font-size: 14px;
}

.ai-bubble.user {
  background: linear-gradient(130deg, #7c3aed, #3b82f6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(76, 44, 159, 0.3);
}

.ai-bubble.assistant {
  background: #fff;
  color: #2e2052;
  border: 1px solid #ddd1ff;
}

.ai-chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-chat-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.report-bars {
  display: grid;
  gap: 10px;
}

.report-row {
  display: grid;
  gap: 5px;
}

.report-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #ebe2ff;
  overflow: hidden;
}

.report-bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #4f46e5);
}

.report-bar.status {
  background: linear-gradient(90deg, #7c3aed, #2563eb);
}

.topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  position: relative;
  color: #2b1b4f;
  font: 800 23px/1 "Bricolage Grotesque", sans-serif;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 38%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.landing {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  animation: fade-up 450ms ease-out;
}

.landing-hero {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.16fr 0.84fr;
  align-items: center;
}

.landing-hero-copy {
  display: grid;
  gap: 12px;
}

.landing-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-panel {
  background:
    radial-gradient(circle at 20% 10%, rgba(15, 118, 110, 0.12), transparent 45%),
    linear-gradient(160deg, #ffffff 0%, #eff5e8 100%);
  border: 1px solid #cbd9bf;
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.landing-panel-cta {
  margin-top: 14px;
}

.landing-preview {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.landing-preview-card {
  border: 1px solid #d8c8ff;
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(160deg, #ffffff, #f3eeff);
}

.landing-preview-card.alt {
  background: linear-gradient(160deg, #ffffff, #eef4ff);
  border-color: #cbdcff;
}

.landing-mini-bars {
  margin-top: 8px;
  display: grid;
  gap: 5px;
}

.landing-mini-bars i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #3b82f6);
}

.landing-values {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.landing-focus {
  margin-top: 14px;
}

.landing-purpose {
  margin-top: 14px;
}

.landing-faq {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.landing-faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fcfaff;
}

.landing-faq summary {
  cursor: pointer;
  font-weight: 700;
}

.landing-value-card h3 {
  margin-bottom: 6px;
}

.landing-final-cta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-stage {
  max-width: 1080px;
}

.auth-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
}

.auth-card {
  min-height: 100%;
}

.auth-side {
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.18), transparent 44%),
    linear-gradient(165deg, #ffffff 0%, #f2ecff 100%);
  border: 1px solid #d8c8ff;
}

.auth-side h3 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.1;
}

.auth-side ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.auth-side li {
  color: #3f2f72;
}

.landing h1 {
  font-size: clamp(35px, 5vw, 58px);
  line-height: 0.95;
}

.legal-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
}

.legal-links span {
  color: #b19add;
}

.legal-page {
  max-width: 900px;
}

.legal-content {
  display: grid;
  gap: 10px;
}

.legal-content h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.legal-content h3 {
  margin-top: 8px;
  font-size: clamp(18px, 2vw, 22px);
}

.legal-content ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.google-wrap {
  display: grid;
  gap: 8px;
}

.google-status {
  border: 1px solid #d8e6e3;
  background: #f3fbf8;
  border-radius: 10px;
  padding: 8px 10px;
}

.sep {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sep::before,
.sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

pre {
  margin: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .kpi .n {
    font-size: 22px;
  }

  .topbar-inner {
    gap: 10px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    width: 258px;
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .app-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(20, 11, 40, 0.48);
  }

  .app-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .app-search-wrap {
    min-width: 0;
    width: auto;
    flex: 1;
  }

  .user-pill .muted {
    display: none;
  }

  .app-wrap {
    padding-top: 14px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .landing-values,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .landing-final-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .ideas-grid,
  .template-grid,
  .ideas-toolbar,
  .calendar-filters {
    grid-template-columns: 1fr;
  }

  .wrap {
    padding-top: 10px;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .nav a {
    font-size: 13px;
    padding: 7px 11px;
  }

  .table {
    min-width: 760px;
  }

  .ai-assistant-panel {
    width: 100vw;
    padding: 6px;
  }

  .calendar-grid-wrap {
    overflow-x: auto;
  }

  .calendar-head,
  .calendar-grid {
    min-width: 760px;
  }
}

@media (max-width: 560px) {
  .landing {
    padding-top: 22px;
  }

  .landing h1 {
    font-size: 40px;
  }

  .brand {
    font-size: 20px;
  }

  .row {
    gap: 10px;
  }

  button {
    width: 100%;
  }
}
