/* ==========================================================================
   TUTORMATCH - MODERN NOTIFICATIONS PAGE STYLESHEET
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  
  --success: #10b981;
  --success-light: #d1fae5;
  
  --amber: #f59e0b;
  --amber-light: #fef3c7;
  
  --teal: #0d9488;
  --teal-light: #ccfbf1;

  --dark-bg: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;
  
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --font-family: 'Plus Jakarta Sans', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body.tm-notif-body {
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Navbar Fix */
.tm-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

.tm-nav-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tm-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  font-size: 20px;
}

.tm-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.tm-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tm-nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.tm-nav-link:hover {
  color: var(--primary);
}

/* Notifications Container */
.tm-notif-container {
  max-width: 900px;
  margin: 40px auto 80px auto;
  padding: 0 20px;
}

/* Header */
.tm-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.tm-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tm-title-wrapper h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.tm-notif-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.tm-btn-mark-read {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.tm-btn-mark-read:hover {
  opacity: 0.8;
}

/* Tabs */
.tm-notif-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
}

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

.tm-tab-btn:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.tm-tab-btn.active {
  background-color: var(--card-bg);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Notification List Items */
.tm-notif-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tm-notif-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 16px;
  position: relative;
  transition: all 0.2s ease;
}

.tm-notif-item.unread {
  background-color: #f0fdf4; /* Slightly tinted for fresh look */
  background-color: #faf5ff; /* Or Soft Indigo Tint */
  background-color: #f8fafc;
  border-color: #c7d2fe;
}

.tm-notif-item:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

/* Icon Badges */
.tm-notif-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tm-notif-icon svg {
  width: 20px;
  height: 20px;
}

.tm-notif-icon.lead {
  background-color: var(--primary-light);
  color: var(--primary);
}

.tm-notif-icon.payment {
  background-color: var(--teal-light);
  color: var(--teal);
}

.tm-notif-icon.alert {
  background-color: var(--amber-light);
  color: var(--amber);
}

.tm-notif-icon.success {
  background-color: var(--success-light);
  color: var(--success);
}

/* Content */
.tm-notif-content {
  flex: 1;
}

.tm-notif-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
  gap: 12px;
}

.tm-notif-title-row h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.tm-notif-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.tm-notif-content p {
  font-size: 14px;
  color: #475569;
}

/* Actions Inside Card */
.tm-notif-actions {
  margin-top: 12px;
}

.tm-notif-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
}

.tm-notif-btn.primary {
  background-color: var(--primary);
  color: #ffffff;
}

.tm-notif-btn.primary:hover {
  background-color: var(--primary-hover);
}

.tm-notif-btn.secondary {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.tm-notif-btn.secondary:hover {
  background-color: #e2e8f0;
}

/* Unread Dot */
.tm-unread-dot {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
}

/* Footer */
.tm-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 768px) {
  .tm-notif-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .tm-notif-title-row {
    flex-direction: column;
    gap: 2px;
  }

  .tm-unread-dot {
    top: 12px;
    right: 12px;
  }

  .tm-notif-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .tm-tab-btn {
    flex-shrink: 0;
  }
}

/* Dashboard shell integration */
.tm-dashboard-content.tm-notif-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.tm-notif-body .tm-dashboard-topbar,
.tm-student-notif-body .tm-dashboard-topbar {
  position: sticky;
}