* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: #333;
}

.top-bar {
  width: 100%;
  max-width: 950px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
  flex-wrap: wrap;
}

.header { color: white; flex: 1; text-align: right; }
.header h1 { font-size: 1.5rem; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }

.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.icon-btn {
  border: none;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border-radius: 50px;
  cursor: pointer;
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.3s;
  font-family: inherit;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.3);
  position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,0.4); transform: translateY(-2px); }

.bell-btn {
  background: rgba(255,215,0,0.35);
  border-color: rgba(255,215,0,0.6);
  position: relative;
}
.bell-btn:hover { background: rgba(255,215,0,0.6); }
.bell-btn.ringing { animation: ring 1.2s infinite; }
@keyframes ring {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
  50% { transform: rotate(0); }
}
.bell-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: linear-gradient(135deg, #eb3349, #f45c43);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 3px 8px rgba(235,51,73,0.5);
  border: 2px solid white;
}

.user-badge-top {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 6px 14px 6px 6px;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  font-weight: 600;
  font-size: 13px;
}
.user-badge-top .avatar-mini {
  width: 35px; height: 35px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  border: 2px solid white;
}
.user-badge-top .avatar-mini img { width: 100%; height: 100%; object-fit: cover; }

.logout-btn {
  border: none;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  padding: 11px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  color: white;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.3s;
  font-family: inherit;
  border: 2px solid rgba(255,255,255,0.3);
}
.logout-btn:hover { background: rgba(235,51,73,0.85); border-color: rgba(235,51,73,1); transform: translateY(-2px); }

.page { display: none; width: 100%; max-width: 950px; }
.page.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px);} to {opacity:1; transform: translateY(0);} }

.card {
  background: white;
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  margin-bottom: 20px;
}

.card h2 {
  color: #4a3f8f;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
}

textarea, input[type=text], input[type=email], input[type=password], input[type=url], input[type=file], input[type=date], input[type=number], input[type=tel], select {
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e0f0;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 15px;
  transition: 0.3s;
  resize: vertical;
  background: #f9f9ff;
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: #764ba2;
  background: white;
  box-shadow: 0 0 0 4px rgba(118,75,162,0.1);
}
input[type=file] { padding: 10px; cursor: pointer; }
input:disabled, select:disabled { background: #ececf3; color: #888; cursor: not-allowed; border-style: dashed; }

.input-group { position: relative; }
.input-group .eye {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-80%);
  cursor: pointer;
  color: #888;
  background: none;
  border: none;
  font-size: 16px;
}

.btn {
  border: none;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.3s;
  font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: white; box-shadow: 0 8px 20px rgba(118,75,162,0.4); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-success { background: linear-gradient(135deg, #11998e, #38ef7d); color: white; box-shadow: 0 8px 20px rgba(56,239,125,0.4); }
.btn-success:hover { transform: translateY(-2px); }
.btn-danger { background: linear-gradient(135deg, #eb3349, #f45c43); color: white; box-shadow: 0 8px 20px rgba(244,92,67,0.4); }
.btn-danger:hover { transform: translateY(-2px); }
.btn-warning { background: linear-gradient(135deg, #f7971e, #ffd200); color: #4a3f8f; box-shadow: 0 8px 20px rgba(247,151,30,0.4); }
.btn-warning:hover { transform: translateY(-2px); }
.btn-info { background: linear-gradient(135deg, #2193b0, #6dd5ed); color: white; box-shadow: 0 8px 20px rgba(33,147,176,0.4); }
.btn-info:hover { transform: translateY(-2px); }
.btn-purple { background: linear-gradient(135deg, #8e2de2, #4a00e0); color: white; box-shadow: 0 8px 20px rgba(142,45,226,0.4); }
.btn-purple:hover { transform: translateY(-2px); }
.btn-grey { background: #e0e0f0; color: #4a3f8f; }
.btn-grey:hover { background: #d0d0e5; }

.btn-full { width: 100%; margin-bottom: 12px; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa, #e8ecf5);
  border-radius: 16px;
  margin-top: 15px;
}
#userQrcode { padding: 15px; background: white; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }

.qr-locked {
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(135deg, #fff3cd, #ffe8a1);
  border-radius: 16px;
  border: 3px dashed #ffc107;
  margin-top: 15px;
}
.qr-locked i { font-size: 60px; color: #856404; margin-bottom: 15px; }
.qr-locked .title { font-weight: 700; color: #856404; font-size: 16px; margin-bottom: 8px; }
.qr-locked .msg { color: #856404; font-size: 13px; line-height: 1.6; margin-bottom: 15px; }

.contract-preview {
  background: #f9f9ff;
  border: 2px dashed #c5c5e0;
  border-radius: 12px;
  padding: 20px;
  margin-top: 15px;
  white-space: pre-wrap;
  line-height: 1.8;
  max-height: 300px;
  overflow-y: auto;
}

.contract-item {
  background: white;
  border: 1px solid #e0e0f0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
  transition: 0.3s;
}
.contract-item:hover { box-shadow: 0 10px 25px rgba(118,75,162,0.15); transform: translateY(-2px); }
.contract-item .contract-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}
.contract-item .contract-body { color: #555; font-size: 14px; line-height: 1.7; }
.contract-item .contract-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}
.badge-pending { background: #fff3cd; color: #856404; }
.badge-accepted { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }
.badge-manager { background: #e7d4ff; color: #4a00e0; }
.badge-user { background: #d4e7ff; color: #0066cc; }
.badge-admin { background: #ffd4d4; color: #b00020; }
.badge-locked { background: #ffcdd2; color: #b71c1c; }
.badge-blocked { background: #e0e0e0; color: #424242; }
.badge-edit-req { background: #ffe0b2; color: #e65100; }
.badge-remove-req { background: #ffcccc; color: #b71c1c; }
.badge-new { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #5a3a00; animation: pulse 1.5s infinite; }
.badge-incomplete { background: linear-gradient(135deg, #fff3cd, #ffe8a1); color: #856404; border: 1px solid #ffc107; }
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,140,0,0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(255,140,0,0); }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}
.empty-state i { font-size: 60px; margin-bottom: 15px; color: #c5c5e0; }

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #333;
  color: white;
  padding: 15px 30px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 10000;
  transition: 0.4s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 90%;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: linear-gradient(135deg, #11998e, #38ef7d); }
.toast.error { background: linear-gradient(135deg, #eb3349, #f45c43); }
.toast.info { background: linear-gradient(135deg, #2193b0, #6dd5ed); }

#readerManager {
  width: 100%;
  max-width: 400px;
  margin: 15px auto;
  border-radius: 16px;
  overflow: hidden;
  display: none;
}
#readerManager.active { display: block; }

.action-banner {
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  border-radius: 14px;
  padding: 18px;
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: #7d4b1a;
}
.action-banner i { font-size: 24px; }

.user-card {
  background: white;
  border: 1px solid #e0e0f0;
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  transition: 0.3s;
}
.user-card:hover { box-shadow: 0 8px 20px rgba(118,75,162,0.12); }
.user-card.clickable { cursor: pointer; }
.user-card.clickable:hover { border-color: #764ba2; transform: translateY(-2px); }
.user-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }

.user-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  position: relative;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar.avatar-admin { background: linear-gradient(135deg,#eb3349,#f45c43); }
.user-avatar.avatar-manager { background: linear-gradient(135deg,#8e2de2,#4a00e0); }
.user-avatar.avatar-user { background: linear-gradient(135deg,#2193b0,#6dd5ed); }

.serial-badge {
  position: absolute;
  bottom: -3px;
  left: -3px;
  background: #ffd700;
  color: #5a3a00;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.user-meta { display: flex; flex-direction: column; gap: 3px; }
.user-meta .name { font-weight: 700; color: #4a3f8f; font-size: 14px; }
.user-meta .email { font-size: 12px; color: #888; }

.company-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.info-card-manager {
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: white;
  border-radius: 16px;
  padding: 22px;
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 25px rgba(142,45,226,0.3);
}
.info-card-manager .avatar-lg {
  width: 70px; height: 70px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid white;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  position: relative;
}
.info-card-manager .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.info-card-manager .info-text { flex: 1; }
.info-card-manager .info-text .label { font-size: 11px; opacity: 0.85; margin-bottom: 2px; }
.info-card-manager .info-text .val { font-size: 16px; font-weight: 700; }
.info-card-manager .company-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  background: rgba(255,255,255,0.15);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
}
.stat-card i { font-size: 20px; margin-bottom: 6px; opacity: 0.9; }
.stat-card .num { font-size: 24px; font-weight: 700; }
.stat-card .lbl { font-size: 11px; opacity: 0.9; }
.stat-card.green { background: linear-gradient(135deg, #11998e, #38ef7d); }
.stat-card.orange { background: linear-gradient(135deg, #f7971e, #ffd200); color:#5a3a00; }
.stat-card.blue { background: linear-gradient(135deg, #2193b0, #6dd5ed); }
.stat-card.red { background: linear-gradient(135deg, #eb3349, #f45c43); }
.stat-card.purple { background: linear-gradient(135deg, #8e2de2, #4a00e0); }

.hidden { display: none !important; }

.login-box { max-width: 450px; width: 100%; margin: 20px auto; }

.tabs-inner {
  display: flex;
  background: #f0f0fa;
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 20px;
}
.tabs-inner button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #764ba2;
  font-family: inherit;
  font-size: 13px;
  transition: 0.3s;
}
.tabs-inner button.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 5px 15px rgba(118,75,162,0.3);
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}
.image-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid #e0e0f0;
  background: #f9f9ff;
}
.image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.image-thumb .remove-img {
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(235,51,73,0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.contract-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.contract-images img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e0e0f0;
  cursor: pointer;
  transition: 0.3s;
}
.contract-images img:hover { transform: scale(1.05); border-color: #764ba2; }

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}
.image-lightbox.show { display: flex; }
.image-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.warning-box {
  background: linear-gradient(135deg, #ffe0e0, #ffd0d0);
  border: 2px solid #ffb3b3;
  border-radius: 12px;
  padding: 15px;
  color: #b71c1c;
  font-size: 14px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-box {
  background: linear-gradient(135deg, #e0f7ff, #d0ecff);
  border: 2px solid #a3d5ff;
  border-radius: 12px;
  padding: 15px;
  color: #004a7c;
  font-size: 14px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 15px;
}
@media (max-width: 600px) { .date-row { grid-template-columns: 1fr; } }
.date-field label {
  display: block;
  font-weight: 600;
  color: #4a3f8f;
  font-size: 13px;
  margin-bottom: 6px;
}

.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}
.avatar-preview {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 8px 20px rgba(118,75,162,0.3);
  position: relative;
  cursor: pointer;
  transition: 0.3s;
}
.avatar-preview:hover { transform: scale(1.05); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s;
  color: white;
  font-size: 22px;
}
.avatar-preview:hover .overlay { opacity: 1; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: white;
  border-radius: 20px;
  padding: 26px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: popIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-box h3 {
  color: #4a3f8f;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
}

.manager-detail-header {
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: white;
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.manager-detail-header .avatar-lg {
  width: 60px; height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid white;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.manager-detail-header .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

.req-box {
  background: linear-gradient(135deg, #fff3cd, #ffe8a1);
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}
.req-box.remove-req {
  background: linear-gradient(135deg, #ffe0e0, #ffd0d0);
  border-color: #eb3349;
}
.req-box .req-title {
  font-weight: 700;
  color: #856404;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.req-box.remove-req .req-title { color: #b71c1c; }
.req-box pre {
  background: rgba(255,255,255,0.6);
  padding: 10px;
  border-radius: 8px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  white-space: pre-wrap;
  max-height: 150px;
  overflow-y: auto;
  margin-bottom: 10px;
  color: #555;
}

.readonly-info {
  background: #f0f0fa;
  border: 2px dashed #c5c5e0;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}
.readonly-info .label { font-size: 12px; color: #888; margin-bottom: 4px; }
.readonly-info .value { font-weight: 700; color: #4a3f8f; font-size: 15px; }
.lock-note {
  font-size: 11px;
  color: #888;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
}

.company-card {
  background: white;
  border: 2px solid #e0e0f0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.company-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 5px; height: 100%;
  background: linear-gradient(180deg, #667eea, #764ba2);
}
.company-card:hover { box-shadow: 0 10px 25px rgba(118,75,162,0.2); transform: translateY(-3px); border-color: #764ba2; }
.company-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.company-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}
.company-meta { display: flex; flex-direction: column; gap: 3px; }
.company-meta .c-name { font-weight: 700; color: #4a3f8f; font-size: 15px; }
.company-meta .c-mgr { font-size: 12px; color: #4a00e0; }
.company-meta .c-count { font-size: 11px; color: #888; }

.company-selector {
  background: #f9f9ff;
  border: 2px dashed #c5c5e0;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}
.company-selector label {
  display: block;
  font-weight: 700;
  color: #4a3f8f;
  margin-bottom: 10px;
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f0f0fa, #e8e8f5);
  padding: 12px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.breadcrumb .crumb {
  color: #764ba2;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: 0.3s;
}
.breadcrumb .crumb:hover { background: rgba(118,75,162,0.15); }
.breadcrumb .crumb.active { color: #4a3f8f; cursor: default; background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.breadcrumb .crumb.active:hover { background: white; }
.breadcrumb .sep { color: #c5c5e0; }

.back-btn {
  background: linear-gradient(135deg, #e0e0f0, #d0d0e5);
  color: #4a3f8f;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.3s;
  margin-bottom: 15px;
}
.back-btn:hover { background: linear-gradient(135deg, #d0d0e5, #c5c5e0); transform: translateX(3px); }

.manager-brief {
  background: linear-gradient(135deg, #f9f9ff, #f0f0fa);
  border: 2px solid #e0e0f0;
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.manager-brief:hover {
  border-color: #8e2de2;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(142,45,226,0.15);
}
.manager-brief .avatar-md {
  width: 55px; height: 55px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8e2de2, #4a00e0);
  color: white;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
}
.manager-brief .avatar-md img { width: 100%; height: 100%; object-fit: cover; }

.notifications-panel {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: white;
  border-radius: 20px;
  padding: 20px;
  max-width: 500px;
  width: calc(100% - 40px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 10003;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  max-height: 70vh;
  overflow-y: auto;
}
.notifications-panel.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.notifications-panel .notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0fa;
}
.notifications-panel .notif-header h3 {
  color: #4a3f8f;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-item {
  background: linear-gradient(135deg, #fff9e6, #ffeaa7);
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: 0.3s;
}
.notif-item:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,215,0,0.3); }
.notif-item.read {
  background: #f9f9ff;
  border-color: #e0e0f0;
}
.notif-item .notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.notif-item .notif-title {
  font-weight: 700;
  color: #4a3f8f;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.notif-item .notif-body {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}
.notif-item .notif-time {
  font-size: 11px;
  color: #999;
  margin-top: 6px;
}

.notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 10002;
  display: none;
}
.notif-backdrop.show { display: block; }

@media (max-width: 600px) {
  .header h1 { font-size: 1.1rem; }
  .card { padding: 20px; }
  .user-badge-top { font-size: 12px; padding: 5px 10px 5px 5px; }
  .user-badge-top .avatar-mini { width: 30px; height: 30px; }
}