:root {
  --blue: #4a90d9;
  --blue-dark: #2f6cb3;
  --blue-light: #eaf4fc;
  --red: #e57373;
  --red-dark: #c85a5a;
  --text: #2b2b2b;
  --bg: #f7f9fb;
}

body {
  font-family: 'Segoe UI', -apple-system, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== Header ===== */
.site-header {
  background: var(--blue);
  color: #fff;
}
.site-header h1 {
  font-size: 26px;
}
.site-header .tagline {
  font-size: 13px;
  color: var(--blue-light);
}

/* ===== Nav ===== */
.site-nav {
  background: var(--blue-dark) !important;
}
.site-nav .nav-link {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
}
.site-nav .nav-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ===== Cards / widget boxes ===== */
.widget-card {
  border: none;
  border-top: 4px solid var(--blue);
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}
.widget-card .card-title {
  color: var(--blue-dark);
  font-weight: 600;
}

.hint {
  color: #8a939c;
}

/* ===== Buttons ===== */
.btn-primary {
  background-color: var(--blue);
  border-color: var(--blue);
}
.btn-primary:hover {
  background-color: var(--blue-dark);
  border-color: var(--blue-dark);
}
.btn-outline-danger {
  color: var(--red);
  border-color: var(--red);
}
.btn-outline-danger:hover {
  background-color: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ===== Worker ID card (search results + admin list) ===== */
.worker-id-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e8ecf0;
  border-left: 4px solid var(--red);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.badge-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 18px;
}
.id-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-thumb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue);
  background: #eee;
}
.reg-id-box {
  font-size: 11px;
  background: var(--blue-light);
  color: var(--blue-dark);
  padding: 2px 8px;
  border-radius: 5px;
  display: inline-block;
  margin-top: 4px;
}
.w-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.w-cat {
  font-size: 13px;
  color: var(--red-dark);
  font-weight: 600;
}
.info-line {
  font-size: 13px;
  margin: 3px 0;
  color: #555;
}
.call-btn {
  display: block;
  text-align: center;
  background: var(--blue);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
  cursor: pointer;
  border: none;
  width: 100%;
}
.call-btn:hover {
  background: var(--blue-dark);
  color: #fff;
}

/* ===== Search result gallery (photos + videos) ===== */
.worker-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.worker-gallery .gallery-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
}
.worker-gallery .video-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: var(--blue-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
}

/* ===== In-page media lightbox (replaces opening a new browser tab) ===== */
.media-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}
.media-modal-content {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 88vh;
  background: #000;
  border-radius: 10px;
  padding: 6px;
  display: flex;
}
.media-modal-content img,
.media-modal-content video {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: auto;
}
.media-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.media-modal-close:hover {
  background: var(--red-dark);
}


/* ===== Profile-edit gallery (with delete buttons) ===== */
.gallery-edit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gallery-edit-item {
  position: relative;
  width: 72px;
  height: 72px;
}
.gallery-edit-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}
.gallery-edit-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
}
.gallery-edit-del:hover {
  background: var(--red-dark);
}

/* ===== Admin-assigned tag shown on public profile cards ===== */
.admin-tag {
  display: inline-block;
  background: var(--blue-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
}

/* ===== Admin badge buttons ===== */
.badge-btn-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.badge-btn {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
}
.badge-btn.silver { background: #9e9e9e; }
.badge-btn.gold { background: #d4a017; }
.badge-btn.diamond { background: #4a90d9; }
.badge-btn.active-badge {
  outline: 3px solid var(--red);
  outline-offset: 1px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--blue-dark);
  color: #fff;
}
.site-footer a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  margin: 0 8px;
  opacity: 0.9;
}
.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}
