/* DESIGN SYSTEM & GLOBAL VARIABLES - MODERN DARK MODE */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Inter', var(--font-sans);
  --font-mono: 'Courier New', Courier, monospace;

  /* Color Palette - Professional Dark Mode */
  --bg-app: #0A0A0A;
  --bg-sidebar: #000000;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #EDEDED;

  /* Brand & Accent Colors */
  --color-primary: #EDEDED;
  --color-primary-hover: #FFFFFF;
  --color-secondary: #888888;
  --color-accent: #0070F3;

  --instagram-pink: #d62976;
  --instagram-grad: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --facebook-blue: #1877f2;

  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #06b6d4;

  /* Text Colors */
  --text-primary: #EDEDED;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;

  /* Transitions */
  --transition-fast: all 0.15s ease;
  --transition-normal: all 0.25s ease;

  /* Box Shadow */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-neon: 0 0 0 rgba(0, 0, 0, 0);
  --shadow-neon-secondary: 0 0 0 rgba(0, 0, 0, 0);
}

/* BASE STYLES & RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* APP CONTAINER LAYOUT */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR NAVIGATION */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  color: #000;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  font-weight: 500;
}

.nav-item .material-symbols-rounded {
  font-size: 22px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

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

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* MAIN CONTENT AREA */
.main-content {
  flex-grow: 1;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: calc(100vw - 280px);
  overflow-y: auto;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

#page-title {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

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

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-0 {
  margin-bottom: 0;
}

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

/* Badges for connection status */
.connection-status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mock-badge {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.real-badge {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.2);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
}

.dot.pulse {
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

/* PROFESSIONAL CARD STYLES */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

/* TAB VISIBILITY */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* METRICS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.card-icon .material-symbols-rounded {
  font-size: 26px;
}

.post-icon {
  background: linear-gradient(135deg, #818cf8, #4f46e5);
}

.scheduled-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.reach-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.engagement-icon {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.metric-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.metric-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.metric-trend.positive {
  color: var(--color-success);
}

.metric-trend.negative {
  color: var(--color-danger);
}

.metric-trend.neutral {
  color: var(--text-muted);
}

.metric-trend .material-symbols-rounded {
  font-size: 14px;
}

/* CHARTS & LISTS GRID */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.chart-card {
  display: flex;
  flex-direction: column;
}

.custom-chart-wrapper {
  display: flex;
  gap: 1rem;
  height: 220px;
  position: relative;
  margin-top: 1rem;
  padding-bottom: 20px;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 30px;
  text-align: right;
  height: calc(100% - 20px);
}

.chart-bars-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  flex-grow: 1;
  border-bottom: 1px solid var(--border-color);
  height: calc(100% - 20px);
  padding: 0 10px;
}

.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 10%;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.bar-pair {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 100%;
  width: 100%;
  justify-content: center;
}

.bar {
  width: 8px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease-in-out;
}

.instagram-bar {
  background: var(--instagram-grad);
}

.facebook-bar {
  background-color: var(--facebook-blue);
}

.bar-label {
  position: absolute;
  bottom: -22px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.instagram-bg {
  background: var(--instagram-grad);
}

.facebook-bg {
  background-color: var(--facebook-blue);
}

.platform-share-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.share-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.share-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.05);
}

.reels-color {
  color: var(--instagram-pink);
}

.post-color {
  color: var(--color-primary);
}

.story-color {
  color: var(--color-warning);
}

.share-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.share-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.share-value {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 80px;
}

.share-value span {
  font-weight: 700;
  font-size: 0.95rem;
}

.progress-bar-sm {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
}

.reels-bg {
  background-color: var(--instagram-pink);
}

.post-bg {
  background-color: var(--color-primary);
}

.story-bg {
  background-color: var(--color-warning);
}

/* COMPOSER TAB GRID LAYOUT */
.composer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

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

/* FORM ELEMENTS */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

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

.platform-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.platform-btn i {
  font-size: 1.25rem;
}

.platform-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.platform-btn.active.instagram-select {
  border-color: var(--instagram-pink);
  color: white;
  background: rgba(214, 41, 118, 0.1);
  box-shadow: 0 0 10px rgba(214, 41, 118, 0.15);
}

.platform-btn.active.facebook-select {
  border-color: var(--facebook-blue);
  color: white;
  background: rgba(24, 119, 242, 0.1);
  box-shadow: 0 0 10px rgba(24, 119, 242, 0.15);
}

.platform-btn.active.threads-select {
  border-color: #ffffff;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.check-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-success);
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  border: 2px solid var(--bg-app);
}

.check-badge .material-symbols-rounded {
  font-size: 12px;
  font-weight: 900;
}

.platform-btn.active .check-badge {
  display: flex;
}

/* Post Type Selector */
.post-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.type-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.type-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.type-btn.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-neon);
}

.type-btn .material-symbols-rounded {
  font-size: 24px;
}

/* Media Upload Area */
.media-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.01);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-upload-area:hover {
  border-color: var(--color-primary);
  background-color: rgba(99, 102, 241, 0.02);
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.upload-icon {
  font-size: 40px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.media-upload-area:hover .upload-icon {
  color: var(--color-primary);
  transform: translateY(-3px);
}

.upload-title {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Upload Preview */
.upload-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b0f19;
}

.upload-preview img,
.upload-preview video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.btn-remove-media {
  background-color: rgba(239, 68, 68, 0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.btn-remove-media:hover {
  background-color: var(--color-danger);
  transform: scale(1.1);
}

/* Upload Progress Bar */
.upload-progress {
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.progress-bar-wrapper {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  transition: width 0.1s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Textarea Controls */
.caption-label-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.character-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
  transition: var(--transition-fast);
}

select.form-control {
  appearance: auto;
}

select.form-control option {
  background-color: var(--bg-app);
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: #888888;
  box-shadow: 0 0 0 1px #888888;
  background: rgba(255, 255, 255, 0.05);
}

.textarea-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  position: relative;
}

.action-mini-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-mini-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
}

.hashtag-helper {
  display: flex;
  gap: 0.5rem;
}

.tag-badge {
  font-size: 0.8rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tag-badge:hover {
  background-color: rgba(99, 102, 241, 0.1);
  border-color: var(--color-primary);
  color: white;
}

/* Emoji Popup Window */
.emoji-popup {
  position: absolute;
  bottom: 45px;
  left: 0;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  width: 140px;
}

.emoji-item {
  font-size: 1.25rem;
  padding: 0.25rem;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.emoji-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Toggle Switch Slider */
.schedule-toggle-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

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

input:focus+.slider {
  box-shadow: 0 0 1px var(--color-primary);
}

input:checked+.slider:before {
  transform: translateX(24px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.schedule-time-inputs {
  margin-top: 1rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.input-datetime-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.form-control-datetime {
  background: transparent;
  border: none;
  color: white;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.form-control-datetime:focus {
  outline: none;
}

/* BUTTONS - PROFESSIONAL DARK MODE */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--color-primary);
  color: #000;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.form-actions {
  display: flex;
  gap: 1rem;
}

.form-actions .btn {
  flex-grow: 1;
}

/* SMARTPHONE SIMULATOR PREVIEW */
.preview-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.preview-tabs {
  display: flex;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  width: 100%;
}

.preview-tab-btn {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.preview-tab-btn i {
  font-size: 1.1rem;
}

.preview-tab-btn:hover {
  color: white;
}

.preview-tab-btn.active {
  background-color: rgba(255, 255, 255, 0.06);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* iPhone 17 Pro Style Phone Frame */
.smartphone-simulator {
  width: 330px;
  height: 680px;
  background: linear-gradient(145deg, #4b4b4b, #222222, #000000);
  border-radius: 50px;
  padding: 12px;
  box-shadow:
    0px 30px 60px rgba(0, 0, 0, 0.8),
    inset 0px 2px 6px rgba(255, 255, 255, 0.3),
    inset 0px -2px 6px rgba(255, 255, 255, 0.1),
    0 0 0 2px rgba(255, 255, 255, 0.1),
    0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Side Buttons */
.smartphone-simulator::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 120px;
  width: 3px;
  height: 30px;
  background: #333;
  border-radius: 2px 0 0 2px;
  box-shadow: 0 45px 0 #333, 0 100px 0 #333;
  /* Action, Vol Up, Vol Down */
}

.smartphone-simulator::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 140px;
  width: 3px;
  height: 45px;
  background: #333;
  border-radius: 0 2px 2px 0;
}

.phone-frame {
  width: 100%;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;
  background-color: #000;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.phone-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Dynamic Island */
.phone-screen::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 14px;
  z-index: 9999;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Status Bar Mock */
.phone-status-bar {
  height: 24px;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: white;
  z-index: 99;
  background-color: rgba(0, 0, 0, 0.3);
  font-weight: 600;
}

.status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* Mock App Container */
.mock-app-container {
  display: none;
  flex-direction: column;
  flex-grow: 1;
  background-color: #000;
  position: relative;
}

.mock-app-container.active {
  display: flex;
}

/* INSTAGRAM SIMULATOR SPECIFICS */
#mock-ig-container {
  background-color: #000;
  color: white;
}

.ig-header {
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
  background-color: #000;
}

.ig-header-title {
  font-size: 14px;
}

.ig-header .material-symbols-rounded {
  font-size: 20px;
  cursor: pointer;
}

.ig-screen-content {
  flex-grow: 1;
  overflow-y: auto;
  scrollbar-width: none;
  /* Hide scrollbar for layout */
}

.ig-screen-content::-webkit-scrollbar {
  display: none;
}

/* IG Post Feed view */
.ig-post-view {
  display: none;
}

.ig-post-view.active {
  display: block;
}

.ig-post-author {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 8px;
}

.ig-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ig-author-info {
  display: flex;
  flex-direction: column;
}

.ig-author-name {
  font-size: 12px;
  font-weight: 700;
}

.ig-post-location {
  font-size: 10px;
  color: #ccc;
}

.icon-right {
  margin-left: auto;
  font-size: 18px;
}

.ig-post-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ig-post-media img,
.ig-post-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ig-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #555;
  gap: 0.5rem;
  font-size: 12px;
  text-align: center;
  padding: 1rem;
}

.ig-media-placeholder.dikey {
  aspect-ratio: 9 / 16;
}

.ig-media-placeholder .material-symbols-rounded {
  font-size: 36px;
}

.ig-post-actions {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
}

.actions-left {
  display: flex;
  gap: 12px;
}

.ig-post-actions .material-symbols-rounded {
  font-size: 20px;
}

.ig-post-details {
  padding: 0 10px 15px 10px;
  font-size: 12px;
}

.likes-count {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.ig-caption-text {
  line-height: 1.4;
  word-break: break-word;
}

.caption-author {
  font-weight: 700;
  margin-right: 5px;
}

/* IG Reels View */
.ig-reels-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
}

.reels-media-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.reels-media-container img,
.reels-media-container video,
.tt-media-container img,
.tt-media-container video,
.th-media-container img,
.th-media-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-media-container img,
.yt-media-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reels-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80%;
  padding: 15px 12px 25px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 10;
}

.reels-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.reels-author-name {
  font-size: 12px;
  font-weight: 700;
}

.reels-follow-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  color: white;
  font-weight: 600;
}

.reels-caption-text {
  font-size: 11px;
  margin-bottom: 10px;
  max-height: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;

  -webkit-box-orient: vertical;
}

.reels-music {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  width: 150px;
  overflow: hidden;
  white-space: nowrap;
}

.reels-music .material-symbols-rounded {
  font-size: 12px;
}

.marquee-text {
  display: inline-block;
  animation: marquee 10s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.reels-overlay-right {
  position: absolute;
  bottom: 30px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 10;
}

.reels-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  gap: 3px;
}

.reels-action-item .material-symbols-rounded,
.reels-action-item i {
  font-size: 20px;
}

.reels-audio-thumbnail {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid white;
  overflow: hidden;
  animation: rotateDisc 4s linear infinite;
}

.reels-audio-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes rotateDisc {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* IG Story View */
.ig-story-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  flex-direction: column;
}

.story-progress-indicator {
  position: absolute;
  top: 32px;
  left: 10px;
  right: 10px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  z-index: 15;
}

.story-bar-active {
  width: 40%;
  height: 100%;
  background-color: white;
  border-radius: 2px;
}

.story-author-header {
  position: absolute;
  top: 42px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.story-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid white;
  object-fit: cover;
}

.story-author-name {
  font-size: 11px;
  font-weight: 700;
}

.story-time {
  font-size: 10px;
  color: #ccc;
}

.story-media-container {
  width: 100%;
  height: 100%;
}

.story-media-container img,
.story-media-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-reply-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 12px 20px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 15;
}

.story-reply-input {
  flex-grow: 1;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 11px;
  color: #eee;
  background-color: rgba(0, 0, 0, 0.2);
}

.story-reply-footer .material-symbols-rounded {
  font-size: 20px;
}

/* FACEBOOK SIMULATOR SPECIFICS */
#mock-fb-container {
  background-color: #18191a;
  color: #e4e6eb;
}

.fb-header {
  height: 44px;
  background-color: #242526;
  border-bottom: 1px solid #3e4042;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.fb-header-title {
  font-size: 14px;
  font-weight: 600;
}

.fb-header .material-symbols-rounded {
  font-size: 20px;
}

.fb-post-btn-mock {
  background-color: #2d88ff;
  border: none;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.fb-screen-content {
  flex-grow: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.fb-screen-content::-webkit-scrollbar {
  display: none;
}

/* FB Feed Post View */
.fb-post-view {
  display: none;
  background-color: #242526;
}

.fb-post-view.active {
  display: block;
}

.fb-post-author {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 8px;
}

.fb-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.fb-author-info {
  display: flex;
  flex-direction: column;
}

.fb-author-name {
  font-size: 12px;
  font-weight: 600;
}

.fb-author-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #b0b3b8;
}

.globe-icon {
  font-size: 10px !important;
}

.fb-caption-text {
  font-size: 12px;
  padding: 0 10px 10px 10px;
  line-height: 1.4;
  word-break: break-word;
}

.fb-post-media {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  /* Standard FB Link/Image ratio */
  background-color: #18191a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-top: 1px solid #3e4042;
  border-bottom: 1px solid #3e4042;
}

.fb-post-media img,
.fb-post-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #4e4f50;
  gap: 0.5rem;
  font-size: 12px;
  text-align: center;
  padding: 1rem;
}

.fb-media-placeholder .material-symbols-rounded {
  font-size: 36px;
}

.fb-post-stats {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 11px;
  color: #b0b3b8;
  border-bottom: 1px solid #3e4042;
}

.stats-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fb-likes-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #1877f2;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
}

.fb-post-actions-buttons {
  display: flex;
  border-bottom: 1px solid #3e4042;
}

.fb-action-btn {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #b0b3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.fb-action-btn .material-symbols-rounded {
  font-size: 16px;
}

/* FB Reels View */
.fb-reels-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
}

.fb-reels-media-container {
  width: 100%;
  height: 100%;
}

.fb-reels-media-container img,
.fb-reels-media-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-reels-actions-right {
  position: absolute;
  bottom: 40px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 10;
}

/* FB Story View */
.fb-story-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
}

.fb-story-header {
  position: absolute;
  top: 42px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 15;
}

.fb-story-author {
  font-size: 11px;
  font-weight: 600;
}

.fb-story-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 12px 20px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 15;
}

.fb-reply-box {
  flex-grow: 1;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 11px;
  color: #ccc;
  background-color: rgba(255, 255, 255, 0.1);
}

.fb-story-footer .material-symbols-rounded {
  font-size: 20px;
}

/* DEVELOPER CONSOLE CARD */
.console-card {
  border-color: rgba(255, 255, 255, 0.05);
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.75rem;
}

.console-title-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-icon {
  color: var(--color-info);
  font-size: 20px;
}

.btn-clear-console {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-clear-console:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.console-output {
  background-color: #05070c;
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.825rem;
  height: 160px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.console-line {
  display: block;
  line-height: 1.6;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.system-line {
  color: var(--text-muted);
}

.istek-line {
  color: var(--color-info);
}

.yanit-line {
  color: var(--color-success);
}

.hata-line {
  color: var(--color-danger);
}

.sim-line {
  color: var(--color-warning);
}

/* POST HISTORY TABLE */
.card-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
}

.history-table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.history-table th,
.history-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.history-table th {
  color: var(--text-secondary);
  font-weight: 600;
}

.history-row:hover {
  background-color: rgba(255, 255, 255, 0.01);
}

.history-media-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

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

.history-caption {
  max-width: 250px;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-platforms {
  display: flex;
  gap: 8px;
  font-size: 1.1rem;
}

.instagram-color {
  color: var(--instagram-pink);
}

.facebook-color {
  color: var(--facebook-blue);
}

.history-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.type-badge {
  background-color: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.reels-badge {
  background-color: rgba(214, 41, 118, 0.15);
  color: #f472b6;
}

.story-badge {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.success-badge {
  color: var(--color-success);
}

.pending-badge {
  color: var(--color-warning);
}

.success-badge .dot {
  background-color: var(--color-success);
}

.pending-badge .dot {
  background-color: var(--color-warning);
}

.history-metrics {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* SETTINGS PANEL SPECIFICS */
.settings-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}

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

.toggle-button-group {
  display: flex;
  gap: 1rem;
}

.btn-toggle-mode {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 0.85rem;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-toggle-mode:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.btn-toggle-mode.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--color-primary);
  color: white;
}

.form-desc {
  line-height: 1.4;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* GUIDE CARDS */
.settings-guide-card {
  background: linear-gradient(135deg, rgba(22, 28, 45, 0.4) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.guide-step {
  display: flex;
  gap: 1rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.step-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-content p {
  line-height: 1.4;
}

.step-content code {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  color: #f472b6;
  display: inline-block;
  margin-top: 0.25rem;
}

/* =========================================
   LOGIN OVERLAY STYLES
   ========================================= */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease-in-out;
}

.login-overlay.active {
  opacity: 1;
  visibility: visible;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.logo-icon.large {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.logo-icon.large .material-symbols-rounded {
  font-size: 32px;
}

.login-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff, #cbd5e1);

  -webkit-text-fill-color: transparent;
}

.btn-facebook {
  background-color: #1877f2;
  color: white;
  width: 100%;
  justify-content: center;
  font-size: 1.1rem;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.4);
  transition: all 0.3s ease;
}

.btn-facebook:hover {
  background-color: #166fe5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.6);
}

.btn-facebook i {
  font-size: 1.4rem;
  margin-right: 8px;
}

.login-footer {
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* =========================================
   RESPONSIVE (MOBILE) STYLES
   ========================================= */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .brand {
    margin-bottom: 1rem;
  }

  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
  }

  .nav-item {
    padding: 0.6rem;
    flex-shrink: 0;
  }

  .nav-item span:not(.material-symbols-rounded) {
    display: none;
    /* Hide text on mobile tabs to fit them in one row */
  }

  .user-profile {
    display: none;
    /* Hide user profile on small screens to save space */
  }

  .main-content {
    padding: 1rem;
    max-width: 100%;
    width: 100%;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .form-row-2,
  .form-row-3,
  .form-row-4 {
    grid-template-columns: 1fr !important;
  }

  .composer-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  .stat-grid {
    grid-template-columns: 1fr !important;
  }

  .glass-card {
    padding: 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  .card-header-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Keep history tables scrollable horizontally, but don't let them expand their container */
  .history-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Scale simulator on mobile to prevent horizontal overflow */
  .smartphone-simulator {
    transform: scale(0.85) !important;
    transform-origin: top center !important;
    margin-bottom: -100px !important;
    max-width: 100% !important;
  }

  @media (max-width: 480px) {
    .smartphone-simulator {
      transform: scale(0.75) !important;
      transform-origin: top center !important;
      margin-bottom: -170px !important;
    }
  }

  /* Stack actions vertically on mobile */
  .form-actions {
    flex-direction: column-reverse !important;
    gap: 10px !important;
  }

  .form-actions .btn {
    width: 100% !important;
  }

  /* Optimize preview tabs for mobile screens by hiding text and showing only icons */
  .preview-tabs {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  .preview-tab-btn {
    font-size: 0 !important;
    padding: 10px !important;
    flex: 1 !important;
  }

  .preview-tab-btn i {
    font-size: 1.25rem !important;
    margin: 0 !important;
  }

  .mock-device-container {
    transform: scale(0.9);
    transform-origin: top center;
  }

  /* Calendar Responsive Fixes */
  .fc .fc-toolbar {
    flex-direction: column;
    gap: 1rem;
  }

  .fc .fc-toolbar-title {
    font-size: 1.4rem !important;
    text-align: center;
  }

  .fc .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Custom Premium Calendar Styling - Glassmorphism WOW Edition */
.custom-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.custom-cal-header h2 {
  font-size: 2rem;
  font-weight: 800;
  background: var(--color-primary);

  -webkit-text-fill-color: transparent;
  margin: 0;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 20px rgba(165, 180, 252, 0.3);
}

.cal-controls {
  display: flex;
  gap: 12px;
}

.cal-controls button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.cal-controls button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.cal-controls .btn-today {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: none;
  padding: 8px 24px;
}

.cal-controls .btn-today:hover {
  background: linear-gradient(135deg, #818cf8, #c084fc);
}

.custom-cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 15px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 700;
  color: #c4b5fd;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.custom-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 15px;
}

.custom-cal-cell {
  background: rgba(15, 15, 20, 0.4);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 140px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.custom-cal-cell:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.custom-cal-cell.muted {
  opacity: 0.4;
}

.custom-cal-cell.today {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.custom-cal-cell.weekend {
  background: rgba(255, 255, 255, 0.035);
}

.custom-cal-cell.weekend:hover {
  background: rgba(255, 255, 255, 0.07);
}


.custom-cal-cell.today::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 0 30px rgba(99, 102, 241, 0.2);
  pointer-events: none;
}

.date-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: color 0.3s ease;
}

.custom-cal-cell:hover .date-num {
  color: #fff;
}

.custom-cal-cell.today .date-num {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.events-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.cal-event {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  transition: all 0.2s ease;
}

.cal-event:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.8));
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.cal-event.status-published {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
  border-color: rgba(16, 185, 129, 0.3);
}

.cal-event.status-published:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.8), rgba(5, 150, 105, 0.8));
}

.ev-icon {
  font-size: 14px;
}

/* Fix for Filerobot Popovers (Color Picker) hidden behind modal */
div[class*="SfxPopover"],
div[class*="FIE_popover"],
.SfxPopover-root {
  z-index: 99999 !important;
}

/* Multi-Tag Input UI */
.tags-input-container {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 12px;
  transition: border-color 0.3s;
}

.tags-input-container:focus-within {
  border-color: var(--primary-color);
}

.tag-chip {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
}

.tag-chip:hover {
  background: rgba(59, 130, 246, 0.3);
}

/* Mobile responsive styles for custom calendar */
@media (max-width: 768px) {
  .custom-cal-header h2 {
    font-size: 1.3rem;
  }

  .cal-controls button {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 8px;
    gap: 4px;
  }

  .cal-controls .btn-today {
    padding: 6px 12px;
  }

  .custom-cal-days-header {
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    letter-spacing: 0;
  }

  .custom-cal-grid {
    gap: 4px;
  }

  .custom-cal-cell {
    min-height: 70px !important;
    padding: 4px !important;
    border-radius: 10px !important;
  }

  .date-num {
    font-size: 0.85rem;
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
  }

  .events-container {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: auto;
  }

  .cal-event {
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    justify-content: center !important;
    align-items: center !important;
    display: inline-flex !important;
    flex-shrink: 0;
  }

  .cal-event span:not(.ev-icon) {
    display: none !important;
  }

  .ev-icon {
    font-size: 11px !important;
    margin: 0 !important;
  }
}

/* Premium Modal System */
.custom-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.custom-modal-content {
  background: var(--bg-surface, #1e1e2f);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 100%;
  position: relative;
  padding: 30px;
  transform: scale(0.95);
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  max-height: 90vh;
  overflow-y: auto;
}

/* Large modals: composer-grid and AI influencer */
.custom-modal-content.large {
  max-width: 1200px;
  padding: 20px;
}

.custom-modal-close {
  position: absolute;
  right: 24px;
  top: 20px;
  z-index: 100;
  font-size: 28px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.custom-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Choice Cards */
.choice-card-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 25px;
}

.choice-card {
  flex: 1;
  min-width: 220px;
  padding: 25px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.choice-card .material-symbols-rounded {
  font-size: 48px;
  transition: transform 0.3s ease;
}

.choice-card.ai-choice {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
  border-color: rgba(139, 92, 246, 0.2);
}

.choice-card.ai-choice:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(236, 72, 153, 0.15) 100%);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.2);
  transform: translateY(-5px);
}

.choice-card.ai-choice:hover .material-symbols-rounded {
  transform: scale(1.15) rotate(5deg);
  color: #c084fc;
}

.choice-card.regular-choice {
  background: rgba(255, 255, 255, 0.03);
}

.choice-card.regular-choice:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
}

.choice-card.regular-choice:hover .material-symbols-rounded {
  transform: scale(1.15) translateY(-2px);
  color: #a5b4fc;
}

/* Responsive Modals */
@media (max-width: 768px) {
  .custom-modal {
    padding: 10px;
    align-items: flex-start;
  }

  .custom-modal-content {
    padding: 20px;
    border-radius: 18px;
    margin-top: 30px;
    max-height: 90vh;
  }

  .custom-modal-content.large {
    padding: 15px 10px;
  }

  .custom-modal-close {
    right: 15px;
    top: 15px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }

  .choice-card-container {
    flex-direction: column;
    gap: 15px;
  }

  .choice-card {
    min-width: 100%;
    padding: 20px 15px;
    flex-direction: row;
    text-align: left;
    gap: 15px;
  }

  .choice-card .material-symbols-rounded {
    font-size: 32px;
  }

  .choice-card div {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
}

/* Modals Nested Element Overrides - Resolves the double card background/border and extra padding issues */
.custom-modal-content .glass-card,
.custom-modal-content .composer-form-container,
.custom-modal-content .influencer-grid,
.custom-modal-content .composer-grid>div {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.custom-modal-content .composer-grid {
  gap: 1.5rem !important;
}

.custom-modal-content .form-group {
  margin-bottom: 1.2rem !important;
}

.custom-modal-content h2 {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.6rem !important;
  margin-bottom: 12px !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: #fff !important;
}

.custom-modal-content .text-muted {
  margin-bottom: 15px !important;
  font-size: 0.85rem !important;
}

.custom-modal-content .smartphone-simulator {
  transform: scale(0.9) !important;
  margin-top: -20px !important;
}

@media (max-width: 768px) {
  .custom-modal-content .smartphone-simulator {
    transform: scale(0.8) !important;
    margin-top: 10px !important;
  }
}

/* =========================================
   PREMIUM COMPOSER FORM UPGRADES
   ========================================= */

/* Stepper/Card Containers */
.composer-section-card {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 20px !important;
  padding: 24px !important;
  margin-bottom: 24px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.composer-section-card:hover {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
}

.composer-section-card .section-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  margin-bottom: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #fff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding-bottom: 12px !important;
}

.composer-section-card .section-title .material-symbols-rounded {
  font-size: 22px !important;
  color: #a5b4fc !important;
}

/* Profile Account Selection Grid */
.account-selectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.account-select-card {
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  transition: all 0.25s ease !important;
}

.account-select-card:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.account-select-card.active-profile {
  border-color: rgba(99, 102, 241, 0.4) !important;
  background: rgba(99, 102, 241, 0.04) !important;
}

.account-card-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
}

.account-card-header i {
  font-size: 1.05rem !important;
}

.account-select-card select.form-control {
  background-color: rgba(0, 0, 0, 0.4) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  font-size: 0.85rem !important;
  width: 100% !important;
  outline: none !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  padding-right: 28px !important;
}

.account-select-card select.form-control:focus {
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05) !important;
}

/* Beautiful Platform Badges active glows */
.platform-btn:hover {
  transform: translateY(-2px) !important;
}

.platform-btn.active.instagram-select {
  background: linear-gradient(45deg, rgba(240, 148, 51, 0.15) 0%, rgba(230, 104, 60, 0.15) 25%, rgba(220, 39, 67, 0.15) 50%, rgba(204, 35, 102, 0.15) 75%, rgba(188, 24, 136, 0.15) 100%) !important;
  border-color: var(--instagram-pink) !important;
  box-shadow: 0 4px 15px rgba(220, 39, 67, 0.25) !important;
}

.platform-btn.active.facebook-select {
  background: rgba(24, 119, 242, 0.15) !important;
  border-color: var(--facebook-blue) !important;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.25) !important;
}

.platform-btn.active.threads-select {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #fff !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15) !important;
}

.platform-btn.active.tiktok-select {
  background: rgba(0, 242, 254, 0.1) !important;
  border-color: #00f2fe !important;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2) !important;
}

.platform-btn.active.youtube-select {
  background: rgba(255, 0, 0, 0.1) !important;
  border-color: #ff0000 !important;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.25) !important;
}

/* Post Format Segmented Pill Bar */
.post-type-grid {
  background: rgba(0, 0, 0, 0.25) !important;
  padding: 5px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 5px !important;
}

.type-btn {
  border: none !important;
  background: transparent !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-size: 0.85rem !important;
  flex-direction: row !important;
  justify-content: center !important;
  gap: 6px !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  flex: 1 1 auto !important;
}

.type-btn:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

.type-btn.active {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

/* Elegant Chips for Hashtags, Mentions, Locations */
.tags-input-container {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  min-height: 48px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-items: center !important;
  transition: all 0.25s ease !important;
}

.tags-input-container:focus-within {
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.tag-chip {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
}

.tag-chip:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.tag-chip-remove {
  cursor: pointer !important;
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
}

.tag-chip-remove:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

/* Custom premium sliders for ranges */
input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: rgba(255, 255, 255, 0.1) !important;
  height: 6px !important;
  border-radius: 3px !important;
  outline: none !important;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100% !important;
  height: 6px !important;
  cursor: pointer !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 3px !important;
}

input[type="range"]::-webkit-slider-thumb {
  height: 16px !important;
  width: 16px !important;
  border-radius: 50% !important;
  background: #fff !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
  margin-top: -5px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.1s ease !important;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25) !important;
}

/* Actions Section */
.form-actions {
  display: flex !important;
  gap: 12px !important;
  margin-top: 24px !important;
}

.form-actions .btn {
  flex: 1 !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-actions .btn-primary {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #fff !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
}

.form-actions .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.18) !important;
}

.form-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.form-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-2px) !important;
}

/* Upload zone enhancement */
.media-upload-area {
  background-color: rgba(0, 0, 0, 0.15) !important;
  border: 2px dashed rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  padding: 30px 20px !important;
  transition: all 0.3s ease !important;
}

.media-upload-area:hover {
  background-color: rgba(255, 255, 255, 0.01) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.upload-icon {
  font-size: 44px !important;
  background: linear-gradient(135deg, #a5b4fc, #c4b5fd) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  margin-bottom: 8px !important;
}

/* Connect Profile Button & Avatar Styles */
.btn-connect-profile {
  background: rgba(99, 102, 241, 0.15) !important;
  border: 1px dashed rgba(99, 102, 241, 0.4) !important;
  color: #a5b4fc !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.btn-connect-profile:hover {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(99, 102, 241, 0.8) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
}

.avatar-xs {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* ==========================================================================
   RESPONSIVE CARD TABLE SYSTEM (18-Column Grid Transformation for Mobile)
   ========================================================================== */
@media (min-width: 1201px) {
  .responsive-card-table {
    min-width: 1400px !important;
  }
}

@media (max-width: 1200px) {
  .responsive-card-table {
    display: block !important;
    width: 100% !important;
    border: none !important;
  }

  .responsive-card-table thead {
    display: none !important;
  }

  .responsive-card-table tbody {
    display: block !important;
    width: 100% !important;
  }

  .responsive-card-table tr {
    display: block !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 16px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
  }

  .responsive-card-table tr:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }

  .responsive-card-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: right !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    width: 100% !important;
    min-height: 44px !important;
    font-size: 0.9rem !important;
  }

  .responsive-card-table td:last-child {
    border-bottom: none !important;
  }

  .responsive-card-table td::before {
    content: attr(data-label) !important;
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-align: left !important;
    margin-right: 15px !important;
  }

  /* Styling highlights inside card cells */
  .responsive-card-table td strong {
    font-size: 1.05rem !important;
    color: #fff !important;
  }

  .responsive-card-table td .status-badge {
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
  }
}

/* =========================================================
   UNIFIED INBOX UI (Phase 3)
   ========================================================= */

.unified-inbox-container {
  display: flex;
  height: 80vh;
  min-height: 600px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 1. Sidebar */
.inbox-sidebar {
  width: 70px;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 15px;
}

.inbox-sidebar-item {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 20px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.inbox-sidebar-item:hover,
.inbox-sidebar-item.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.inbox-sidebar-item .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid var(--bg-surface);
}

/* 2. Message List */
.inbox-list-column {
  width: 320px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.inbox-list-header {
  padding: 15px;
  border-bottom: 1px solid var(--border-light);
}

.inbox-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

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

.inbox-list-items {
  flex: 1;
  overflow-y: auto;
}

.inbox-list-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.inbox-list-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.inbox-list-item.active {
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid var(--color-primary);
}

.inbox-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
}

.inbox-platform-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.inbox-list-item-content {
  flex: 1;
  min-width: 0;
  /* for text truncation */
}

.inbox-list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.inbox-list-item-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.inbox-preview {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.inbox-unread-dot {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #34c759;
  border-radius: 50%;
}

/* 3. Chat Column */
.inbox-chat-column {
  flex: 1;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.inbox-chat-header {
  height: 70px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
}

.chat-header-info h3 {
  margin: 0 0 2px 0;
  font-size: 1rem;
  font-weight: 600;
}

.chat-header-info p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.inbox-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  position: relative;
}

.chat-bubble.incoming {
  align-self: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-bubble.outgoing {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble-time {
  display: block;
  font-size: 0.7rem;
  margin-top: 5px;
  text-align: right;
  opacity: 0.7;
}

.inbox-chat-input-area {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 15px 20px;
}

.inbox-chat-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.chat-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.chat-tab.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
}

.inbox-input-wrapper {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px;
}

.inbox-input-wrapper textarea {
  border: none;
  background: transparent;
  width: 100%;
  resize: none;
  color: var(--text-primary);
  min-height: 60px;
  margin-bottom: 10px;
  font-family: inherit;
  outline: none;
}

.inbox-input-actions {
  display: flex;
  justify-content: flex-end;
}

.inbox-input-actions .btn {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 6px 16px;
}

/* Mobile adjustments for Inbox */
@media (max-width: 768px) {
  .unified-inbox-container {
    flex-direction: column !important;
    height: auto !important;
  }

  .inbox-sidebar {
    flex-direction: row !important;
    width: 100% !important;
    height: auto !important;
    padding: 10px !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-light) !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .inbox-sidebar-item {
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
  }

  .inbox-list-column {
    width: 100% !important;
    max-height: 40vh !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-light) !important;
  }

  .inbox-chat-column {
    width: 100% !important;
    min-height: 50vh !important;
  }
}