/* ============ ADMIN SYSTEM CSS ============ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0d7c5f;
  --primary-light: #10a37f;
  --primary-lighter: #e8f5f0;
  --primary-dark: #0a5e48;
  --accent: #1a73a7;
  --accent-light: #e3f0fa;
  --gold: #c9a84c;
  --gold-light: #f5edda;
  --bg: #f0f4f3;
  --bg-white: #ffffff;
  --dark: #0a1f1a;
  --dark-lighter: #122e26;
  --text: #1a2e28;
  --text-light: #5a7a70;
  --text-muted: #8ca89e;
  --border: #d4e4de;
  --border-light: #e8f0ec;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --shadow-sm: 0 1px 3px rgba(10, 31, 26, 0.06);
  --shadow-md: 0 4px 12px rgba(10, 31, 26, 0.08);
  --shadow-lg: 0 8px 30px rgba(10, 31, 26, 0.12);
  --shadow-xl: 0 20px 60px rgba(10, 31, 26, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 280px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Cairo', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; outline: none; border: none; }

/* ============ LAYOUT ============ */
.admin-layout { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--dark) 0%, #0d2b22 100%);
  color: white;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-header h2 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.sidebar-header small { font-size: 0.7rem; color: rgba(255,255,255,0.4); display: block; }

.sidebar-nav { padding: 12px 0; flex: 1; }

.nav-section-label {
  padding: 16px 20px 6px;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  letter-spacing: 1.5px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  border: none;
  background: none;
  width: 100%;
  text-align: right;
  direction: rtl;
}

.nav-item:hover { color: white; background: rgba(255,255,255,0.06); }
.nav-item.active { color: white; background: rgba(255,255,255,0.1); }
.nav-item.active::before {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary-light);
  border-radius: 0 3px 3px 0;
}

.nav-item i { width: 20px; text-align: center; font-size: 1rem; }
.nav-item .nav-text { flex: 1; }

.nav-badge {
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 50px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.nav-item.danger { color: #ef4444; }
.nav-item.danger:hover { background: rgba(239,68,68,0.1); }
.nav-item.gold { color: var(--gold); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
}

/* ============ MAIN CONTENT ============ */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.topbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-left { display: flex; align-items: center; gap: 16px; }

.topbar h1 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar h1 i { color: var(--primary); font-size: 1.1rem; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; box-shadow: 0 2px 8px rgba(13,124,95,0.2); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(13,124,95,0.3); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border-light); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-gold { background: linear-gradient(135deg, var(--gold), #d4b85a); color: var(--dark); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* ============ PAGE CONTENT ============ */
.page-content { padding: 28px; flex: 1; }

/* ============ STATS ============ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 22px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}

.stat-icon.green { background: #dcfce7; color: #22c55e; }
.stat-icon.blue { background: #dbeafe; color: #3b82f6; }
.stat-icon.orange { background: #fef3c7; color: #f59e0b; }
.stat-icon.purple { background: #ede9fe; color: #8b5cf6; }
.stat-icon.teal { background: var(--primary-lighter); color: var(--primary); }
.stat-icon.red { background: #fef2f2; color: #ef4444; }

.stat-info h3 { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.stat-info p { font-size: 0.8rem; color: var(--text-light); margin-top: 3px; }
.stat-info .stat-new { font-size: 0.72rem; color: var(--success); font-weight: 600; }

/* ============ CARDS ============ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: 20px;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-header h3 i { color: var(--primary); }
.card-body { padding: 22px; }

/* ============ TABLE ============ */
.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: right;
  padding: 12px 16px;
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-light);
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(13,124,95,0.02); }

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-new { background: #fef3c7; color: #92400e; }
.badge-reviewing { background: #dbeafe; color: #1e40af; }
.badge-accepted { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fef2f2; color: #991b1b; }
.badge-umrah { background: var(--primary-lighter); color: var(--primary); }
.badge-hajj { background: var(--gold-light); color: #92400e; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fef2f2; color: #991b1b; }

/* ============ STATUS SELECT ============ */
.status-select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: inherit;
  background: white;
  cursor: pointer;
  transition: var(--transition);
}

.status-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,124,95,0.1); }

/* ============ ACTION BUTTONS ============ */
.actions { display: flex; gap: 5px; }

.action-btn {
  width: 32px; height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.action-btn:hover { transform: scale(1.1); }
.action-btn.view { background: var(--accent-light); color: var(--accent); }
.action-btn.edit { background: #fef3c7; color: #92400e; }
.action-btn.delete { background: #fef2f2; color: #991b1b; }
.action-btn.download { background: var(--primary-lighter); color: var(--primary); }

/* ============ FORMS ============ */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.form-group .required { color: var(--danger); }

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(13,124,95,0.1); }

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

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a7a70' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  padding-left: 40px;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full-width { grid-column: 1 / -1; }

.file-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.file-upload:hover { border-color: var(--primary); background: var(--primary-lighter); }
.file-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-upload i { font-size: 1.8rem; color: var(--text-muted); margin-bottom: 8px; }
.file-upload span { color: var(--text-light); font-size: 0.85rem; }
.file-upload .file-name { margin-top: 6px; color: var(--primary); font-weight: 600; font-size: 0.82rem; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 0;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s ease-out;
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-white);
  z-index: 1;
}

.modal-header h3 { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-header h3 i { color: var(--primary); }

.modal-close {
  width: 36px; height: 36px;
  border: none; background: var(--bg);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-light);
  transition: var(--transition);
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); }

.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); display: flex; gap: 10px; justify-content: flex-start; }

/* ============ CLIENT DETAIL ============ */
.client-profile {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.client-info-card {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.client-avatar {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: white;
  margin: 0 auto 16px;
}

.client-info-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.client-info-card p { color: var(--text-light); font-size: 0.9rem; }

.client-meta { margin-top: 16px; text-align: right; }
.client-meta-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
}
.client-meta-item:last-child { border-bottom: none; }
.client-meta-item i { color: var(--primary); width: 18px; text-align: center; }

.client-requests { }
.client-request-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  border-right: 4px solid var(--primary);
}

.client-request-card.tourism { border-right-color: var(--accent); }
.client-request-card.labor { border-right-color: var(--gold); }

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

.client-request-header h4 { font-size: 0.9rem; font-weight: 700; }
.client-request-details { font-size: 0.82rem; color: var(--text-light); }
.client-request-details span { display: inline-flex; align-items: center; gap: 4px; margin-left: 16px; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state h4 { font-size: 1rem; color: var(--text-light); margin-bottom: 4px; }

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  animation: toastIn 0.3s ease-out;
  pointer-events: auto;
  border-right: 4px solid var(--success);
}

.toast.error { border-right-color: var(--danger); }
.toast-hide { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-20px); } }

/* ============ LOGIN ============ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--dark) 0%, #0a2e22 50%, #0d3d2f 100%);
  padding: 24px;
}

.login-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.login-card .login-logo {
  width: 72px; height: 72px;
  background: white;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-card h2 { font-size: 1.5rem; margin-bottom: 6px; font-weight: 800; }
.login-card > p { color: var(--text-light); font-size: 0.88rem; margin-bottom: 32px; }

/* ============ SECTIONS (Tab content) ============ */
.section-page { display: none; }
.section-page.active { display: block; }

/* ============ SEARCH & FILTERS ============ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,124,95,0.1); }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.filter-select {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 140px;
}

/* ============ MOBILE TOGGLE ============ */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 101;
  width: 44px; height: 44px;
  background: var(--primary);
  color: white;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 1.2rem;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .client-profile { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; overflow-x: hidden; }
  .mobile-menu-btn { display: flex; }
  .stats-row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  /* Topbar */
  .topbar { padding: 12px 16px; padding-right: 65px; height: auto; min-height: 50px; }
  .topbar h1 { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .topbar-left { font-size: 0.75rem; }
  .topbar-right { max-width: calc(100% - 20px); overflow: hidden; }

  /* Content */
  .page-content { padding: 12px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-box { min-width: auto; }

  /* Tables */
  .data-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -12px; padding: 0 12px; }
  .data-table { min-width: 600px; font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 8px 6px; }

  /* Cards & sections */
  .section-page { overflow-x: hidden; }
  .card { padding: 14px; }
}

/* ============ SPINNER ============ */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============ SCROLLBAR ============ */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* ============ QUICK VIEW ============ */
.quick-activity { margin-top: 24px; }
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .charts-row { grid-template-columns: 1fr; }
}
.activity-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}

.activity-info { flex: 1; }
.activity-info h4 { font-size: 0.88rem; font-weight: 600; }
.activity-info p { font-size: 0.78rem; color: var(--text-muted); }
.activity-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

/* ============ EMPLOYEE SYSTEM ============ */

/* Role & Status Badges */
.role-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 50px;
  font-size: 0.72rem; font-weight: 700;
}
.role-badge.admin { background: linear-gradient(135deg, var(--gold-light), #f5edda); color: #92400e; }
.role-badge.employee { background: var(--accent-light); color: var(--accent); }
.status-badge-active { background: #dcfce7; color: #166534; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; }
.status-badge-inactive { background: #fef2f2; color: #991b1b; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; }

/* Assigned-to Badge */
.assigned-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 50px;
  font-size: 0.7rem; font-weight: 600;
  background: var(--primary-lighter); color: var(--primary);
}
.assigned-badge i { font-size: 0.65rem; }

.assign-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 50px;
  font-size: 0.72rem; font-weight: 600;
  background: var(--bg); color: var(--text-light);
  border: 1px dashed var(--border); cursor: pointer;
  transition: var(--transition);
}
.assign-btn:hover { background: var(--primary-lighter); color: var(--primary); border-color: var(--primary); }

/* Notes Chat */
.notes-chat {
  max-height: 400px; overflow-y: auto;
  padding: 16px 0; display: flex;
  flex-direction: column; gap: 12px;
  min-height: 120px;
}

.note-bubble {
  background: var(--bg); border-radius: var(--radius-md);
  padding: 12px 16px; max-width: 85%;
  position: relative; animation: fadeInUp 0.2s ease;
}

.note-bubble .note-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px; gap: 8px;
}

.note-bubble .note-author {
  font-size: 0.78rem; font-weight: 700; color: var(--primary);
}

.note-bubble .note-time {
  font-size: 0.68rem; color: var(--text-muted);
}

.note-bubble .note-text {
  font-size: 0.88rem; color: var(--text); line-height: 1.6;
}

.note-bubble.mine {
  background: var(--primary-lighter);
  align-self: flex-start;
  border-bottom-right-radius: 4px;
}

.note-bubble.other {
  align-self: flex-end;
  border-bottom-left-radius: 4px;
}

.notes-input-area {
  display: flex; gap: 8px; align-items: flex-end;
  padding-top: 12px; border-top: 1px solid var(--border-light);
  margin-top: 8px;
}

.notes-input-area textarea {
  flex: 1; min-height: 40px; max-height: 100px;
  resize: vertical;
}

.notes-input-area .btn { height: 44px; width: 44px; padding: 0; flex-shrink: 0; }

.notes-empty {
  text-align: center; color: var(--text-muted);
  padding: 32px; font-size: 0.9rem;
}

.notes-empty i { font-size: 2rem; opacity: 0.3; display: block; margin-bottom: 8px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Activity Timeline */
.activity-timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  animation: fadeInUp 0.2s ease;
}
.timeline-item:last-child { border-bottom: none; }

.timeline-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}

.timeline-icon.login { background: #dbeafe; color: #3b82f6; }
.timeline-icon.status { background: #fef3c7; color: #f59e0b; }
.timeline-icon.note { background: var(--primary-lighter); color: var(--primary); }
.timeline-icon.assign { background: #ede9fe; color: #8b5cf6; }
.timeline-icon.whatsapp { background: #dcfce7; color: #22c55e; }
.timeline-icon.employee { background: var(--accent-light); color: var(--accent); }
.timeline-icon.default { background: var(--bg); color: var(--text-muted); }

.timeline-content { flex: 1; }
.timeline-content h4 { font-size: 0.88rem; font-weight: 600; margin-bottom: 2px; }
.timeline-content p { font-size: 0.8rem; color: var(--text-light); }
.timeline-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; padding-top: 2px; }

/* Admin-only visibility */
.admin-only { display: none; }
/* Hide admin-only elements by default */
.admin-only { display: none !important; }
/* Show them when user is admin */
body.is-admin .admin-only { display: flex !important; }
body.is-admin div.admin-only { display: block !important; }
body.is-admin section.admin-only { display: block !important; }
body.is-admin button.admin-only { display: flex !important; }
