/* ═══════════════════════════════════════════════════════════════════
   EMPLOYEE DASHBOARD · LearnerConnect HR
   Mobile-first styles for the restructured employee landing page.
   Desktop enhancements applied via progressive breakpoints.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 1. Greeting strip ──────────────────────────────────────────── */
.dash-greet-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-greet-text { min-width: 0; }

.dash-greet-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.dash-greet-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.dash-greet-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 600;
}

@media (min-width: 640px) {
  .dash-greet-strip {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .dash-greet-cta { align-self: center; }
  .dash-greet-title { font-size: 24px; }
}

/* ─── 2. Today snapshot ──────────────────────────────────────────── */
.dash-today-card { margin-bottom: 14px; }

.dash-today-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.dash-today-cell {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 84px;
}

.dash-today-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dash-today-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

.dash-today-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.dash-today-action {
  margin-top: 4px;
  align-self: flex-start;
  min-height: 36px;
  transition: opacity 0.15s ease;
}

/* Amber variant used for the "Check Out" state on the dashboard today
   card — distinguishes the in-progress working session from the fresh
   green "Check In" call-to-action. */
.dash-today-action-amber {
  background: linear-gradient(180deg, #f59e0b, #d97706);
  border-color: rgba(0, 0, 0, 0.08);
  color: #fff;
}

.dash-today-action-amber:hover {
  background: linear-gradient(180deg, #d97706, #b45309);
}

.dash-today-action:disabled,
.dash-today-action[disabled] {
  opacity: 0.7;
  cursor: progress;
  pointer-events: none;
}

/* Location badge shown on the dashboard check-in cell — tells the
   employee (and admin shoulder-surfing) whether geolocation actually
   got captured for today's attendance. */
.dash-loc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.dash-loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.dash-loc-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.dash-loc-missing {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Location chip used inside the admin attendance-mgmt table.
   Matches the dashboard chip styling so both surfaces feel consistent. */
.att-loc {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  margin-right: 4px;
}

.att-loc-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.att-loc-ok:hover { background: rgba(34, 197, 94, 0.22); }

.att-loc-missing {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

@media (min-width: 640px) {
  .dash-today-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* ─── 3. Leave balance widget ────────────────────────────────────── */
.dash-balance-card { margin-bottom: 14px; }

.dash-bal-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.dash-bal-row:first-child { padding-top: 6px; }
.dash-bal-row:last-child  { border-bottom: 0; padding-bottom: 0; }

.dash-bal-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.dash-bal-key {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  flex-shrink: 0;
}

.dash-bal-label {
  font-size: 13px;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.dash-bal-count {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.dash-bal-bar {
  position: relative;
  height: 6px;
  border-radius: 4px;
  background: var(--surface2);
  overflow: hidden;
}

.dash-bal-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.dash-bal-foot {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ─── 4. Recent activity grid ────────────────────────────────────── */
.dash-activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .dash-activity-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}

/* Recent leave request row */
.dash-recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.dash-recent-row:first-child { padding-top: 4px; }
.dash-recent-row:last-child  { border-bottom: 0; padding-bottom: 0; }

.dash-recent-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.dash-recent-type {
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  color: var(--text);
}

.dash-recent-dates {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Recent notifications row */
.dash-notif-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.dash-notif-row:first-child { padding-top: 4px; }
.dash-notif-row:last-child  { border-bottom: 0; padding-bottom: 0; }

.dash-notif-ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-top: 1px;
}

.dash-notif-body {
  flex: 1;
  min-width: 0;
}

.dash-notif-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.dash-notif-preview {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-notif-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
  padding-top: 2px;
  opacity: 0.8;
  white-space: nowrap;
}

/* ─── Empty + loading states ─────────────────────────────────────── */
.dash-empty {
  padding: 14px 4px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.01em;
}
