/* ===========================================
   EMPLOYEE PORTAL — The Care Team Dashboard
   "Supporting those who support others."
   =========================================== */

.employee-page {
  background-color: #FBFAF5;
  padding-bottom: 4rem;
}

/* ===========================================
   HERO
   =========================================== */
.employee-hero {
  position: relative;
  height: 40vh;
  min-height: 280px;
  overflow: hidden;
}

.employee-hero-image {
  position: absolute;
  inset: 0;
  background-image: url('assets/employee-hero.jpg');
  background-size: cover;
  background-position: center 30%;
  background-color: #c5bfb4;
}

.employee-hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 2rem 2rem 2.5rem;
  background: linear-gradient(
    to bottom,
    rgba(251, 250, 245, 0) 0%,
    rgba(251, 250, 245, 0.5) 50%,
    rgba(251, 250, 245, 0.9) 100%
  );
}

.employee-hero-greeting {
  font-size: 1rem;
  color: var(--color-slate, #4A433D);
  margin-bottom: 0.25rem;
}

.employee-hero-name {
  font-family: var(--font-serif, 'Lora', Georgia, serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--color-chocolate, #3A322C);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.employee-hero-role {
  font-size: 0.9rem;
  color: var(--color-olive, #7A8B5E);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.employee-hero-shift {
  font-size: 0.85rem;
  color: var(--color-slate, #4A433D);
}

/* ===========================================
   QUICK ACTIONS BAR
   =========================================== */
.quick-actions-bar {
  display: flex;
  gap: 0.75rem;
  max-width: 1100px;
  margin: -2rem auto 2rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.quick-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid rgba(58, 50, 44, 0.08);
  border-radius: 1rem;
  padding: 1rem;
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-chocolate, #3A322C);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(58, 50, 44, 0.05);
  transition: all 0.25s;
}

.quick-action-btn:hover {
  background: var(--color-olive, #7A8B5E);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(122, 139, 94, 0.2);
}

.quick-action-btn.clocked-in {
  background: var(--color-olive, #7A8B5E);
  color: white;
  border-color: var(--color-olive, #7A8B5E);
}

/* ===========================================
   DASHBOARD GRID
   =========================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.dashboard-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===========================================
   DASHBOARD CARDS
   =========================================== */
.dashboard-card {
  background: white;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 2px 14px rgba(58, 50, 44, 0.04);
  border: 1px solid rgba(58, 50, 44, 0.05);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-header h2 {
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-chocolate, #3A322C);
  margin: 0;
}

.card-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.card-badge {
  font-size: 0.75rem;
  color: var(--color-olive, #7A8B5E);
  background: rgba(122, 139, 94, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 1rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ===========================================
   LIVE DOT
   =========================================== */
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--color-olive, #7A8B5E);
  border-radius: 50%;
  position: relative;
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(122, 139, 94, 0.4);
  animation: livePulse 2s ease-out infinite;
}

@keyframes livePulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ===========================================
   PULSE GRID
   =========================================== */
.pulse-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pulse-unit {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(122, 139, 94, 0.04);
  border-radius: 0.75rem;
  flex-wrap: wrap;
}

.unit-label {
  font-size: 0.85rem;
  color: var(--color-chocolate, #3A322C);
  font-weight: 500;
  min-width: 140px;
}

.unit-ratio {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-olive, #7A8B5E);
}

.unit-residents {
  font-size: 0.78rem;
  color: var(--color-slate, #4A433D);
  margin-left: auto;
}

/* ===========================================
   DROPDOWNS & SEARCH
   =========================================== */
.dropdown-filter {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid rgba(58, 50, 44, 0.12);
  border-radius: 0.6rem;
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-size: 0.85rem;
  color: var(--color-chocolate, #3A322C);
  background: var(--color-cream, #FDFBF7);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234A433D' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.dropdown-filter:focus {
  outline: none;
  border-color: var(--color-olive, #7A8B5E);
  box-shadow: 0 0 0 3px rgba(122, 139, 94, 0.1);
}

.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: #b8b0a6;
  pointer-events: none;
}

.search-input {
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  border: 1px solid rgba(58, 50, 44, 0.12);
  border-radius: 0.6rem;
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-size: 0.85rem;
  color: var(--color-chocolate, #3A322C);
  background: var(--color-cream, #FDFBF7);
  width: 180px;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-olive, #7A8B5E);
  box-shadow: 0 0 0 3px rgba(122, 139, 94, 0.1);
}

.search-input::placeholder {
  color: #b8b0a6;
}

/* ===========================================
   RESIDENT LIST
   =========================================== */
.resident-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 300px;
  overflow-y: auto;
}

.resident-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.6rem;
  transition: background 0.2s;
  cursor: pointer;
}

.resident-item:hover {
  background: rgba(122, 139, 94, 0.04);
}

.resident-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(122, 139, 94, 0.1);
  color: var(--color-olive, #7A8B5E);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.resident-info {
  flex: 1;
  min-width: 0;
}

.resident-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-chocolate, #3A322C);
}

.resident-unit {
  font-size: 0.75rem;
  color: var(--color-slate, #4A433D);
}

.resident-status {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-thriving { background: rgba(122,139,94,0.12); color: var(--color-olive, #7A8B5E); }
.status-settled { background: rgba(122,139,94,0.08); color: #5d6e42; }
.status-attention { background: rgba(194,122,90,0.1); color: var(--color-terracotta, #C27A5A); }

/* ===========================================
   CARE LOG FORM
   =========================================== */
.care-log-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(58, 50, 44, 0.06);
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.log-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(58, 50, 44, 0.12);
  border-radius: 0.75rem;
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-size: 0.9rem;
  color: var(--color-chocolate, #3A322C);
  background: var(--color-cream, #FDFBF7);
  resize: vertical;
  min-height: 60px;
}

.log-textarea:focus {
  outline: none;
  border-color: var(--color-olive, #7A8B5E);
  box-shadow: 0 0 0 3px rgba(122, 139, 94, 0.1);
}

.log-textarea::placeholder {
  color: #b8b0a6;
  font-style: italic;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-slate, #4A433D);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-olive, #7A8B5E);
  cursor: pointer;
}

/* Recent Logs */
.recent-logs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recent-log-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-slate, #4A433D);
  background: rgba(122, 139, 94, 0.03);
}

.recent-log-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-olive, #7A8B5E);
  margin-top: 0.4rem;
  flex-shrink: 0;
}

.recent-log-time {
  font-size: 0.7rem;
  color: #b8b0a6;
  margin-left: auto;
  white-space: nowrap;
}

/* ===========================================
   ANNOUNCEMENTS
   =========================================== */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.announcement-item {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(122, 139, 94, 0.03);
  cursor: pointer;
  transition: background 0.2s;
}

.announcement-item:hover {
  background: rgba(122, 139, 94, 0.06);
}

.announcement-item.unread {
  background: rgba(122, 139, 94, 0.06);
  border-left: 3px solid var(--color-olive, #7A8B5E);
}

.announcement-title {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 0.2rem;
}

.announcement-preview {
  font-size: 0.8rem;
  color: var(--color-slate, #4A433D);
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.announcement-time {
  font-size: 0.7rem;
  color: #b8b0a6;
}

/* ===========================================
   TEAM LIST
   =========================================== */
.team-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.6rem;
  transition: background 0.2s;
}

.team-member:hover {
  background: rgba(122, 139, 94, 0.04);
}

.team-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-olive, #7A8B5E);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.team-info {
  flex: 1;
  min-width: 0;
}

.team-name {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-chocolate, #3A322C);
}

.team-role {
  display: block;
  font-size: 0.72rem;
  color: var(--color-slate, #4A433D);
}

.team-status {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  white-space: nowrap;
}

.team-status.online {
  background: rgba(122, 139, 94, 0.12);
  color: var(--color-olive, #7A8B5E);
}

.team-status.break {
  background: rgba(194, 122, 90, 0.1);
  color: var(--color-terracotta, #C27A5A);
}

/* ===========================================
   WELLNESS CORNER
   =========================================== */
.wellness-card {
  background: linear-gradient(135deg, #faf8f3 0%, #f3efe6 100%);
}

.wellness-prompt {
  font-family: var(--font-serif, 'Lora', Georgia, serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 0.75rem;
}

.mood-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mood-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: white;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mood-btn:hover {
  border-color: var(--color-olive, #7A8B5E);
  transform: scale(1.1);
}

.mood-btn.selected {
  border-color: var(--color-olive, #7A8B5E);
  background: rgba(122, 139, 94, 0.08);
  transform: scale(1.1);
}

.wellness-reminder {
  font-size: 0.8rem;
  color: var(--color-slate, #4A433D);
  margin-bottom: 0.75rem;
  font-style: italic;
}


/* ===========================================
   CLOCK DISPLAY
   =========================================== */
.clock-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-olive, #7A8B5E);
  color: white;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  min-width: 80px;
  box-shadow: 0 4px 14px rgba(122, 139, 94, 0.2);
  animation: clockIn 0.4s ease;
}

@keyframes clockIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.clock-timer {
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.clock-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-top: 0.1rem;
}

/* ===========================================
   SHIFT LOG
   =========================================== */
.shift-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
}

.shift-log-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.6rem;
  font-size: 0.82rem;
  color: var(--color-chocolate, #3A322C);
  background: rgba(122, 139, 94, 0.03);
  transition: background 0.2s;
}

.shift-log-item:hover {
  background: rgba(122, 139, 94, 0.06);
}

.shift-log-time {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--color-olive, #7A8B5E);
  min-width: 50px;
}

.shift-log-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.shift-log-text {
  flex: 1;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions-bar {
    flex-wrap: wrap;
    margin-top: -1rem;
  }

  .quick-action-btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 120px;
  }

  .card-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .search-input {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .employee-hero {
    height: 30vh;
    min-height: 220px;
  }

  .employee-hero-overlay {
    padding: 1.25rem;
  }

  .quick-action-btn {
    flex: 1 1 100%;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row .dropdown-filter {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::after {
    animation: none;
  }
}
