/* ========================================================
   ANIME SOCIAL HUB - Views & Component Styles
   ======================================================== */

/* Dashboard Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.08) 0%, transparent 70%);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.purple { background: var(--purple-soft); color: var(--purple-primary); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue-primary); }
.stat-icon.pink { background: var(--pink-soft); color: var(--pink-primary); }
.stat-icon.gold { background: #fff8e7; color: var(--gold-glow); }
.stat-icon.green { background: #eafaf1; color: #2ecc71; }
.stat-icon.red { background: #fdeaea; color: #e74c3c; }

.stat-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Social Account Cards */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.account-card {
  background: var(--card-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.account-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.account-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
}

.status-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-badge.connected, .status-badge.published, .status-badge.active {
  background: #eafaf1;
  color: #27ae60;
}

.status-badge.warning, .status-badge.scheduled, .status-badge.testing, .status-badge.retrying {
  background: #fff8e7;
  color: #f39c12;
}

.status-badge.danger, .status-badge.failed, .status-badge.expired {
  background: #fdeaea;
  color: #e74c3c;
}

.status-badge.draft {
  background: #f1f2f6;
  color: #747d8c;
}

.account-main-info {
  margin-bottom: 16px;
}

.account-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--purple-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-name-text {
  font-weight: 800;
  font-size: 16px;
  color: var(--text-main);
}

.account-dest-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.account-meta-list {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(248, 249, 254, 0.7);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.account-meta-item {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.account-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.account-actions .btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
}

/* Post Composer */
.composer-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
}

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

.platform-selector-box {
  margin-bottom: 20px;
}

.platform-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.2s ease;
  user-select: none;
}

.platform-chip input[type="checkbox"] {
  accent-color: var(--purple-primary);
  width: 16px;
  height: 16px;
}

.platform-chip.selected {
  border-color: var(--purple-primary);
  background: var(--purple-soft);
  color: var(--purple-primary);
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.15);
}

.destination-selector-group {
  margin-bottom: 20px;
  background: rgba(248, 249, 254, 0.8);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-glass);
}

.destination-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--purple-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dest-select {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
}

/* Content Area */
.composer-textarea-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.composer-textarea {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-main);
  resize: vertical;
  background: var(--white);
  transition: border-color 0.2s ease;
}

.composer-textarea:focus {
  outline: none;
  border-color: var(--purple-primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15);
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.toolbar-helpers {
  display: flex;
  gap: 8px;
}

.tool-btn {
  background: var(--white);
  border: 1px solid var(--border-glass);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.tool-btn:hover {
  background: var(--purple-soft);
  color: var(--purple-primary);
  border-color: var(--purple-light);
}

.char-counter {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
}

.char-counter.warning {
  color: #f39c12;
}

.char-counter.danger {
  color: #e74c3c;
}

/* Hashtag presets */
.hashtag-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.hashtag-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--pink-soft);
  color: var(--pink-deep);
  cursor: pointer;
  transition: all 0.15s;
}

.hashtag-tag:hover {
  background: var(--pink-primary);
  color: var(--white);
  transform: scale(1.05);
}

/* Media Dropzone */
.media-dropzone {
  border: 2px dashed var(--purple-light);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: rgba(240, 237, 255, 0.3);
  transition: all 0.2s;
  margin-bottom: 20px;
}

.media-dropzone:hover {
  background: rgba(240, 237, 255, 0.7);
  border-color: var(--purple-primary);
}

.media-previews {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.preview-thumb-box {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 2px solid var(--purple-light);
}

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

.btn-remove-thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(214, 48, 49, 0.85);
  color: var(--white);
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
}

/* Scheduling Options Box */
.scheduling-box {
  background: var(--purple-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.schedule-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.switch-label {
  font-weight: 800;
  font-size: 14px;
  color: var(--purple-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Live Preview Mockups */
.preview-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.preview-tab-btn {
  background: none;
  border: none;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
}

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

.social-mockup-frame {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.mockup-header {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mockup-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--purple-soft);
  overflow: hidden;
}

.mockup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mockup-user-name {
  font-weight: 800;
  font-size: 14px;
}

.mockup-meta {
  font-size: 11px;
  color: var(--text-light);
}

.mockup-body {
  padding: 14px;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.mockup-media-container {
  max-height: 280px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-media-container img, .mockup-media-container video {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.mockup-footer {
  padding: 10px 14px;
  display: flex;
  gap: 16px;
  color: var(--text-light);
  font-size: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Calendar Styles */
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

.calendar-day-header {
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--text-light);
  padding: 8px 0;
}

.calendar-day-cell {
  min-height: 110px;
  background: var(--white);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 8px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.calendar-day-cell:hover {
  border-color: var(--purple-light);
  box-shadow: var(--shadow-sm);
}

.calendar-day-cell.today {
  border: 2px solid var(--purple-primary);
  background: rgba(240, 237, 255, 0.2);
}

.calendar-day-number {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.calendar-event-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s;
}

.calendar-event-pill:hover {
  transform: scale(1.03);
}

/* Tables */
.anime-table-wrapper {
  overflow-x: auto;
}

.anime-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.anime-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid var(--border-glass);
}

.anime-table td {
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: 1px solid rgba(124, 92, 252, 0.06);
  vertical-align: middle;
}

.anime-table tr:hover td {
  background: rgba(240, 237, 255, 0.4);
}

/* Content Library Grid */
.library-folders-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.folder-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--border-glass);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.folder-tab.active {
  background: var(--purple-primary);
  color: var(--white);
  border-color: var(--purple-primary);
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.media-gallery-card {
  background: var(--white);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

.media-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.media-thumb-area {
  height: 150px;
  overflow: hidden;
  background: #f1f2f6;
  position: relative;
}

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

.media-card-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.media-card-title {
  font-weight: 800;
  font-size: 13.5px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
