/* Ebers Brand Selection Style */
::selection {
  background-color: #9F0015;
  color: #ffffff;
}
::-moz-selection {
  background-color: #9F0015;
  color: #ffffff;
}

:root {
  /* Dark Mode Palette (Default - Ebers Obsidian & Crimson) */
  --bg-main: #000000;
  --bg-card: #0d0d0d;
  --bg-card-hover: #161616;
  --bg-sidebar: #080808;
  --bg-elevated: #141414;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(179, 30, 45, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Ebers Signature Brand Accents (Crimson / Ruby / Flame Red) */
  --accent-primary: #B31E2D;
  --accent-primary-hover: #D3202A;
  --accent-gradient: linear-gradient(135deg, #D3202A 0%, #B31E2D 50%, #6D111D 100%);
  --accent-glow: radial-gradient(circle, rgba(179, 30, 45, 0.28) 0%, rgba(0, 0, 0, 0) 70%);
  
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-cyan: #06b6d4;
  --font-latin: 'Jost', 'Inter', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Tajawal', 'Jost', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px rgba(225, 29, 72, 0.3);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   LIGHT MODE PALETTE (Ebers Platinum & Clean Studio Minimal)
   ========================================================================== */

body.light-theme,
[data-theme="light"] {
  --bg-main: #f3f6fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-elevated: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-glow: rgba(225, 29, 72, 0.25);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #e11d48;
  --accent-primary-hover: #be123c;
  --accent-gradient: linear-gradient(135deg, #e11d48 0%, #be123c 50%, #9f1239 100%);
  --accent-glow: radial-gradient(circle, rgba(225, 29, 72, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 0 1px 1px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 20px rgba(225, 29, 72, 0.18);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-latin);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  direction: ltr;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.rtl {
  direction: rtl;
  font-family: var(--font-arabic);
}

/* Ambient Glows */
.ambient-glow-1 {
  position: fixed;
  top: -150px;
  right: -100px;
  width: 520px;
  height: 520px;
  background: var(--accent-glow);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.ambient-glow-2 {
  position: fixed;
  bottom: -150px;
  left: 200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(0,0,0,0) 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

/* App Layout */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 270px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  transition: var(--transition);
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  z-index: 100;
}

body.rtl .sidebar {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.brand-header img,
.dark-theme-logo,
.light-theme-logo {
  max-width: 100%;
  object-fit: contain;
  transition: opacity var(--transition);
}

.brand-header .dark-theme-logo,
.brand-header .light-theme-logo {
  height: 40px;
  max-height: 40px;
  width: auto;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  box-shadow: var(--shadow-glow);
  letter-spacing: -0.5px;
}

.brand-info h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-info span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Server Status Pill */
.server-status-pill {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.server-status-pill:hover {
  background: rgba(16, 185, 129, 0.2);
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-success);
  font-weight: 600;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-success);
  box-shadow: 0 0 10px var(--accent-success);
  animation: pulseAnimation 2s infinite;
}
@keyframes pulseAnimation {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Nav Menu */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
  list-style: none;
  flex: 1;
  min-height: 0; /* Crucial for scroll inside flex parent */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(179, 30, 45, 0.4) transparent;
}

body.rtl .nav-menu {
  padding-right: 0;
  padding-left: 4px;
}

.nav-menu::-webkit-scrollbar {
  width: 5px;
}
.nav-menu::-webkit-scrollbar-track {
  background: transparent;
}
.nav-menu::-webkit-scrollbar-thumb {
  background: rgba(179, 30, 45, 0.35);
  border-radius: 10px;
}
.nav-menu::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  user-select: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #fff;
  background: rgba(179, 30, 45, 0.15);
  border-color: rgba(179, 30, 45, 0.3);
  box-shadow: 0 0 20px rgba(179, 30, 45, 0.15);
}

.nav-item .icon {
  font-size: 17px;
  width: 22px;
  display: flex;
  justify-content: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent-primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
body.rtl .nav-badge {
  margin-left: 0;
  margin-right: auto;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.user-meta {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.user-role-tag {
  font-size: 10px;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Header Bar */
.top-header {
  height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 12, 21, 0.6);
  backdrop-filter: blur(15px);
  z-index: 10;
}

.page-title-area h1 {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(179, 30, 45, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(179, 30, 45, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success { background: var(--accent-success); color: #fff; }
.btn-warning { background: var(--accent-warning); color: #0f172a; }
.btn-danger { background: var(--accent-danger); color: #fff; }

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}
.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* Content Body */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 120px 32px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* View Section */
.view-section {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
.view-section.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-card-hover);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition);
}
.stat-card:hover::after {
  opacity: 1;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-latin);
}
.stat-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   REQUESTS & TRIAGE INBOX STYLES (WhatsApp Replacement)
   ========================================================================== */
.request-triage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  margin-bottom: 16px;
}
.request-triage-card.pending-glow {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(26, 35, 58, 0.9);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 15px rgba(245, 158, 11, 0.1);
}
.request-triage-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.req-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.req-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.req-card-details {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.req-reference-link {
  font-size: 12px;
  background: rgba(0,0,0,0.3);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.05);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.req-card-meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}
.req-card-meta-row strong { color: var(--text-primary); }
.req-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
}

/* ==========================================================================
   STRUCTURED EDITS HUB & TABS STYLES (On Submissions)
   ========================================================================== */
.review-panel-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
}
.review-panel-tab {
  flex: 1;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.review-panel-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}
.review-panel-tab.active {
  color: #fff;
  border-bottom-color: var(--accent-primary);
  background: rgba(179, 30, 45, 0.08);
}

.edit-hub-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition);
}
.edit-hub-item-card.resolved {
  opacity: 0.6;
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.04);
}
.edit-category-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Clients & Projects Directory */
.client-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  cursor: pointer;
  transition: var(--transition);
}
.client-pill-tag:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.client-card:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 30, 45, 0.4);
  box-shadow: 0 15px 35px -10px rgba(0,0,0,0.6), 0 0 20px rgba(179, 30, 45, 0.15);
}

.client-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.client-avatar-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.client-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.client-code-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.client-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.client-industry {
  font-size: 11px;
  color: var(--text-muted);
}

.client-contact-info {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.client-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.client-info-row span { color: var(--text-muted); }
.client-info-row strong { color: var(--text-primary); font-weight: 600; }

.client-card-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.client-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.client-stat-box .stat-num {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-latin);
  color: var(--text-primary);
}
.client-stat-box .stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.client-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
}

.project-directory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
}
.project-directory-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
}

.proj-metrics-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.proj-metrics-mini-row strong { color: var(--text-primary); }

.client-profile-project-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  transition: var(--transition);
}
.client-profile-project-item:hover {
  border-color: rgba(179, 30, 45, 0.4);
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-title-bar h2 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 30, 45, 0.4);
  box-shadow: 0 15px 35px -10px rgba(0,0,0,0.6), 0 0 20px rgba(179, 30, 45, 0.15);
}

.proj-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.proj-code-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-latin);
  background: rgba(179, 30, 45, 0.15);
  color: #818cf8;
  border: 1px solid rgba(179, 30, 45, 0.3);
}
.proj-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
}
.proj-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.proj-progress-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.proj-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.proj-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.proj-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  transition: width 0.4s ease;
}

.proj-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}
.truenas-path-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: monospace;
  font-size: 11px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* Kanban */
.kanban-board-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.kanban-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.filter-select:focus {
  border-color: var(--accent-primary);
}

.kanban-columns-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: start;
  min-height: 600px;
  overflow-x: auto;
  padding-bottom: 20px;
}

@media (max-width: 1200px) {
  .kanban-columns-container {
    grid-template-columns: repeat(2, 320px);
  }
}
@media (max-width: 768px) {
  .kanban-columns-container {
    grid-template-columns: 1fr;
  }
}

.kanban-column {
  background: rgba(13, 18, 30, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 500px;
  transition: var(--transition);
}
.kanban-column.drag-over {
  border-color: var(--accent-primary);
  background: rgba(179, 30, 45, 0.08);
}

.col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}
.col-dot { width: 10px; height: 10px; border-radius: 50%; }
.col-backlog .col-dot { background: #94a3b8; }
.col-in-progress .col-dot { background: #38bdf8; }
.col-in-review .col-dot { background: #f59e0b; }
.col-done .col-dot { background: #10b981; }

.col-count {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.task-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 380px;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: grab;
  transition: var(--transition);
  position: relative;
  user-select: none;
}
.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.task-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.task-top-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.task-project-tag {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-latin);
  padding: 2px 6px;
  border-radius: 4px;
}
.task-priority-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}
.priority-urgent { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.priority-high { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.priority-medium { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.priority-low { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

.task-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.task-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.task-due-date { display: flex; align-items: center; gap: 4px; }
.task-subtasks-count { display: flex; align-items: center; gap: 4px; }

.task-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.task-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.task-timer-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.task-timer-trigger:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}
.task-timer-trigger.active-running {
  background: var(--accent-success);
  color: #fff;
  border-color: var(--accent-success);
  animation: pulseAnimation 1.5s infinite;
}

.task-submission-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}
.sub-status-approved { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.sub-status-changes_requested { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.sub-status-pending { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }

/* Review Hub */
.review-hub-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  height: calc(100vh - 170px);
}

@media (max-width: 1024px) {
  .review-hub-container {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.submissions-sidebar-list {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.submission-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.submission-item-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}
.submission-item-card.active {
  background: rgba(179, 30, 45, 0.15);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(179, 30, 45, 0.2);
}

.sub-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sub-version-badge {
  background: #1e293b;
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-latin);
}
.sub-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.sub-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.review-stage-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.review-stage-topbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(13, 18, 30, 0.8);
  flex-wrap: wrap;
  gap: 12px;
}

.review-asset-info h3 { font-size: 16px; font-weight: 800; }
.review-asset-info span { font-size: 12px; color: var(--text-muted); }

.review-action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-canvas-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .review-canvas-split {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
}

.media-viewer-area {
  background: #06080e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.image-annotation-canvas-wrap {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
}

.annotated-image {
  max-width: 100%;
  max-height: 480px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  user-select: none;
  pointer-events: none;
}

.annotation-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f59e0b;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.8), 0 0 0 3px #ffffff;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
}
.annotation-pin:hover {
  transform: translate(-50%, -50%) scale(1.25);
  background: #fbbf24;
}

.video-player-container {
  width: 100%;
  max-width: 720px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.video-canvas-mock {
  width: 100%;
  height: 380px;
  background: radial-gradient(circle at center, #1e1b4b 0%, #090d16 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.video-play-btn-large {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}
.video-play-btn-large:hover { transform: scale(1.1); }

.video-scrub-bar-wrap {
  background: #111827;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.video-timeline-track {
  height: 8px;
  background: #374151;
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
}
.video-timeline-progress {
  height: 100%;
  width: 35%;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}
.video-timeline-marker {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: #f59e0b;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  transform: translateX(-50%);
}

.video-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.comments-feedback-panel {
  border-left: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.rtl .comments-feedback-panel {
  border-left: none;
  border-right: 1px solid var(--border-subtle);
}

.feedback-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.feedback-panel-header h4 { font-size: 14px; font-weight: 800; }

.feedback-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}
.comment-card:hover { background: rgba(255, 255, 255, 0.06); }
.comment-card.highlighted {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.comment-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.comment-author-name { font-weight: 700; color: var(--text-primary); }
.comment-time-tag {
  color: var(--accent-warning);
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-latin);
}

.comment-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.feedback-input-box {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feedback-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  resize: none;
  height: 60px;
  outline: none;
}
.feedback-textarea:focus { border-color: var(--accent-primary); }

/* Floating Timer */
.floating-timer-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(179, 30, 45, 0.2);
  z-index: 100;
  transition: var(--transition);
}

.timer-active-indicator { display: flex; align-items: center; gap: 10px; }
.timer-pulse-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
  animation: pulseAnimation 1.2s infinite;
}
.timer-pulse-circle.idle { background: #64748b; box-shadow: none; animation: none; }

.timer-task-info {
  display: flex;
  flex-direction: column;
  max-width: 240px;
}
.timer-task-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.timer-task-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timer-digit-display {
  font-family: var(--font-latin);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-controls-btns { display: flex; align-items: center; gap: 8px; }

/* Timesheets */
.timesheets-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
body.rtl .data-table { text-align: right; }
.data-table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); color: var(--text-primary); }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(179, 30, 45, 0.25);
  transform: translateY(20px) scale(0.95);
  transition: var(--transition);
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { font-size: 18px; font-weight: 800; }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.form-input, .form-textarea, .form-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(179, 30, 45, 0.25);
}

.upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
}
.upload-dropzone:hover {
  border-color: var(--accent-primary);
  background: rgba(179, 30, 45, 0.05);
}

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}
body.rtl .toast-container { right: auto; left: 24px; }
.toast {
  background: #111827;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: slideToast 0.3s ease;
}
body.rtl .toast { border-left: 1px solid var(--border-subtle); border-right: 4px solid var(--accent-primary); }
@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   PROPOSALS & DEALS PIPELINE STYLES
   ========================================================================== */

.proposals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.proposal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.proposal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.15);
}

.proposal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prop-code-badge {
  font-family: monospace;
  font-size: 11px;
  font-weight: 800;
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.proposal-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
}

.proposal-summary {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.proposal-meta-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.prop-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.metric-val {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.win-prob-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.win-prob-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.proposal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: auto;
}

.badge-converted {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Stage Tags */
.stage-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-draft {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.tag-review {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tag-negotiation {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-won {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-lost {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}


/* ==========================================================================
   TEAM DIRECTORY & ACL PERMISSIONS STYLES
   ========================================================================== */

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

.team-dept-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.team-dept-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.perm-mini-pill {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
}

.member-card:hover {
  transform: translateY(-3px);
  border-color: rgba(179, 30, 45, 0.35);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.6);
}

.member-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.member-avatar-box {
  position: relative;
  width: 52px;
  height: 52px;
}

.member-avatar-emoji {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.member-dept-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 2px solid var(--bg-sidebar);
}

.member-rate-tag {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.member-info-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.member-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.member-title {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.member-team-tag {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.member-contact-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.member-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  text-align: center;
}

.m-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.m-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.m-stat-val {
  font-size: 13px;
  font-weight: 800;
}

.member-permissions-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.perm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.btn-text-sm {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.btn-text-sm:hover {
  text-decoration: underline;
  color: #818cf8;
}

.perm-pills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.perm-pill {
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(179, 30, 45, 0.12);
  color: #a5b4fc;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(179, 30, 45, 0.25);
}

.perm-pill-more {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 5px;
}

.member-card-footer {
  margin-top: auto;
  padding-top: 8px;
}

/* Role Badges */
.role-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-lead {
  background: rgba(179, 30, 45, 0.2);
  color: #818cf8;
  border: 1px solid rgba(179, 30, 45, 0.4);
}

.badge-mktg-lead {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.badge-mktg-staff {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.badge-creator {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Permissions Modal Toggles */
.perm-category-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perm-category-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.perm-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.perm-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition);
}

.perm-toggle-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.perm-toggle-row.active {
  background: rgba(179, 30, 45, 0.08);
  border-color: rgba(179, 30, 45, 0.35);
}

.perm-toggle-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.perm-toggle-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.perm-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* ==========================================================================
   GANTT CHARTS & TIMELINE HUB STYLES
   ========================================================================== */

.gantt-scale-group {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.gantt-scale-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.gantt-scale-btn:hover {
  color: #fff;
}

.gantt-scale-btn.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(179, 30, 45, 0.4);
}

.gantt-deliverable-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  transition: var(--transition);
}

.gantt-deliverable-filter-label:hover {
  background: rgba(245, 158, 11, 0.18);
}

.gantt-deliverable-filter-label input[type="checkbox"] {
  accent-color: #f59e0b;
  cursor: pointer;
}

.deliverable-filter-star {
  font-size: 14px;
}

.gantt-wrapper {
  display: flex;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  min-height: 520px;
  box-shadow: var(--shadow-card);
}

/* Left Tree Pane */
.gantt-tree-pane {
  width: 360px;
  flex-shrink: 0;
  background: rgba(11, 15, 26, 0.95);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

body.rtl .gantt-tree-pane {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}

.gantt-tree-header {
  height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.2);
}

.gantt-tree-body {
  flex: 1;
  overflow-y: auto;
}

.gantt-tree-row {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
  transition: background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-tree-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.gantt-tree-row.row-project {
  background: rgba(179, 30, 45, 0.06);
  font-weight: 800;
  color: #fff;
  border-left: 3px solid var(--accent-primary);
}

body.rtl .gantt-tree-row.row-project {
  border-left: none;
  border-right: 3px solid var(--accent-primary);
}

.gantt-tree-row.row-milestone {
  background: rgba(255, 255, 255, 0.015);
  padding-left: 28px;
  font-weight: 700;
  color: #e2e8f0;
}

body.rtl .gantt-tree-row.row-milestone {
  padding-left: 14px;
  padding-right: 28px;
}

.gantt-tree-row.row-task {
  padding-left: 44px;
  color: var(--text-secondary);
}

body.rtl .gantt-tree-row.row-task {
  padding-left: 14px;
  padding-right: 44px;
}

.gantt-tree-title {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.gantt-tree-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Right Timeline Pane */
.gantt-timeline-pane {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  background: rgba(5, 8, 16, 0.5);
}

.gantt-timeline-header {
  height: 52px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.gantt-timeline-months-row {
  height: 24px;
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.gantt-timeline-days-row {
  height: 28px;
  display: flex;
}

.gantt-timeline-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.gantt-timeline-cell.weekend {
  background: rgba(0, 0, 0, 0.2);
}

.gantt-timeline-cell.today {
  background: rgba(179, 30, 45, 0.15);
  color: #818cf8;
  font-weight: 800;
}

.gantt-timeline-body {
  position: relative;
  flex: 1;
  overflow-y: auto;
}

.gantt-timeline-row {
  height: 44px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
}

.gantt-timeline-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Today Reference Line */
.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f43f5e;
  box-shadow: 0 0 10px #f43f5e;
  z-index: 5;
  pointer-events: none;
}

.gantt-today-tag {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  background: #f43f5e;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Gantt Bars */
.gantt-bar {
  position: absolute;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.gantt-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  z-index: 6;
}

.gantt-bar-project {
  height: 28px;
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gantt-bar-milestone {
  height: 24px;
  background: linear-gradient(90deg, #8b5cf6 0%, #a855f7 100%);
  border-left: 3px solid #fbbf24;
}

body.rtl .gantt-bar-milestone {
  border-left: none;
  border-right: 3px solid #fbbf24;
}

.gantt-milestone-diamond {
  width: 14px;
  height: 14px;
  background: #fbbf24;
  transform: rotate(45deg);
  border: 2px solid #fff;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
  margin-right: 6px;
  flex-shrink: 0;
}

body.rtl .gantt-milestone-diamond {
  margin-right: 0;
  margin-left: 6px;
}

.gantt-bar-task {
  height: 22px;
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 10.5px;
}

.gantt-bar-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  border-radius: 5px 0 0 5px;
}

body.rtl .gantt-bar-progress {
  left: auto;
  right: 0;
  border-radius: 0 5px 5px 0;
}

.gantt-bar-star {
  color: #fbbf24;
  margin-right: 4px;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.8));
}

body.rtl .gantt-bar-star {
  margin-right: 0;
  margin-left: 4px;
}

/* Tooltip on Hover */
.gantt-tooltip {
  position: fixed;
  background: #0f172a;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 12px;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  max-width: 280px;
  line-height: 1.4;
  backdrop-filter: blur(12px);
}

/* ==========================================================================
   CLIENT DELIVERABLES HUB STYLES
   ========================================================================== */

.deliverables-chart-container {
  display: flex;
  gap: 16px;
  padding: 16px 8px 8px;
  align-items: flex-end;
  height: 180px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.chart-bucket-col {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}

.chart-bucket-bar-wrap {
  width: 100%;
  max-width: 64px;
  height: 120px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.chart-bucket-bar {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 0 15px currentColor;
  position: relative;
}

.chart-bucket-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

.chart-bucket-count {
  font-size: 10px;
  color: var(--text-muted);
}

/* Deliverables Table Customizations */
.deliverables-table th {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.2);
}

.deliverables-table td {
  padding: 14px;
  vertical-align: middle;
}

.deliverable-title-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.deliverable-star-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  width: fit-content;
}

.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.countdown-badge.overdue {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
  animation: pulseWarning 2s infinite ease-in-out;
}

.countdown-badge.today {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.countdown-badge.urgent {
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #fb923c;
}

.countdown-badge.this_week {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.countdown-badge.upcoming {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.countdown-badge.completed {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

@keyframes pulseWarning {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.deliv-status-pill {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ACL & Granular Permissions Switch Styling */
.perm-toggle-row {
  transition: var(--transition);
}
.perm-toggle-row:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(179, 30, 45, 0.3) !important;
}
.perm-toggle-row.active {
  background: rgba(179, 30, 45, 0.12) !important;
  border-color: rgba(179, 30, 45, 0.45) !important;
}
.perm-toggle-row.active .perm-toggle-label {
  color: #a5b4fc !important;
}
.perm-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
  cursor: pointer;
}

/* ==========================================================================
   AUTHENTICATION & LOGIN SCREEN STYLES
   ========================================================================== */

.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(17, 24, 39, 0.95) 0%, rgba(9, 12, 21, 0.98) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(17, 23, 38, 0.85);
  border: 1px solid rgba(179, 30, 45, 0.35);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(179, 30, 45, 0.25);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  animation: loginCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

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

.login-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  justify-content: center;
}

.login-logo {
  width: 44px;
  height: 44px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 0 15px rgba(179, 30, 45, 0.5);
}

.login-title-group h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
  margin: 0;
}

.login-title-group span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.login-welcome-text {
  text-align: center;
  margin-bottom: 22px;
}

.login-welcome-text h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.login-welcome-text p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-toggle-eye {
  transition: var(--transition);
  opacity: 0.7;
}

.btn-toggle-eye:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.15) !important;
}

.login-demo-box code {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-xs-copy {
  transition: var(--transition);
}

.btn-xs-copy:hover {
  background: rgba(225, 29, 72, 0.25) !important;
  border-color: var(--accent-primary) !important;
  color: #fff !important;
}

/* ==========================================================================
   LIGHT THEME COMPONENT OVERRIDES
   ========================================================================== */

body.light-theme .glass-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
}

body.light-theme .top-header {
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.light-theme .stat-card,
body.light-theme .member-card,
body.light-theme .kanban-card,
body.light-theme .proposal-card,
body.light-theme .req-card,
body.light-theme .client-card,
body.light-theme .milestone-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .stat-card:hover,
body.light-theme .member-card:hover,
body.light-theme .kanban-card:hover,
body.light-theme .proposal-card:hover {
  border-color: rgba(225, 29, 72, 0.35) !important;
  box-shadow: 0 8px 25px -5px rgba(225, 29, 72, 0.12) !important;
}

body.light-theme .form-input,
body.light-theme .form-select,
body.light-theme .form-textarea,
body.light-theme .filter-select {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-theme .form-input:focus,
body.light-theme .form-select:focus,
body.light-theme .form-textarea:focus {
  border-color: #e11d48 !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15) !important;
}

body.light-theme .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25) !important;
}

body.light-theme .modal-header,
body.light-theme .modal-footer {
  border-color: #f1f5f9 !important;
  background: #f8fafc !important;
}

body.light-theme .btn-secondary {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-theme .btn-secondary:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.light-theme .nav-item {
  color: #64748b !important;
}

body.light-theme .nav-item:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

body.light-theme .nav-item.active {
  background: rgba(225, 29, 72, 0.08) !important;
  color: #e11d48 !important;
}

body.light-theme .login-overlay {
  background: radial-gradient(circle at center, rgba(241, 245, 249, 0.95) 0%, rgba(226, 232, 240, 0.98) 100%) !important;
}

body.light-theme .login-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 50px -15px rgba(15, 23, 42, 0.12), 0 0 25px rgba(225, 29, 72, 0.15) !important;
}

body.light-theme .login-welcome-text h3 {
  color: #0f172a !important;
}

body.light-theme .login-demo-box {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .user-profile-badge {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

body.light-theme .kanban-column {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

/* Theme-responsive Brand Logos */
.dark-theme-logo {
  display: block;
}

.light-theme-logo {
  display: none;
}

body.light-theme .dark-theme-logo,
[data-theme="light"] .dark-theme-logo {
  display: none !important;
}

body.light-theme .light-theme-logo,
[data-theme="light"] .light-theme-logo {
  display: block !important;
}

.login-brand-header .dark-theme-logo,
.login-brand-header .light-theme-logo {
  height: 52px;
  max-height: 52px;
  width: auto;
  margin: 0 auto;
}

/* ==========================================================================
   AUDIT TRAIL & ACTIVITY LOG STYLES
   ========================================================================== */
.audit-card {
  transition: var(--transition);
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.audit-card:hover {
  background: var(--bg-card-hover);
  transform: translateX(-3px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.audit-card.is-restored {
  opacity: 0.85;
  background: rgba(16, 185, 129, 0.04);
}

.audit-actor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.btn-restore-action {
  transition: var(--transition);
}

.btn-restore-action:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #fff !important;
  transform: scale(1.04);
}

/* Project & Task Status Select Styles */
.proj-status-select {
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.proj-status-select.status-active {
  color: #34d399 !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}

.proj-status-select.status-on_hold {
  color: #fbbf24 !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
}

.proj-status-select.status-completed {
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

.proj-status-select.status-cancelled {
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
}

body.light-theme .audit-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04) !important;
}

body.light-theme .audit-card:hover {
  background: #f8fafc !important;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .audit-actor-avatar {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

/* ==========================================================================
   DAILY WORK & BREAK SHIFT TRACKER WIDGET STYLES (عداد ساعات العمل والبريك)
   ========================================================================== */

.shift-tracker-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
}

.shift-counter-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.shift-counter-box.work.active-state {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.shift-counter-box.break.active-state {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.shift-icon-pulse {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shift-counter-box.work.active-state .shift-icon-pulse {
  animation: pulseWork 1.8s infinite;
}

.shift-counter-box.break.active-state .shift-icon-pulse {
  animation: pulseBreak 1.8s infinite;
}

@keyframes pulseWork {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes pulseBreak {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.shift-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.shift-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.shift-counter-box.work.active-state .shift-label {
  color: #34d399;
}

.shift-counter-box.break.active-state .shift-label {
  color: #fbbf24;
}

.shift-timer-digits {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #f8fafc;
}

.shift-counter-box.work.active-state .shift-timer-digits {
  color: #34d399;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.shift-counter-box.break.active-state .shift-timer-digits {
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.shift-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.shift-status-dot.idle,
.shift-status-dot.stopped {
  background: #64748b;
}

.shift-status-dot.working {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: liveBlink 1.5s infinite ease-in-out;
}

.shift-status-dot.on_break {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: liveBlink 1.5s infinite ease-in-out;
}

@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.shift-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shift-action-btn {
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.shift-action-btn:hover {
  transform: translateY(-1px);
}

/* Light theme adaptations */
body.light-theme .shift-tracker-widget {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(203, 213, 225, 0.8);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

body.light-theme .shift-counter-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .shift-timer-digits {
  color: #0f172a;
}

body.light-theme .shift-counter-box.work.active-state {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
}

body.light-theme .shift-counter-box.break.active-state {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
}

body.light-theme .shift-status-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* ==========================================================================
   REPORTS & ANALYTICS ENGINE STYLES
   ========================================================================== */
.pill-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.btn-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-pill.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(179, 30, 45, 0.35);
}

.report-custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
  direction: rtl;
}

.report-custom-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.report-custom-table td {
  padding: 14px 16px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.report-custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.report-custom-table.sub-table {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.report-custom-table.sub-table th {
  background: rgba(255, 255, 255, 0.02);
  font-size: 11px;
  padding: 8px 12px;
}

.report-custom-table.sub-table td {
  padding: 10px 12px;
  font-size: 12px;
}

/* Light Theme Reports */
body.light-theme .pill-group {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.light-theme .btn-pill {
  color: #64748b;
}

body.light-theme .btn-pill:hover {
  color: #0f172a;
  background: #e2e8f0;
}

body.light-theme .btn-pill.active {
  background: #6366f1;
  color: #ffffff;
}

body.light-theme .report-custom-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom-color: #e2e8f0;
}

body.light-theme .report-custom-table td {
  border-bottom-color: #f1f5f9;
  color: #1e293b;
}

body.light-theme .report-custom-table tr:hover td {
  background: #f8fafc;
}

body.light-theme .report-custom-table.sub-table {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* Print Friendly Stylesheet (PDF Generation) */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sidebar,
  .top-header,
  .floating-timer-bar,
  .rep-dimension-btn,
  .rep-mode-btn,
  #repModeToolbar,
  .header-actions,
  button,
  .filter-select,
  .form-input {
    display: none !important;
  }

  .main-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .view-section {
    display: none !important;
  }

  .view-section.active {
    display: block !important;
  }

  .glass-panel {
    background: transparent !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    color: #000 !important;
  }

  .report-custom-table {
    direction: rtl;
    border: 1px solid #ccc;
  }

  .report-custom-table th {
    background: #f0f0f0 !important;
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
  }

  .report-custom-table td {
    color: #000 !important;
    border-bottom: 1px solid #ddd !important;
  }

  .badge {
    border: 1px solid #666 !important;
    color: #000 !important;
    background: transparent !important;
  }
}

/* ==========================================================================
   MARKETING BRIEFS & DYNAMIC TEMPLATES SYSTEM STYLES
   ========================================================================== */

/* Destination Segmented Pills */
.dest-pill-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-top: 6px;
}

.dest-pill-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dest-pill-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.dest-pill-btn.active {
  background: linear-gradient(135deg, rgba(179, 30, 45, 0.3), rgba(168, 85, 247, 0.3));
  border-color: rgba(168, 85, 247, 0.5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

/* Template Selection Cards Grid */
.brief-templates-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.brief-template-select-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.brief-template-select-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
  background: var(--bg-card-hover);
}

.brief-template-select-card.active {
  background: linear-gradient(135deg, rgba(179, 30, 45, 0.15), rgba(168, 85, 247, 0.18));
  border-color: #a855f7;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
}

.tpl-card-icon {
  font-size: 24px;
  min-width: 32px;
  text-align: center;
}

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

.tpl-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-card-check {
  display: none;
  font-size: 12px;
  font-weight: 800;
  background: #a855f7;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
}

.brief-template-select-card.active .tpl-card-check {
  display: block;
}

/* Dynamic Field Group */
.dynamic-field-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: var(--transition);
}

.dynamic-field-group:focus-within {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.02);
}

/* Requests Grid & Cards */
.requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.request-triage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.request-triage-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.request-triage-card.pending-glow {
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.08);
}

/* Request Badges & Tags */
.req-tpl-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.req-dest-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dest-badge-project {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.dest-badge-proposal {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.dest-badge-client {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.dest-badge-general {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.req-status-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-assigned {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Structured Brief Preview inside card */
.req-structured-preview-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.req-preview-field-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-field-label {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
}

.preview-field-value {
  font-size: 12.5px;
  color: #f1f5f9;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Template Builder Cards */
.template-builder-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}

.template-builder-card:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: var(--bg-card-hover);
}

.template-field-editor-row {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

/* ==========================================================================
   NOTIFICATIONS CENTER & DROPDOWN
   ========================================================================== */

.notifications-center-wrapper {
  position: relative;
}

.notif-badge-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: pulse-ring 2s infinite;
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: 90vw;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.rtl .notifications-dropdown {
  right: auto;
  left: 0;
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.notif-dropdown-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
  background: rgba(56, 189, 248, 0.06);
}

.notification-item.unread:hover {
  background: rgba(56, 189, 248, 0.1);
}

.notif-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.notif-content-box {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.notif-message {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #38bdf8;
  position: absolute;
  top: 14px;
  right: 12px;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.8);
}

body.rtl .notif-dot {
  right: auto;
  left: 12px;
}

/* ==========================================================================
   MY WORKDAY HUB
   ========================================================================== */

.workday-hero-card {
  position: relative;
  overflow: hidden;
}

.workday-task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: var(--transition);
}

.workday-task-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.workday-task-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.workday-task-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.4;
}

.workday-task-title:hover {
  color: #38bdf8;
}

.workday-brief-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.workday-brief-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(168, 85, 247, 0.35);
}

.workday-todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.workday-todo-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.workday-todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.workday-todo-item .todo-text {
  font-size: 12px;
  color: #fff;
  transition: var(--transition);
}

.workday-account-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.workday-account-tile:hover {
  background: rgba(251, 191, 36, 0.04);
  border-color: rgba(251, 191, 36, 0.3);
}

/* ==========================================================================
   BRAND KITS & CLIENT GUIDELINES
   ========================================================================== */

.brandkit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.brandkit-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(179, 30, 45, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.bk-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 10px;
}

body.rtl .bk-card-header {
  padding-left: 0;
  padding-right: 10px;
}

.bk-palette-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bk-swatch {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bk-swatch:hover {
  transform: scale(1.15);
  border-color: #fff;
  z-index: 2;
}

.bk-swatch-hex {
  display: none;
}

.bk-color-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.bk-color-chip:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  transform: translateY(-1px);
}

.color-preview-box {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.color-details-box {
  min-width: 0;
  flex: 1;
}

.color-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-hex-code {
  font-size: 10px;
  color: #38bdf8;
  font-family: monospace;
  font-weight: 700;
}

.bk-logo-row, .bk-typo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   CHAT & DISCUSSION STREAMS
   ========================================================================== */

.chat-discussion-container {
  display: flex;
  flex-direction: column;
}

.chat-messages-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 12.5px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-message-bubble.incoming {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
}

body.rtl .chat-message-bubble.incoming {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: 2px;
}

.chat-message-bubble.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #fff;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

body.rtl .chat-message-bubble.outgoing {
  border-bottom-right-radius: var(--radius-lg);
  border-bottom-left-radius: 2px;
}

.chat-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}

.chat-msg-author {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-message-bubble.incoming .chat-msg-author {
  color: #38bdf8;
}

.chat-message-bubble.outgoing .chat-msg-author {
  color: #fef08a;
}

.chat-msg-time {
  font-size: 9.5px;
  opacity: 0.7;
}

.chat-msg-text {
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-mention-tag {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
}

.chat-message-bubble.outgoing .chat-mention-tag {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.task-comment-bubble {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  font-size: 12px;
}

.task-comment-bubble .comment-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
}



/* ==========================================================================
   EBERS FLOW MOBILE & RESPONSIVE ENGINE (ebers.uk Styled)
   ========================================================================== */

/* Mobile Hamburger Button */
.btn-mobile-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 38px;
  height: 38px;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 8px;
  cursor: pointer;
  z-index: 25;
  transition: var(--transition);
}
.btn-mobile-menu:hover {
  background: #252525;
  border-color: rgba(179, 30, 45, 0.5);
}
.btn-mobile-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: var(--transition);
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .btn-mobile-menu {
    display: flex;
  }
  
  .app-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
  }
  
  /* Off-canvas Mobile Sidebar */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 285px;
    max-width: 85vw;
    height: 100vh;
    z-index: 999;
    transform: translateX(-100%);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.85);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  body.rtl .sidebar {
    left: auto;
    right: 0;
    transform: translateX(100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0) !important;
  }
  
  .main-wrapper {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .top-header {
    height: auto;
    min-height: 64px;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .header-actions {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
  }
  
  .content-body {
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .kanban-board {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
  }
  
  .kanban-columns-container {
    display: flex;
    flex-direction: row;
    min-width: 1100px;
    gap: 16px;
  }
  
  .modal-dialog,
  .modal-card {
    max-width: 95vw !important;
    width: 95vw !important;
    max-height: 90vh !important;
    margin: 5vh auto !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .top-header .page-title-area h1 {
    font-size: 16px;
  }
  .top-header .page-subtitle {
    display: none;
  }
  
  .header-actions button span:not(.icon):not(.pulse-dot) {
    font-size: 11px;
  }
  
  .shift-tracker-widget {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 6px;
  }
  
  .shift-counter-box {
    justify-content: center;
  }
  
  .btn-header-logout {
    padding: 5px 8px !important;
  }
  
  .login-card {
    width: 92vw;
    padding: 20px 16px;
  }
}
