/* ── cnxt-to-post — Light theme with grid pattern background ── */

:root {
  --bg: #ffffff;
  --bg-alt: #f8f8f6;
  --surface: #ffffff;
  --panel: rgba(255, 255, 255, 0.82);
  --border: rgba(29, 27, 24, 0.09);
  --border-light: rgba(29, 27, 24, 0.06);
  --text: #1d1b18;
  --text-secondary: #5f5647;
  --text-muted: #8a8178;

  --brand: #1d1b18;
  --brand-dark: #000;
  --brand-light: #3d3a35;
  --brand-soft: rgba(29, 27, 24, 0.06);
  --brand-ring: rgba(29, 27, 24, 0.1);

  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.08);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.08);
  --error: #dc2626;
  --error-soft: rgba(220, 38, 38, 0.08);

  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-sm: 8px;
  --transition: 150ms ease;
  --shadow: 0 20px 60px rgba(55, 34, 17, 0.12);
  --shadow-lg: 0 24px 80px rgba(55, 34, 17, 0.16);
  --sidebar-width: 260px;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-alt: #111115;
  --surface: #16161a;
  --panel: rgba(22, 22, 26, 0.85);
  --border: #252530;
  --border-light: #1e1e28;
  --text: #e4e4ed;
  --text-secondary: #9898a8;
  --text-muted: #686878;

  --brand: #6b8cff;
  --brand-dark: #5a78e8;
  --brand-light: #8aa4ff;
  --brand-soft: rgba(107, 140, 255, 0.12);
  --brand-ring: rgba(107, 140, 255, 0.15);

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --error: #f87171;
  --error-soft: rgba(248, 113, 113, 0.12);

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
}

/* Dark mode grid */
[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 27, 24, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 27, 24, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 0;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Mobile Header */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-logo:hover { text-decoration: none; }

.mobile-logo-dot {
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 50%;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.mobile-menu-btn:hover {
  background: var(--bg-alt);
  color: var(--text);
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 50;
  transition: transform var(--transition);
}
.sidebar.hidden { display: none; }
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px;
  height: 60px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.sidebar-logo:hover { text-decoration: none; }

.sidebar-logo-dot {
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.sidebar-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.sidebar-nav-item:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.sidebar-nav-item.sidebar-nav-item-active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.sidebar-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
  color: var(--brand);
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-email {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-plan {
  display: block;
  font-size: 0.75rem;
  color: var(--success);
  margin-top: 2px;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Main content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 36px 24px 60px;
  transition: margin-left var(--transition);
}
.sidebar.hidden ~ .main-content {
  margin-left: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-alt);
  border-color: #cbd5e1;
}

.btn-ghost { background: transparent; color: var(--text-secondary); border: none; }
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }
.btn-large { padding: 12px 24px; font-size: 0.9375rem; }

.btn-full { width: 100%; }

/* View Transitions */
.view { animation: fadeIn 0.2s ease; }
.view.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card */
.card {
  background: radial-gradient(ellipse at 50% 25%, var(--surface) 0%, var(--surface) 35%, transparent 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.card-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.card-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-top: 2px; }

.card-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── HERO SECTION ── */
.hero {
  padding: 64px 24px;
  text-align: center;
  color: var(--text);
}

.hero-content {
  max-width: 620px;
  margin: 0 auto;
  background: radial-gradient(ellipse at 50% 20%, var(--surface) 0%, var(--surface) 30%, transparent 100%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--brand-soft, rgba(99, 102, 241, 0.1));
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand, #6366f1);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
  min-height: 2.2em;
}

.hero-cursor {
  animation: blink 1.2s step-end infinite;
  font-weight: 400;
  color: var(--brand);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-brand-name {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero-title-gradient {
  background: linear-gradient(135deg, var(--brand, #6366f1) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.1875rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-platforms {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-platform-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.hero-platform-icons {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-platform-icon {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0 10px;
  transition: color var(--transition);
}
.hero-platform-icon:not(:last-child)::after {
  content: "|";
  position: relative;
  left: 10px;
  color: var(--border);
}
.hero-platform-icon:hover {
  color: var(--text);
}

/* ── FEATURES SECTION ── */
.features {
  padding: 80px 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: 32px;
  background: radial-gradient(ellipse at 50% 25%, var(--surface) 0%, var(--surface) 35%, transparent 100%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── COMPOSE PAGE ── */
.compose-page {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  max-width: 1200px;
}

.compose-main {
  min-width: 0;
}

.compose-sidebar {
  min-width: 0;
}

/* Compose Media */
.compose-media {
  margin-bottom: 16px;
}

.media-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.media-dropzone:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.media-dropzone-icon {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.media-dropzone-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.media-dropzone-subtext {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.media-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.media-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.media-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
}

.media-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  transition: background var(--transition);
}

.media-preview-remove:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Compose Toolbar */
.compose-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.toolbar-actions {
  display: flex;
  gap: 4px;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.toolbar-btn:hover {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--text-secondary);
}

/* Compose Textarea */
.compose-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  min-height: 160px;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.compose-textarea::placeholder { color: var(--text-muted); }

.compose-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-ring);
}

/* Compose Footer */
.compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.platform-toggles { display: flex; flex-wrap: wrap; gap: 6px; }

.platform-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
  background: var(--surface);
  transition: all var(--transition);
}

.platform-chip:hover { border-color: #cdd3dc; color: var(--text); }
.platform-chip input { display: none; }

.platform-chip.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.platform-chip.disabled { opacity: 0.5; cursor: not-allowed; }

.platform-icon { font-size: 1rem; line-height: 1; }

.compose-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.char-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.char-count.warning { color: var(--warning); }
.char-count.danger { color: var(--error); font-weight: 600; }

/* Preview Panel */
.preview-panel {
  position: sticky;
  top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.preview-title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.preview-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.preview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
}

.preview-empty svg {
  margin-bottom: 12px;
}

.preview-empty p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.preview-card {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.preview-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.preview-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.preview-card-platform {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
}

.preview-card-icon {
  font-size: 1rem;
}

.preview-card-content {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.preview-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Feedback */
.feedback {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
  animation: fadeIn 0.2s ease;
}

.feedback.visible { display: block; }
.feedback.error { background: var(--error-soft); color: var(--error); border: 1px solid #fecaca; }
.feedback.success { background: var(--success-soft); color: var(--success); border: 1px solid #a7f3d0; }
.feedback.warning { background: var(--warning-soft); color: var(--warning); border: 1px solid #fde68a; }

.feedback-results { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.feedback-result-item { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  font-size: 0.8125rem; 
}

.feedback-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.feedback-icon-success { color: var(--success); }
.feedback-icon-error { color: var(--error); }

/* History */
.history-list { display: flex; flex-direction: column; gap: 16px; }

.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.history-item:hover { box-shadow: var(--shadow); }

.history-text { font-size: 0.9375rem; line-height: 1.6; margin-bottom: 14px; }

.history-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.history-platforms { display: flex; gap: 4px; }

.history-platform-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
}

.history-platform-badge.failed { background: var(--error-soft); color: var(--error); }

.history-date { font-size: 0.75rem; color: var(--text-muted); }
.history-link { font-size: 0.75rem; font-weight: 500; margin-left: auto; }

/* Accounts */
.account-list { display: flex; flex-direction: column; gap: 2px; }

.account-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.account-item:hover { background: var(--bg); }

.account-item-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.account-item-info { flex: 1; min-width: 0; }
.account-item-name { font-weight: 600; font-size: 0.9375rem; }
.account-item-status { font-size: 0.8125rem; color: var(--text-muted); margin-top: 1px; }
.account-item-status.connected { color: var(--success); }

/* Empty state */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.6; }
.empty-state-text { color: var(--text-muted); font-size: 0.9375rem; }

/* Calendar */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-header {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0;
  text-transform: uppercase;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.calendar-day:hover { background: var(--bg); }
.calendar-day.other-month { color: var(--text-muted); opacity: 0.4; }
.calendar-day.today { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.calendar-day.selected { background: var(--brand); color: #fff; }
.calendar-day.has-posts::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.schedule-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.schedule-form-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.schedule-form input[type="datetime-local"],
.schedule-form select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--surface);
  transition: border-color var(--transition);
}

.schedule-form input:focus,
.schedule-form select:focus {
  outline: none;
  border-color: var(--brand);
}

.scheduled-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.scheduled-list-item .sli-text { flex: 1; font-size: 0.875rem; }
.scheduled-list-item .sli-meta { font-size: 0.75rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) {
  .compose-page {
    grid-template-columns: 1fr;
  }
  
  .compose-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.sidebar-open {
    transform: translateX(0);
  }
  
  .sidebar-close {
    display: flex;
  }
  
  .main-content {
    margin-left: 0;
    padding: 24px 16px 48px;
  }
  
  .mobile-header {
    display: flex;
  }
  
  .hero {
    padding: 48px 16px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .features {
    padding: 48px 16px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .card {
    padding: 20px;
  }
  
  .compose-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .compose-actions {
    justify-content: space-between;
  }
  
  .history-item {
    padding: 16px 18px;
  }
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .sidebar-overlay.active {
    display: block;
  }
}

/* Shared cnxt footer */
.cnxt-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 24px 24px;
  margin-top: 48px;
  color: var(--text);
}

.cnxt-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cnxt-footer-brand { max-width: 300px; }
.cnxt-footer-logo { font-size: 1.1rem; font-weight: 700; color: var(--brand); text-decoration: none; }
.cnxt-footer-tagline { margin: 8px 0 0; font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; }
.cnxt-footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.cnxt-footer-col { display: flex; flex-direction: column; gap: 8px; }
.cnxt-footer-heading { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); margin-bottom: 4px; }
.cnxt-footer-col a { font-size: 0.875rem; color: var(--text); text-decoration: none; }
.cnxt-footer-col a:hover { color: var(--brand); }
.cnxt-footer-bottom {
  max-width: 960px; margin: 28px auto 0; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 0.75rem; color: var(--text-secondary); flex-wrap: wrap;
}

@media (max-width: 640px) {
  .cnxt-footer-inner { flex-direction: column; gap: 24px; }
  .cnxt-footer-bottom { flex-direction: column; text-align: center; }
}

/* ── DRAFTS VIEW ── */
.drafts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.draft-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--transition);
}

.draft-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.draft-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.draft-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.draft-text {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.draft-platforms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.draft-platform-tag {
  font-size: 0.75rem;
  padding: 4px 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  color: var(--text-secondary);
}

.draft-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── HASHTAG GROUPS VIEW ── */
.hashtag-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.hashtag-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--transition);
}

.hashtag-group-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.hashtag-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.hashtag-group-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.hashtag-group-platform {
  font-size: 0.75rem;
  padding: 4px 8px;
  background: var(--brand-soft);
  border-radius: 4px;
  color: var(--brand);
  font-weight: 600;
}

.hashtag-group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.hashtag-tag {
  font-size: 0.8125rem;
  color: var(--brand);
  font-weight: 500;
}

/* ── SAVED REPLIES VIEW ── */
.saved-replies {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--transition);
}

.reply-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.reply-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.reply-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.reply-content {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.reply-platforms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ── QUEUE VIEW ── */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.queue-schedule {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.queue-schedule svg {
  width: 14px;
  height: 14px;
}

.queue-text {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.queue-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.queue-platforms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.queue-actions {
  display: flex;
  gap: 8px;
}

/* ── INBOX VIEW ── */
.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inbox-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all var(--transition);
}

.inbox-item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.inbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.inbox-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inbox-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.inbox-user-info {
  display: flex;
  flex-direction: column;
}

.inbox-username {
  font-weight: 600;
  font-size: 0.9375;
  color: var(--text);
}

.inbox-platform {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.inbox-comment {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.inbox-reply-box {
  display: flex;
  gap: 8px;
}

.inbox-reply-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  resize: vertical;
  min-height: 80px;
}

.inbox-reply-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-ring);
}

/* ── ANALYTICS VIEW ── */
.analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.analytics-metric-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.analytics-metric-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.analytics-metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
}

.analytics-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.analytics-platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.analytics-platform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.analytics-platform-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.analytics-platform-icon {
  width: 28px;
  height: 28px;
}

.analytics-platform-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.analytics-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.analytics-stat-value {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  transition: all var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-ring);
}

.form-select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  background: var(--surface);
  cursor: pointer;
}

.form-textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-ring);
}

.form-helper {
  font-size: 0.75rem;
  color: var(--text-muted);
}