/* ==========================================================================
   CanvasAI — AI Social Media Content Studio
   Style Sheet: Pure CSS3, Warm Editorial Palette & Micro-Interactions
   ========================================================================== */

/* --- CSS Variables & Theme Definition (Artistic Flair Theme) --- */
:root {
  --bg-main: #f8f5ef;
  --bg-surface: rgba(255, 255, 255, 0.75);
  --bg-surface-solid: #ffffff;
  --bg-surface-elevated: #fcfaf7;
  --text-primary: #242321;
  --text-secondary: #77736b;
  --text-muted: #a09b90;

  --accent: #b86b4b;
  --accent-hover: #9e583b;
  --accent-light: #f6ede6;
  --accent-secondary: #d6a77a;
  --accent-soft: #f4e8dc;
  --sage: #a8b5a0;
  --sage-text: #5a6354;
  --sage-light: #eef2ec;

  --border: #e7e0d6;
  --border-light: #f0ece4;
  --border-focus: #b86b4b;

  --shadow-sm: 0 2px 10px rgba(36, 35, 33, 0.03);
  --shadow-md: 0 10px 30px rgba(36, 35, 33, 0.06);
  --shadow-lg: 0 20px 50px rgba(36, 35, 33, 0.08);
  --shadow-accent: 0 10px 25px -5px rgba(184, 107, 75, 0.3);

  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans:
    "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Global Reset & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

::selection {
  background-color: var(--accent-light);
  color: var(--accent);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #d9d2c7;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* --- Decorative Background Art --- */
.bg-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.decor-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: floatSlow 18s infinite ease-in-out alternate;
}

.decor-blob-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #eadbc8 0%, #f8f5ef 70%);
  top: -100px;
  right: -80px;
}

.decor-blob-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #e3e9df 0%, #f8f5ef 70%);
  bottom: -150px;
  left: -120px;
  animation-delay: -6s;
}

.decor-blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #f2e3d5 0%, #f8f5ef 70%);
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -12s;
}

.decor-stroke {
  position: absolute;
  stroke: var(--accent-secondary);
  stroke-width: 1.5;
  fill: none;
  opacity: 0.18;
}

/* --- Typography --- */
h1,
h2,
h3,
.font-serif {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
}

.heading-display {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  letter-spacing: -0.02em;
}

.heading-xl {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.heading-lg {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.heading-md {
  font-size: 1.35rem;
}

.text-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 620px;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Layout Structure --- */
div#workspaceLayout {
  display: block !important;
  width: 100%;
}
.app-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 270px !important;
  padding-right: 2rem !important;
  /* padding-top: 1.25rem !important;
    padding-bottom: 3rem !important;
    min-height: 100vh; */
}

/* --- Top Navigation Header --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 245, 239, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 2rem;
  transition: var(--transition-normal);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
}

/* --- Active Brand Selector Dropdown in Navbar --- */
.nav-brand-select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  transition: var(--transition-fast);
  margin-left: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.nav-brand-select-wrapper:hover {
  border-color: var(--accent);
  background: #fff;
}

.nav-brand-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.nav-brand-select {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  padding-right: 0.3rem;
}

.nav-brand-select option {
  background: var(--bg-surface-solid);
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.4rem;
}

/* --- App Workspace Layout & Fixed/Sticky Left Sidebar --- */
.app-workspace-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.75rem;
  align-items: start;
  width: 100%;
}

.workspace-content-views {
  min-width: 0; /* Prevents overflow in grid items */
}

/* .app-sidebar {
  position: sticky;
  top: 80px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.35rem 1rem;
  box-shadow: 0 4px 20px rgba(36, 35, 33, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  z-index: 90;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
} */
.app-sidebar {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 250px !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  z-index: 200 !important;
  background: #faf8f5 !important;
  border-right: 1px solid #e8e3dd !important;
  border-top: none !important;
  border-left: none !important;
  border-bottom: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 1rem 0.85rem !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
}
.app-sidebar::-webkit-scrollbar {
  width: 4px;
}
.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.app-sidebar::-webkit-scrollbar-thumb {
  background: #e2d9cd;
  border-radius: 99px;
}

.sidebar-logo-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition-fast);
}

.sidebar-logo-brand:hover {
  opacity: 0.88;
}

.sidebar-logo-box {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e86a38 0%, #d85a28 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(232, 106, 56, 0.2);
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sidebar-header {
  padding: 0 0.1rem;
  margin-top: 0.05rem;
}

.sidebar-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8c8880;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  color: #4a4740;
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.sidebar-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--accent);
}

/* Active Menu Item Pill — Matching Reference Image */
.sidebar-item.active {
  background: #fdf0ea;
  color: #d85a28;
  font-weight: 700;
  border-color: transparent;
  box-shadow: none;
}

.sidebar-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-icon {
  font-size: 0.95rem;
  width: 24px;
  height: 24px;
  color: #706c63;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-text {
  font-size: 0.85rem;
  white-space: nowrap;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
}

.sidebar-brand-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #e5ddd0;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.sidebar-brand-card:hover {
  border-color: #d85a28;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Sidebar AI Insights Beta Card (Matching Reference Screenshot) */
.sidebar-insights-card {
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #faf8f5;
  border: 1px dashed #e5ddd0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.sidebar-insights-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-beta-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  background: #fce8e0;
  color: #d85a28;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-insights-text {
  font-size: 0.78rem;
  color: #615e58;
  line-height: 1.35;
  margin: 0;
}

.sidebar-insights-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.4rem 0.65rem;
  background: #ffffff;
  border: 1px solid #eae3d9;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #d85a28;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  margin-top: 0.2rem;
}

.sidebar-insights-btn:hover {
  background: #fffbf8;
  border-color: #d85a28;
}

.sidebar-insights-chart {
  padding: 0.2rem 0;
}

.sidebar-insights-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.4rem 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.sidebar-insights-btn:hover {
  border-color: var(--accent);
  background: #faf0e6;
  color: var(--accent);
}

.sidebar-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e86a38;
  flex-shrink: 0;
}

.sidebar-brand-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-edit {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

@media (max-width: 899px) {
  .app-workspace-layout {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .app-sidebar {
    position: relative;
    top: 0;
    padding: 0.6rem;
    gap: 0.5rem;
  }
  .sidebar-logo-brand,
  .sidebar-header,
  .sidebar-footer {
    display: none;
  }
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }
  .sidebar-item {
    white-space: nowrap;
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
  }
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-secondary) 100%
  );
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
}

.brand-logo:hover .logo-icon {
  transform: rotate(10deg) scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition-fast);
  border-radius: var(--radius-full);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* --- Step Progress Bar (Workflow Navigation) --- */
.workflow-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.6rem;
  box-shadow: var(--shadow-sm);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-normal);
  cursor: pointer;
}

.step-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.step-item.completed {
  color: var(--text-primary);
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.step-item.active .step-num {
  background: var(--accent);
  color: #fff;
}

.step-item.completed .step-num {
  background: var(--sage);
  color: #fff;
}

.step-divider {
  width: 16px;
  height: 1px;
  background: var(--border);
}

/* --- Screen Transitions & Visibility --- */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-normal);
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.btn-ai {
  background: linear-gradient(135deg, #faf4ee 0%, #f5ece0 100%);
  color: var(--accent);
  border: 1px solid var(--accent-secondary);
  box-shadow: var(--shadow-sm);
}

.btn-ai:hover {
  background: linear-gradient(135deg, #f5ece0 0%, #ebdbcb 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* --- Cards & Containers --- */
.card,
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
}

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

/* --- Forms & Inputs --- */
.form-group {
  margin-bottom: 0.8rem;
  position: relative;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.form-label .optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.input-control,
.select-control,
.textarea-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
  outline: none;
}

.input-control:focus,
.select-control:focus {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(184, 107, 75, 0.12);
}

.textarea-control {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
  text-align: left;
}

.char-counter {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.35rem;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

/* --- Post action buttons --- */
.card_wrap {
  width: 100%;
  margin-bottom: 1.25rem;
}

.post-action-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  align-items: stretch;
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.post-action-btn--primary {
  background: #fff;
  color: #d85a28;
  border: 1px solid #d85a28;
}

.post-action-btn--success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.post-action-btn--schedule {
  background: #fff;
  color: #d85a28;
  border: 1px solid #d85a28;
}

.post-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(216, 90, 40, 0.08);
}

@media (max-width: 920px) {
  .post-action-buttons {
    grid-template-columns: 1fr;
  }
}

/* Color Pickers Row */
.color-picker-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.color-swatch-input {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: none;
}

.color-swatch-input::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-swatch-input::-webkit-color-swatch {
  border: none;
  border-radius: calc(var(--radius-md) - 3px);
}

/* Upload Area */
.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  background: var(--bg-surface-elevated);
  cursor: pointer;
  transition: var(--transition-normal);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.upload-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 0.8rem;
  color: var(--accent);
}

/* Checkbox & Radio */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  background: var(--bg-surface);
}

.checkbox-group input[type="checkbox"] {
  display: none;
}

.checkbox-group input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ==========================================================================
   SCREEN 1 — LANDING PAGE
   ========================================================================== */
.hero-section {
  padding: 3.5rem 0 5rem;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto 3.5rem;
}

.hero-title {
  margin: 1.2rem 0;
}

.hero-title span {
  font-style: italic;
  color: var(--accent);
  position: relative;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.trust-badge svg {
  color: var(--sage);
}

/* Hero Showcase Visual Composition */
.hero-showcase {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

.hero-mockup-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  text-align: left;
  align-items: center;
  position: relative;
}

@media (max-width: 768px) {
  .hero-mockup-frame {
    grid-template-columns: 1fr;
  }
}

.hero-mockup-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: linear-gradient(135deg, #f4ece1 0%, #e8d8c5 100%);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-mockup-img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.floating-badge {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.2rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10;
  animation: float 6s infinite ease-in-out;
}

.badge-top-left {
  top: -15px;
  left: -20px;
  animation-delay: 0s;
}

.badge-bottom-right {
  bottom: -20px;
  right: -15px;
  animation-delay: -3s;
}

/* How It Works Grid */
.section-works {
  padding: 5rem 0;
  border-top: 1px solid var(--border-light);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.work-step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: var(--transition-normal);
}

.work-step-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--accent-secondary);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   SCREEN 2 & 3 — AUTH (LOGIN & REGISTER)
   ========================================================================== */
.auth-container {
  max-width: 440px;
  margin: 2rem auto;
}

.auth-card {
  padding: 2.5rem 2.2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.social-auth-btns {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.divider-text {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 1.5rem 0;
}

.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.divider-text::before {
  margin-right: 0.75em;
}
.divider-text::after {
  margin-left: 0.75em;
}

.password-meter {
  height: 4px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  margin-top: 0.5rem;
  overflow: hidden;
}

.password-meter-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

/* ==========================================================================
   SCREEN 4 & 5 — BRAND & PRODUCT FORMS
   ========================================================================== */
.form-screen-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.section-divider-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-divider-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.ai-autofill-banner {
  background: linear-gradient(135deg, #faf4ee 0%, #f5ece0 100%);
  border: 1px solid var(--accent-secondary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 600px) {
  .ai-autofill-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   SCREEN 6 — AI IMAGE GENERATION / SWIPE CAROUSEL
   ========================================================================== */
.carousel-wrapper {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.swipe-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 1.5rem;
  perspective: 1000px;
  touch-action: pan-y;
  user-select: none;
}

.swipe-card {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    box-shadow 0.3s ease;
  cursor: grab;
  display: flex;
  flex-direction: column;
}

.swipe-card:active {
  cursor: grabbing;
}

.swipe-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  position: relative;
}

.swipe-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(36, 35, 33, 0.85) 0%,
    rgba(36, 35, 33, 0) 50%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
}

.card-style-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  width: fit-content;
}

.swipe-card.selected {
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-accent);
}

.selected-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.gesture-instructions {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.image-thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.thumb-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}

.thumb-item img,
.thumb-item .thumb-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-item.active {
  border-color: var(--accent);
  transform: scale(1.05);
}

/* ==========================================================================
   SCREEN 7 — POST EDITOR & PREVIEW DUAL COLUMN
   ========================================================================== */
.platform-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 0.4rem;
  background: #ffffff;
  border: 1px solid #eae3d9;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #706c63;
}

.platform-tab-btn:hover {
  background: #faf8f5;
  border-color: #d8d2c7;
  color: #1f1e1b;
}

.platform-tab-btn.active {
  background: #fff5f0;
  border: 1.5px solid #d85a28;
  color: #d85a28;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(216, 90, 40, 0.08);
}

.platform-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-tab-name {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.editor-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

.tone-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.tone-chip {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tone-chip:hover,
.tone-chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.ai-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

/* ==========================================================================
   SCREEN 8 — REALISTIC INSTAGRAM PREVIEW MOCKUP
   ========================================================================== */
.instagram-mockup-wrapper {
  max-width: 440px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

.ig-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #efefef;
}

.ig-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ig-avatar-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.ig-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  background: #f0ece4;
}

.ig-username {
  font-size: 0.9rem;
  font-weight: 600;
  color: #262626;
  line-height: 1.2;
}

.ig-location {
  font-size: 0.75rem;
  color: #8e8e8e;
}

.ig-post-media {
  width: 100%;
  aspect-ratio: 1;
  background: #faf8f5;
  object-fit: cover;
  display: block;
}

.ig-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.5rem;
}

.ig-actions-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ig-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #262626;
  transition: transform 0.15s ease;
}

.ig-action-btn:hover {
  transform: scale(1.1);
}

.ig-action-btn.liked {
  color: #ed4956;
}

.ig-likes-count {
  padding: 0 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #262626;
  margin-bottom: 0.4rem;
}

.ig-caption-block {
  padding: 0 1rem 0.8rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #262626;
}

.ig-caption-username {
  font-weight: 600;
  margin-right: 0.4rem;
}

.ig-hashtags {
  color: #00376b;
  word-break: break-word;
  margin-top: 0.4rem;
}

.ig-tagged-list {
  padding: 0 1rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ig-tag-pill {
  background: #f0ece4;
  color: #262626;
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.ig-footer-stamp {
  padding: 0.8rem 1rem;
  background: #fafafa;
  border-top: 1px solid #efefef;
  text-align: center;
  font-size: 0.78rem;
  color: #8e8e8e;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* --- Floating Sticky Action Bar at Bottom of Screen 8 --- */
.bottom-sticky-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(36, 35, 33, 0.92);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 90;
}

/* ==========================================================================
   MODAL & TOAST OVERLAYS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 35, 33, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid #b86b4b;
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  transition: transform 0.25s ease;
  text-align: center;
}

.modal-backdrop.active .modal-content {
  transform: translateY(0);
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.ai-pulse-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-pulse-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--accent-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  animation: slideInRight 0.3s ease forwards;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes floatSlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(30px, 20px) scale(1.08);
  }
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent-secondary) 50%,
    var(--accent) 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ==========================================================================
   LANDING PAGE HEADER NAV & FOOTER STYLES
   ========================================================================== */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-link-item {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.nav-link-item:hover {
  color: var(--accent);
}

.landing-footer {
  margin-top: 6rem;
  padding: 4rem 2rem 2rem;
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 1;
  min-width: 260px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.social-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  text-decoration: none;
}

.social-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer-links-grid {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
  flex: 2;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 140px;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   USER DASHBOARD STYLES
   ========================================================================== */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 15px 25px;
  width: max-content;
}

.dashboard-welcome {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.user-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-secondary) 100%
  );
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.dashboard-alert-banner {
  background: linear-gradient(135deg, #fff8ef 0%, #faf0e3 100%);
  border: 1px solid #f0d4bd;
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.alert-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(184, 107, 75, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .dashboard-grid-2col {
    grid-template-columns: 1fr;
  }
  .nav-menu {
    display: none;
  }
}

.active-brand-card {
  padding: 1.8rem;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
}

.brand-logo-preview-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.brand-logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.stat-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.3rem;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.dash-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.dash-action-card {
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.dash-action-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.dash-action-step {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.dash-action-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.dash-action-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  padding-top: 1rem;
  display: inline-block;
}

.recent-drafts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.badge-sage {
  background: var(--sage-light);
  color: var(--sage-text);
  border: 1px solid var(--sage);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.color-swatch-sm {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
}

/* --- AI Post Products Selector Grid --- */
.ai-post-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.ai-post-product-card {
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.ai-post-product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.ai-post-product-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 4px 16px rgba(184, 107, 75, 0.12);
}

.ai-post-product-card.active::before {
  content: "✓ Selected for AI Post";
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.ai-post-product-card-click {
  cursor: pointer;
}

.ai-post-product-media {
  position: relative;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #faf5ef;
}

.ai-post-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ai-post-product-card:hover .ai-post-product-image {
  transform: scale(1.05);
}

.ai-post-product-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--bg-surface-solid);
}

.ai-post-product-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.ai-post-product-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.ai-post-product-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai-post-product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-light);
}

.ai-post-product-price {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.ai-post-product-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.catalog-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.catalog-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.catalog-empty-state h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.catalog-empty-state p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.catalog-empty-action {
  margin-top: 1rem;
}

.product-thumb-cell {
  padding: 0.85rem 1.25rem;
  vertical-align: middle;
}

.product-thumb-frame {
  width: 100px;
  height: 55px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #faf6f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.product-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb-fallback {
  display: none;
  font-size: 1.5rem;
}

.catalog-table-name {
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  vertical-align: middle;
}

.catalog-table-price {
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.92rem;
  vertical-align: middle;
}

.product-action-cell {
  padding: 0.85rem 1.25rem;
  vertical-align: middle;
}

.catalog-actions-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.catalog-action-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.catalog-action-secondary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  padding: 0.45rem 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.catalog-action-delete {
  padding: 0.45rem 0.6rem;
  color: #a0aec0;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
}

.swipe-card-img {
  --swipe-card-bg: #faf5ef;
  background: var(--swipe-card-bg);
}

.swipe-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-2xl);
}

.swipe-fallback-block {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.swipe-card-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.swipe-card-copy {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 0.3rem;
}

.thumb-bg {
  --thumb-bg: #faf5ef;
  background: var(--thumb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.ig-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ig-post-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.ig-post-placeholder-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.draft-empty-text {
  color: var(--text-muted);
  padding: 2rem 0;
  text-align: center;
}

.draft-list-item {
  margin-bottom: 1rem;
  text-align: left;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.draft-list-main {
  flex: 1;
}

.draft-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.draft-list-brand {
  color: var(--accent);
  font-size: 0.9rem;
}

.draft-list-timestamp {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.draft-list-caption {
  font-size: 0.88rem;
  line-height: 1.4;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0;
}

.draft-list-actions {
  display: flex;
  gap: 0.4rem;
}

.draft-delete-btn {
  color: #c53030;
}

.upload-preview-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  flex-wrap: wrap;
}

.upload-preview-thumb {
  max-height: 80px;
  max-width: 120px;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
  padding: 4px;
}

.upload-preview-copy {
  text-align: left;
  flex: 1;
  min-width: 150px;
}

.upload-preview-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 200px;
}

.upload-preview-status {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}

.upload-preview-remove {
  color: #c53030;
}

.upload-placeholder-label {
  font-weight: 500;
  color: var(--text-primary);
}

.upload-placeholder-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.platform-reaction-count {
  margin-left: 0.2rem;
  font-weight: 600;
}

.reddit-brand-text {
  color: #1c1c1c;
}

.reddit-meta-subtext {
  color: #787c7e;
}

.reddit-action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.facebook-more-dots {
  color: #65676b;
}

.platform-badge-linkedin {
  color: #0077b5;
  background: #fff;
}

.platform-badge-pinterest {
  color: #e60023;
  background: #fff;
}

.platform-badge-facebook {
  color: #1877f2;
  background: #fff;
}

.platform-badge-reddit {
  color: #ff4500;
  background: #fff;
}

.platform-badge-instagram {
  color: #d62976;
  background: #fff;
}

.dashboard-empty-panel {
  padding: 2rem;
  grid-column: 1 / -1;
  text-align: center;
}

.dashboard-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.dashboard-empty-copy {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 0.3rem;
}

.dashboard-empty-cta {
  margin-top: 1rem;
}

.dashboard-draft-card {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard-draft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.dashboard-draft-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dashboard-draft-media {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
}

.dashboard-draft-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-draft-fallback {
  font-size: 2rem;
}

.dashboard-draft-title {
  font-size: 0.9rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.3rem;
}

.dashboard-draft-caption {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.dashboard-draft-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dashboard-draft-open {
  flex: 1;
  font-size: 0.8rem;
}

.dashboard-draft-delete {
  color: #c53030;
  padding: 0.4rem 0.6rem;
}

/* --- AI Post Studio Split Layout (Left Image + Right Content) --- */
.ai-post-studio-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .ai-post-studio-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Image Container with Round Overlay Buttons */
.center-image-card {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.center-image-display {
  width: 100%;
  height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

/* Loading overlay over the center image */
.image-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.image-loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.image-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Floating Round Action Buttons on Image (Red ❌ and Green ✔) */
.image-round-actions-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.btn-round-action {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  border: 3px solid #ffffff;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-round-red {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

.btn-round-red:hover {
  transform: scale(1.12) rotate(-8deg);
  background: #dc2626;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.55);
}

.btn-round-green {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.btn-round-green:hover {
  transform: scale(1.12) rotate(8deg);
  background: #059669;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.55);
}

/* Product Detail Pop-Up Modal Styling */
.product-modal-card {
  max-width: 620px;
  width: 92%;
  border-radius: var(--radius-2xl);
  background: var(--bg-surface-solid);
  padding: 2rem;
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border);
}

.product-detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   GENERATED POSTS GALLERY & LIST STYLING
   ========================================================================== */
.gen-posts-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.gen-posts-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  background: var(--bg-surface-solid);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.gen-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .gen-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 880px) {
  .gen-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .gen-posts-grid {
    grid-template-columns: 1fr;
  }
}

/* Platform Filter Chips */
.platform-tab-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.platform-tab-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
}

.platform-tab-chip.active {
  background: #fdf3eb;
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(184, 107, 75, 0.12);
}

.platform-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  min-width: 20px;
}

.platform-tab-chip.active .platform-tab-badge {
  background: rgba(184, 107, 75, 0.18);
  color: var(--accent);
}

.gen-post-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.gen-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.gen-post-card.active-preview-card {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.gen-post-card-thumb {
  height: 200px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #faf5ef;
}

.gen-post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gen-post-card:hover .gen-post-card-thumb img {
  transform: scale(1.05);
}

.gen-post-badge-brand {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.gen-post-badge-style {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(30, 25, 20, 0.85);
  color: #ffffff;
  backdrop-filter: blur(6px);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.gen-post-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gen-post-card-product {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.gen-post-card-caption {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
  flex: 1;
}

.gen-post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.gen-post-card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: #faf0e6;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.gen-post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-light);
  gap: 0.4rem;
}

.gen-post-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* CTA Card (Generate New Post) */
.gen-post-cta-card {
  background: #fdf9f5;
  border: 1px dashed rgba(184, 107, 75, 0.4);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 380px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.gen-post-cta-card:hover {
  border-color: var(--accent);
  background: #fcf4eb;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gen-post-cta-card .cta-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(184, 107, 75, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* --- Products Catalog Grid & Cards --- */
.products-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.catalog-product-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  position: relative;
}

.catalog-product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.catalog-product-card.active-product {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(184, 107, 75, 0.2);
}

.product-table-row:hover {
  background: #faf6f0 !important;
}

/* Platform Preview Tabs */
.platform-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 0.4rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.platform-tab-btn:hover {
  background: #faf5ef;
  border-color: var(--accent);
}

.platform-tab-btn.active {
  background: #fff5f0;
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* Platform Mockup Custom Styles */
.platform-mockup-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.platform-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #666666;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.platform-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.linkedin-btn:hover {
  color: #0077b5;
  background: #e8f4f8;
}

.fb-btn:hover {
  color: #1877f2;
  background: #e7f3ff;
}

.reddit-vote-box {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f2f4f7;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #1c1c1c;
}

.reddit-vote-box button {
  background: none;
  border: none;
  cursor: pointer;
  color: #576f76;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.reddit-vote-box button:hover {
  color: #ff4500;
}

.pinterest-save-btn {
  background: #e60023;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pinterest-save-btn:hover {
  background: #ad001a;
}

/* Auth Screens Centering (Login & Register) */
.auth-container {
  width: 100%;
  max-width: 440px;
  margin: 1.5rem auto;
}

.auth-card {
  padding: 1.5rem 1.75rem;
}

/* ==========================================================================
   WORKSPACE FIXED LEFT SIDEBAR MODE (FULL-HEIGHT PINNED LEFT MENU)
   ========================================================================== */
body.workspace-mode .navbar {
  display: none !important;
}

body.workspace-mode .main-content {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: 270px !important; /* Sidebar width (250px) + 20px padding gap */
  padding-right: 2rem !important;
  padding-top: 1.25rem !important;
  padding-bottom: 3rem !important;
  min-height: 100vh;
}

body.workspace-mode .app-workspace-layout {
  display: block !important;
  width: 100%;
}

body.workspace-mode .workspace-content-views {
  width: 100%;
  max-width: 100%;
}

body.workspace-mode .app-sidebar {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 250px !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  z-index: 200 !important;
  background: #faf8f5 !important; /* Soft warm canvas as in reference image */
  border-right: 1px solid #e8e3dd !important;
  border-top: none !important;
  border-left: none !important;
  border-bottom: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 1rem 0.85rem !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
}

body.workspace-mode .app-sidebar::-webkit-scrollbar {
  width: 4px;
}
body.workspace-mode .app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
body.workspace-mode .app-sidebar::-webkit-scrollbar-thumb {
  background: #e2d9cd;
  border-radius: 99px;
}
.ai-autofill-banner {
  width: 100%;
  padding: 20px 22px;
  margin-bottom: 20px;

  border: 1px solid #e7a16b;
  border-radius: 14px;

  background: linear-gradient(135deg, #fffaf5 0%, #fdf4e9 100%);

  box-sizing: border-box;
}

.ai-autofill-content {
  width: 100%;
}

.ai-autofill-title {
  display: flex;
  align-items: center;
  gap: 6px;

  margin-bottom: 16px;

  color: #292929;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
}

.ai-autofill-form {
  display: flex;
  align-items: end;
  gap: 12px;
  width: 100%;
}

.ai-url-group {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.ai-autofill-label {
  display: block;
  margin-bottom: 7px;

  color: #333;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
}

.ai-autofill-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;

  box-sizing: border-box;

  border: 1px solid #ded8d0;
  border-radius: 10px;

  background: #fff;
  color: #333;

  font-size: 14px;
  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.ai-autofill-input:hover {
  border-color: #d8a071;
}

.ai-autofill-input:focus {
  border-color: #e18c50;

  box-shadow: 0 0 0 3px rgba(225, 140, 80, 0.12);
}

.ai-autofill-input::placeholder {
  color: #999;
}

.btn-ai {
  height: 44px;
  padding: 0 18px;

  flex-shrink: 0;

  border: 1px solid #e39a65;
  border-radius: 10px;

  background: #fff8f1;
  color: #c96f3c;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  white-space: nowrap;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.btn-ai:hover {
  background: #e28b52;
  border-color: #e28b52;
  color: #fff;

  transform: translateY(-1px);
}

.btn-ai:active {
  transform: translateY(0);
}
.upload-dropzone {
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover {
  border-color: var(--accent);
  background: rgba(201, 111, 60, 0.03);
}

.upload-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(201, 111, 60, 0.08);
  transform: scale(1.01);
}

/* ==========================================
   PRODUCT MODAL
========================================== */

.product-modal {
  padding: 0;
  overflow: hidden;
  max-width: 720px;
}
.product-modal .modal-content-box .product-modal-body #productForm {
  display: flex;
  flex-direction: column;
}
.product-modal .modal-content-box .product-modal-body {
  max-height: 687px;
  overflow-y: auto;
}
.product-modal .modal-content-box .product-modal-header button {
  flex: 0 1 50px;
}
.product-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 0;
  padding: 20px 24px 16px;

  border-bottom: 1px solid #b86b4b;
}

/* ==========================================
   IMPORT PRODUCT CARD
========================================== */

.product-import-card {
  margin: 20px 24px 24px;
  padding: 18px;

  border: 1px solid #e8b487;
  border-radius: 12px;

  background: linear-gradient(135deg, #fffaf5 0%, #fdf4eb 100%);
}

.product-import-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  margin-bottom: 16px;
}

.product-import-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  flex-shrink: 0;

  border-radius: 9px;

  background: #fff;
  border: 1px solid #edc7a7;

  font-size: 17px;
}

.product-import-title {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;

  margin-bottom: 3px;
}

.product-import-description {
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ==========================================
   URL INPUT
========================================== */

.product-import-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.product-import-input-wrapper {
  flex: 1;
  min-width: 0;
}

.product-url-input-wrapper {
  position: relative;
}

.product-url-icon {
  position: absolute;
  left: 12px;
  top: 50%;

  transform: translateY(-50%);

  font-size: 14px;
  opacity: 0.6;

  pointer-events: none;
}

.product-fetch-input {
  padding-left: 36px !important;
  height: 42px;
}

.product-fetch-btn {
  height: 42px;
  flex-shrink: 0;

  padding: 0 17px;

  white-space: nowrap;
}

/* ==========================================
   FETCH STATUS
========================================== */

.product-fetch-status {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-top: 12px;
  padding: 9px 11px;

  border-radius: 7px;

  background: rgba(74, 150, 95, 0.08);

  color: #3e8050;

  font-size: 12px;
}

.fetch-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;

  border-radius: 50%;

  background: #4a965f;
  color: #fff;

  font-size: 11px;
}

/* ==========================================
   FORM SECTIONS
========================================== */

.form-section {
  padding: 0 24px;
  margin-bottom: 24px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 16px;

  color: var(--text-primary);

  font-size: 13px;
  font-weight: 700;
}

.form-section-title::after {
  content: "";

  flex: 1;

  height: 1px;

  background: #b86b4b;
}

/* ==========================================
   PRICE
========================================== */

.price-input-group {
  display: flex;
  gap: 8px;
}

.price-input-group .select-control {
  width: 97px;
  flex-shrink: 0;
  appearance: unset;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' xml:space='preserve'%3E%3Cpath style='fill:none;stroke:%23000;stroke-width:2;stroke-miterlimit:10' d='M28.5 11.5 16 24 3.5 11.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 15px;
  background-position: center right 11px;
  padding-right: 33px;
}

/* ==========================================
   UPLOAD
========================================== */

.upload-dropzone {
  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.upload-dropzone:hover {
  border-color: var(--accent);
  background: rgba(201, 111, 60, 0.03);
}

.upload-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(201, 111, 60, 0.07);
  transform: scale(1.005);
}

.upload-title {
  font-weight: 500;
  color: var(--text-primary);
}

.upload-description {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================
   FOOTER
========================================== */

.product-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;

  margin-top: 0;
  padding: 16px 24px 20px;

  border-top: 1px solid #b86b4b;
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {
  .product-modal {
    width: calc(100% - 20px);
    max-height: 94vh;
  }

  .product-modal-header {
    padding: 16px;
  }

  .product-import-card {
    margin: 16px;
  }

  .form-section {
    padding: 0 16px;
  }

  .product-import-form {
    flex-direction: column;
    align-items: stretch;
  }

  .product-fetch-btn {
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .product-modal-footer {
    padding: 14px 16px 16px;
  }

  .product-modal-footer button {
    flex: 1;
  }
}
/* Tablet */
@media (max-width: 768px) {
  .ai-autofill-banner {
    padding: 18px;
  }

  .ai-autofill-form {
    gap: 10px;
  }

  .btn-ai {
    padding: 0 14px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .ai-autofill-banner {
    padding: 16px;
    border-radius: 12px;
  }

  .ai-autofill-title {
    font-size: 15px;
    margin-bottom: 14px;
  }

  .ai-autofill-form {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .ai-autofill-input,
  .btn-ai {
    width: 100%;
  }
}
@media (max-width: 899px) {
  body.workspace-mode .navbar {
    display: flex !important;
  }
  body.workspace-mode .main-content {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    padding-top: 1.25rem !important;
  }
  body.workspace-mode .app-sidebar {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    border-right: none !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-xl) !important;
    padding: 0.75rem !important;
    background: var(--bg-surface-solid) !important;
  }
}

/* ================================
   QUICK WORKFLOWS
================================ */

.quick-workflows {
  width: 100%;
}

.quick-workflows-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.2rem;
}

.quick-workflows-header .heading-lg {
  margin-top: 0.2rem;
}

/* GRID */

.dash-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* CARD */

.dash-action-card {
  position: relative;
  min-height: 247px;
  padding: 25px 24px 23px;
  border: 1px solid #e4ddd4;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.dash-action-card:hover {
  transform: translateY(-2px);
  border-color: #d7c7bb;
  box-shadow: 0 8px 24px rgba(65, 45, 35, 0.08);
}

/* TOP */

.dash-action-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
}

/* STEP TEXT */

.dash-action-step {
  display: flex;
  align-items: center;
}

.step-number,
.step-completed {
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.step-number {
  color: #c16643;
}

.step-completed {
  display: none;
  color: #43845c;
}

/* STATUS CIRCLE */

.dash-action-status {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.status-check {
  width: 27px;
  height: 27px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1.5px solid #d9d1c9;
  border-radius: 50%;

  color: transparent;
  font-size: 15px;
  font-weight: 800;
}

/* ICON */

.dash-action-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-top: 14px;
  margin-bottom: 10px;

  border-radius: 12px;
  background: #faf6f0;

  font-size: 28px;
}

/* TITLE */

.dash-action-card h4 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

/* DESCRIPTION */

.dash-action-card p {
  margin: 0.4rem 0 0;
  max-width: 95%;

  font-size: 0.85rem;
  line-height: 1.6;

  color: var(--text-secondary);
}

.required-text {
  opacity: 0.9;
}

/* LINK */

.dash-action-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  margin-top: 14px;

  color: #c16643;
  font-size: 0.78rem;
  font-weight: 700;
}

.dash-action-link span {
  transition: transform 0.2s ease;
}

.dash-action-card:hover .dash-action-link span {
  transform: translateX(3px);
}

/* =================================
   COMPLETED STATE
================================= */

.dash-action-card.is-complete {
  border-color: #b9d5c0;
  background: linear-gradient(135deg, #ffffff 0%, #fbfdfb 100%);

  box-shadow: 0 5px 18px rgba(67, 132, 92, 0.05);
}

/* COMPLETED TEXT */

.dash-action-card.is-complete .step-number {
  display: none;
}

.dash-action-card.is-complete .step-completed {
  display: inline-block;
}

/* CHECK */

.dash-action-card.is-complete .status-check {
  color: #fff;
  background: #43845c;
  border-color: #43845c;

  box-shadow: 0 0 0 4px rgba(67, 132, 92, 0.1);
}

/* COMPLETED ICON */

.dash-action-card.is-complete .dash-action-icon {
  background: #f2f8f3;
}

/* COMPLETED LINK */

.dash-action-card.is-complete .dash-action-link {
  color: #43845c;
}

/* SUBTLE GREEN DECORATION */

.dash-action-card.is-complete::after {
  content: "";

  position: absolute;
  width: 100px;
  height: 100px;

  top: -50px;
  right: -50px;

  border-radius: 50%;

  background: rgba(67, 132, 92, 0.06);

  pointer-events: none;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 900px) {
  .dash-actions-grid {
    grid-template-columns: 1fr;
  }

  .dash-action-card {
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .quick-workflows-header {
    align-items: flex-start;
  }

  .dash-action-card {
    padding: 20px;
    border-radius: 16px;
  }
}

.ai_error {
  display: none;
  color: #dc3545;
  font-size: 13px;
  margin-top: 5px;
  width: fit-content;
}

.is-invalid {
  border-color: #dc3545 !important;
}

.input-error {
  display: block;
  margin-top: 5px;
  color: #dc3545;
  font-size: 13px;
}

/* =========================================
   DASHBOARD OVERVIEW
========================================= */

.dashboard-overview {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: flex-start;
  width: 100%;
}

/* =========================================
   BRAND SNAPSHOT
========================================= */

.brand-snapshot-card {
  min-width: 0;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.brand-snapshot-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-snapshot-info {
  min-width: 0;
  flex: 1;
}

.brand-snapshot-info .badge {
  display: inline-flex;
  margin-bottom: 0.3rem;
}

.brand-snapshot-info h3 {
  margin: 0.15rem 0 0.15rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.brand-snapshot-info a {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
}

.brand-snapshot-info a:hover {
  text-decoration: underline;
}

/* =========================================
   BRAND LOGO
========================================= */

.brand-snapshot-card .brand-logo-preview-box {
  width: 54px;
  height: 54px;
  min-width: 54px;

  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}

.brand-snapshot-card .brand-logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================================
   BRAND PALETTE
========================================= */

.brand-palette {
  margin-top: 1rem;
  padding-top: 0.85rem;

  border-top: 1px solid var(--border-color, #e8e4dd);
}

.brand-palette-title {
  margin-bottom: 0.55rem;

  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.brand-colors {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-color-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;

  font-family: monospace;
  font-size: 0.72rem;

  color: var(--text-primary);
}

.color-swatch-sm {
  width: 17px;
  height: 17px;

  min-width: 17px;

  border-radius: 50%;

  border: 1px solid rgba(0, 0, 0, 0.08);

  display: inline-block;
}

/* =========================================
   STAT GRID
========================================= */

.dashboard-stat-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 1rem;

  min-width: 0;
}

/* =========================================
   STAT CARD
========================================= */

.dashboard-stat-card {
  min-width: unset;

  min-height: unset;

  padding: 0;

  box-sizing: border-box;

  display: flex;
  flex-direction: column;

  align-items: center;
  /* justify-content: center; */

  text-align: center;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.dashboard-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

/* =========================================
   STAT ICON
========================================= */

.dashboard-stat-icon {
  width: 42px;
  height: 42px;

  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 15px 0 0;
}

.instagram-icon {
  background: #e8f5e9;
  color: #2e7d32;
}

.pending-icon {
  background: #fff4e5;
  color: #e67e22;
}

.drafts-icon {
  background: var(--sage-light);
  color: var(--sage-text);
}

.generated-icon {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

/* =========================================
   STAT VALUE
========================================= */

.dashboard-stat-card .stat-value {
  font-size: 70px;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 0.45rem;
  display: flex;
  font-family: sans-serif;
  margin: 0;
  width: 100%;
  justify-content: center;
  padding: 10px;
}

/* =========================================
   STAT LABEL
========================================= */

.dashboard-stat-card .stat-label {
  font-size: 0.82rem;

  font-weight: 600;

  color: var(--text-primary);

  line-height: 1.25;
  width: 100%;
  padding: 17px;
  border-top: 1px solid #e8e4dd;
}

.dashboard-stat-card .stat-description {
  margin-top: 0.18rem;

  font-size: 0.7rem;

  color: var(--text-secondary);

  line-height: 1.25;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1100px) {
  .dashboard-overview {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brand-snapshot-card {
    min-height: auto;
  }
}

/* =========================================
   SMALL TABLET
========================================= */

@media (max-width: 800px) {
  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-stat-card {
    min-height: 160px;
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 520px) {
  .dashboard-overview {
    gap: 0.85rem;
  }

  .brand-snapshot-card {
    padding: 1rem;
  }

  .brand-snapshot-header {
    gap: 0.7rem;
  }

  .brand-snapshot-card .brand-logo-preview-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  .brand-snapshot-info h3 {
    font-size: 1rem;
  }

  .brand-snapshot-info a {
    font-size: 0.7rem;
  }

  .dashboard-stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .dashboard-stat-card {
    min-height: 145px;
    padding: 1rem 0.75rem;
  }

  .dashboard-stat-icon {
    width: 38px;
    height: 38px;
  }

  .dashboard-stat-card .stat-value {
    font-size: 1.55rem;
  }
}

/* =========================================
   VERY SMALL MOBILE
========================================= */

@media (max-width: 360px) {
  .dashboard-stat-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-card {
    min-height: 130px;
  }
}
.dash-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.dash-action-card {
  position: relative;
  padding: 1.25rem;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.dash-action-card:not(.is-locked):hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
}
.dash-action-card.is-required {
  border: 1.5px solid var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 8px 25px rgba(0, 0, 0, 0.05);
}
.dash-action-card.is-required:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 12px 12px 0 0;
}
.dash-action-card.is-active {
  border-color: var(--accent);
}
.dash-action-card.is-locked {
  opacity: 0.62;
  background: linear-gradient(
    135deg,
    rgba(245, 245, 245, 0.9),
    rgba(250, 250, 250, 0.8)
  );
  cursor: not-allowed;
}
.dash-action-card.is-locked .dash-action-icon {
  filter: grayscale(1);
  opacity: 0.55;
}
.dash-action-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.dash-action-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.step-number {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.step-completed,
.step-required,
.step-locked {
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
}
.step-completed {
  background: var(--sage-light);
  color: var(--sage-text);
}
.step-required {
  background: var(--accent-soft);
  color: var(--accent);
}
.step-locked {
  background: #f1f1f1;
  color: #888;
}
.status-check,
.status-required,
.status-active,
.status-lock {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
}
.status-check {
  background: var(--sage-light);
  color: var(--sage-text);
}
.status-required {
  background: var(--accent);
  color: white;
  font-weight: 700;
}
.status-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.status-lock {
  background: #eee;
  font-size: 0.7rem;
}
.dash-action-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}
.dash-action-card h4 {
  margin-bottom: 0.4rem;
}
.dash-action-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.required-text {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
}
.dash-action-locked-message {
  margin-top: auto;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: #f5f5f5;
  color: #888;
  font-size: 0.7rem;
  line-height: 1.4;
}
.dash-action-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}
.dash-action-link:hover {
  text-decoration: underline;
}
.dash-action-disabled {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #aaa;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: not-allowed;
}
@media (max-width: 900px) {
  .dash-actions-grid {
    grid-template-columns: 1fr;
  }
  .dash-action-card {
    min-height: 220px;
  }
}
@media (max-width: 520px) {
  .dash-action-card {
    padding: 1rem;
    min-height: 210px;
  }
}

/* Instagram Feed Mockup */
#platformMockupContainer {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

/* Instagram Header */
#platformMockupContainer .ig-header {
  min-height: 60px;
  padding: 10px 0px !important;
  background: #fff;
}

/* Instagram Avatar */
#platformMockupContainer .ig-avatar-ring {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
}

/* Instagram Main Image */
#platformMockupContainer .ig-post-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: auto !important;
  max-height: none !important;
  background: #faf5ef;
  overflow: hidden;
}

/* Image itself */
#platformMockupContainer .ig-post-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Action buttons */
#platformMockupContainer .ig-actions {
  padding: 10px 14px 5px !important;
}

#platformMockupContainer .ig-actions-left {
  gap: 14px !important;
}

#platformMockupContainer .ig-action-btn svg {
  width: 24px;
  height: 24px;
}

/* Likes */
#platformMockupContainer .ig-likes-count {
  padding: 0 14px !important;
  margin-bottom: 5px !important;
}

/* Caption */
#platformMockupContainer .ig-caption-block {
  padding: 0 14px !important;
  font-size: 14px !important;
  line-height: 1.4;
}

/* Hashtags */
#platformMockupContainer .ig-hashtags {
  padding: 0 14px !important;
  font-size: 13px !important;
  line-height: 1.5;
  word-break: break-word;
}

/* Tagged accounts */
#platformMockupContainer > div:nth-last-of-type(2) {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

/* Bottom dots */
#platformMockupContainer > div:last-child {
  padding: 10px 14px 14px !important;
}

/* Mobile */
@media (max-width: 600px) {
  #platformMockupContainer {
    max-width: 100%;
    border-radius: 10px;
  }

  #platformMockupContainer .ig-post-media {
    aspect-ratio: 4 / 5;
  }
}

/* ===== Sidebar (reused from existing app) ===== */
.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--cream-card);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar-logo-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.4rem 1.25rem;
}

.sidebar-logo-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-text {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.sidebar-header {
  padding: 0 0.4rem 0.5rem;
}

.sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.25rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.5rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.87rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.sidebar-item:hover {
  background: var(--cream-hover);
}

.sidebar-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.sidebar-brand-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.55rem 0.65rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.sidebar-logout-btn:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ===== Main content ===== */
.main {
  flex: 1;
  padding: 2rem 2.5rem 3rem;
  max-width: 1100px;
}

.page-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.page-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  /* margin-bottom: 2rem; */
  max-width: 560px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  margin-top: 2.2rem;
}

.connections-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.connections-grid > * {
  flex: 1 1 260px;
}
.connection-card {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.connection-card:hover {
  border-color: #ddd3c4;
  box-shadow: 0 6px 18px rgba(70, 50, 30, 0.06);
}

.connection-card.connected {
  border-color: #cfe6d9;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.platform-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-pill.connected {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.not-connected {
  background: var(--cream-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.platform-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.platform-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.btn-connect {
  background: var(--accent);
  color: #fff;
}
.btn-connect:hover {
  background: #c24e20;
}

.btn-manage {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-manage:hover {
  background: var(--cream-hover);
}

.btn-disconnect {
  background: transparent;
  border-color: #f6d5d5;
  color: var(--danger);
}
.btn-disconnect:hover {
  background: var(--danger-soft);
}

/* Add-platform ghost tile */
.connection-card.add-tile {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  color: var(--text-muted);
  cursor: pointer;
  min-height: 168px;
}
.connection-card.add-tile:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.add-tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px dashed currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.add-tile-label {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Sidebar Css  */
.sidebar-brand-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-brand-switch-toggle {
  background: transparent;
  border: none;
  color: #8c887f;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition:
    transform 0.15s ease,
    color 0.15s ease;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-brand-switch-toggle:hover {
  color: #d85a28;
}

.sidebar-brand-switch-toggle.open svg {
  transform: rotate(180deg);
}

.sidebar-brand-switch-toggle svg {
  transition: transform 0.15s ease;
}

.sidebar-brand-dropdown {
  display: none;
  margin-top: 0.4rem;
  background: #ffffff;
  border: 1px solid #eae3d9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(70, 50, 30, 0.08);
}

.sidebar-brand-dropdown.open {
  display: block;
}

.sidebar-brand-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1f1e1b;
  transition: background 0.12s ease;
}

.sidebar-brand-dropdown-item:hover {
  background: #faf5ef;
}

.sidebar-brand-dropdown-item.active {
  background: #fce8e0;
}

.sidebar-brand-dropdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.sidebar-brand-dropdown-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-dropdown-check {
  color: #d85a28;
  flex-shrink: 0;
}

.sidebar-brand-dropdown-addnew {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #d85a28;
  text-decoration: none;
  border-top: 1px solid #eae3d9;
  background: #fcfaf6;
}

.sidebar-brand-dropdown-addnew:hover {
  background: #faf5ef;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.55rem 0.65rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #8c887f;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.sidebar-logout-btn:hover {
  background: #fdeded;
  border-color: #f6d5d5;
  color: #d64545;
}

.sidebar-logout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sidebar-logout-btn .sidebar-icon-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* =========================================
   DATATABLE - LARGE / CLEAN LAYOUT
   ========================================= */

.dataTables_wrapper {
  width: 100% !important;
  max-width: 100% !important;
}

/* Table container */
.dataTables_wrapper .dataTables_scroll {
  width: 100% !important;
}

.dataTables_wrapper .dataTables_scrollBody {
  width: 100% !important;
}

/* Main table */
.dataTables_wrapper table.dataTable {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

/* Header */
.dataTables_wrapper table.dataTable thead th {
  height: 12px;
  padding: 14px 16px !important;

  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;

  white-space: nowrap;
  vertical-align: middle;

  background: #fafafa;
  color: #b86b4b;
  font-weight: 700;
}

/* Filter row */
.dataTables_wrapper table.dataTable thead tr.filters th {
  height: 58px;
  padding: 8px 10px !important;
}

/* Column filter inputs */
.datatable-column-filter {
  width: 100% !important;
  min-width: 100px;

  height: 38px;
  padding: 7px 10px;

  border: 1px solid #ddd;
  border-radius: 6px;

  font-size: 13px;
  outline: none;

  box-sizing: border-box;
}

.datatable-column-filter:focus {
  border-color: #999;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* Table rows */
.dataTables_wrapper table.dataTable tbody tr {
  min-height: 80px;
}

/* Table cells */
.dataTables_wrapper table.dataTable tbody td {
  padding: 16px !important;

  font-size: 14px;
  line-height: 1.5;

  vertical-align: middle;

  white-space: normal;
}

/* Post/content column */
.dataTables_wrapper table.dataTable tbody td:first-of-type {
  min-width: 80px;
  width: 14px;
}

/* Images inside table */
.dataTables_wrapper table.dataTable tbody td img {
  max-width: 100px;
  max-height: 80px;

  width: auto;
  height: auto;

  object-fit: cover;
  border-radius: 6px;
}

/* Action buttons */
.dataTables_wrapper table.dataTable tbody td .btn {
  margin: 2px;
  white-space: nowrap;
  border: 1px solid #242321;
  padding: 6px !important;
}
.dataTables_wrapper table.dataTable tbody td .btn.product-generate-btn {
  background-color: #b86b4b;
  color: #fff !important;
  border: 1px solid #b86b4b;
  font-weight: 400;
}

/* Pagination / info spacing */
.dataTables_wrapper .dataTables_info {
  padding-top: 12px !important;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 8px !important;
}

/* Search box */
.dataTables_wrapper .dataTables_filter input {
  height: 40px;
  min-width: 260px;

  padding: 8px 12px;

  border: 1px solid #ddd;
  border-radius: 7px;

  font-size: 14px;
}

/* Length dropdown */
.dataTables_wrapper .dataTables_length select {
  height: 40px;

  padding: 5px 30px 5px 10px;

  border: 1px solid #ddd;
  border-radius: 7px;
}

/* Horizontal scrollbar */
.dataTables_wrapper .dataTables_scrollBody {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

/* Make scrollbar easier to use */
.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar {
  height: 8px;
}

.dataTables_wrapper .dataTables_scrollBody::-webkit-scrollbar-thumb {
  border-radius: 10px;
}

/* =========================================
   TABLE CARD / OUTER CONTAINER
   ========================================= */

.table-responsive,
.data-table-container,
.table-container {
  width: 100% !important;
  max-width: 100% !important;
}

.sidebar-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none; /* click bhi block ho jayega */
}

/* brand sceleton  */
/* Skeleton overlay for brand form while auto-fill is fetching */
.form-skeleton-overlay {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  border-radius: 12px;
  z-index: 20;
  padding: 2rem;
  display: none;
  overflow: hidden;
}

.form-skeleton-overlay.active {
  display: block;
}

.skeleton-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.skeleton-bar {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #efeae1 25%, #f7f3ec 37%, #efeae1 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-label {
  height: 10px;
  width: 90px;
  margin-bottom: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #efeae1 25%, #f7f3ec 37%, #efeae1 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-field {
  flex: 1;
}

.skeleton-field .skeleton-bar {
  height: 42px;
}

.skeleton-textarea .skeleton-bar {
  height: 90px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.upload-preview-container.has-images {
  display: block;
  padding: 12px;
  border-style: solid;
}

.product-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.product-image-card {
  position: relative;
  width: 90px;
  height: 90px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.product-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-image-card .removeProductImage {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.product-image-add-tile {
  width: 90px;
  height: 90px;
  border: 2px dashed var(--border-color, #ddd);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #c96f3c;
  font-size: 28px;
  background: var(--bg-secondary, #faf9f7);
  flex-shrink: 0;
}

.product-image-add-tile:hover {
  border-color: #c96f3c;
}

.upload-dropzone {
  padding: 16px;
}

.upload-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

/* uploaded image tile */
.product-image-card {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-secondary, #f2f1ee);
  flex-shrink: 0;
}

.product-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-image-card .removeProductImage {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(60, 60, 60, 0.75);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* "click or drag & drop" tile - hamesha visible rahega, images ke sath bhi */
.product-image-add-tile {
  width: 100%;
  height: 160px;
  flex-shrink: 0;
  border: unset;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 10px;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
}
#productImagePreviewContainer:has(.product-image-card) .product-image-add-tile {
  width: 160px;
}

.product-image-add-tile:hover {
  border-color: #c96f3c;
}

.product-image-add-tile .upload-icon {
  width: 32px;
  height: 32px;
  color: var(--text-primary, #1f2937);
}

.product-image-add-tile .upload-title {
  font-size: 0.85rem;
  color: var(--text-primary, #1f2937);
  line-height: 1.25;
}

.product-image-add-tile .upload-description {
  font-size: 0.72rem;
  color: var(--text-secondary, #9aa3af);
  line-height: 1.3;
}

/* Skeleton base */
.skeleton {
  background: linear-gradient(90deg, #edeae3 25%, #f5f2ec 37%, #edeae3 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
.skeleton-circle {
  border-radius: 50%;
}

/* Sab kuch .plans-page ke andar scoped. Theme variables use hue hain, na mile to fallback color. */
.plans-page {
  --p-accent: var(--accent, #b86b4b);
  --p-text: var(--text-primary, #1f1e1b);
  --p-sub: var(--text-secondary, #6b6962);
  --p-border: var(--border, #e7e2d9);
  --p-card: var(--bg-card, #ffffff);
  --p-soft: var(--accent-soft, #fbf1ec);
}
.plans-page .plans-banner {
  border: 1px solid var(--p-border);
  background: var(--p-card);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.plans-page .plans-banner--warn {
  background: var(--p-soft);
  border-color: var(--p-accent);
}
.plans-page .plans-banner h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--p-text);
}
.plans-page .plans-banner p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--p-sub);
}
.plans-page .plans-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--p-border);
  margin-top: 0.6rem;
  overflow: hidden;
}
.plans-page .plans-bar span {
  display: block;
  height: 100%;
  background: var(--p-accent);
}

.plans-page .plans-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  align-items: stretch;
}
.plans-page .plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: 16px;
  padding: 1.4rem 1.2rem 1.2rem;
}
.plans-page .plan-card--popular {
  border: 2px solid var(--p-accent);
}
.plans-page .plan-card--current {
  background: var(--p-soft);
}
.plans-page .plan-badge {
  position: absolute;
  top: -11px;
  left: 1.2rem;
  background: var(--p-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}
.plans-page .plan-name {
  margin: 0;
  font-size: 1.1rem;
  color: var(--p-text);
}
.plans-page .plan-desc {
  margin: 0.25rem 0 0.9rem;
  font-size: 0.82rem;
  color: var(--p-sub);
  min-height: 2.4em;
}
.plans-page .plan-price {
  margin: 0;
  color: var(--p-text);
}
.plans-page .plan-amount {
  font-size: 2rem;
  font-weight: 800;
}
.plans-page .plan-cycle {
  font-size: 0.85rem;
  color: var(--p-sub);
}
.plans-page .plan-per-image {
  margin: 0.1rem 0 0.9rem;
  font-size: 0.78rem;
  color: var(--p-accent);
  font-weight: 600;
  min-height: 1.2em;
}
.plans-page .plan-limits {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--p-border);
  border-bottom: 1px solid var(--p-border);
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--p-text);
}
.plans-page .plan-features {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--p-sub);
  flex: 1;
  align-content: start;
}
.plans-page .plan-features li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.plans-page .plan-features svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--p-accent);
}

.plans-page .plan-btn {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  background: var(--p-accent);
  color: #fff;
  border: 1px solid var(--p-accent);
}
.plans-page .plan-btn:hover {
  filter: brightness(0.94);
}
.plans-page .plan-btn:focus-visible {
  outline: 3px solid var(--p-text);
  outline-offset: 2px;
}
.plans-page .plan-btn--off {
  background: transparent;
  color: var(--p-sub);
  border-color: var(--p-border);
  cursor: default;
}
.plans-page .plan-btn--off:hover {
  filter: none;
}
.plans-page .plan-btn--current {
  background: var(--p-accent);
  color: #fff;
  border-color: var(--p-accent);
  font-weight: 700;
}

.plans-page .plans-topup-title {
  margin: 2.2rem 0 0.3rem;
  font-size: 1.2rem;
  color: var(--p-text);
}
.plans-page .plans-topup-sub {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--p-sub);
}
.plans-page .topup-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.plans-page .topup-card {
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: 14px;
  padding: 1rem;
}
.plans-page .topup-card strong {
  display: block;
  color: var(--p-text);
  font-size: 1rem;
}
.plans-page .topup-price {
  margin: 0.2rem 0 0.8rem;
  color: var(--p-sub);
  font-size: 0.85rem;
}
.plans-page form {
  margin: 0;
}
.plans-page button.plan-btn {
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}
.plans-page .plan-btn--line {
  background: transparent;
  color: var(--p-accent);
}
.plans-page .plans-banner-actions {
  margin-top: 0.8rem;
  max-width: 220px;
}

.swal2-popup.bp-popup {
  --bp-accent: var(--accent, #b86b4b);
  --bp-text: var(--text-primary, #1f1e1b);
  --bp-sub: var(--text-secondary, #6b6962);
  --bp-border: var(--border, #e7e2d9);
  --bp-soft: var(--accent-soft, #fbf1ec);
  width: min(92vw, 460px);
  padding: 1.7rem 1.4rem 1.4rem;
  border-radius: 18px;
  font-family: inherit;
}
.bp-popup .bp-title {
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0 0 0.7rem;
  padding: 0;
  color: var(--bp-text);
}
.bp-popup .bp-html {
  margin: 0;
  padding: 0;
}

.bp-popup .bp-text {
  text-align: left;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--bp-sub);
}
.bp-popup .bp-text b {
  color: var(--bp-text);
}

/* Brands ki list: har brand ek card jaisa */
.bp-popup .bp-list {
  text-align: left;
  display: grid;
  gap: 0.5rem;
  padding: 3px;
  max-height: min(260px, 40vh);
  overflow-y: auto;
}
.bp-popup .bp-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  border: 1px solid var(--bp-border);
  border-radius: 12px;
  background: #fff;
  transition:
    border-color 0.15s,
    background-color 0.15s,
    box-shadow 0.15s,
    opacity 0.15s;
}
.bp-popup .bp-row:hover {
  border-color: var(--bp-accent);
}
.bp-popup .bp-row:has(input:checked) {
  border-color: var(--bp-accent);
  background: var(--bp-soft);
}
.bp-popup .bp-row:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--bp-accent);
}
.bp-popup .bp-row:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.bp-popup .bp-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--bp-accent);
}
.bp-popup .bp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bp-popup .bp-name {
  flex: 1;
  font-weight: 600;
  color: var(--bp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-popup .bp-count {
  text-align: left;
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--bp-sub);
  transition: color 0.15s;
}
.bp-popup .bp-count-full {
  color: var(--bp-accent);
  font-weight: 600;
}

/* Buttons: site jaise pill buttons */
.bp-popup .bp-actions {
  margin-top: 1.3rem;
  gap: 0.6rem;
}
.bp-popup .bp-btn {
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--bp-accent);
  transition:
    filter 0.15s,
    background-color 0.15s,
    opacity 0.15s;
}
.bp-popup .bp-btn-main {
  background: var(--bp-accent);
  color: #fff;
}
.bp-popup .bp-btn-main:hover {
  filter: brightness(0.94);
}
.bp-popup .bp-btn-main:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}
.bp-popup .bp-btn-line {
  background: transparent;
  color: var(--bp-accent);
}
.bp-popup .bp-btn-line:hover {
  background: var(--bp-soft);
}
.bp-popup .bp-btn:focus-visible {
  outline: 3px solid var(--bp-text);
  outline-offset: 2px;
  box-shadow: none;
}

/* Halka sa khulna aur band hona */
@keyframes bpIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bpOut {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}
.bp-show {
  animation: bpIn 0.22s ease-out;
}
.bp-hide {
  animation: bpOut 0.16s ease-in forwards;
}
@media (prefers-reduced-motion: reduce) {
  .bp-show,
  .bp-hide {
    animation: none;
  }
}

.save-status {
  font-size: 0.75rem;
  color: #8c887f;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.save-status.saving::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid #d9cfc1;
  border-top-color: #b96b4a;
  border-radius: 50%;
  animation: saveSpin 0.7s linear infinite;
}
.save-status.saved {
  color: #1e7a3c;
}
.save-status.error {
  color: #c0392b;
}
.save-status .retry {
  background: none;
  border: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
#postActionButtons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@keyframes saveSpin {
  to {
    transform: rotate(360deg);
  }
}

/* login page changes */
body:has(.login-page) .main-content {
  padding: 0 !important;
  max-width: 100% !important;
}
body [id*="screen"] .login-page {
  padding: 0 !important;
  height: 100% !important;
}
body .login-page .login-layout .login-image {
  height: 100% !important;
  flex: 1;
  min-height: unset !important;
  border-radius: unset !important;
}
body .login-page .login-layout {
  max-width: 100% !important;
  display: flex !important;
  height: calc(100vh - 70px) !important;
}

body .login-page .login-layout .auth-container {
  flex: 1;
  max-width: 100%;
}
body .dashboard-welcome .heading-lg {
  font-size: clamp(1.5rem, 2.5vw, 1.5rem);
}
body .sidebar-brand-switch-toggle:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
}
body .header-title-transperent {
  margin-bottom: 1.5rem;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 15px 25px;
  width: max-content;
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #e7e0d6;
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
  position: relative;
  flex-direction: column;
}
body #delete_post {
  background-color: #cd3700;
  border-color: #cd3700;
  color: #fff;
}
body .actions a {
  background: #fff;
  color: #242321;
  border: 1px solid #2e2a20;
}
body .dataTables_wrapper table.dataTable thead tr th:nth-child(1) {
  min-width: 100px;
}
body .dataTables_wrapper table.dataTable thead tr th:nth-last-child(1) {
  text-align: center;
}
.mb-0 {
  margin-bottom: 0 !important;
}

@media (max-width: 991px) {
  body .login-image {
    display: none;
  }
  body #screen-login .auth-card {
    max-width: 100%;
  }
  body:has(.login-page) .main-content {
    padding: 20px !important;
    margin: auto 0 !important;
  }
  body .login-page .login-layout {
    height: 100% !important;
  }
  body .otp-input-row {
    gap: 15px !important;
  }
}

@media (max-width: 360px) {
  body .nav-actions {
    flex-wrap: wrap;
  }
}
@media (min-width: 1200px) and (max-width: 1700px) {
  body .post-card-img {
    height: 351px;
  }
}
