:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-main: #0f172a;
  --bg-sidebar: #1e293b;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #10b981;
  --danger: #ef4444;
  --sidebar-width: 260px;
  --top-bar-height: 70px;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow: hidden;
  /* App container will handle scrolling */
}

h1,
h2,
h3,
.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  transition: width 0.3s ease;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  color: var(--primary);
}

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

.sidebar-nav ul {
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 4px;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.nav-item.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 18px;
}

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

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.1);
}

.auth-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.auth-status-dot.connected {
  background-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.auth-status-dot.disconnected {
  background-color: var(--danger);
}

.user-info {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-bar {
  height: var(--top-bar-height);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.top-bar h1 {
  font-size: 22px;
}

.content-body {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent);
}

/* Views */
.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.visible {
  display: block;
}

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

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

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--card-shadow);
  max-width: 100%;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.section-header i {
  font-size: 24px;
  color: var(--primary);
}

.section-header h3 {
  font-size: 20px;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 24px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

label {
  margin: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

input[type="text"] {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  font-size: 15px;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
}

/* File Selection */
.file-selection-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.file-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-drop-area {
  flex: 1;
  border: 2px dashed var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-drop-area:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.file-drop-area i {
  font-size: 32px;
  color: var(--text-muted);
}

.file-drop-area span {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

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

.card-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  margin-top: 4px;
}

.card-select:focus {
  border-color: var(--primary-main);
  background: rgba(0, 0, 0, 0.4);
}

.card-select option {
  background: #1a1a1a;
  color: #fff;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 15px;
}


.btn-primary {
  margin: 12px 0;
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-danger {
  margin: 12px 0;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.btn-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
  background: #f59e0b;
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-google {
  background: white;
  color: #1f2937;
}

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

.actions-row {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

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

/* Status Message */
.status-message {
  margin-top: 20px;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
}

.status-message.success {
  color: var(--accent);
}

.status-message.error {
  color: var(--danger);
}

/* Progress Container */
.progress-container {
  margin-top: 24px;
  max-height: 200px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.progress-item {
  font-size: 13px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.progress-item:last-child {
  border-bottom: none;
}

/* Cards Grid & Content Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.content-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.content-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

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

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
}

.card-id {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  height: fit-content;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.card-info-item i {
  width: 14px;
  color: var(--primary);
  font-size: 0.9rem;
}

/* Badges */
.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

.badge-youtube {
  background: #ff0000;
  color: white;
}

.badge-tiktok {
  background: #000000;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Table View Styles */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 1200px;
  /* Force scroll on small screens */
}

.calendar-table th {
  background: rgba(30, 41, 59, 0.95);
  color: var(--text-main);
  text-align: left;
  padding: 16px;
  font-weight: 600;
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 2;
}

.calendar-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-muted);
  vertical-align: middle;
}

.calendar-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.calendar-table tr:last-child td {
  border-bottom: none;
}

.table-badge-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.calendar-table .status-cell {
  font-weight: 500;
}

.calendar-table .name-cell {
  font-weight: 600;
  color: var(--text-main);
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-table .date-cell {
  white-space: nowrap;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

/* Loading & Empty States */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  gap: 15px;
  color: var(--text-secondary);
}

.loading-spinner i {
  font-size: 2.5rem;
  color: var(--primary);
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

/* Configuration Specific Styles */
.config-tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.config-tab-btn {
  padding: 10px 20px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.config-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.config-tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.config-tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
}

.config-form-pane .pane-header,
.config-list-pane .pane-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.config-form-pane .pane-header i,
.config-list-pane .pane-header i {
  font-size: 1.2rem;
  color: var(--primary);
}

.config-form-pane h4,
.config-list-pane h4 {
  color: var(--text-main);
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
}

.config-form-pane .form-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.config-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 15px;
  margin-top: 15px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 5px;
}

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

.config-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.config-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(5px);
}

.config-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.config-item-name {
  font-weight: 600;
  color: var(--text-main);
}

.config-item-id {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.8;
}

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

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transform: scale(1.1);
}

.btn-icon-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.btn-icon-danger:hover {
  background: #ef4444;
  color: white;
}

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

/* Responsive */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 80px;
  }

  .sidebar-header .logo span,
  .sidebar-nav span,
  .sidebar-footer .user-info {
    display: none;
  }

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

  .sidebar-header {
    padding: 20px 0;
    display: flex;
    justify-content: center;
  }

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

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

  .top-bar {
    padding: 0 16px;
  }

  .content-body {
    padding: 16px;
  }

  .glass-card {
    padding: 20px;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.visible {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.visible .modal-content {
  transform: scale(1);
  opacity: 1;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.item-display-name {
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 12px;
  border-radius: 8px;
}

.modal-footer {
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--glass-border);
}

.modal-footer.justify-center {
  justify-content: center;
}

/* Confirm Modal Specifics */
.confirm-modal {
  max-width: 400px;
}

#confirmTextInput {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px;
  border-radius: 8px;
  width: 100%;
  color: #ef4444;
  font-weight: 700;
}

#confirmTextInput:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  outline: none;
}

.warning-icon {
  width: 64px;
  height: 64px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.confirm-modal h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #fff;
}

.confirm-modal p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Modal Variants */
.modal-primary .warning-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.2);
}

.modal-primary .warning-icon i::before {
  content: "\f1d8";
}

/* Paper plane icon */

.modal-warning .warning-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.2);
}

.modal-warning .warning-icon i::before {
  content: "\f021";
}

/* Sync icon */

.modal-danger .warning-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.4s ease-in-out;
  border-color: #ef4444 !important;
}

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

/* Specific button in table */
.btn-calendar-cell {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.btn-calendar-cell:hover {
  background: var(--primary);
  color: white;
}

input[type="datetime-local"] {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 14px 18px;
  color: white;
  font-size: 15px;
  width: 100%;
  transition: all 0.3s;
  outline: none;
}

input[type="datetime-local"]:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) hue-rotate(200deg) brightness(1.2);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px;
  color: white;
  width: 100%;
  font-family: inherit;
  resize: vertical;
}

textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.content-card {
  cursor: pointer;
}

.content-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.06);
}

/* History Grid - 5 Columns */
.history-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 10px 0;
}

/* Premium Glassmorphism History Card */
.history-card.premium-glass {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  min-height: 280px;
}

.history-card.premium-glass:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.card-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.card-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.history-card:hover .card-media-wrap img {
  transform: scale(1.1);
}

.platform-icon-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
}

.play-button-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.history-card:hover .play-button-overlay {
  background: var(--primary);
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
}

.card-mgmt-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 5;
}

.history-card:hover .card-mgmt-actions {
  opacity: 1;
}

.btn-icon-tiny {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.btn-icon-tiny:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.btn-icon-tiny.danger:hover {
  background: #ef4444;
  border-color: #ef4444;
}

.tiny-overlay {
  font-size: 8px;
  position: absolute;
  top: 6px;
  right: 6px;
}

.card-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title-line {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.status-label-glass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-label-glass .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-success .dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-success {
  color: #10b981;
}

.status-fail .dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.status-fail {
  color: #ef4444;
}

.btn-platform-view {
  margin-top: auto;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-platform-view:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: white;
}

.btn-delete-history {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  border: none;
  color: #ef4444;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: 0.3s;
}

.history-card:hover .btn-delete-history {
  opacity: 1;
}

.btn-delete-history:hover {
  background: #ef4444;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
  .history-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

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

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

.badge-facebook {
  background: rgba(24, 119, 242, 0.1);
  color: #1877f2;
}

.badge-youtube {
  background: rgba(255, 0, 0, 0.1);
  color: #ff0000;
}

/* --- Custom Confirm Modal --- */
.confirm-modal {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.visible .confirm-modal {
  transform: scale(1);
  opacity: 1;
}

.confirm-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  color: #ffd700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.confirm-icon-box.danger {
  color: #ff4d4d;
  box-shadow: 0 0 15px rgba(255, 77, 77, 0.2);
}

.confirm-icon-box.success {
  color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

#confirmTitle {
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.25rem;
  font-weight: 600;
}

#confirmMessage {
  color: #aaa;
  margin-bottom: 25px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn-glass-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.btn-glass-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- Toggle Switch --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

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

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

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

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

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

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

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


.account-actions {
  border-radius: 0px 18px 18px 0px;
  height: 100%;
  min-width: 14%;
  position: absolute;
  top: 50%;
  right: 0%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--glass-bg);
}

.btn-small {
  margin-left: 12px;
}

.btn-secondary {
  margin: 12px 0;
}

/* WooCommerce Dashboard Styles */
.woo-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.sub-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.sub-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.sub-card h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--primary);
}

.sub-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.btn-full {
  width: 100%;
  margin-top: 10px;
}

.file-drop-area.mini {
  padding: 20px;
  border-style: dashed;
  font-size: 14px;
}

.section-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 30px 0;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.modern-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
}

.modern-table td {
  padding: 12px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 14px;
}

/* WooCommerce Modal */
#wooConfigModal {
  z-index: 9999;
}

#wooConfigModal .modal-content {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.woo-form-group {
  margin-bottom: 15px;
}

.woo-form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--text-muted);
}

.woo-form-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  outline: none;
}

.action-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* WooCommerce Bulk & Review Enhancements */
.status-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.woo-edit-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  margin-top: 20px;
}

.btn-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

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

#editWooModal .modal-content {
  max-width: 1024px;
  width: 95%;
  /* Nới rộng modal cho editor */
}

#editHaravanModal .modal-content {
  max-width: 1024px;
  width: 95%;
}

.preview-box img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}

.preview-box iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.status-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.status-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Category Chips */
.category-chip {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.category-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.category-chip.active,
.category-chip.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.category-chips-container::-webkit-scrollbar {
  width: 4px;
}

.category-chips-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

/* Custom Dropdown for Haravan Product Type & Vendor */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  font-size: 14px;
}

.custom-dropdown input:focus {
  outline: none;
  border-color: var(--primary);
}

.custom-dropdown .dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: rgba(30, 30, 40, 0.98);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  margin-top: 4px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.custom-dropdown .dropdown-list.show {
  display: block;
}

.custom-dropdown .dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s ease;
}

.custom-dropdown .dropdown-item:last-child {
  border-bottom: none;
}

.custom-dropdown .dropdown-item:hover {
  background: rgba(99, 102, 241, 0.2);
  color: var(--text-primary);
}

.custom-dropdown .dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.custom-dropdown .dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 10px;
}

.custom-dropdown .dropdown-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

/* Local Images Preview for Upload */
.local-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.local-img-item {
  position: relative;
  width: 70px;
  height: 70px;
}

.local-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(99, 102, 241, 0.3);
}

.local-img-item .remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.local-img-item .remove-btn:hover {
  transform: scale(1.1);
}