/* ============================================
   Social Hub - Layout & Components
   ============================================ */

/* Theme Bar */
.social-theme-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  backdrop-filter: blur(12px);
  background-color: hsl(var(--background) / 0.8);
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.social-theme-bar-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-theme-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
}

.social-theme-label svg {
  color: hsl(var(--primary));
}

.social-theme-select {
  width: 280px;
  height: 2.25rem;
  padding: 0 2rem 0 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.375rem;
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: border-color 0.2s;
}

.social-theme-select:hover {
  border-color: hsl(var(--primary) / 0.5);
}

.social-theme-select:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* Layout */
.social-hub-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 52px;
  background-color: hsl(var(--background));
}

/* Sidebar */
.social-sidebar {
  width: 14rem;
  border-right: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 52px;
  bottom: 0;
  left: 0;
  z-index: 40;
}

.social-main {
  flex: 1;
  overflow: auto;
  margin-left: 14rem;
}

.social-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
}

.social-sidebar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(var(--primary));
  font-family: 'Playfair Display', Georgia, serif;
}

.social-sidebar-subtitle {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.125rem;
}

.social-sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
}

.social-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.social-nav-item:hover:not(.disabled) {
  color: hsl(var(--foreground));
  background-color: hsl(var(--muted) / 0.5);
}

.social-nav-item.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 500;
}

.social-nav-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.social-nav-item.no-account {
  opacity: 0.6;
}

.social-nav-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.social-nav-badge {
  margin-left: auto;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* Main Content - uses .social-main defined above */

.social-content {
  padding: 2rem;
  max-width: 64rem;
}

.social-page-header {
  margin-bottom: 2rem;
}

.social-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  font-family: 'Playfair Display', Georgia, serif;
}

.social-page-description {
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

/* Grid */
.social-email-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .social-email-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.social-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.social-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.social-card-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background-color: hsl(var(--primary) / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary));
}

.social-card-title {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 0.9375rem;
}

.social-card-subtitle {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* Form Elements */
.social-form-group {
  margin-bottom: 1rem;
}

.social-label {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.social-input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.375rem;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.social-input:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.social-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.social-input-wrapper {
  position: relative;
}

.social-input-wrapper .social-input {
  padding-right: 2.5rem;
}

.social-input-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.social-input-toggle:hover {
  color: hsl(var(--foreground));
}

.social-select {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.375rem;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.social-select:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.social-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.375rem;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  resize: none;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.social-textarea:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.social-textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

.social-form-hint {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.375rem;
}

.social-form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Toggle / Switch */
.social-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: hsl(var(--muted) / 0.3);
  border: 1px solid hsl(var(--border));
  margin-bottom: 1.25rem;
}

.social-toggle-label {
  font-weight: 500;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
}

.social-toggle-description {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.social-switch {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
}

.social-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.social-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: hsl(var(--muted));
  border-radius: 1.5rem;
  transition: background-color 0.3s;
}

.social-switch-slider::before {
  content: '';
  position: absolute;
  height: 1.125rem;
  width: 1.125rem;
  left: 0.1875rem;
  bottom: 0.1875rem;
  background-color: hsl(var(--foreground));
  border-radius: 50%;
  transition: transform 0.3s;
}

.social-switch input:checked + .social-switch-slider {
  background-color: hsl(var(--primary));
}

.social-switch input:checked + .social-switch-slider::before {
  transform: translateX(1.25rem);
  background-color: hsl(var(--primary-foreground));
}

/* Status Card */
.social-status-card {
  margin-top: 1.5rem;
}

.social-status-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-status-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: hsl(var(--muted-foreground) / 0.3);
  transition: background-color 0.3s;
}

.social-status-dot.testing {
  background-color: hsl(45 90% 50%);
  animation: pulse 1s infinite;
}

.social-status-dot.success {
  background-color: hsl(142 70% 45%);
}

.social-status-dot.error {
  background-color: hsl(0 70% 50%);
}

.social-status-title {
  font-weight: 600;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
}

.social-status-subtitle {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.social-status-actions {
  display: flex;
  gap: 0.75rem;
}

/* Buttons */
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
  border: 1px solid transparent;
}

.social-btn-outline {
  background-color: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.social-btn-outline:hover {
  background-color: hsl(var(--muted) / 0.5);
}

.social-btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.social-btn-primary:hover {
  opacity: 0.9;
}

/* Toast */
.social-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  min-width: 280px;
  box-shadow: 0 10px 30px hsla(0, 0%, 0%, 0.3);
  z-index: 1000;
  transform: translateY(1rem);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.social-toast strong {
  display: block;
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.social-toast p {
  color: hsl(var(--muted-foreground));
  font-size: 0.8125rem;
  margin: 0;
}

.social-toast-error {
  border-color: hsl(0 70% 50% / 0.3);
}

/* ============================================
   Settings Page
   ============================================ */

.social-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.social-accounts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .social-accounts-grid {
    grid-template-columns: 1fr;
  }
}

.social-account-card {
  overflow: hidden;
}

.social-account-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.social-account-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-account-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-account-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.social-account-network {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.social-account-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.social-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.social-badge-green {
  background-color: hsl(142 70% 45% / 0.15);
  color: hsl(142 70% 35%);
}

.social-badge-yellow {
  background-color: hsl(45 90% 50% / 0.15);
  color: hsl(45 80% 35%);
}

.social-badge-red {
  background-color: hsl(0 70% 50% / 0.15);
  color: hsl(0 70% 45%);
}

.social-badge-muted {
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.social-account-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid hsl(var(--border));
}

.social-btn-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 0.375rem;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.social-btn-icon:hover {
  background-color: hsl(var(--muted) / 0.5);
  color: hsl(var(--foreground));
}

.social-btn-danger {
  color: hsl(0 70% 50%);
}

.social-btn-danger:hover {
  background-color: hsl(0 70% 50% / 0.1);
  color: hsl(0 70% 45%);
}

.social-switch-sm {
  transform: scale(0.85);
}

/* ── Modal ── */
.social-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: hsla(0, 0%, 0%, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.social-modal {
  width: 100%;
  max-width: 520px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px hsla(0, 0%, 0%, 0.4);
  max-height: 90vh;
  overflow-y: auto;
}

.social-modal-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem;
  padding-bottom: 1rem;
}

.social-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem 1.5rem;
}

.social-modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.social-modal-close {
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 0.2s;
}

.social-modal-close:hover {
  color: hsl(var(--foreground));
}

.social-modal-body {
  padding: 1.5rem;
}

.social-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
}

.social-label-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
}

.social-label-row .social-label {
  margin-bottom: 0;
}

.social-help-icon {
  display: inline-flex;
  color: hsl(var(--muted-foreground));
  cursor: help;
}

.social-info-banner {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: hsl(210 80% 95%);
  color: hsl(210 70% 35%);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.social-form-error {
  font-size: 0.75rem;
  color: hsl(0 70% 50%);
  margin-top: 0.25rem;
}

.social-input-error {
  border-color: hsl(0 70% 50%) !important;
}

/* ============================================
   Post Page
   ============================================ */

.social-post-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card) / 0.7);
  margin-bottom: 1.5rem;
}

.social-post-header-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-post-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.15fr) 420px;
}

@media (max-width: 1280px) {
  .social-post-layout {
    grid-template-columns: 1fr;
  }
}

.social-post-form-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.social-post-preview-col {
  position: relative;
}

.social-post-preview-card {
  position: sticky;
  top: 6rem;
}

.social-post-idea {
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card) / 0.8);
  padding: 1.25rem;
}

.social-post-idea-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.social-post-idea-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border) / 0.7);
  background-color: hsl(var(--background) / 0.6);
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

.social-btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.social-btn-brand:hover {
  opacity: 0.9;
}

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

.social-post-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 1280px) {
  .social-post-types-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.social-post-type-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.5);
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: inherit;
}

.social-post-type-btn:hover {
  border-color: hsl(var(--border) / 0.8);
  color: hsl(var(--foreground));
}

.social-post-type-btn.selected {
  border-color: transparent;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.social-post-type-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--muted) / 0.45);
}

.social-post-text-section {
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card) / 0.6);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.social-char-counter {
  font-size: 0.75rem;
  font-weight: 500;
}

.social-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  min-height: 1.5rem;
}

.social-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  font-size: 0.75rem;
}

.social-tag button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  opacity: 0.7;
}

.social-tag button:hover {
  opacity: 1;
}

.social-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Media Upload ── */
.social-media-placeholder {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card) / 0.6);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.social-media-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  border: 2px dashed hsl(var(--border));
  border-radius: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  text-align: center;
}

.social-media-upload-area:hover {
  border-color: hsl(var(--primary) / 0.5);
  background-color: hsl(var(--muted) / 0.2);
}

.social-media-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.social-media-preview-item {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
}

.social-media-preview-item img {
  width: 100%;
  height: 6rem;
  object-fit: cover;
  display: block;
}

.social-media-preview-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 6rem;
  padding: 0.5rem;
  font-size: 0.625rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
  gap: 0.25rem;
}

.social-media-remove-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(0 70% 50%);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0;
}

/* ── Preview Panel ── */
.social-post-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.social-post-preview-body {
  border-radius: 1.75rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.7);
  padding: 1rem;
}

.social-post-preview-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.social-post-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 16rem;
  border-radius: 1rem;
  border: 1px dashed hsl(var(--border));
  background-color: hsl(var(--background) / 0.6);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .social-hub-layout {
    flex-direction: column;
    padding-top: 52px;
  }

  .social-sidebar {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 1px solid hsl(var(--border));
  }

  .social-main {
    margin-left: 0;
  }

  .social-sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .social-nav-item {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
  }

  .social-nav-badge {
    display: none;
  }

  .social-content {
    padding: 1.25rem;
  }

  .social-status-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .social-status-actions {
    width: 100%;
  }

  .social-btn {
    flex: 1;
    justify-content: center;
  }

  .social-theme-label span {
    display: none;
  }

  .social-theme-select {
    width: 200px;
  }
}

/* ── Dropdown menu (split button) ── */
.social-dropdown {
  display: inline-flex;
  position: relative;
}

.social-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 180px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px hsl(0 0% 0% / 0.15);
  z-index: 50;
  padding: 0.25rem;
}

.social-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  background: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}

.social-dropdown-item:hover {
  background: hsl(var(--muted));
}

/* ── Weekday toggle buttons ── */
.social-weekday-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.social-weekday-btn input { display: none; }
.social-weekday-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}
.social-weekday-btn input:checked + span {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.social-weekday-btn:hover span {
  border-color: hsl(var(--primary) / 0.5);
}

.social-btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.social-btn-ghost:hover {
  background: hsl(var(--muted));
}
.social-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}

/* ── Social network selection grid ── */
.social-network-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.social-network-option {
  cursor: pointer;
}
.social-network-option input { display: none; }
.social-network-option span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}
.social-network-option input:checked + span {
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.5);
}
.social-network-option:hover span {
  border-color: hsl(var(--primary) / 0.3);
}

/* ============================================
   SH - Mobile Sidebar / Hamburger
   ============================================ */

/* Hamburger button (oculto por padrão no desktop) */
.sh-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: inherit;
  flex-shrink: 0;
}
.sh-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* Mobile topbar (oculto por padrão no desktop) */
.sh-mobile-topbar {
  display: none;
  align-items: center;
  padding: 0 16px;
  height: 52px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: hsl(var(--background, 0 0% 10%));
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 12px;
}

/* Overlay escuro ao abrir o sidebar no mobile */
.sh-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 39;
}
.sh-sidebar-overlay.active {
  display: block;
}

@media (max-width: 768px) {
  /* Mostrar hamburger e topbar mobile */
  .sh-hamburger {
    display: flex !important;
  }
  .sh-mobile-topbar {
    display: flex !important;
  }

  /* Sidebar: oculto fora da tela, desliza ao abrir */
  .sh-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sh-sidebar.open {
    transform: translateX(0);
  }

  /* Conteúdo principal ocupa tela toda sem overflow */
  .sh-main {
    margin-left: 0 !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* ── social-preview: header ── */
  .sp-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
  }
  .sp-header-content {
    flex-wrap: wrap;
    width: 100%;
  }
  .sp-title h1 {
    font-size: 1.125rem;
  }
  .sp-actions {
    width: 100%;
  }
  .sp-actions .sp-btn {
    width: 100%;
    justify-content: center;
  }

  /* ── social-preview: conteúdo ── */
  .sp-content {
    padding: 0.75rem;
    width: 100%;
  }
  .sp-container {
    width: 100%;
  }

  /* ── social-preview: tabs ── */
  .sp-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    display: block;
  }
  .sp-tab {
    display: inline-block;
    white-space: nowrap;
    bottom: 0;
  }

  /* ── social-preview: grid ── */
  .sp-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* ── social-preview: cards ── */
  .sp-card {
    width: 100%;
    max-width: 100%;
  }
  .sp-card-footer {
    flex-wrap: wrap;
  }
  .sp-card-btn {
    min-width: 0;
    flex: 1 1 auto;
  }

  /* ── social-preview: paginação e dialog ── */
  .sp-pagination {
    flex-wrap: wrap;
    gap: 0.375rem;
  }
  .sp-dialog {
    width: calc(100vw - 2rem);
  }

  /* ── email-config: grid de cards ── */
  .sh-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── social-settings: topbar ── */
  .sh-topbar {
    padding: 0 16px;
  }

  /* ── social-settings: page header e tabs ── */
  .ss-page-header {
    padding: 1rem 1rem 0;
  }
  .ss-page-title {
    font-size: 1.375rem;
  }
  .ss-tabs {
    padding: 0 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ss-tab-content {
    padding: 1rem;
  }
  .ss-form-row {
    grid-template-columns: 1fr;
  }

  /* ── social-settings: campanhas toolbar ── */
  .camp-toolbar-bottom {
    flex-wrap: wrap;
  }
  .camp-search-box {
    min-width: 0;
  }
  .camp-filter-select {
    flex: 1;
    min-width: 0;
  }
  .camp-new-btn {
    width: 100%;
    justify-content: center;
  }

  /* ── social-settings: stats ── */
  .camp-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
  }
  .camp-stat {
    min-width: 0;
  }

  /* ── social-settings: grid de campanhas ── */
  .camp-grid {
    grid-template-columns: 1fr;
  }

  /* ── social-settings: modal ── */
  .ss-modal {
    max-width: calc(100vw - 2rem);
  }
  .ss-network-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  .ss-weekdays {
    gap: 0.25rem;
  }
}
