/* ============================================================
   HR EXPANSION STYLES
   New components for requests, shifts, goals, reviews, surveys,
   and the notification center. Uses existing design tokens so
   light/dark themes apply automatically.
============================================================ */

/* -------------------- Notification bell + panel -------------------- */
.notif-wrap { position: relative; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.notif-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--status-failed);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-panel {
  position: absolute;
  top: 46px;
  right: 0;
  width: 340px;
  max-width: 90vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}
.notif-scroll { max-height: 380px; overflow-y: auto; }
.notif-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: rgba(45,45,42,0.04); }
body.theme-dark .notif-item.unread { background: rgba(221,219,213,0.07); }
.notif-item.unread .notif-title::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.notif-title { font-weight: 600; font-size: 0.9rem; }
.notif-body { color: var(--text2); font-size: 0.84rem; margin-top: 2px; }
.notif-time { color: var(--text3); font-size: 0.75rem; margin-top: 4px; }
.notif-empty, .notif-loading { padding: 28px 14px; text-align: center; color: var(--text3); font-size: 0.88rem; }

/* -------------------- Leave balance strip / stat cards -------------------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-card--mini { padding: 14px 16px; }
.stat-label { color: var(--text3); font-size: 0.8rem; text-transform: capitalize; }
.stat-value { color: var(--text); font-size: 1.6rem; font-weight: 700; margin-top: 4px; }
.stat-unit { color: var(--text3); font-size: 0.85rem; font-weight: 500; }

/* -------------------- Card grids (goals, surveys) -------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.meta-line { color: var(--text3); font-size: 0.82rem; margin-top: 4px; }

/* -------------------- Goal progress -------------------- */
.goal-card h4 { font-size: 1rem; }
.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
}
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }

/* -------------------- Reviews -------------------- */
.review-items { display: flex; flex-direction: column; gap: 14px; margin: 12px 0; }
.review-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.review-item-label { font-weight: 600; margin-bottom: 8px; }
.review-scores { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text2); font-size: 0.9rem; }
.review-scores .text-muted { flex-basis: 100%; }
.final-score-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(22,163,74,0.10);
  color: var(--status-submitted);
  border: 1px solid rgba(22,163,74,0.25);
  font-size: 1.05rem;
}

/* -------------------- Surveys / forms -------------------- */
.survey-form { display: flex; flex-direction: column; gap: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--text2); cursor: pointer; }
.check-list { display: flex; flex-direction: column; gap: 2px; }
.req-star { color: var(--status-failed); }

/* -------------------- Wide modal -------------------- */
.modal-box--wide { max-width: 640px; width: 92vw; max-height: 86vh; overflow-y: auto; }

/* -------------------- Report History -------------------- */
.search-input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
}
.search-input:focus { outline: none; border-color: var(--accent); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.history-card { transition: border-color 0.15s, transform 0.15s; }
.history-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.history-card h4 { font-size: 1rem; }
.history-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* Detail modal */
.history-detail .detail-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.history-detail .detail-row strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text3); }
.history-detail .detail-row > div { display: flex; flex-wrap: wrap; gap: 6px; }

.detail-section { margin-top: 20px; }
.detail-section-title { font-size: 0.95rem; margin: 0 0 10px; }
.history-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.history-entry-num { font-size: 0.75rem; font-weight: 700; color: var(--text3); margin-bottom: 8px; }
.detail-field { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.detail-field-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text3); }
.detail-field span:last-child { color: var(--text2); font-size: 0.9rem; white-space: pre-wrap; }
