/* ============================================
   MuslimsInnovate Dashboard — Styles
   Mobile-first, dark theme, premium feel
   ============================================ */

:root {
  --teal: #0D7377;
  --teal-light: #10918F;
  --teal-dark: #095456;
  --gold: #D4A843;
  --gold-light: #E4C06A;
  --gold-dark: #B08A30;
  --dark: #1A1A2E;
  --dark-card: #232340;
  --dark-hover: #2A2A4A;
  --dark-border: #333355;
  --dark-input: #1E1E36;
  --off-white: #F8F6F3;
  --text-secondary: #A0A0B8;
  --text-muted: #6B6B80;
  --red: #E54B4B;
  --red-bg: rgba(229, 75, 75, 0.12);
  --green: #2ECC71;
  --green-bg: rgba(46, 204, 113, 0.12);
  --blue: #3B82F6;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --yellow: #F1C40F;
  --yellow-bg: rgba(241, 196, 15, 0.12);
  --purple: #9B59B6;
  --purple-bg: rgba(155, 89, 182, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --nav-height: 64px;
  --header-height: 56px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark);
  color: var(--off-white);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Header ---- */
#app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(26, 26, 46, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--dark-border);
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.logo-mi {
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  color: #fff;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.logo-text {
  color: var(--off-white);
  font-weight: 600;
}

#header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--off-white);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.header-btn:hover {
  background: var(--dark-hover);
}

/* ---- Main Content ---- */
#app-content {
  padding-top: var(--header-height);
  padding-bottom: calc(var(--nav-height) + 16px);
  min-height: 100dvh;
}

.page {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 0.25s ease;
}

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

/* ---- Bottom Nav ---- */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
  text-decoration: none;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
  color: var(--text-secondary);
}

.nav-item.active {
  color: var(--teal-light);
}

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

.nav-icon {
  font-size: 1.3rem;
  transition: transform var(--transition);
  line-height: 1;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ---- Page Title ---- */
.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* ---- Filter / Sort Bar ---- */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--dark-border);
  background: var(--dark-card);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-chip:hover {
  border-color: var(--teal);
  color: var(--off-white);
}

.filter-chip.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.filter-chip .chip-count {
  background: rgba(255,255,255,0.2);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
}

.sort-select {
  appearance: none;
  background: var(--dark-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23A0A0B8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--dark-border);
  color: var(--text-secondary);
  padding: 8px 30px 8px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  min-height: 36px;
}

.sort-select:focus {
  outline: none;
  border-color: var(--teal);
}

/* ---- Post Cards Grid ---- */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

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

/* ---- Post Card ---- */
.post-card {
  background: var(--dark-card);
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

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

.post-card:active {
  transform: translateY(0);
}

.card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--dark-hover);
}

.card-image-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dark-card), var(--dark-hover));
  color: var(--text-muted);
  font-size: 2.5rem;
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: auto;
}

.badge-format {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(8px);
  color: var(--off-white);
}

.badge-virality {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 4px;
}

.virality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.virality-high { background: var(--green); }
.virality-mid { background: var(--gold); }
.virality-low { background: var(--red); }

.card-body {
  padding: 14px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-caption {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.validation-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.validation-confirmed {
  background: var(--green-bg);
  color: var(--green);
}

.validation-likely {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.validation-unverified {
  background: var(--red-bg);
  color: var(--red);
}

.status-badge {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending { background: rgba(212, 168, 67, 0.15); color: var(--gold); }
.status-approved { background: rgba(13, 115, 119, 0.15); color: var(--teal-light); }
.status-rejected { background: var(--red-bg); color: var(--red); }
.status-scheduled { background: var(--blue-bg); color: var(--blue); }
.status-posted { background: var(--green-bg); color: var(--green); }

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

.card-action-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

.card-action-btn:active {
  transform: scale(0.96);
}

.btn-approve:hover, .btn-approve:active {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green);
}

.btn-reject:hover, .btn-reject:active {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}

.btn-edit:hover, .btn-edit:active {
  background: var(--blue-bg);
  border-color: var(--blue);
  color: var(--blue);
}

/* ---- Edit Feedback Form (inline on card) ---- */
.card-feedback-form {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.card-feedback-form input {
  flex: 1;
  background: var(--dark-input);
  border: 1px solid var(--dark-border);
  color: var(--off-white);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: inherit;
}

.card-feedback-form input:focus {
  outline: none;
  border-color: var(--teal);
}

.card-feedback-form button {
  background: var(--teal);
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

/* ---- Verification Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
}

.modal {
  background: var(--dark-card);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--dark-border);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.25s ease;
}

@media (min-width: 640px) {
  .modal { border-radius: var(--radius); }
}

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

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-text {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  font-family: inherit;
  transition: all var(--transition);
}

.modal-btn-primary {
  background: var(--teal);
  color: #fff;
}

.modal-btn-primary:hover {
  background: var(--teal-light);
}

.modal-btn-danger {
  background: var(--red);
  color: #fff;
}

.modal-btn-secondary {
  background: var(--dark-hover);
  color: var(--off-white);
  border: 1px solid var(--dark-border);
}

/* ---- Post Detail Page ---- */
.detail-page {
  padding-top: 8px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 8px 0;
  background: none;
  border: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.detail-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.detail-image-placeholder {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dark-card), var(--dark-hover));
  border-radius: var(--radius);
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 3rem;
}

.detail-header {
  margin-bottom: 20px;
}

.detail-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detail-section {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.detail-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.detail-caption-text {
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-caption-edit {
  width: 100%;
  background: var(--dark-input);
  border: 1px solid var(--dark-border);
  color: var(--off-white);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  min-height: 150px;
}

.detail-caption-edit:focus {
  outline: none;
  border-color: var(--teal);
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--dark-border);
  background: transparent;
  color: var(--off-white);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.detail-btn:active { transform: scale(0.97); }

.detail-btn-approve { border-color: var(--green); color: var(--green); }
.detail-btn-approve:hover { background: var(--green-bg); }
.detail-btn-reject { border-color: var(--red); color: var(--red); }
.detail-btn-reject:hover { background: var(--red-bg); }
.detail-btn-save { background: var(--teal); border-color: var(--teal); color: #fff; }

.detail-source-link {
  color: var(--teal-light);
  text-decoration: none;
  font-size: 0.88rem;
  word-break: break-all;
}

.detail-source-link:hover { text-decoration: underline; }

/* Virality Breakdown */
.virality-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.virality-bar-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 80px;
}

.virality-bar-track {
  flex: 1;
  height: 8px;
  background: var(--dark-input);
  border-radius: 4px;
  overflow: hidden;
}

.virality-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.virality-score-big {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
}

.virality-score-big span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Feedback Thread */
.feedback-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--dark-border);
}

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

.feedback-author {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-light);
}

.feedback-text {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: 2px;
}

.feedback-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.feedback-add {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.feedback-add input {
  flex: 1;
  background: var(--dark-input);
  border: 1px solid var(--dark-border);
  color: var(--off-white);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
}

.feedback-add input:focus { outline: none; border-color: var(--teal); }

.feedback-add button {
  background: var(--teal);
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ---- Schedule View ---- */
.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.schedule-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.schedule-nav-btn {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--off-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.schedule-nav-btn:hover { background: var(--dark-hover); }

.schedule-week-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--off-white);
  min-width: 160px;
  text-align: center;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.schedule-day {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.schedule-day-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-day-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.schedule-day-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.schedule-day-time {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
}

.schedule-day-content {
  padding: 10px 14px;
  min-height: 60px;
}

.schedule-post-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--dark-hover);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.schedule-post-item:hover {
  background: var(--dark-border);
}

.schedule-post-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--dark-border);
}

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

.schedule-post-title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-post-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.schedule-empty-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 2px dashed var(--dark-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.schedule-day.is-today {
  border-color: var(--teal);
}

.schedule-day.is-today .schedule-day-header {
  background: rgba(13, 115, 119, 0.1);
}

/* ---- Collab Tracker ---- */
.collab-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
}

.collab-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.collab-table th {
  background: var(--dark-card);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--dark-border);
  position: sticky;
  top: 0;
  white-space: nowrap;
}

.collab-table td {
  padding: 12px 14px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--dark-border);
  vertical-align: middle;
}

.collab-table tr:hover td {
  background: var(--dark-hover);
}

.collab-table .bool-yes { color: var(--green); font-weight: 600; }
.collab-table .bool-no { color: var(--text-muted); }
.collab-table .bool-pending { color: var(--gold); font-weight: 500; }

.collab-notes {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.collab-add-btn {
  background: var(--teal);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  transition: all var(--transition);
}

.collab-add-btn:hover { background: var(--teal-light); }

/* Collab edit modal form */
.collab-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.collab-form label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.collab-form input,
.collab-form select,
.collab-form textarea {
  background: var(--dark-input);
  border: 1px solid var(--dark-border);
  color: var(--off-white);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  width: 100%;
}

.collab-form input:focus,
.collab-form select:focus,
.collab-form textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.collab-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23A0A0B8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

/* Mobile collab cards */
.collab-cards {
  display: none;
}

@media (max-width: 639px) {
  .collab-table-wrapper { display: none; }
  .collab-cards { display: flex; flex-direction: column; gap: 12px; }
}

.collab-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition);
}

.collab-card:hover { border-color: var(--teal); }

.collab-card-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.collab-card-company {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.collab-card-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.collab-card-stat {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Performance (placeholder) ---- */
.performance-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.performance-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.performance-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.performance-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 340px;
}

/* ---- Loading / Empty States ---- */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--dark-border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 12px;
}

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

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

/* ---- Toast Notifications ---- */
#toast-container {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 420px;
  margin: 0 auto;
}

.toast {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-elevated);
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.toast-exit {
  animation: toastOut 0.2s ease forwards;
}

.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); }
.toast-info { border-left: 3px solid var(--blue); }

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

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

/* ---- Utility ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-teal { color: var(--teal-light); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* ---- Responsive ---- */
@media (min-width: 640px) {
  .page { padding: 20px 24px; }
  .page-title { font-size: 1.6rem; }
  .schedule-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .schedule-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--dark-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Header Branding ---- */
.header-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.logo-text .text-teal {
  color: var(--teal-light);
}

.logo-text .text-gold {
  color: var(--gold);
}

/* ---- Nav Badges ---- */
.nav-icon {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--gold);
  color: var(--dark);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  font-family: 'Inter', sans-serif;
}

.nav-badge-green {
  background: var(--green);
  color: #fff;
}

/* ---- Summary Bar ---- */
.summary-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.summary-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.summary-dot-pending { background: var(--gold); }
.summary-dot-approved { background: var(--teal-light); }
.summary-dot-posted { background: var(--green); }

.summary-sep {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---- Pull to Refresh Hint ---- */
.pull-to-refresh-hint {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 6px 0 10px;
  letter-spacing: 0.3px;
  opacity: 0.6;
}

/* ---- Format Badge Colors ---- */
.badge-format.format-teal {
  background: rgba(13, 115, 119, 0.85);
  color: #fff;
}

.badge-format.format-gold {
  background: rgba(212, 168, 67, 0.85);
  color: var(--dark);
}

.badge-format.format-green {
  background: rgba(46, 204, 113, 0.85);
  color: var(--dark);
}

.badge-format.format-purple {
  background: rgba(155, 89, 182, 0.85);
  color: #fff;
}

.badge-format.format-blue {
  background: rgba(59, 130, 246, 0.85);
  color: #fff;
}

.badge-format.format-default {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(8px);
  color: var(--off-white);
}

/* ---- Validation Dots ---- */
.validation-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.validation-dot-green {
  background: var(--green);
}

.validation-dot-yellow {
  background: var(--yellow);
}

.validation-dot-red {
  background: var(--red);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
