/* GLOBAL TV Premium Stylesheet - Modern, Fluid Glassmorphism */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #f8fafc;
  --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-primary: #09090b;
  --text-secondary: #475569;
  --primary: #DC2626;
  --primary-hover: #B91C1C;
  --primary-glow: rgba(220, 38, 38, 0.12);
  --accent: #d97706;
  --success: #16a34a;
  --info: #2563eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

input, select, textarea, button {
  font-family: inherit;
}

html {
  font-size: 88.5%;
}

body {
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.875rem;
  min-height: 100dvh;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* Header / Navigation */
header.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.brand span.logo-text {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(229, 62, 62, 0.05);
}

.profile-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar-badge {
  background: var(--primary);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(229, 62, 62, 0.2);
}

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

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
}

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

.logout-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

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

/* Main Content area */
main.app-main {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Grid Dashboards */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 3fr 2fr;
  }
  .dashboard-grid.wide {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: var(--transition);
}

.card.primary-accent::before {
  background: var(--primary);
}

.card.success-accent::before {
  background: var(--success);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05), 0 4px 8px -2px rgba(0, 0, 0, 0.03);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Forms & Form Controls */
.form-group {
  margin-bottom: 1rem;
}

label.form-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
  background: #ffffff;
}

/* Stepper Wizard Styling */
.stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--card-border);
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  flex: 1;
  text-align: center;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.step-text {
  font-size: 0.78rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.step-line {
  height: 2px;
  background: #cbd5e1;
  flex: 1;
  margin: 0 0.5rem;
  margin-top: -1rem; /* align with numbers */
}

.step-indicator.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(229, 62, 62, 0.2);
}

.step-indicator.active .step-text {
  color: var(--primary);
}

.step-indicator.completed .step-num {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.step-indicator.completed .step-text {
  color: var(--success);
}

@media (max-width: 768px) {
  .step-text {
    font-size: 0.7rem !important;
  }
  .step-num {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
  }
  .step-line {
    margin-top: -0.9rem !important;
  }
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Custom Platform Selector */
.platform-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.platform-checkbox {
  position: relative;
  display: block;
}

.platform-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.platform-checkbox span {
  display: block;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 0.8rem;
  text-align: center;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  color: var(--text-secondary);
  user-select: none;
}

.platform-checkbox input:checked + span {
  background: rgba(229, 62, 62, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 10px rgba(229, 62, 62, 0.05);
}

.platform-checkbox:hover span {
  border-color: #94a3b8;
}

/* Publish Switch */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
}

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

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.15rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
  gap: 0.4rem;
}

.btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.2);
}

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

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

.btn-secondary:hover {
  background: #e2e8f0;
  box-shadow: none;
}

/* Link Tag Input style */
.links-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-row {
  display: flex;
  gap: 0.5rem;
}

.link-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.link-badge {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid var(--info);
  color: var(--info);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.link-badge a {
  color: inherit;
  text-decoration: none;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-badge .remove-link {
  cursor: pointer;
  font-weight: bold;
  color: var(--primary);
}

/* Status badge styles */
.badge {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-pending {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-hod {
  background: rgba(37, 99, 235, 0.1);
  color: var(--info);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-manager {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

/* Feed lists */
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.feed-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.feed-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

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

.feed-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  gap: 1rem;
}

/* Detailed Reports Views / Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

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

.modal-body {
  padding: 1.5rem;
}

.close-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.35rem;
  cursor: pointer;
  transition: var(--transition);
}

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

/* Detail Section Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 576px) {
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.detail-block {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  padding: 0.8rem 1rem;
  border-radius: 8px;
}

.detail-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.2rem;
}

.detail-value {
  font-weight: 500;
  font-size: 0.85rem;
}

.detail-value.multiline {
  white-space: pre-wrap;
}

/* Review Forms */
.review-section {
  border-top: 1px solid var(--card-border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

/* Star Ratings input */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
  margin: 0.5rem 0 1rem;
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 1.5rem;
  color: rgba(0,0,0,0.15);
  cursor: pointer;
  transition: var(--transition);
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: var(--accent);
}

/* Ratings representation static */
.stars-static {
  color: var(--accent);
  display: inline-flex;
  gap: 0.1rem;
}

/* Responsive Daily Status Table */
.status-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #ffffff;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.status-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--card-border);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.4px;
}

.status-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
  color: var(--text-primary);
  line-height: 1.35;
}

/* Status Table Column Min-Widths to Prevent Overlap and Text Squishing */
.status-table th:nth-child(1), .status-table td:nth-child(1) { min-width: 145px; } /* Mfanyakazi */
.status-table th:nth-child(2), .status-table td:nth-child(2) { min-width: 130px; } /* Hali ya Uwasilishaji */
.status-table th:nth-child(3), .status-table td:nth-child(3) { min-width: 130px; } /* Eneo la Kazi */
.status-table th:nth-child(4), .status-table td:nth-child(4) { min-width: 200px; } /* Habari (Done/Published) */
.status-table th:nth-child(5), .status-table td:nth-child(5) { min-width: 120px; } /* Ukadiriaji wa HOD */
.status-table th:nth-child(6), .status-table td:nth-child(6) { min-width: 120px; } /* Chat & Mrejesho */
.status-table th:nth-child(7), .status-table td:nth-child(7) { min-width: 100px; } /* Kitendo */

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

.status-table tr:hover td {
  background: #f8fafc;
}

/* EASY CHAT Thread Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  max-height: 350px;
  min-height: 120px;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-bubble.reporter {
  background: #ffffff;
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.chat-bubble.hod {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.chat-bubble.manager {
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(22, 163, 74, 0.12);
  color: #064e3b;
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.chat-bubble.self {
  align-self: flex-end;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-top-right-radius: 2px;
  border-top-left-radius: 12px;
  box-shadow: 0 2px 8px rgba(229, 62, 62, 0.15);
}

.chat-sender {
  font-weight: 600;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.chat-bubble.self .chat-sender {
  color: rgba(255, 255, 255, 0.9);
}

.chat-bubble.hod:not(.self) .chat-sender {
  color: var(--info);
}

.chat-bubble.manager:not(.self) .chat-sender {
  color: var(--success);
}

.chat-bubble.reporter:not(.self) .chat-sender {
  color: var(--text-secondary);
}

.chat-time {
  font-weight: normal;
  font-size: 0.7rem;
  opacity: 0.75;
}

.chat-rating {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--accent);
}

.chat-bubble.self .chat-rating {
  color: #fef08a;
}

.chat-input-container {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #ffffff;
  border-top: 1px solid var(--card-border);
}

.chat-input-container input {
  flex: 1;
}

/* Flexible History Cards Grid */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.history-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 125px;
}

.history-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.history-card-date {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.history-card-day {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Pulsing Notification Badge */
.notif-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(229, 62, 62, 0.3);
}

.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--primary);
}

.pulse {
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(229, 62, 62, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0);
  }
}

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

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-val {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.5rem 0;
}

.stat-val.primary-color {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

.stat-val.success-color {
  color: var(--success);
}

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

/* Platform Distribution Custom Chart */
.chart-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.chart-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chart-label {
  width: 110px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.chart-bar-bg {
  flex: 1;
  height: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.chart-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 8px;
  transition: width 1s ease-in-out;
  box-shadow: 0 0 10px var(--primary-glow);
}

.chart-bar-fill.youtube { background: #ff0000; }
.chart-bar-fill.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.chart-bar-fill.facebook { background: #1877f2; }
.chart-bar-fill.website { background: #38a169; }
.chart-bar-fill.ad { background: #ecc94b; }

.chart-percentage {
  width: 45px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Sidebar lists details */
.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 550px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* Notification Toast Banner - Website Light Theme */
.toast {
  position: fixed;
  bottom: 2.5rem;
  right: 2rem;
  background: #ffffff;
  color: var(--text-primary, #0f172a);
  border: 1px solid var(--card-border, #e2e8f0);
  border-left: 4px solid var(--success, #16a34a);
  padding: 0.9rem 1.4rem;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15), 0 4px 6px -2px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10000;
  font-weight: 600;
  font-size: 0.9rem;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.error {
  border-left-color: var(--primary, #e53e3e);
}

.toast.show {
  transform: translateY(0);
}

/* Dropdowns / Header Filters */
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-end;
}

.filter-item {
  flex: 1;
  min-width: 150px;
}

/* Tab Pills Styling */
.dashboard-tabs {
  display: flex;
  gap: 0.75rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(229, 62, 62, 0.05);
}

.tab-btn.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.2);
}

/* Collapsible Monthly Attendance Table Styles */
.tracker-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: #ffffff;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

.tracker-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.tracker-table th, .tracker-table td {
  padding: 0.6rem 0.4rem;
  border: 1px solid var(--card-border);
  text-align: center;
  vertical-align: middle;
}

.tracker-table th {
  font-weight: 600;
}

.tracker-table td.reporter-name-cell {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  background: #f8fafc;
  min-width: 150px;
  position: sticky;
  left: 0;
  z-index: 10;
  border-right: 2px solid var(--card-border);
}

.tracker-month-header {
  cursor: pointer;
  background: #f8fafc;
  font-weight: 700;
  user-select: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.tracker-month-header:hover {
  background: rgba(229, 62, 62, 0.05);
  color: var(--primary);
}

.tracker-day-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #f8fafc;
  min-width: 26px;
}

.tracker-day-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.tracker-day-dot.submitted {
  background: var(--success);
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
}

.tracker-day-dot.missing {
  background: #cbd5e1;
}

.tracker-day-dot.overdue {
  background: var(--primary);
  box-shadow: 0 0 6px rgba(229, 62, 62, 0.4);
}

.tracker-summary-cell {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-primary);
  background: #f8fafc;
  min-width: 65px;
}

/* Print CSS */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  header.app-header, .logout-btn, .btn, .filters-row, .review-section, .close-modal, .toast, .dashboard-tabs, .tab-btn {
    display: none !important;
  }
  main.app-main {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .card {
    background: transparent !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    page-break-inside: avoid;
    margin-bottom: 20px;
  }
  .stat-card {
    border: 1px solid #ddd !important;
  }
  .chart-bar-bg {
    border: 1px solid #ddd !important;
  }
}

/* Reporter Timeline styling */
.timeline-container {
  position: relative;
  padding-left: 2.25rem;
  margin-top: 1.5rem;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
}

.timeline-dot {
  position: absolute;
  left: -2.25rem;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--primary);
  z-index: 2;
  box-shadow: 0 0 6px rgba(229, 62, 62, 0.3);
  transition: background 0.2s, border-color 0.2s;
}

.timeline-item:hover .timeline-dot {
  background: var(--primary);
}

.timeline-content {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.timeline-date-info {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 0.5rem !important;
  }
  
  main.app-main {
    padding: 0.5rem 0.25rem !important;
  }
  
  .card {
    padding: 1rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  header.app-header {
    padding: 0.65rem 0.85rem !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  /* Hide GLOBAL TV title text on mobile - only show logo icon */
  header.app-header .brand span {
    display: none !important;
  }

  header.app-header .brand {
    gap: 0 !important;
    flex-shrink: 0;
  }

  header.app-header .brand img {
    width: 32px !important;
    height: 32px !important;
  }
  
  header.app-header .nav-links {
    display: none !important; /* Hide desktop links */
  }

  .profile-widget {
    gap: 0.35rem !important;
    margin-left: auto;
  }

  .profile-widget .user-info-text {
    display: none !important; /* Hide textual name in mobile header to save space */
  }

  .profile-widget i[data-lucide="user-cog"] {
    display: none !important;
  }

  .profile-widget .avatar-badge {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
  }

  .form-control {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    padding: 0.85rem 1rem !important; /* Larger touch target */
  }

  .btn {
    padding: 0.85rem 1.5rem !important; /* Larger tap area */
    font-size: 1rem !important;
  }
  
  .history-grid {
    grid-template-columns: 1fr !important; /* Single column stack */
    gap: 1rem !important;
  }

  .timeline-container {
    padding-left: 1.75rem !important;
  }

  .timeline-dot {
    left: -1.75rem !important;
  }
  
  .timeline-content {
    padding: 1rem !important;
  }
  
  .timeline-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Chat modal / popup height using dvh */
  .modal-container {
    max-height: 92dvh !important;
    width: 95% !important;
    margin: 10px auto !important;
  }

  .chat-container {
    height: 300px !important;
  }
}
/* Bottom Tab Navigation for Mobile */
.mobile-bottom-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--card-border);
  height: 62px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.mobile-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 4px;
  flex: 1;
  transition: color 0.2s, transform 0.1s;
}

.mobile-tab-btn i {
  width: 20px;
  height: 20px;
  transition: transform 0.2s;
}

.mobile-tab-btn:active i {
  transform: scale(0.9);
}

.mobile-tab-btn.active {
  color: var(--primary);
  font-weight: 600;
}

/* Loader Indicator Overlay */
.loader-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--card-border);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Toast Notification Overlay */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #09090b;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--success);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.toast.error {
  border-left-color: var(--primary);
}

.toast i {
  color: var(--success);
  flex-shrink: 0;
}

.toast.error i {
  color: var(--primary);
}

@media (max-width: 768px) {
  .toast {
    bottom: calc(75px + env(safe-area-inset-bottom));
    left: 1rem;
    right: 1rem;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .mobile-bottom-tabs {
    display: flex;
  }
  
  .dashboard-tabs {
    display: none !important; /* Hide desktop tab buttons */
  }

  body {
    padding-bottom: 75px !important;
  }

  /* Employee mobile dashboard layouts */
  #today-container, #history-container {
    display: none;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* Compact card paddings on mobile */
  .card {
    padding: 1rem 0.85rem !important;
    margin-bottom: 0.75rem !important;
    border-radius: 12px !important;
  }
  
  .card-title {
    font-size: 1.05rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* Compact switch toggle sliders */
  .switch-container {
    padding: 0.65rem 0.85rem !important;
    border-radius: 8px !important;
    margin-top: 0.75rem !important;
  }
  
  .switch {
    width: 44px !important;
    height: 22px !important;
  }
  
  .slider:before {
    height: 16px !important;
    width: 16px !important;
    left: 3px !important;
    bottom: 3px !important;
  }
  
  input:checked + .slider:before {
    transform: translateX(22px) !important;
  }

  /* Compact custom platforms selector buttons */
  .platform-checkbox span {
    padding: 0.55rem 0.75rem !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
  }

  /* Compact custom timeline contents */
  .timeline-content {
    padding: 0.85rem !important;
    border-radius: 8px !important;
  }

  /* Hide history layout switcher on mobile */
  .history-view-switcher {
    display: none !important;
  }
}

@media (min-width: 769px) {
  #today-container, #history-container {
    display: block !important;
  }
}

/* Sticky table headers until scrolling is done */
.status-table-container {
  max-height: 480px;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.status-table-container thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 20;
  box-shadow: inset 0 -1px 0 var(--card-border);
}

.tracker-table-container {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
  border: 1px solid var(--card-border);
  border-radius: 10px;
}

.tracker-table-container thead tr th {
  position: sticky;
  background: #f8fafc;
  z-index: 20;
  box-shadow: inset 0 -1px 0 var(--card-border);
}

.tracker-table-container thead tr:first-child th {
  top: 0;
  z-index: 25;
}

.tracker-table-container thead tr:nth-child(2) th {
  top: 27px; /* Position below first header row */
  z-index: 25;
}

/* Fix sticky reporter column overlap with sticky headers */
.tracker-table td.reporter-name-cell {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #f8fafc;
  border-right: 2px solid var(--card-border);
}

.tracker-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 30; /* Higher than sticky headers and columns */
  background: #f8fafc;
}

/* Edit Links Mode overrides */
#form-card.editing-links .stepper-container,
#form-card.editing-links .form-step:not(#form-step-2),
#form-card.editing-links #form-step-2 .switch-container,
#form-card.editing-links #form-step-2 label.form-label,
#form-card.editing-links #form-step-2 .platform-selector,
#form-card.editing-links #form-step-2 .step-nav-buttons {
  display: none !important;
}

#form-card.editing-links #form-step-2 #publish-options {
  display: block !important;
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

#form-card.editing-links .edit-links-actions {
  display: block !important;
}

/* Floating Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(10px);
}

.back-to-top-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(229, 62, 62, 0.3);
}

.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .back-to-top-btn {
    bottom: 5.5rem; /* Safe position above the PWA mobile bottom nav bar */
    right: 1.25rem;
    width: 38px;
    height: 38px;
  }
}

/* Timeline details fluid flow */
@media (max-width: 768px) {
  .timeline-details-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  
  .timeline-details-grid div:last-child {
    text-align: left !important;
  }
}

/* Active today's column highlight in Monthly Tracker */
.tracker-today-column-active {
  background: rgba(229, 62, 62, 0.05) !important;
  border-left: 2.5px dashed rgba(229, 62, 62, 0.3) !important;
  border-right: 2.5px dashed rgba(229, 62, 62, 0.3) !important;
}

th.tracker-today-column-active {
  background: rgba(229, 62, 62, 0.08) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
}

/* Tracker Table Row and Column Hover Crosshair Highlights */
.tracker-table tr.hovered-row td {
  background: rgba(229, 62, 62, 0.02) !important;
}

.tracker-table td.hovered-column, 
.tracker-table th.hovered-column {
  background: rgba(229, 62, 62, 0.025) !important;
}

/* Intersecting focused cell where cursor sits */
.tracker-table tr.hovered-row td.hovered-column {
  background: rgba(229, 62, 62, 0.07) !important;
}

/* Link Metrics Pill & Tooltip Styles */
.link-item-wrapper {
  position: relative;
}

.link-metrics-pill {
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  position: relative;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.link-metrics-pill span {
  font-size: 0.68rem;
}

.link-metrics-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Tooltip style popup */
.link-metrics-pill .metrics-tooltip {
  display: none;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  width: 200px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.4);
  z-index: 10000;
  text-transform: none;
  font-weight: normal;
  pointer-events: none;
  text-align: left;
}

.link-metrics-pill:hover .metrics-tooltip {
  display: block;
}

.link-metrics-pill.youtube {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.link-metrics-pill.instagram {
  background: rgba(236, 72, 153, 0.1);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.2);
}

.link-metrics-pill.facebook {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.2);
}

.link-metrics-pill.website {
  background: rgba(107, 114, 128, 0.1);
  color: #9ca3af;
  border-color: rgba(107, 114, 128, 0.2);
}

/* Sidebar Layout (Desktop & Tablet) - Red & White Theme */
@media (min-width: 769px) {
  .app-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    min-height: 100vh !important;
    background: #f8fafc;
  }
  
  .main-content-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    background: #f8fafc;
  }

  .app-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid var(--card-border, #e2e8f0);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.02);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 900;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border, #e2e8f0);
    margin-bottom: 1rem;
    color: var(--text-primary, #0f172a);
  }

  .sidebar-user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f8fafc;
    border: 1px solid var(--card-border, #e2e8f0);
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
  }

  .sidebar-user-badge .avatar-badge {
    background: var(--primary, #e53e3e);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.78rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .sidebar-user-info .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-user-info .user-role {
    font-size: 0.7rem;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    font-weight: 500;
  }

  .sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    overflow-y: auto;
  }

  .menu-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.8px;
    margin: 0.6rem 0.5rem 0.3rem;
  }

  .sidebar-link, .sidebar-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    color: var(--text-secondary, #475569);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.2s ease;
  }

  .sidebar-link i, .sidebar-tab-btn i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .sidebar-link:hover, .sidebar-tab-btn:hover {
    background: #f8fafc;
    color: var(--text-primary, #0f172a);
    transform: translateX(2px);
  }

  .sidebar-link.active, .sidebar-tab-btn.active {
    background: linear-gradient(90deg, rgba(229, 62, 62, 0.08) 0%, rgba(229, 62, 62, 0.02) 100%);
    color: var(--primary, #e53e3e);
    font-weight: 700;
    border-left: 3px solid var(--primary, #e53e3e);
    border-radius: 0 8px 8px 0;
  }

  .sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--card-border, #e2e8f0);
    margin-top: auto;
  }

  .sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .sidebar-logout-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
  }

  header.app-header .brand,
  header.app-header .nav-links {
    display: none !important;
  }

  header.app-header {
    justify-content: flex-end !important;
    background: #ffffff !important;
    border-bottom: 1px solid var(--card-border, #e2e8f0) !important;
    padding: 0.85rem 2rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
  }

  main.app-main {
    flex: 1 !important;
    padding: 2rem !important;
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    align-self: flex-start !important;
  }
}

/* Modern Segmented Control for Desktop Tabs */
.dashboard-tabs {
  display: inline-flex;
  gap: 0.4rem;
  background: #ffffff;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--card-border, #e2e8f0);
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dashboard-tabs .tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-tabs .tab-btn:hover {
  color: var(--text-primary, #0f172a);
  background: #f8fafc;
}

.dashboard-tabs .tab-btn.active {
  background: var(--primary, #e53e3e);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(229, 62, 62, 0.25);
}

.dashboard-tabs .tab-btn i {
  width: 16px;
  height: 16px;
}

/* Desktop Grid Card Accent Top Border */
.card.wide {
  border-top: 3px solid var(--primary, #e53e3e);
}

/* ==========================================================================
   STICKY REPORTER COLUMN FOR MONTHLY TRACKER TABLES
   ========================================================================== */
.tracker-table th.sticky-name-col,
.tracker-table td.sticky-name-col {
  position: sticky !important;
  left: 0 !important;
  z-index: 5 !important;
  background: #ffffff;
  box-shadow: 3px 0 8px -2px rgba(0, 0, 0, 0.08);
}

.tracker-table th.sticky-name-col {
  z-index: 15 !important;
  background: #f8fafc;
}

/* Responsive Container with custom horizontal scrollbar styling */
.tracker-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 62, 62, 0.3) transparent;
  border-radius: 12px;
}

.tracker-table-container::-webkit-scrollbar {
  height: 6px;
}

.tracker-table-container::-webkit-scrollbar-track {
  background: transparent;
}

.tracker-table-container::-webkit-scrollbar-thumb {
  background: rgba(229, 62, 62, 0.3);
  border-radius: 4px;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--card-border, #e2e8f0);
  z-index: 9999;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary, #64748b);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  min-width: 58px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.mobile-nav-item i {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.mobile-nav-item:active i {
  transform: scale(0.9);
}

.mobile-nav-item.active {
  color: var(--primary, #e53e3e);
}

.mobile-nav-item.active i {
  stroke-width: 2.5;
}

.mobile-nav-badge {
  position: absolute;
  top: 2px;
  right: 12px;
  background: var(--primary, #e53e3e);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   CANNED FEEDBACK CHIPS (FOR HOD & MANAGER CHAT)
   ========================================================================== */
.canned-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.85rem;
}

.canned-chip {
  background: rgba(229, 62, 62, 0.08);
  border: 1px solid rgba(229, 62, 62, 0.2);
  color: var(--primary, #e53e3e);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.canned-chip:hover, .canned-chip:active {
  background: var(--primary, #e53e3e);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   INSTANT LINK LIVE PREVIEW CARD
   ========================================================================== */
.link-live-preview {
  margin-top: 8px;
  background: #f8fafc;
  border: 1px solid var(--card-border, #e2e8f0);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  animation: fadeIn 0.3s ease;
}

.link-live-preview img {
  width: 52px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.link-live-preview .preview-meta {
  flex: 1;
  min-width: 0;
}

.link-live-preview .preview-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-live-preview .preview-platform {
  font-size: 0.7rem;
  color: var(--text-secondary, #64748b);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & BOTTOM-SHEET MODAL RULES
   ========================================================================== */
@media (max-width: 768px) {
  .app-sidebar {
    display: none !important;
  }
  
  .mobile-bottom-nav {
    display: flex !important;
  }
  
  /* Space out main content to avoid bottom nav overlay */
  main.app-main {
    padding: 1rem 1rem calc(75px + env(safe-area-inset-bottom)) 1rem !important;
  }

  header.app-header {
    padding: 0.75rem 1rem !important;
  }

  /* Transform modals to sleek bottom-sheets on mobile */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-container {
    border-radius: 20px 20px 0 0 !important;
    max-height: 90dvh !important;
    max-width: 100% !important;
    margin: 0 !important;
    transform: translateY(100%) !important;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1) !important;
  }

  .modal-overlay.open .modal-container {
    transform: translateY(0) !important;
  }

  .dashboard-tabs {
    display: flex;
    width: 100%;
  }

  .dashboard-tabs .tab-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.6rem;
  }

  /* Welcome Banner Mobile Typography adjustments */
  .welcome-banner {
    padding: 0.85rem 1rem !important;
  }

  .welcome-banner-title {
    font-size: 1rem !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100vw - 110px) !important;
  }

  .welcome-banner-meta {
    font-size: 0.76rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100vw - 110px) !important;
  }

  .welcome-banner-icon {
    width: 38px !important;
    height: 38px !important;
  }

  .welcome-banner-icon i {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Welcome Banner Standard Typography */
.welcome-banner-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.welcome-banner-meta {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 3px;
  margin-bottom: 0;
}

.welcome-banner-icon {
  background: rgba(220, 38, 38, 0.1);
  color: var(--primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


