/* ============ APPLE DESIGN SYSTEM ============ */

/* Dark Theme (Default) */
:root, [data-theme="dark"] {
  /* Colors - Apple Dark Mode */
  --bg-primary: #000000;
  --bg-secondary: #1c1c1e;
  --bg-tertiary: #2c2c2e;
  --bg-card: #2c2c2e;
  --bg-hover: #3a3a3c;
  --bg-elevated: #3a3a3c;
  
  /* Accent Colors - Apple */
  --accent-primary: #0a84ff;
  --accent-secondary: #5e5ce6;
  --accent-success: #30d158;
  --accent-warning: #ff9f0a;
  --accent-danger: #ff453a;
  --accent-purple: #bf5af2;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.55);
  
  /* Borders */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.15);
  --divider: rgba(255, 255, 255, 0.06);
  
  /* Status Colors */
  --status-draft: rgba(255, 255, 255, 0.4);
  --status-pending: #ff9f0a;
  --status-approved: #30d158;
  --status-rejected: #ff453a;
  --status-published: #30d158;
  --status-scheduled: #bf5af2;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  
  --theme-icon: "🌙";
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f2f2f7;
  --bg-tertiary: #e5e5ea;
  --bg-card: #ffffff;
  --bg-hover: #e5e5ea;
  --bg-elevated: #ffffff;
  
  --accent-primary: #007aff;
  --accent-secondary: #5856d6;
  --accent-success: #34c759;
  --accent-warning: #ff9500;
  --accent-danger: #ff3b30;
  --accent-purple: #af52de;
  
  --text-primary: #000000;
  --text-secondary: rgba(0, 0, 0, 0.6);
  --text-muted: rgba(0, 0, 0, 0.5);
  
  --border-color: rgba(0, 0, 0, 0.1);
  --border-light: rgba(0, 0, 0, 0.08);
  --divider: rgba(0, 0, 0, 0.05);
  
  --status-draft: rgba(0, 0, 0, 0.3);
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  
  --theme-icon: "☀️";
}

/* Shared Variables */
:root {
  /* Radius - Apple Style */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Spacing */
  --sidebar-width: 220px;
  --header-height: 56px;
  
  /* Transitions */
  --transition: all 0.25s ease;
  --transition-fast: all 0.15s ease;
  
  /* Apple Typography Scale */
  --font-large-title: 34px;
  --font-title1: 28px;
  --font-title2: 22px;
  --font-title3: 20px;
  --font-headline: 17px;
  --font-body: 17px;
  --font-callout: 16px;
  --font-subhead: 15px;
  --font-footnote: 13px;
  --font-caption1: 12px;
  --font-caption2: 11px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

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

.hidden {
  display: none !important;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: width 0.25s ease;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
  width: 64px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span:not(.nav-icon),
.sidebar.collapsed .nav-label {
  display: none;
}

.sidebar.collapsed .logo {
  padding: 16px;
  justify-content: center;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .sidebar-controls {
  flex-direction: column;
  gap: 8px;
}

.sidebar.collapsed .toggle-icon {
  transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .logo {
  width: 100%;
  padding: 24px 0;
  justify-content: center;
}

/* Toggle button - positioned at bottom of sidebar, below footer */
.sidebar > .sidebar-toggle {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  padding: 10px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
  z-index: 1;
}

/* Ensure footer is above toggle */
.sidebar-footer {
  position: relative;
  z-index: 10;
  margin-bottom: 60px;
}

.sidebar > .sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar > .sidebar-toggle .toggle-svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

/* Collapsed state - toggle centered */
.sidebar.collapsed > .sidebar-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  bottom: auto;
  right: auto;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  padding: 10px;
}

.sidebar.collapsed > .sidebar-toggle .toggle-svg {
  transform: rotate(180deg);
}

.sidebar.collapsed .nav-divider {
  margin: 8px 12px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 12px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.sidebar-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
  color: var(--text-secondary);
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.toggle-icon {
  font-size: 12px;
  display: inline-block;
  transition: transform 0.25s ease;
}

.logo {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text-only {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.logo-short {
  display: none;
}

.sidebar.collapsed .logo-full {
  display: none;
}

.sidebar.collapsed .logo-short {
  display: block;
  font-size: 32px;
  letter-spacing: 0;
  text-align: center;
  width: 100%;
}

.nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  font-size: 14px;
  font-weight: 500;
}

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

.nav-item:active {
  transform: scale(0.98);
}

.nav-item.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.3);
}

.nav-icon {
  font-size: 18px;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.sidebar.collapsed .sidebar-footer {
  padding: 8px;
  border: none;
}

.sidebar.collapsed .sidebar-footer .nav-item span {
  display: none;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  font-size: 24px;
}

.user-name {
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============ MAIN CONTENT ============ */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
  height: 100vh;
  overflow: hidden;
}

.sidebar.collapsed + .main {
  margin-left: 64px;
}

/* ============ HEADER - APPLE STYLE ============ */
/* ============ HEADER - APPLE STYLE ============ */
.header {
  height: 56px;
  min-height: 56px;
  flex-shrink: 0;
  padding: 0 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav button {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.header-nav button:hover {
  background: var(--bg-hover);
}

.page-subtitle {
  color: var(--text-secondary);
  margin-top: 4px;
}

.header-right {
  display: flex;
  gap: 12px;
}

/* ============ BUTTONS - APPLE iOS STYLE ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: none;
  font-size: 15px;
  white-space: nowrap;
  letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}

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

.btn-primary {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.35);
}

.btn-primary:hover {
  background: #0077ed;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.45);
}

.btn-accent {
  background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(88, 86, 214, 0.4);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #0077ed 0%, #4f4dc4 100%);
  box-shadow: 0 4px 16px rgba(88, 86, 214, 0.5);
}

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

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

.btn-success {
  background: var(--accent-success);
  color: white;
  box-shadow: 0 2px 8px rgba(48, 209, 88, 0.35);
}

.btn-success:hover {
  background: #2fb350;
  box-shadow: 0 4px 12px rgba(48, 209, 88, 0.45);
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 69, 58, 0.35);
}

.btn-danger:hover {
  background: #ff2d20;
  box-shadow: 0 4px 12px rgba(255, 69, 58, 0.45);
}

.btn-ai {
  background: linear-gradient(135deg, #bf5af2 0%, #0a84ff 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(191, 90, 242, 0.4);
}

.btn-ai:hover {
  background: linear-gradient(135deg, #a94de0 0%, #0077ed 100%);
  box-shadow: 0 4px 16px rgba(191, 90, 242, 0.5);
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
  font-weight: 500;
}

.btn-large {
  padding: 14px 28px;
  font-size: 17px;
  border-radius: 12px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
}

/* Ghost Button - Apple Style */
.btn-ghost {
  background: transparent;
  color: var(--accent-primary);
  padding: 10px 16px;
}

.btn-ghost:hover {
  background: rgba(10, 132, 255, 0.1);
}

/* Pill Button - Apple Style */
.btn-pill {
  border-radius: 100px;
  padding: 8px 20px;
}

/* ============ CONTENT AREA - FULL WIDTH ============ */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  height: calc(100vh - 52px);
  padding: 12px 16px;
  gap: 12px;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--divider);
}

.content-body {
  flex: 1;
  overflow: auto;
}

/* ============ WEEK GRID ============ */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
}

.day-column {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  min-height: 400px;
  border: 1px solid var(--border-color);
}

.day-header {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.day-name {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.day-date {
  font-size: 24px;
  font-weight: 600;
  margin-top: 4px;
}

.day-today .day-date {
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 0;
}

.day-holiday {
  background: var(--bg-hover);
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-posts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============ POST CARD ============ */
.post-card {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid var(--status-draft);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.post-card[data-status="draft"] {
  border-left-color: var(--status-draft);
}

.post-card[data-status="pending"] {
  border-left-color: var(--status-pending);
}

.post-card[data-status="approved"] {
  border-left-color: var(--status-approved);
}

.post-card[data-status="rejected"] {
  border-left-color: var(--status-rejected);
}

.post-card[data-status="published"] {
  border-left-color: var(--status-published);
}

.post-thumbnail {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--bg-hover);
}

.post-type {
  font-size: 12px;
  color: var(--text-muted);
}

.post-preview {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 8px;
  display: inline-block;
}

.status-draft { background: var(--status-draft); color: white; }
.status-pending { background: var(--status-pending); color: white; }
.status-approved { background: var(--status-approved); color: white; }
.status-rejected { background: var(--status-rejected); color: white; }
.status-published { background: var(--status-published); color: white; }

.add-post-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.add-post-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ============ MODAL ============ */
/* ============ MODALS - APPLE STYLE ============ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 14px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.1),
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 2px 10px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 28px;
  height: 28px;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

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

.modal-close:active {
  transform: scale(0.95);
}

.modal-body {
  padding: 20px;
}

/* ============ FORMS - APPLE iOS STYLE ============ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  background: var(--bg-hover);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.15);
  background: var(--bg-secondary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238e8e93' d='M6 8.5L1.5 4h9L6 8.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* Inline form group */
.form-group-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-group-inline label {
  margin-bottom: 0;
  text-transform: none;
  font-size: 15px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* ============ UPLOAD AREAS ============ */
.upload-area,
.creative-upload {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.upload-area:hover,
.creative-upload:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.creative-preview,
.reference-preview {
  position: relative;
  margin-top: 12px;
}

.creative-preview img,
.reference-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.btn-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent-danger);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

/* ============ RADIO GROUP ============ */
.radio-group {
  display: flex;
  gap: 16px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.radio-label:has(input:checked) {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.1);
}

.radio-label input {
  width: auto;
}

/* ============ GENERATE PANEL ============ */
.generate-panel {
  max-width: 800px;
  margin: 0 auto;
}

.generate-panel h2 {
  margin-bottom: 24px;
}

.generate-form {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.generate-result {
  margin-top: 24px;
  background: var(--bg-card);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.result-preview {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-preview img,
.result-preview video {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ============ HOLIDAYS GRID ============ */
.holidays-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.holiday-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
}

.holiday-icon {
  font-size: 36px;
}

.holiday-info h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.holiday-date {
  color: var(--text-muted);
  font-size: 13px;
}

.holiday-countries {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.country-tag {
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

/* ============ APPROVAL MODAL ============ */
.modal-approval {
  max-width: 700px;
}

.approval-preview {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.approval-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.approval-preview .post-text {
  white-space: pre-wrap;
  line-height: 1.6;
}

.approval-actions {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.approval-actions .btn {
  flex: 1;
}

.rejection-reason {
  margin-top: 16px;
}

.rejection-reason textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  margin: 8px 0;
  min-height: 80px;
}

/* ============ POSTS LIST ============ */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-list-item {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition);
}

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

.post-list-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.post-list-info {
  flex: 1;
}

.post-list-date {
  font-size: 13px;
  color: var(--text-muted);
}

.post-list-preview {
  margin-top: 4px;
  color: var(--text-secondary);
}

/* ============ MONTH CALENDAR ============ */
.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 0 4px;
  flex-shrink: 0;
}

.calendar-header .day-name {
  text-align: center;
  padding: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}

.calendar-header .weekend {
  color: var(--accent-warning);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, 1fr);
  gap: 4px;
  padding: 0 4px 4px;
  flex: 1;
}

/* ============ CALENDAR DAYS - APPLE STYLE ============ */
.calendar-day {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calendar-day:hover {
  border-color: var(--accent-primary);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-day:active {
  transform: scale(0.98);
}

.calendar-day.other-month {
  background: var(--bg-secondary);
  opacity: 0.4;
}

.calendar-day.today {
  border-color: var(--accent-primary);
  box-shadow: 
    0 0 0 2px rgba(10, 132, 255, 0.25),
    0 4px 12px rgba(10, 132, 255, 0.15);
}

.calendar-day.has-post {
  background: linear-gradient(135deg, var(--bg-card), rgba(10, 132, 255, 0.08));
}

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.calendar-day-number {
  font-weight: 600;
  font-size: 14px;
}

.calendar-day.today .calendar-day-number {
  background: var(--accent-primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
}

.calendar-day-holiday {
  font-size: 10px;
  background: var(--accent-warning);
  color: #000;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.calendar-day-posts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-post-mini {
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-left: 3px solid var(--status-draft);
}

.calendar-post-mini.high-potential {
  border-left-color: var(--accent-success);
  background: rgba(16, 185, 129, 0.1);
}

.calendar-post-mini img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.post-potential-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--accent-success);
  color: white;
  font-weight: 600;
}

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

.analytics-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.analytics-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.analytics-value {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.analytics-label {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 14px;
}

.analytics-card.highlight {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.analytics-card.highlight .analytics-value {
  background: none;
  -webkit-text-fill-color: white;
  color: white;
}

.analytics-card.highlight .analytics-label {
  color: rgba(255,255,255,0.8);
}

/* Charts Row */
.analytics-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.chart-card.wide {
  grid-column: 1 / -1;
}

.chart-card h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

.chart-container {
  position: relative;
  height: 250px;
}

.chart-card.wide .chart-container {
  height: 200px;
}

/* Two Column Layout */
.analytics-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Best Time Summary */
.best-time-summary {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border-color);
}

.best-time-summary h3 {
  margin-bottom: 16px;
}

.best-time-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.rec-card {
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rec-icon {
  font-size: 24px;
}

.rec-content {
  display: flex;
  flex-direction: column;
}

.rec-content strong {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rec-content span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .analytics-charts-row,
  .analytics-two-col {
    grid-template-columns: 1fr;
  }
  
  .best-time-cards {
    grid-template-columns: 1fr;
  }
}

.top-posts, .recommendations-summary {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.top-posts h3, .recommendations-summary h3 {
  margin-bottom: 16px;
}

.top-post-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 8px;
}

.top-post-rank {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-primary);
  min-width: 40px;
}

.top-post-info {
  flex: 1;
}

.top-post-date {
  font-size: 12px;
  color: var(--text-muted);
}

.top-post-text {
  margin-top: 4px;
  font-size: 14px;
}

.top-post-score {
  background: var(--accent-success);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.recommendation-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  border-left: 3px solid var(--accent-primary);
}

.recommendation-icon {
  font-size: 20px;
}

.best-time-summary .recommendation-item {
  border-left: none;
  background: rgba(59, 130, 246, 0.1);
}

/* ============ MODAL TWO COLUMN ============ */
.modal-large {
  max-width: 900px;
}

.modal-two-column {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

.modal-right {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 20px;
}

.post-analysis h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

.potential-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 16px;
}

.score-label {
  color: var(--text-secondary);
  margin-right: 8px;
}

.score-value {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-success), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-max {
  color: var(--text-muted);
  font-size: 20px;
}

.analysis-text {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  font-size: 14px;
}

.target-audience, .expected-reach {
  margin-bottom: 8px;
  font-size: 13px;
}

.target-audience strong, .expected-reach strong {
  color: var(--text-secondary);
}

.recommendations-list {
  list-style: none;
  padding: 0;
}

.recommendations-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
}

.recommendations-list li:last-child {
  border-bottom: none;
}

.recommendations-list li::before {
  content: '💡 ';
}

/* ============ FORM ROW ============ */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row:has(.form-group:nth-child(3)) {
  grid-template-columns: 1fr 1fr 1fr;
}

/* ============ CREATIVE SECTION ============ */
.creative-section {
  margin-bottom: 20px;
}

.creative-preview-large {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  margin-bottom: 12px;
}

.creative-preview-large img,
.creative-preview-large video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creative-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.creative-placeholder span {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

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

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-ai {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: white;
  border: none;
}

.btn-ai:hover {
  opacity: 0.9;
}

/* ============ LABEL WITH ACTION ============ */
.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.label-with-action label {
  margin-bottom: 0;
}

.template-select {
  flex: 1;
  max-width: 180px;
  padding: 6px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}

.template-select:hover {
  border-color: var(--accent-primary);
}

/* ============ AI MODAL ============ */
#aiModal .modal-content {
  max-width: 600px;
}

.ai-result {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.ai-result h4 {
  margin-bottom: 12px;
  color: var(--text-secondary);
}

#aiResultContent {
  max-height: 400px;
  overflow-y: auto;
}

#aiResultContent img {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

#aiResultContent p {
  white-space: pre-wrap;
  line-height: 1.6;
}

/* ============ FILTERS ============ */
.posts-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: var(--bg-hover);
}

.filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  .week-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 70px;
  }
  
  .logo-text,
  .nav-item span:not(.nav-icon),
  .user-name {
    display: none;
  }
  
  .main {
    margin-left: 70px;
  }
  
  .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .week-grid {
    grid-template-columns: 1fr;
  }
  
  .header {
    flex-direction: column;
    height: auto;
    padding: 16px;
    gap: 12px;
  }
  
  .header-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ============ POST DETAIL MODAL - APPLE STYLE ============ */
.modal-fullscreen {
  width: 90vw;
  max-width: 1200px;
  height: 85vh;
  max-height: 800px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.post-detail-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: 100%;
}

/* Left: Creative Preview */
.post-detail-left {
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border-right: 1px solid var(--divider);
}

.creative-full-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.creative-full-preview img,
.creative-full-preview video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.creative-placeholder-large {
  text-align: center;
  color: var(--text-muted);
}

.creative-placeholder-large .placeholder-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.5;
}

.creative-placeholder-large p {
  margin-bottom: 24px;
  font-size: var(--font-body);
}

/* Right: Post Details */
.post-detail-right {
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Compact Header */
.compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: var(--font-caption1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.draft { background: var(--bg-tertiary); color: var(--text-secondary); }
.status-badge.pending { background: rgba(255, 159, 10, 0.15); color: var(--accent-warning); }
.status-badge.approved { background: rgba(48, 209, 88, 0.15); color: var(--accent-success); }
.status-badge.scheduled { background: rgba(191, 90, 242, 0.15); color: var(--accent-purple); }
.status-badge.published { background: rgba(48, 209, 88, 0.15); color: var(--accent-success); }

/* Status Select in Header */
.status-select {
  padding: 8px 32px 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid #8e8e93;
  cursor: pointer;
  appearance: none;
  background-color: #8e8e93;
  color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all 0.2s;
  min-width: 120px;
}

.status-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

/* Status colors - solid backgrounds for visibility */
.status-select[value="draft"],
.status-select option[value="draft"] { 
  background-color: #8e8e93; 
  color: white; 
  border-color: #8e8e93;
}

.status-select[value="review"] { 
  background-color: #ff9f0a; 
  color: white; 
  border-color: #ff9f0a;
}

.status-select[value="approved"] { 
  background-color: #34c759; 
  color: white; 
  border-color: #34c759;
}

.status-select[value="scheduled"] { 
  background-color: #007aff; 
  color: white; 
  border-color: #007aff;
}

.status-select[value="published"] { 
  background-color: #af52de; 
  color: white; 
  border-color: #af52de;
}

.header-title {
  font-size: var(--font-headline);
  font-weight: 600;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Compact Toolbar */
.compact-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--divider);
}

.detail-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-footnote);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: white;
}

.quick-actions {
  display: flex;
  gap: 6px;
}

.action-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: var(--font-footnote);
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.action-btn.small {
  padding: 6px 10px;
}

/* Tab Content Wrapper */
.tab-content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.tab-content {
  animation: fadeIn 0.2s ease;
}

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

.post-detail-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-detail-header h2 {
  font-size: 20px;
}

/* Status Workflow */
.status-workflow {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-tertiary);
  gap: 4px;
  overflow-x: auto;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 70px;
  opacity: 0.5;
}

.status-step.active {
  opacity: 1;
}

.status-step.completed {
  opacity: 1;
}

.status-step.completed .status-dot {
  background: var(--accent-success);
}

.status-step.active .status-dot {
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

.status-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border-color);
  transition: var(--transition);
}

.status-step span {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.status-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  min-width: 20px;
}

.status-line.completed {
  background: var(--accent-success);
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.action-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.action-btn:hover {
  background: var(--bg-hover);
}

.action-btn.success {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-success);
  color: var(--accent-success);
}

.action-btn.success:hover {
  background: var(--accent-success);
  color: white;
}

.action-btn.danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

.action-btn.danger:hover {
  background: var(--accent-danger);
  color: white;
}

.action-btn.primary {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.action-btn.primary:hover {
  background: var(--accent-primary);
  color: white;
}

.action-btn.instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  border: none;
  color: white;
}

.action-btn.instagram:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* Detail Tabs */
.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* Tab Content */
.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.tab-content.hidden {
  display: none;
}

/* Form Actions */
.form-actions-sticky {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  margin-top: 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

/* Character Count */
.char-count {
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Hashtag Suggestions */
.hashtag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hashtag-suggestions span {
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  font-size: 11px;
  color: var(--accent-primary);
  cursor: pointer;
  transition: var(--transition);
}

.hashtag-suggestions span:hover {
  background: var(--accent-primary);
  color: white;
}

/* Analytics Tab */
.analysis-section {
  margin-bottom: 24px;
}

.analysis-section h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

.potential-display {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.potential-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-success), var(--accent-primary));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.potential-number {
  font-size: 32px;
  font-weight: 700;
  color: white;
}

.potential-label {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

.potential-details {
  flex: 1;
}

.potential-details p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}

.analysis-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-size: 13px;
}

.metric-icon {
  font-size: 16px;
}

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

.metric-value {
  flex: 1;
  text-align: right;
  font-weight: 500;
}

.recommendations-box {
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 16px;
}

.recommendations-box h4 {
  margin-bottom: 12px;
  font-size: 14px;
}

.recommendations-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recommendations-box li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
}

.recommendations-box li:last-child {
  border-bottom: none;
}

/* Instagram Metrics */
.instagram-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.instagram-metrics.secondary {
  grid-template-columns: repeat(3, 1fr);
}

.ig-metric {
  text-align: center;
  padding: 16px 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.ig-metric-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-primary);
}

.ig-metric-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* History Timeline */
.history-timeline {
  position: relative;
  padding-left: 24px;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.history-item {
  position: relative;
  padding-bottom: 20px;
}

.history-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-secondary);
}

.history-content {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
}

.history-time {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.history-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============ INSTAGRAM INSIGHTS VIEW ============ */
.insights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.account-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-tertiary);
}

.account-details h2 {
  font-size: 20px;
}

.account-details p {
  color: var(--text-muted);
  font-size: 14px;
}

.insights-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.insight-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.insight-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-primary);
}

.insight-label {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.insight-change {
  font-size: 12px;
  margin-top: 8px;
}

.insight-change.positive {
  color: var(--accent-success);
}

.insight-change.negative {
  color: var(--accent-danger);
}

.insights-section {
  margin-top: 24px;
}

.insights-section h3 {
  margin-bottom: 16px;
}

.published-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

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

.insight-post-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: var(--transition);
}

.insight-post-card:hover {
  opacity: 0.85;
}

.insight-post-card img,
.insight-post-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.insight-post-card.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.insight-post-card.no-image::before {
  content: '📷';
  font-size: 32px;
  opacity: 0.5;
}

.insight-post-card.no-image img {
  display: none;
}

.insight-post-card .video-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 18px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.insight-post-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 24px 8px 8px;
  font-size: 13px;
  color: white;
  text-align: center;
  font-weight: 500;
  opacity: 0;
  transition: var(--transition);
}

.insight-post-card:hover .insight-post-stats {
  opacity: 1;
}

.no-data {
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  min-width: 280px;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 4px solid var(--accent-success);
}

.toast.error {
  border-left: 4px solid var(--accent-danger);
}

.toast.warning {
  border-left: 4px solid var(--accent-warning);
}

.toast-icon {
  font-size: 20px;
}

.toast-message {
  flex: 1;
  font-size: 14px;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
}

/* ============ CONFIRMATION MODAL ============ */
.modal-small {
  max-width: 400px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============ RESPONSIVE FOR DETAIL MODAL ============ */
@media (max-width: 1000px) {
  .post-detail-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 40vh 1fr;
  }
  
  .instagram-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .modal-fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    max-height: none;
  }
  
  .post-detail-layout {
    grid-template-rows: 30vh 1fr;
  }
  
  .status-workflow {
    padding: 12px;
  }
  
  .status-step span {
    display: none;
  }
  
  .quick-actions {
    justify-content: center;
  }
  
  .insights-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ CALENDAR LAYOUT (Full Width) ============ */
.calendar-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.calendar-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.posts-sidebar {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.sidebar-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.posts-count {
  background: var(--accent-primary);
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.sidebar-filters {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.posts-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.sidebar-post-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 8px;
  background: var(--bg-tertiary);
  border: 1px solid transparent;
}

.sidebar-post-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.sidebar-post-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--bg-primary);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

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

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

.sidebar-post-date {
  font-size: 12px;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-post-text {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.sidebar-post-meta {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sidebar-post-type {
  font-size: 11px;
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-post-potential {
  font-size: 11px;
  color: var(--accent-success);
  font-weight: 600;
}

.sidebar-post-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: auto;
}

.sidebar-post-status.draft { background: var(--status-draft); }
.sidebar-post-status.pending { background: var(--status-pending); }
.sidebar-post-status.approved { background: var(--status-approved); }
.sidebar-post-status.scheduled { background: var(--status-published); }
.sidebar-post-status.published { background: var(--accent-success); }

@media (max-width: 1200px) {
  .calendar-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .posts-sidebar {
    max-height: 300px;
  }
}

/* ============ INSTAGRAM PREVIEW PHONE FRAME ============ */
.instagram-preview-container {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.phone-frame {
  width: 320px;
  background: #000;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
}

.phone-notch {
  display: none;
}

.instagram-post-preview {
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  color: #000;
}

.ig-header {
  display: flex;
  align-items: center;
  padding: 12px;
  gap: 10px;
  border-bottom: 1px solid #eee;
}

.ig-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.ig-username {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.ig-more {
  color: #666;
}

.ig-image-container {
  width: 100%;
  aspect-ratio: 1;
  background: #fafafa;
  position: relative;
}

.ig-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none; /* Hidden by default, shown via JS */
}

.ig-image-container img[src]:not([src=""]) {
  display: block;
}

.ig-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #999;
  background: #fafafa;
}

.ig-actions {
  display: flex;
  padding: 12px;
  gap: 16px;
  font-size: 22px;
}

.ig-bookmark {
  margin-left: auto;
}

.ig-likes {
  padding: 0 12px 8px;
  font-size: 14px;
}

.ig-caption {
  padding: 0 12px 8px;
  font-size: 14px;
  line-height: 1.4;
}

.ig-caption strong {
  margin-right: 6px;
}

.ig-caption span {
  word-wrap: break-word;
}

.ig-hashtags {
  padding: 0 12px 8px;
  font-size: 14px;
  color: #00376b;
  word-wrap: break-word;
}

.ig-time {
  padding: 0 12px 16px;
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
}

/* ============ DRAG & DROP ============ */
.calendar-day.drag-over {
  background: var(--accent-primary) !important;
  opacity: 0.7;
  transform: scale(1.02);
}

.calendar-post-mini {
  cursor: grab;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.calendar-post-mini:active {
  cursor: grabbing;
}

.calendar-post-mini.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.calendar-post-mini:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ============ NAV DIVIDER & LABEL ============ */
.nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 12px 0;
}

.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 16px;
  letter-spacing: 0.5px;
}

/* ============ AI CONTENT ADVISOR VIEW ============ */
.advisor-header,
.hashtags-header,
.scheduling-header,
.recycler-header,
.ab-header,
.competitors-header {
  margin-bottom: 24px;
}

.advisor-header h2,
.hashtags-header h2,
.scheduling-header h2,
.recycler-header h2,
.ab-header h2,
.competitors-header h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.advisor-header p,
.hashtags-header p,
.scheduling-header p,
.recycler-header p,
.ab-header p,
.competitors-header p {
  color: var(--text-secondary);
}

.advisor-grid,
.hashtags-grid,
.scheduling-grid,
.recycler-grid,
.competitors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.advisor-card,
.hashtags-card,
.scheduling-card,
.recycler-card,
.competitor-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.advisor-card h3,
.hashtags-card h3,
.scheduling-card h3,
.recycler-card h3,
.competitor-card h3 {
  font-size: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.advisor-card.wide,
.hashtags-card.wide,
.scheduling-card.wide,
.recycler-card.wide,
.competitor-card.wide {
  grid-column: 1 / -1;
}

.advisor-card.highlight,
.scheduling-card.highlight,
.competitor-card.highlight {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-card));
  border-color: var(--accent-primary);
}

.hint {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.loading {
  color: var(--text-muted);
  font-size: 14px;
}

/* Ideas List */
.ideas-list {
  margin-top: 16px;
}

.idea-item {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
}

.idea-item:hover {
  border-color: var(--accent-primary);
}

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

.idea-theme {
  font-weight: 600;
  color: var(--text-primary);
}

.idea-potential {
  background: var(--accent-success);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.idea-potential.medium {
  background: var(--accent-warning);
}

.idea-potential.low {
  background: var(--text-muted);
}

.idea-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.idea-format {
  display: inline-block;
  background: var(--bg-hover);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.idea-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

/* Weekly Plan */
.weekly-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.plan-day,
.plan-day-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--border-color);
  min-height: 120px;
  max-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s;
}

.plan-day-card.has-content {
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
}

.plan-day-name,
.plan-day-header {
  font-weight: 600;
  font-size: 11px;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.plan-day-content,
.plan-day-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  flex: 1;
}

.plan-day-body p {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plan-day-body small {
  color: var(--text-muted);
  font-size: 11px;
  display: block;
  margin-top: auto;
}

.plan-day.has-post {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
}

/* Plan Card Actions */
.plan-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.plan-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.plan-card-actions .btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.plan-card-actions .btn-icon:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.plan-card-actions .btn-icon-success:hover {
  background: var(--success);
  border-color: var(--success);
}

.plan-day-card.generating {
  opacity: 0.7;
  pointer-events: none;
}

.plan-day-card.generating::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-day-card.added-to-calendar {
  opacity: 0.6;
  border-color: var(--success);
}

.plan-day-card.has-media {
  background: var(--bg-secondary);
}

.plan-media-thumb {
  width: 100%;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

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

/* Media Preview Box */
.media-preview-box {
  min-height: 120px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-preview-box img {
  max-height: 200px;
}

/* Spin animation for loading */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* Trends */
.trends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.trend-name {
  flex: 1;
  font-size: 14px;
}

.trend-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.trend-badge.rising {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-success);
}

.trend-badge.stable {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-primary);
}

.trend-badge.falling {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-danger);
}

/* ============ HASHTAG INTELLIGENCE ============ */
.hashtags-result {
  margin-top: 16px;
  display: none;
}

.hashtags-result.show {
  display: block;
}

.hashtags-output {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  color: var(--accent-primary);
  word-wrap: break-word;
  line-height: 1.8;
  margin-bottom: 12px;
}

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

.saved-sets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-set-item {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.saved-set-item:hover {
  border-color: var(--accent-primary);
}

.saved-set-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.saved-set-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hashtag-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hashtag-category {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.hashtag-category:hover {
  background: var(--bg-hover);
}

.hashtag-performance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hashtag-perf-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.hashtag-perf-tag {
  flex: 1;
  font-size: 13px;
  color: var(--accent-primary);
}

.hashtag-perf-score {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ SMART SCHEDULING ============ */
.best-time-display {
  text-align: center;
  padding: 20px;
}

.best-time-value {
  display: block;
  font-size: 48px;
  font-weight: 700;
  color: var(--accent-primary);
}

.best-time-score {
  display: block;
  font-size: 14px;
  color: var(--accent-success);
  margin-top: 4px;
}

.best-time-reason {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 8px;
}

.alternative-times {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.alt-time {
  background: var(--bg-tertiary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
}

.alt-time-hour {
  font-weight: 600;
}

.alt-time-score {
  color: var(--text-muted);
  font-size: 12px;
}

.weekly-schedule {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.schedule-day {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.schedule-day-name {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.schedule-day-date {
  font-weight: 600;
  margin-bottom: 12px;
}

.schedule-best-time {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
}

.schedule-day.weekend {
  background: var(--bg-hover);
}

.unscheduled-posts {
  margin: 16px 0;
  max-height: 200px;
  overflow-y: auto;
}

.unscheduled-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  margin-bottom: 8px;
}

.unscheduled-item input[type="checkbox"] {
  accent-color: var(--accent-primary);
}

.scheduling-analytics {
  font-size: 14px;
}

.scheduling-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.scheduling-stat:last-child {
  border-bottom: none;
}

/* ============ CONTENT RECYCLER ============ */
.recycler-suggestions {
  margin-top: 16px;
}

.recycle-item {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
}

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

.recycle-score {
  background: var(--accent-success);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.recycle-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.recycle-reason {
  background: var(--bg-hover);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.recycle-original {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
  padding: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
}

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

.recycled-content {
  padding: 16px 0;
}

.original-text,
.new-text {
  margin-bottom: 16px;
}

.original-text p,
.new-text p {
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 14px;
}

.new-text p {
  border-left: 3px solid var(--accent-success);
}

.recycler-history {
  max-height: 300px;
  overflow-y: auto;
}

.history-recycled-item {
  padding: 8px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

/* ============ A/B TESTING ============ */
.ab-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ab-tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.ab-test-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-color);
}

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

.ab-test-name {
  font-weight: 600;
  font-size: 16px;
}

.ab-test-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.ab-test-status.draft {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
}

.ab-test-status.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-success);
}

.ab-test-status.completed {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-primary);
}

.ab-variants-preview {
  margin: 12px 0;
}

.ab-variant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.ab-variant-row:last-child {
  border-bottom: none;
}

.ab-variant-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

.ab-variant-letter.winner {
  background: var(--accent-success);
}

.ab-variant-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ab-variant-stats {
  font-size: 12px;
  color: var(--text-muted);
}

.ab-test-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.ab-create-form {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
  border: 1px solid var(--accent-primary);
}

.ab-variants {
  margin: 16px 0;
}

.ab-variants h4 {
  margin-bottom: 12px;
}

.ab-variant {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.ab-variant strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-primary);
}

.ab-variant textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  color: var(--text-primary);
  resize: vertical;
  min-height: 80px;
}

.ab-analysis {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.ab-analysis h4 {
  margin-bottom: 8px;
  color: var(--accent-primary);
}

.ab-analysis p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============ COMPETITORS ============ */
.our-position {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 16px 0;
}

.position-stat {
  text-align: center;
}

.position-stat .stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-primary);
}

.position-stat .stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.competitors-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
}

.competitor-item:hover {
  border-color: var(--accent-primary);
}

.competitor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.competitor-info {
  flex: 1;
}

.competitor-name {
  font-weight: 600;
  font-size: 14px;
}

.competitor-username {
  font-size: 12px;
  color: var(--text-muted);
}

.competitor-stats {
  text-align: right;
}

.competitor-followers {
  font-weight: 600;
  color: var(--accent-primary);
}

.competitor-category {
  font-size: 11px;
  color: var(--text-muted);
}

.competitor-alerts {
  max-height: 200px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  align-items: flex-start;
}

.alert-item.unread {
  border-left: 3px solid var(--accent-warning);
}

.alert-icon {
  font-size: 16px;
}

.alert-content {
  flex: 1;
}

.alert-time {
  font-size: 11px;
  color: var(--text-muted);
}

.competitor-recommendations {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rec-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  align-items: flex-start;
}

.rec-item.highlight {
  background: var(--bg-hover);
  border: 1px solid var(--accent-primary);
}

.rec-icon {
  font-size: 18px;
}

.rec-item p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============ RESPONSIVE FOR NEW VIEWS ============ */
@media (max-width: 1200px) {
  .advisor-grid,
  .hashtags-grid,
  .scheduling-grid,
  .recycler-grid,
  .competitors-grid {
    grid-template-columns: 1fr;
  }
  
  .weekly-plan-grid,
  .weekly-schedule {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .weekly-plan-grid,
  .weekly-schedule {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hashtag-performance {
    grid-template-columns: 1fr;
  }
  
  .ab-header {
    flex-direction: column;
    gap: 12px;
  }
}

/* ============ MEDIA EDITOR SECTION ============ */
.media-section {
  margin-bottom: 20px;
}

.media-editor {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.media-preview-box {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

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

.media-preview-box.has-media {
  border-style: solid;
  border-color: var(--accent-primary);
}

.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.media-placeholder span:first-child {
  font-size: 32px;
}

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

.media-actions .btn {
  width: 100%;
  justify-content: center;
}

/* AI Generation Panel */
.ai-generation-panel {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.ai-generation-panel.hidden {
  display: none;
}

.reference-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reference-previews {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reference-previews img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border-color);
}

.reference-previews .ref-item {
  position: relative;
}

.reference-previews .ref-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: var(--accent-danger);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-panel-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ============ FIX MODAL SCROLLING ============ */
#postDetailModal .modal-content {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#postDetailModal .modal-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

.tab-content {
  max-height: none !important;
  overflow: visible !important;
}

/* Form actions at bottom */
.form-actions-sticky {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px 0;
  margin-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* ============ TAB CONTENT SCROLLABLE WRAPPER ============ */
.tab-content-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.post-detail-right {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Fix preview cutoff */
.instagram-preview-container {
  padding-bottom: 40px;
}

.phone-frame {
  margin-bottom: 20px;
}

#tabPreview {
  padding-bottom: 40px;
}

/* ============ HOLIDAY BANNER ============ */
.holiday-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}

.holiday-banner.hidden {
  display: none;
}

.holiday-icon {
  font-size: 28px;
}

.holiday-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.holiday-info strong {
  color: var(--accent-warning);
  font-size: 14px;
}

.holiday-type {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.holiday-tip {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(251, 191, 36, 0.2);
  padding: 4px 10px;
  border-radius: 12px;
}

/* Fix textarea in edit tab */
#detailPostText {
  min-height: 150px;
  max-height: 300px;
  resize: vertical;
  overflow-y: auto;
}

#tabEdit {
  padding: 20px 24px;
}

#tabEdit .form-group {
  margin-bottom: 20px;
}

#tabEdit form {
  display: flex;
  flex-direction: column;
}

#tabEdit .form-actions-sticky {
  margin-top: auto;
  position: relative;
  bottom: auto;
}

/* ============ COMPACT MODAL HEADER ============ */
.compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.status-badge.draft { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.status-badge.pending { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.status-badge.approved { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-badge.scheduled { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.status-badge.published { background: rgba(34, 197, 94, 0.2); color: #22c55e; }

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

.compact-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.compact-toolbar .detail-tabs {
  border: none;
  padding: 0;
}

/* Apple-style Tabs */
.apple-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
}

.apple-tabs .tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.apple-tabs .tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.apple-tabs .tab-btn.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.apple-tabs .tab-icon {
  font-size: 16px;
  line-height: 1;
}

.apple-tabs .tab-label {
  font-weight: 500;
}

.compact-toolbar .quick-actions {
  display: flex;
  gap: 4px;
  padding: 0;
  background: none;
}

.action-btn.small {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
}

/* Labeled Action Button */
.action-btn.labeled {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.action-btn.labeled:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
}

.action-btn.labeled .btn-icon {
  font-size: 16px;
}

.action-btn.labeled .btn-text {
  white-space: nowrap;
}

.action-btn.labeled.success {
  background: rgba(48, 209, 88, 0.15);
  border-color: var(--accent-success);
  color: var(--accent-success);
}

.action-btn.labeled.success:hover {
  background: var(--accent-success);
  color: white;
}

.action-btn.labeled.primary {
  background: rgba(10, 132, 255, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.action-btn.labeled.primary:hover {
  background: var(--accent-primary);
  color: white;
}

.action-btn.labeled.ai {
  background: linear-gradient(135deg, #bf5af2, #0a84ff);
  border: none;
  color: white;
}

.action-btn.labeled.ai:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(191, 90, 242, 0.4);
}

.action-btn.labeled.instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4);
  border: none;
  color: white;
}

.action-btn.labeled.instagram:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(221, 42, 123, 0.4);
}

/* Hide old status workflow */
.status-workflow {
  display: none !important;
}

/* ============ APPLE EDIT FORM ============ */
.edit-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.edit-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.edit-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  position: relative;
}

.edit-media .media-preview-box {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.edit-media .media-preview-box.has-media {
  border: none;
  width: 140px;
  height: 140px;
}

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

.media-buttons {
  display: flex;
  gap: 6px;
}

.edit-settings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  flex: 1;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-row label {
  font-size: var(--font-caption1);
  font-weight: 500;
  color: var(--text-secondary);
}

.setting-row input,
.setting-row select {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: var(--font-subhead);
  transition: var(--transition-fast);
}

.setting-row input:focus,
.setting-row select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}

.edit-text-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

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

.text-header span {
  font-size: var(--font-footnote);
  font-weight: 500;
  color: var(--text-secondary);
}

.edit-text-section textarea {
  flex: 1;
  min-height: 140px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: var(--font-subhead);
  line-height: 1.6;
  resize: none;
  transition: var(--transition-fast);
}

.edit-text-section textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}

.text-footer {
  text-align: right;
  font-size: var(--font-caption2);
  color: var(--text-muted);
  margin-top: 6px;
}

.edit-hashtags input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  font-size: var(--font-footnote);
  transition: var(--transition-fast);
}

.edit-hashtags input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}

/* ============ WORKFLOW ACTIONS ============ */
.workflow-actions {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  margin-top: 12px;
  border-top: 1px solid var(--divider);
  flex-wrap: wrap;
}

.btn-workflow {
  flex: 1;
  min-width: 120px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-workflow.hidden {
  display: none;
}

.btn-review {
  background: rgba(255, 159, 10, 0.15);
  color: #ff9f0a;
  border: 1px solid rgba(255, 159, 10, 0.3);
}

.btn-review:hover {
  background: rgba(255, 159, 10, 0.25);
  border-color: #ff9f0a;
}

.btn-approve {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.btn-approve:hover {
  background: rgba(52, 199, 89, 0.25);
  border-color: #34c759;
}

.btn-schedule {
  background: rgba(10, 132, 255, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(10, 132, 255, 0.3);
}

.btn-schedule:hover {
  background: rgba(10, 132, 255, 0.25);
  border-color: var(--accent-primary);
}

.btn-reject {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.3);
}

.btn-reject:hover {
  background: rgba(255, 69, 58, 0.25);
  border-color: #ff453a;
}

/* Status badge colors */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.draft {
  background: rgba(142, 142, 147, 0.2);
  color: #8e8e93;
}

.status-badge.review {
  background: rgba(255, 159, 10, 0.2);
  color: #ff9f0a;
}

.status-badge.approved {
  background: rgba(52, 199, 89, 0.2);
  color: #34c759;
}

.status-badge.scheduled {
  background: rgba(10, 132, 255, 0.2);
  color: var(--accent-primary);
}

.status-badge.published {
  background: rgba(175, 82, 222, 0.2);
  color: #af52de;
}

.edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--divider);
}

.action-spacer {
  flex: 1;
}

/* ============ THEME TOGGLE ============ */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  margin-bottom: 8px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  transform: scale(1.05);
}

/* ============ APPLE TYPOGRAPHY ============ */
.large-title { font-size: var(--font-large-title); font-weight: 700; letter-spacing: -0.02em; }
.title1 { font-size: var(--font-title1); font-weight: 700; letter-spacing: -0.02em; }
.title2 { font-size: var(--font-title2); font-weight: 700; letter-spacing: -0.01em; }
.title3 { font-size: var(--font-title3); font-weight: 600; }
.headline { font-size: var(--font-headline); font-weight: 600; }
.body { font-size: var(--font-body); }
.callout { font-size: var(--font-callout); }
.subhead { font-size: var(--font-subhead); }
.footnote { font-size: var(--font-footnote); color: var(--text-secondary); }
.caption1 { font-size: var(--font-caption1); color: var(--text-muted); }
.caption2 { font-size: var(--font-caption2); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ============ APPLE-STYLE SIDEBAR ============ */
.sidebar {
  width: 200px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

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

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-size: var(--font-title3);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  flex: 1;
  padding: 0 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-subhead);
  font-weight: 500;
  transition: var(--transition-fast);
  margin-bottom: 2px;
}

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

.nav-item.active {
  background: var(--accent-primary);
  color: white;
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-divider {
  height: 1px;
  background: var(--divider);
  margin: 16px 0 12px;
}

.nav-label {
  display: block;
  padding: 0 14px;
  margin-bottom: 8px;
  font-size: var(--font-caption2);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============ REFINED HEADER ============ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--divider);
}

.page-title {
  font-size: var(--font-title2);
  font-weight: 700;
}

.page-subtitle {
  font-size: var(--font-footnote);
  color: var(--text-muted);
  margin-left: 12px;
}

/* ============ APPLE-STYLE CALENDAR ============ */
.calendar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
  min-height: 0;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 4px;
  flex-shrink: 0;
}

.calendar-weekday {
  padding: 12px 8px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-weekday:nth-child(6),
.calendar-weekday:nth-child(7) {
  color: var(--accent-danger);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, 1fr);
  flex: 1;
  padding: 0 4px 4px;
  gap: 4px;
}

.calendar-day {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calendar-day:hover {
  background: var(--bg-tertiary);
  transform: scale(1.02);
  z-index: 1;
}

.calendar-day.today {
  background: rgba(10, 132, 255, 0.15);
  box-shadow: inset 0 0 0 2px var(--accent-primary);
}

.calendar-day.today .calendar-day-number {
  color: var(--accent-primary);
  font-weight: 700;
}

.calendar-day.other-month {
  opacity: 0.3;
  background: transparent;
}

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

.calendar-day-number {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.calendar-day-holiday {
  font-size: 16px;
}

.calendar-day-posts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.calendar-post-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition-fast);
  overflow: hidden;
}

.calendar-post-mini:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateX(2px);
}

.calendar-post-mini img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.calendar-post-mini span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-post-mini.high-potential {
  background: rgba(48, 209, 88, 0.2);
}

.calendar-post-mini.high-potential:hover {
  background: var(--accent-success);
}

.post-potential-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  background: var(--accent-success);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

/* ============ REFINED INPUTS ============ */
input, select, textarea {
  font-family: inherit;
  font-size: var(--font-body);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 10px 14px;
  transition: var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

/* ============ SMOOTH TRANSITIONS ============ */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-duration: 0.15s;
  transition-timing-function: ease;
}

/* ============ PREVIEW TOGGLE ============ */
.preview-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.toggle-btn {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.toggle-btn.active {
  background: var(--accent-primary);
  color: white;
}

/* ============ WEB PREVIEW ============ */
.web-preview-container {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.web-post-card {
  width: 100%;
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.web-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.web-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

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

.web-username {
  font-weight: 600;
  font-size: 14px;
}

.web-location {
  font-size: 12px;
  color: var(--text-muted);
}

.web-post-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.web-post-actions {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 24px;
}

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

.web-post-likes {
  padding: 0 16px 8px;
  font-size: 14px;
}

.web-post-caption {
  padding: 0 16px 8px;
  font-size: 14px;
  line-height: 1.5;
}

.web-post-caption strong {
  margin-right: 6px;
}

.web-post-hashtags {
  padding: 0 16px 16px;
  font-size: 14px;
  color: #00376b;
}

[data-theme="dark"] .web-post-hashtags {
  color: #e0f1ff;
}

/* ============ PREVIEW LAYOUT ============ */
.preview-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  justify-content: center;
}

.preview-image-section {
  flex: 0 0 350px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-tertiary);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-image-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-no-image {
  color: var(--text-muted);
  font-size: 18px;
}

/* ============ PREVIEW ACTIONS ============ */
.preview-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.preview-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.preview-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.preview-action-btn .action-icon {
  font-size: 18px;
}

/* ============ PREVIEW MODE TOGGLE ============ */
.preview-mode-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  padding: 3px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.mode-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.mode-btn:hover {
  color: var(--text-primary);
}

.mode-btn.active {
  background: var(--accent-primary);
  color: white;
}

/* Web Preview Card */
.web-preview-container {
  display: flex;
  justify-content: center;
}

.web-post-card {
  width: 100%;
  max-width: 470px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.web-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.web-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f58529, #dd2a7b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.web-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.web-username {
  font-weight: 600;
  font-size: 14px;
}

.web-location {
  font-size: 12px;
  color: var(--text-muted);
}

.web-more {
  color: var(--text-muted);
  cursor: pointer;
}

.web-post-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-tertiary);
}

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

.web-post-content {
  padding: 0 14px 14px;
}

.web-post-actions {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 24px;
}

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

.web-post-likes {
  font-size: 14px;
  margin-bottom: 8px;
}

.web-post-caption {
  font-size: 14px;
  line-height: 1.5;
}

.web-post-caption strong {
  margin-right: 6px;
}

.web-post-hashtags {
  margin-top: 8px;
  font-size: 14px;
  color: var(--accent-primary);
}

/* ============ APPLE-STYLE ADVISOR ============ */
/* Simple Advisor Layout */
.advisor-simple {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

.advisor-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  flex: 1;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid var(--border-light);
}

.stat-num {
  display: block;
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-lbl {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.advisor-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--border-light);
}

.advisor-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.card-status, .card-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.card-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-form input,
.card-form select {
  padding: 12px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-primary);
}

.card-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card-form .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.card-form .checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 0;
  text-align: center;
}

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

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

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

/* Stats Row */
.apple-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.apple-stat-card {
  flex: 1;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.apple-stat-number {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.apple-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Grid Layout */
.apple-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Cards */
.apple-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.apple-card.full-width {
  grid-column: 1 / -1;
}

.apple-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.apple-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.apple-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
}

.apple-card-icon.blue {
  background: linear-gradient(135deg, #007AFF, #5856D6);
}

.apple-card-icon.purple {
  background: linear-gradient(135deg, #AF52DE, #5856D6);
}

.apple-card-icon.green {
  background: linear-gradient(135deg, #34C759, #30D158);
}

.apple-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.apple-card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.apple-card-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.apple-card-body {
  padding: 20px 24px;
}

/* Inputs */
.apple-input-group {
  margin-bottom: 16px;
}

.apple-input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.apple-input,
.apple-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-primary);
  transition: box-shadow 0.2s;
}

.apple-input:focus,
.apple-select:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2);
}

.apple-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Toggles */
.apple-toggles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.apple-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
}

.apple-toggle input {
  display: none;
}

.apple-toggle-switch {
  width: 44px;
  height: 26px;
  background: var(--bg-tertiary);
  border-radius: 13px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.apple-toggle-switch::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 11px;
  top: 2px;
  left: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

.apple-toggle input:checked + .apple-toggle-switch {
  background: #34C759;
}

.apple-toggle input:checked + .apple-toggle-switch::after {
  transform: translateX(18px);
}

/* Buttons */
.apple-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: transform 0.1s, filter 0.2s;
}

.apple-btn:hover {
  filter: brightness(1.05);
}

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

.apple-btn.blue {
  background: linear-gradient(135deg, #007AFF, #5856D6);
}

.apple-btn.purple {
  background: linear-gradient(135deg, #AF52DE, #5856D6);
}

.apple-btn.green {
  background: linear-gradient(135deg, #34C759, #30D158);
}

.apple-btn-sm {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: background 0.2s;
}

.apple-btn-sm:hover {
  background: var(--bg-hover);
}

.apple-btn-sm.green {
  background: #34C759;
  color: white;
}

/* Results */
.apple-results {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border-color);
}

.apple-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.apple-result-item {
  text-align: center;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.apple-result-value {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.apple-result-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.apple-details summary {
  font-size: 13px;
  color: var(--accent-primary);
  cursor: pointer;
  padding: 8px 0;
}

.apple-details-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 200px;
  overflow-y: auto;
}

/* Plan List */
.apple-plan-list {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.plan-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 14px;
}

.plan-date {
  text-align: center;
  min-width: 60px;
}

.plan-day {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.plan-date-num {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.plan-time {
  font-size: 12px;
  color: var(--accent-primary);
  font-weight: 500;
}

.plan-content {
  flex: 1;
  min-width: 0;
}

.plan-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg-secondary);
  border-radius: 6px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.plan-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plan-item-actions {
  display: flex;
  gap: 6px;
}

.plan-item-actions .btn,
.plan-item-actions .apple-btn-sm {
  padding: 8px 12px;
}

/* Responsive */
@media (max-width: 768px) {
  .apple-grid {
    grid-template-columns: 1fr;
  }
  .apple-stats-row {
    flex-direction: column;
  }
  .apple-input-row {
    grid-template-columns: 1fr;
  }
  .apple-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .plan-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .plan-date {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
  }
}

/* ============ ACCESSIBILITY - FOCUS STATES ============ */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.tab-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.2);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ SVG NAV ICONS ============ */
.nav-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-item:hover .nav-svg,
.nav-item.active .nav-svg {
  stroke: currentColor;
}

/* Hide text in collapsed sidebar, keep SVG */
.sidebar.collapsed .nav-item span:not(.nav-svg) {
  display: none;
}

.sidebar.collapsed .nav-svg {
  width: 22px;
  height: 22px;
}

/* ============ TAB SVG ICONS ============ */
.tab-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.apple-tabs .tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mode toggle */
.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-btn svg {
  stroke: currentColor;
}

/* ============ USER AVATAR ============ */
.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.sidebar.collapsed .user-avatar-circle {
  width: 36px;
  height: 36px;
}

.sidebar.collapsed .user-name {
  display: none;
}

/* Action buttons SVG */
.preview-action-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

/* ============ INSTAGRAM PREVIEW UPDATES ============ */
.ig-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.ig-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #999;
  height: 100%;
}

.ig-image-placeholder svg {
  stroke: #ccc;
}

.ig-actions {
  display: flex;
  gap: 16px;
  padding: 12px;
}

.ig-actions svg {
  stroke: #262626;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.ig-actions svg:hover {
  transform: scale(1.1);
}

.ig-bookmark {
  margin-left: auto;
}

/* Dark theme IG preview */
[data-theme="dark"] .ig-actions svg {
  stroke: #f5f5f5;
}

/* ============ LOGO SVG ============ */
.logo-icon-svg {
  width: 28px;
  height: 28px;
}

/* ============ RESPONSIVE - MOBILE ============ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -220px;
    transition: left 0.3s ease;
    z-index: 1000;
  }
  
  .sidebar.mobile-open {
    left: 0;
  }
  
  .main {
    margin-left: 0 !important;
  }
  
  .header {
    padding: 0 12px;
  }
  
  .header-right {
    gap: 8px;
  }
  
  .header-right .btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  /* Hide some buttons on mobile */
  #prevMonth, #nextMonth {
    display: none;
  }
  
  .content {
    padding: 8px;
  }
  
  .month-grid {
    gap: 2px;
  }
  
  .calendar-day {
    padding: 4px;
    font-size: 12px;
  }
  
  .calendar-day-number {
    font-size: 14px;
  }
  
  /* Modal fullscreen on mobile */
  .modal-content {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  
  .preview-layout {
    flex-direction: column;
  }
  
  .phone-frame {
    transform: scale(0.85);
  }
  
  .preview-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .preview-action-btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Advisor stats */
  .advisor-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .advisor-actions {
    grid-template-columns: 1fr;
  }
}

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
}

/* ============ AI MEDIA PANEL ============ */
.ai-media-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.ai-media-panel::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

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

.ai-panel-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.btn-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.ai-panel-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.ai-panel-body textarea {
  flex: 1;
  resize: none;
  font-size: 14px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Better button icon visibility */
.btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.btn-small {
  padding: 8px 12px !important;
}

.btn-small svg {
  width: 18px;
  height: 18px;
}

/* Media buttons layout */
.media-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.media-buttons .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Edit media container */
.edit-media {
  position: relative;
  min-width: 120px;
}

.media-placeholder svg {
  stroke: var(--text-muted);
}

/* ============ TEXT EDITOR IMPROVEMENTS ============ */
.text-header, .hashtags-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.text-actions {
  display: flex;
  gap: 6px;
}

.text-actions .btn {
  font-size: 12px;
  padding: 4px 10px;
}

.text-actions .btn svg {
  width: 14px;
  height: 14px;
}

.text-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.autosave-status {
  color: var(--accent-success);
  font-size: 11px;
}

.hashtags-header .btn {
  font-size: 12px;
  padding: 4px 10px;
}

/* Stories preview 9:16 */
.phone-frame.stories {
  width: 280px;
}

.phone-frame.stories .ig-image-container {
  aspect-ratio: 9/16;
}

/* Carousel indicator */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.carousel-dot.active {
  background: var(--accent-primary);
}

/* ============ STORIES PREVIEW ============ */
.stories-preview-container {
  display: flex;
  justify-content: center;
}

.stories-phone {
  width: 280px;
  background: #000;
  border-radius: 36px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.stories-content {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.stories-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stories-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.3) 100%);
}

.stories-header {
  padding: 12px;
}

.stories-progress {
  height: 2px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin-bottom: 12px;
}

.progress-bar {
  width: 30%;
  height: 100%;
  background: white;
  border-radius: 2px;
}

.stories-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 13px;
  font-weight: 500;
}

.stories-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f58529, #dd2a7b);
  border: 2px solid white;
}

.stories-time {
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

.stories-footer {
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.stories-footer input {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 8px 16px;
  color: white;
  font-size: 13px;
}

.stories-footer input::placeholder {
  color: rgba(255,255,255,0.7);
}

.stories-footer svg {
  cursor: pointer;
  opacity: 0.9;
}

/* Web avatar fix */
.web-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f58529, #dd2a7b);
}

/* ============ SVG ICONS SYSTEM ============ */

/* Section header icons */
.section-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 8px;
  stroke: var(--accent-primary);
}

/* Card header icons */
.card-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 6px;
  stroke: var(--accent-primary);
}

/* Button icons */
.btn-icon-svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 6px;
  stroke: currentColor;
  flex-shrink: 0;
}

.btn-icon-svg:only-child {
  margin-right: 0;
}

/* Radio/checkbox icons */
.radio-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
  stroke: currentColor;
}

/* Inline text icons */
.inline-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 4px;
  stroke: var(--text-secondary);
}

/* Upload area icon */
.upload-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 8px;
  stroke: var(--text-muted);
}

/* Placeholder icons */
.placeholder-icon,
.placeholder-icon-svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
  margin-bottom: 8px;
}

/* Setting row icons */
.setting-icon {
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
}

/* Instagram metric icons */
.ig-icon {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 4px;
  stroke: currentColor;
}

/* Recommendation icons */
.rec-icon svg,
.rec-icon-svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-primary);
}

/* Modal header icons */
.modal-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 8px;
  stroke: var(--accent-primary);
}

/* Analytics icons */
.analytics-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent-primary);
}

/* Stat icons */
.stat-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-primary);
}

/* Metric icons */
.metric-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-primary);
}

/* Theme toggle icons */
.theme-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

[data-theme="light"] .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: block !important;
}

[data-theme="dark"] .icon-moon,
:root .icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun,
:root .icon-sun {
  display: none;
}

/* Toggle icon */
.toggle-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.sidebar.collapsed .toggle-icon svg {
  transform: rotate(180deg);
}

/* ============ LOADING STATES ============ */

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--accent-primary);
  animation: spin 0.8s linear infinite;
}

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

/* Button loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.btn.loading::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-card {
  height: 100px;
}

.skeleton-image {
  aspect-ratio: 1;
}

/* Card loading overlay */
.card-loading {
  position: relative;
}

.card-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
}

/* Loading placeholder text */
.loading-text {
  color: var(--text-muted);
  font-style: italic;
}

.loading-text::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Content loading state */
.content-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  gap: 16px;
  color: var(--text-muted);
}

.content-loading .loading-spinner {
  width: 32px;
  height: 32px;
}

/* Calendar day loading */
.day-cell.loading {
  pointer-events: none;
}

.day-cell.loading .day-posts {
  opacity: 0.5;
}

/* Action button states */
.action-pending {
  opacity: 0.6;
  pointer-events: none;
}

/* Toast loading */
.toast.loading {
  background: var(--bg-elevated);
}

.toast.loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

/* Pulse animation for active processes */
.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Fade in animation for loaded content */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

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

/* ============ SETTINGS VIEW ============ */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.settings-section {
  margin-bottom: 32px;
}

.settings-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-info {
  flex: 1;
}

.setting-label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.setting-desc {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

/* Theme Switcher */
.theme-switcher {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 8px;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

.theme-btn.active {
  background: var(--accent-primary);
  color: white;
}

.theme-btn:hover:not(.active) {
  background: var(--bg-hover);
}

/* Toggle Switch */
/* ============ TOGGLE SWITCH - iOS STYLE ============ */
.toggle-switch {
  position: relative;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(120, 120, 128, 0.32);
  border-radius: 15.5px;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 27px;
  height: 27px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.15),
    0 3px 1px rgba(0, 0, 0, 0.06);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-success);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.toggle-switch:active .toggle-slider::before {
  width: 31px;
}

.toggle-switch:active input:checked + .toggle-slider::before {
  margin-left: -4px;
}

/* Connection Items */
.connection-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.connection-item:last-child {
  border-bottom: none;
}

.connection-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connection-icon svg {
  width: 20px;
  height: 20px;
  stroke: white;
}

.connection-icon.instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.connection-icon.google {
  background: linear-gradient(135deg, #4285f4, #34a853);
}

.connection-icon.meta {
  background: linear-gradient(135deg, #0082fb, #00c8ff);
}

.connection-icon.facebook {
  background: #1877f2;
}

.connection-icon.tiktok {
  background: linear-gradient(135deg, #000000, #25f4ee);
}

.connection-icon.linkedin {
  background: #0a66c2;
}

.connection-info {
  flex: 1;
}

.connection-name {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
}

.connection-status {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}

.connection-status.connected {
  color: var(--accent-success);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.success {
  background: rgba(48, 209, 88, 0.15);
  color: var(--accent-success);
}

/* About Section */
.about-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
}

.app-logo-large svg {
  display: block;
}

.app-details h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.app-details p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Sidebar footer settings link */
.sidebar-footer .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
}

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

.sidebar-footer .nav-item.active {
  background: var(--accent-primary);
  color: white;
}

.sidebar-footer .nav-item .nav-svg {
  width: 20px;
  height: 20px;
}

/* Video generating status */
.video-generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  gap: 12px;
}

.video-generating p {
  margin: 0;
  color: var(--text-primary);
}

.video-generating .hint {
  color: var(--text-muted);
  font-size: 13px;
}

.video-generating .error {
  color: var(--error);
}

/* AI Smart Mode Styles */
.ai-smart-info {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.ai-info-text {
  margin: 0 0 8px 0;
  font-weight: 600;
  font-size: 13px;
}

.ai-context-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 12px;
  color: var(--text-secondary);
}

.ai-context-list li {
  padding: 2px 0;
}

.ai-references {
  margin-bottom: 12px;
}

.ai-ref-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.ai-ref-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-ref-preview {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.ai-ref-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-ref-preview .remove-ref {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: rgba(0,0,0,0.6);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-manual-mode {
  margin-bottom: 12px;
}

.ai-manual-mode summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
}

.ai-manual-mode summary:hover {
  color: var(--text-primary);
}

.ai-manual-mode textarea {
  margin-top: 8px;
  width: 100%;
  font-size: 13px;
}

/* Video generation progress */
.video-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
  height: 100%;
  gap: 4px;
}

.video-progress svg {
  width: 28px;
  height: 28px;
}

.video-progress p {
  margin: 0;
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.2;
}

.video-progress .hint {
  color: var(--text-muted);
  font-size: 10px;
}

#videoProgressTime {
  font-family: monospace;
  font-size: 14px !important;
  color: var(--accent-primary) !important;
}

/* ============ SETTINGS IMPROVEMENTS ============ */
.setting-input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  min-width: 200px;
  transition: var(--transition-fast);
}

.setting-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

.setting-input.full-width {
  width: 100%;
  min-width: auto;
}

.form-group {
  margin-bottom: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.settings-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

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

.connection-status.connected {
  color: var(--accent-success);
}

.connection-status.disconnected {
  color: var(--accent-danger);
}

.status-badge.success {
  background: rgba(48, 209, 88, 0.15);
  color: var(--accent-success);
}

.status-badge.warning {
  background: rgba(255, 159, 10, 0.15);
  color: var(--accent-warning);
}

.status-badge.error {
  background: rgba(255, 69, 58, 0.15);
  color: var(--accent-danger);
}

/* Toggle switch iOS style */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  transition: 0.3s;
  border-radius: 31px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--accent-success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--divider);
}

.setting-item:last-child {
  border-bottom: none;
}

.settings-card > button {
  margin-top: 16px;
}

/* ============ BULK ACTIONS ============ */
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  animation: slideIn 0.2s ease;
}

.bulk-actions.hidden {
  display: none;
}

.bulk-count {
  font-weight: 500;
  color: var(--accent-primary);
  margin-right: 8px;
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
  border: none;
}

.btn-danger:hover {
  background: #ff453a;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 8px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

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

/* Select mode styles */
.calendar-day.select-mode {
  cursor: pointer;
}

.calendar-day.select-mode:hover {
  background: var(--bg-hover);
}

.calendar-post-mini.selected {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.calendar-post-mini.selectable::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
}

.calendar-post-mini.selected::before {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.calendar-post-mini.selected::after {
  content: '✓';
  position: absolute;
  top: 4px;
  left: 6px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Bulk Status Dropdown */
.bulk-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  min-width: 150px;
  padding: 4px;
}

.bulk-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-primary);
}

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