:root,
html[data-theme="dark"] {
  --bg: #0f1419;
  --bg-card: #1a2332;
  --bg-elevated: #243044;
  --bg-footer: #0b0f15;
  --accent: #0d9488;
  --accent-hover: #14b8a6;
  --gold: #d4a853;
  --text: #e8edf4;
  --text-strong: #ffffff;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --border: #2d3a4f;
  --border-soft: rgba(148, 163, 184, 0.1);
  --header-bg: rgba(26, 35, 50, 0.95);
  --input-bg: var(--bg);
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: 'Tajawal', 'Segoe UI', sans-serif;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-card: #ffffff;
  --bg-elevated: #eef2f7;
  --bg-footer: #ffffff;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --gold: #b8860b;
  --text: #0f1729;
  --text-strong: #020617;
  --text-muted: #64748b;
  --text-soft: #334155;
  --border: #e2e8f0;
  --border-soft: rgba(15, 23, 41, 0.06);
  --header-bg: rgba(255, 255, 255, 0.92);
  --input-bg: #ffffff;
  --shadow: 0 8px 32px rgba(15, 23, 41, 0.08);
  color-scheme: light;
}

html { transition: background-color 0.25s ease, color 0.25s ease; }
body { transition: background-color 0.25s ease, color 0.25s ease; }
.site-header, .site-footer, .card, .feature-card, .notif-item,
.people-card, .notifications-panel, .form-section, .stat-card,
.notif-hero, .cta-card, .landing-search, .header-search,
.profile-card, .review-meta-card, .file-preview-section,
.search-bar, .notification-card {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  direction: rtl;
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span { color: var(--accent-hover); }

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
}

.brand-logo {
  height: 42px;
  width: auto;
  display: block;
}

.brand-logo--sm { height: 36px; }

.text-brand {
  background: linear-gradient(135deg, var(--gold), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-logout-form { display: inline; margin: 0; }
.nav-logout-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}
.nav-logout-btn:hover { color: var(--text); text-decoration: underline; }

/* Auth card (login / register / password reset) */
.auth-card {
  max-width: 440px;
  margin: 2rem auto;
  padding: 2.5rem 2rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-card--wide { max-width: 620px; }

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  text-align: right;
  margin-bottom: 0.5rem;
}

.auth-grid .form-group { margin-bottom: 0; }
.auth-grid-full { grid-column: 1 / -1; }

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

.auth-card::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.18), transparent 70%);
  pointer-events: none;
}

.auth-card-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  margin-bottom: 1.25rem;
}

.auth-card-mark {
  height: 56px;
  width: 56px;
  display: none;
}

.auth-card-wordmark {
  height: 48px;
  width: auto;
}

.auth-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.auth-card-subtitle {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.auth-form { text-align: right; }
.auth-form .form-group { margin-bottom: 1rem; }

.btn-block { width: 100%; justify-content: center; margin-top: 0.5rem; }

.auth-card-links {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-card-links a {
  color: var(--accent-hover);
  font-weight: 600;
}

.auth-card-links p { margin: 0.5rem 0 0; }

.auth-divider {
  display: block;
  height: 1px;
  background: var(--border-soft);
  margin: 0.65rem 0;
}

@media (max-width: 480px) {
  .auth-card { margin: 1rem; padding: 2rem 1.25rem 1.5rem; border-radius: 14px; }
  .auth-card-wordmark { height: 40px; }
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(15deg);
}

.theme-toggle-icon { line-height: 1; }
html[data-theme="dark"] .theme-toggle-icon--dark { display: none; }
html[data-theme="dark"] .theme-toggle-icon--light { display: inline; }
html[data-theme="light"] .theme-toggle-icon--dark { display: inline; }
html[data-theme="light"] .theme-toggle-icon--light { display: none; }

/* Light theme refinements */
html[data-theme="light"] .badge-notif { background: var(--danger); }
html[data-theme="light"] .notif-item-message { color: var(--text-soft); }
html[data-theme="light"] .landing-stat strong,
html[data-theme="light"] .landing-accent {
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html[data-theme="light"] .blob-a { opacity: 0.18; }
html[data-theme="light"] .blob-b { opacity: 0.12; }

html[data-theme="light"] .file-preview-pdf-wrap { background: #e2e8f0; }
html[data-theme="light"] .alert-warning { color: #92400e; }
html[data-theme="light"] .status-pending { color: #b45309; }
html[data-theme="light"] .status-modification { color: #1d4ed8; }
html[data-theme="light"] .tag,
html[data-theme="light"] .notif-type-tag { color: var(--accent); }

html[data-theme="light"] .nav-links a {
  color: var(--text-soft);
}

html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group textarea,
html[data-theme="light"] .form-group select,
html[data-theme="light"] .header-search input,
html[data-theme="light"] .landing-search input,
html[data-theme="light"] .landing-search select {
  background: var(--input-bg);
  color: var(--text);
}

html[data-theme="light"] .data-table th { color: var(--text-soft); }

.badge-notif {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-right: 0.25rem;
}

/* ============================================
   LANDING PAGE (robio.ma)
   ============================================ */
.landing-hero {
  position: relative;
  margin: -2.5rem -1.5rem 3rem;
  padding: 5rem 1.5rem 4rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top right, rgba(13, 148, 136, 0.15), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(212, 168, 83, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.landing-hero-bg { position: absolute; inset: 0; pointer-events: none; }

.landing-hero-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.blob-a {
  width: 380px; height: 380px;
  background: var(--accent);
  top: -120px; right: -60px;
}

.blob-b {
  width: 320px; height: 320px;
  background: var(--gold);
  bottom: -80px; left: -40px;
  opacity: 0.18;
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.landing-hero-inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.3);
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.landing-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.landing-title {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 1.25rem;
  color: var(--text);
  letter-spacing: -0.5px;
}

.landing-accent {
  background: linear-gradient(135deg, var(--gold) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.75;
}

.landing-search {
  display: flex;
  gap: 0.5rem;
  max-width: 680px;
  margin: 0 auto 2rem;
  padding: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
}

.landing-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  min-width: 200px;
}

.landing-search-icon {
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
}

.landing-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0;
  outline: none;
  min-width: 0;
}

.landing-search select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.landing-search .btn {
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
}

.landing-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn-lg { padding: 0.85rem 1.85rem; font-size: 1rem; }

.landing-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

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

.landing-stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.landing-stat span {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

/* Features */
.landing-features { margin: 4rem 0; }

.landing-section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  text-align: center;
  margin: 0 0 2.5rem;
  color: var(--text);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Types */
.landing-types { margin: 4rem 0; }

.types-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: all 0.2s;
}

.type-pill:hover {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.12);
  color: var(--accent-hover);
  transform: translateY(-2px);
}

/* Latest publications */
.landing-latest { margin: 4rem 0; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.landing-article-card { position: relative; }

.card-type-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(13, 148, 136, 0.18);
  color: var(--accent-hover);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Final CTA */
.landing-cta-final { margin: 5rem 0 3rem; }

.cta-card {
  text-align: center;
  padding: 3.5rem 2rem;
  background:
    radial-gradient(ellipse at top, rgba(13, 148, 136, 0.18), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.cta-card h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0 0 0.75rem;
  color: var(--text);
}

.cta-card > p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none !important;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-hover); }

.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: #111; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card .meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.card .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }

.tag {
  background: var(--bg-elevated);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--accent-hover);
}

/* Forms */
.form-section {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-section h2 { margin-bottom: 1.5rem; color: var(--gold); }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

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

.form-check { display: flex; align-items: flex-start; gap: 0.75rem; margin: 1rem 0; }
.form-check input { width: auto; margin-top: 0.35rem; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--warning);
  color: #fcd34d;
}

.alert-info {
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid var(--accent);
}

.alert-danger { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--danger); }
.alert-success { background: rgba(34, 197, 94, 0.15); border: 1px solid var(--success); }

.terms-box {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-height: 200px;
  overflow-y: auto;
  margin: 1rem 0;
  white-space: pre-wrap;
}

/* Status badges */
.status {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-pending { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.status-accepted { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.status-rejected { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.status-modification { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }

/* Dashboard stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

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

.stat-card .number { font-size: 2rem; font-weight: 800; color: var(--accent-hover); }
.stat-card .label { color: var(--text-muted); font-size: 0.9rem; }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.data-table th { color: var(--text-muted); font-weight: 600; }
.data-table tr:hover td { background: var(--bg-elevated); }

/* Header search (Facebook style) */
.header-search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 320px;
  min-width: 160px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0.5rem;
}

.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.55rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 0;
}

.header-search input:focus { outline: none; }

.header-search button {
  border: none;
  background: transparent;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-size: 1rem;
}

.header-search button:hover { background: var(--bg-elevated); }

/* People search */
.people-search-page { max-width: 1100px; margin: 0 auto; }

.people-search-hero { margin-bottom: 1.5rem; }

.people-search-desc { color: var(--text-muted); margin-top: 0.5rem; }

.people-search-form { margin-bottom: 1.5rem; }

.people-search-input-wrap { flex: 2; min-width: 220px; }

.people-results-count {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.people-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.people-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.people-card-cover {
  height: 72px;
  background: linear-gradient(135deg, var(--accent), #1e3a5f);
}

.people-card-body {
  padding: 0 1rem 1.25rem;
  text-align: center;
  margin-top: -36px;
}

.people-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-card);
  margin: 0 auto 0.65rem;
  display: block;
}

.people-card-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-hover);
}

.people-card-name {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.people-card-role {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.role-prof_agree { background: rgba(59, 130, 246, 0.25); color: #93c5fd; }
.role-etudiant_agree { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.role-etudiant_pending { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }

.people-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.15rem 0;
}

.people-card-cta {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent-hover);
  font-weight: 600;
}

.people-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Profile page (Facebook style) */
.profile-page { max-width: 900px; margin: 0 auto; }

.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, #0d9488 0%, #1e3a5f 50%, #334155 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -1px;
  padding: 0 1.5rem 2rem;
}

.profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: -60px;
  padding-top: 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 4px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.profile-info { flex: 1; min-width: 240px; padding-top: 4rem; }

.profile-info h1 { margin: 0 0 0.25rem; font-size: 1.75rem; }

.profile-username { color: var(--text-muted); margin: 0 0 0.5rem; font-size: 0.95rem; }

.profile-role-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.profile-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.profile-stat {
  text-align: center;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.profile-stat strong { display: block; font-size: 1.25rem; color: var(--accent-hover); }
.profile-stat span { font-size: 0.75rem; color: var(--text-muted); }

.profile-detail { margin: 0.5rem 0; color: var(--text-muted); }

.profile-bio {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.profile-bio h3 { font-size: 0.9rem; color: var(--gold); margin: 0 0 0.5rem; }

.profile-contact { margin-top: 1.25rem; }

.profile-contact h3 { font-size: 0.9rem; color: var(--gold); margin-bottom: 0.65rem; }

.contact-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none !important;
}

.contact-chip--link:hover { border-color: var(--accent); color: var(--accent-hover); }

.contact-private { color: var(--text-muted); font-size: 0.9rem; }

.profile-actions { margin-top: 1.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.contact-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-footer) 100%);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  margin-top: 0.85rem;
  max-width: 360px;
  line-height: 1.7;
}

.footer-links { display: flex; flex-direction: column; gap: 0.45rem; }

.footer-links h4 {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent-hover); }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom strong { color: var(--accent-hover); }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .landing-hero { padding: 3.5rem 1.25rem 3rem; }
  .landing-search { border-radius: var(--radius); }
}

.main-content {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  min-height: 60vh;
}

.page-title {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  color: var(--gold);
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.search-bar .form-group { flex: 1; min-width: 180px; margin: 0; }

/* Notifications page — design pro */
.notifications-page {
  max-width: 800px;
  margin: 0 auto;
}

.notif-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15) 0%, var(--bg-card) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.notif-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.35);
}

.notif-hero-text { flex: 1; min-width: 200px; }

.notif-hero-text h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
}

.notif-hero-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.notif-hero-text strong { color: var(--accent-hover); font-weight: 700; }

.notif-mark-all { margin: 0; margin-right: auto; }

.notif-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.notif-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.notif-stat a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.75rem;
  text-decoration: none !important;
  color: inherit;
}

.notif-stat:hover { border-color: var(--accent); transform: translateY(-2px); }

.notif-stat.is-active {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.12);
}

.notif-stat--unread.is-active { border-color: var(--gold); background: rgba(212, 168, 83, 0.1); }

.notif-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.notif-stat--unread .notif-stat-num { color: var(--gold); }

.notif-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.notif-date-group { margin-bottom: 2rem; }

.notif-date-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.notif-date-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notif-item {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.notif-item:hover {
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.notif-item--unread {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.08) 0%, var(--bg-card) 12%);
  border-color: rgba(13, 148, 136, 0.35);
}

.notif-unread-dot {
  position: absolute;
  top: 1.35rem;
  right: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-hover);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}

.notif-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.notif-item-icon--student_approved,
.notif-item-icon--article_accepted { background: rgba(34, 197, 94, 0.2); }
.notif-item-icon--student_approval { background: rgba(139, 92, 246, 0.2); }
.notif-item-icon--article_review { background: rgba(59, 130, 246, 0.2); }
.notif-item-icon--article_rejected { background: rgba(239, 68, 68, 0.2); }
.notif-item-icon--article_modification { background: rgba(245, 158, 11, 0.2); }

.notif-item-content { flex: 1; min-width: 0; padding-left: 0.5rem; }

.notif-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.notif-item-head-main { flex: 1; min-width: 0; }

.notif-type-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-hover);
  background: rgba(13, 148, 136, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

.notif-item-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.notif-item-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.notif-item-message {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.notif-item-sender {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.notif-item-sender a { color: var(--accent-hover); font-weight: 500; }

.notif-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

.notif-read-status {
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
}

.notif-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.notif-empty--filtered { padding: 2.5rem; }

.notif-empty-visual {
  font-size: 4rem;
  opacity: 0.35;
  margin-bottom: 1rem;
}

.notif-empty h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--text);
}

.notif-empty p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .notif-item { flex-direction: column; padding-top: 1.5rem; }
  .notif-item-head { flex-direction: column; gap: 0.35rem; }
  .notif-item-time { align-self: flex-start; }
  .notif-unread-dot { top: 1rem; right: 1rem; }
  .notif-stats { grid-template-columns: 1fr; }
}

/* File preview (prof / author) */
.file-preview-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.file-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.file-preview-title {
  margin: 0;
  font-size: 1rem;
  color: var(--gold);
}

.file-preview-filename {
  font-size: 0.8rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: left;
}

.file-preview-pdf-wrap {
  position: relative;
  width: 100%;
  height: min(72vh, 640px);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #334155;
}

.file-preview-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.file-preview-image-wrap {
  text-align: center;
  background: var(--bg);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.file-preview-image {
  max-width: 100%;
  max-height: min(70vh, 600px);
  border-radius: 4px;
}

.file-preview-fallback {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px dashed var(--border);
}

.file-preview-fallback .fallback-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.file-preview-hint {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.review-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
  max-width: 1400px;
  margin: 1.5rem auto 0;
  padding-top: 0.5rem;
}

.review-preview-col { min-width: 0; }

.review-meta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-size: 0.95rem;
}

.review-meta-card h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.review-abstract {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.review-abstract p {
  color: var(--text-muted);
  margin: 0.35rem 0 0;
  line-height: 1.6;
}

.table-actions { white-space: nowrap; }

/* Formulaire de revue — radios compacts */
.review-form-col .radio-list { gap: 0.4rem; }

.review-form-col .radio-option {
  padding: 0.55rem 0.85rem;
  min-height: unset;
  font-size: 0.95rem;
}

.review-form-col .radio-option input[type="radio"] {
  width: 1rem;
  height: 1rem;
}

.review-form-col .field-label {
  margin-bottom: 0.4rem;
}

@media (max-width: 1024px) {
  .review-layout {
    grid-template-columns: 1fr;
  }
  .review-form-col { order: -1; }
}

/* Boutons radio RTL */
.radio-group .field-label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
}

.radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.radio-item {
  margin: 0;
  padding: 0;
}

.radio-option {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  margin: 0;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s;
  font-weight: 500;
  color: var(--text);
  width: 100%;
}

.radio-option:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.radio-option input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.radio-option-text {
  flex: 1;
  text-align: right;
}

.radio-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.12);
}

.hidden-field { display: none; }

@media (max-width: 768px) {
  .header-inner { flex-direction: column; }
  .header-search { max-width: 100%; width: 100%; order: 3; }
  .nav-links { justify-content: center; }
  .profile-info { padding-top: 1rem; }
  .profile-header { margin-top: -40px; }
}
