/* =================================================================
   SATR PLATFORM — PAGES CSS
   Shared styles for projects.html & project.html
   (extracted from inline <style> blocks + recurring inline styles)
   ================================================================= */

/* ─── 1. Design Tokens ─── */
:root {
  --bg-base: #080e1a;
  --bg-surface: #111827;
  --bg-surface-2: #1a2438;
  --bg-hover: #1e2d45;
  --text-primary: #f0f6ff;
  --text-secondary: #8899b4;
  --text-muted: #4d637f;
  --primary: #00d68f;
  --primary-dim: rgba(0, 214, 143, 0.15);
  --primary-glow: rgba(0, 214, 143, 0.35);
  --blue: #38bdf8;
  --violet: #a78bfa;
  --orange: #fb923c;
  --red: #f87171;
  --border: rgba(255, 255, 255, 0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: 0.2s ease;
}

/* ─── 2. Base Reset & Body ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  direction: rtl;
  min-height: 100vh;
}

/* ─── 3. Page Layout & Sidebar ─── */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
}

.sidebar {
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-base);
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 28px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #000;
  font-weight: 900;
  box-shadow: 0 4px 16px var(--primary-glow);
  letter-spacing: -1px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.02rem;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--primary-dim);
  color: var(--primary);
  font-weight: 700;
  border-color: rgba(0, 214, 143, 0.2);
}

.nav-item i {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin-top: auto;
  transition: background var(--transition), border-color var(--transition);
  cursor: pointer;
}

.user-card:hover {
  background: var(--bg-hover);
  border-color: rgba(0, 214, 143, 0.3);
}

.user-avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.user-info-sm {
  flex: 1;
  min-width: 0;
}

.user-name-sm {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-handle-sm {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-level-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  background: var(--primary-dim);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 700;
}

.main-content {
  padding: 24px 28px;
  max-width: 1020px;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 16px; }
}

/* ================================================================
   PROJECTS.HTML — Page Specific
   ================================================================ */

/* ─── 4. Hero Section ─── */
.projects-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(0, 214, 143, 0.07) 0%, rgba(56, 189, 248, 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

.projects-hero h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.projects-hero p {
  color: var(--text-secondary);
  max-width: 580px;
  font-size: 1rem;
}

.projects-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

/* ─── 5. Filter & Search Bar ─── */
.projects-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.filter-chips-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.projects-search-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 280px;
}

.projects-search-inner {
  position: relative;
  flex: 1;
}

.projects-search-inner .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.projects-search-inner .form-input {
  padding-right: 36px;
}

.projects-sort-select {
  width: auto;
  padding: 10px 12px;
}

/* ─── 6. Empty State ─── */
.projects-empty-state {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.projects-empty-state .empty-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}

.projects-empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.projects-empty-state p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ─── 7. Card Tech Tags ─── */
.card-tech-tag {
  font-size: 0.75rem !important;
  padding: 2px 8px !important;
}

.card-tech-extra {
  font-size: 0.72rem !important;
}

.card-tech-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* ─── 8. Card Author & Actions ─── */
.project-author-level {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-card-actions {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

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

/* ─── 9. Publish Modal Form Helpers ─── */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ================================================================
   PROJECT.HTML — Page Specific
   ================================================================ */

/* ─── 10. Page Layout ─── */
.project-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

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

/* ─── 11. Hero / Header Card ─── */
.project-header-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 20px;
}

.project-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.project-header-btns {
  display: flex;
  gap: 8px;
}

.proj-title {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.3;
}

.proj-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.proj-action-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* ─── 12. About & Tech Stack Sections ─── */
.proj-section {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
}

.proj-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.proj-section-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.proj-description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.proj-tech-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.proj-tech-badge {
  font-size: 0.9rem !important;
  padding: 6px 14px !important;
}

/* ─── 13. Feedback / Comments Section ─── */
.feedback-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.feedback-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.feedback-section-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
}

.feedback-section-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.feedback-form-card {
  background: var(--bg-surface-2) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  padding: 18px !important;
  margin-bottom: 24px;
}

.feedback-form-type-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.feedback-type-select {
  width: auto;
  padding: 6px 12px;
  font-size: 0.88rem;
}

.feedback-form-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ─── 14. Feedback / Comment Item ─── */
.feedback-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

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

.feedback-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.feedback-author-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
}

.feedback-author-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.feedback-author-handle {
  color: var(--text-muted);
  font-size: 0.78rem;
}

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

.feedback-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.feedback-tag { font-size: 0.75rem; }

.feedback-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.feedback-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
}

/* ─── 15. Right Sidebar / Author Box ─── */
.project-sidebar { position: sticky; top: 24px; }

.owner-header-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 700;
}

.owner-identity-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.owner-avatar {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary);
}

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

.owner-name {
  font-weight: 800;
  font-size: 1.05rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-handle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

.owner-actions { display: flex; gap: 8px; }
.owner-profile-btn { flex: 1; }

/* ─── 16. Quick Stats ─── */
.proj-stats-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 700;
}

.proj-stats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.proj-stat-row { display: flex; justify-content: space-between; }
.proj-stat-key { color: var(--text-secondary); }
.proj-stat-val { font-weight: 600; }
.proj-stat-val--primary { font-weight: 600; color: var(--primary); }

/* ─── 17. Back Link ─── */
.back-link-wrap { margin-bottom: 16px; }
.back-link {
  color: var(--text-secondary);
  padding: 6px 12px;
  cursor: pointer;
}

/* ─── 18. Lightbox Close Button ─── */
.lightbox-close-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  font-size: 2rem;
}

/* ─── 19. Toast Icon & Modal Icon ─── */
.toast-icon { color: var(--primary); font-size: 1.3rem; }
.modal-title-icon { color: var(--primary); }
