/* ============================================
   Worker Status Page — Dark Theme
   ============================================ */

/* Filter Bar */
.hrm-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
}

.hrm-filter-input,
.hrm-filter-select {
  height: 40px;
  padding: 0 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: rgba(255,255,255,.9);
  font-size: .85rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
}

.hrm-filter-input:focus,
.hrm-filter-select:focus {
  border-color: #818cf8;
  background: rgba(255,255,255,.07);
}

.hrm-filter-input::placeholder {
  color: rgba(255,255,255,.35);
}

.hrm-filter-input[type="date"] {
  width: 160px;
  color-scheme: dark;
}

.hrm-filter-input[type="text"] {
  flex: 1;
  min-width: 180px;
}

.hrm-filter-select {
  min-width: 140px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
}

.hrm-filter-select option {
  background: #1a1a2e;
  color: rgba(255,255,255,.9);
}

.hrm-filter-reset {
  height: 40px;
  padding: 0 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hrm-filter-reset:hover {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
}

/* Summary Stat Cards */
.ws-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ws-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  transition: border-color .2s;
}

.ws-stat-card:hover {
  border-color: rgba(255,255,255,.12);
}

.ws-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ws-stat-icon.total {
  background: rgba(96,165,250,.12);
  color: #60a5fa;
}

.ws-stat-icon.working {
  background: rgba(52,211,153,.12);
  color: #34d399;
}

.ws-stat-icon.leave {
  background: rgba(129,140,248,.12);
  color: #818cf8;
}

.ws-stat-icon.absent {
  background: rgba(239,68,68,.12);
  color: #f87171;
}

.ws-stat-icon.notchecked {
  background: rgba(148,163,184,.12);
  color: #94a3b8;
}

.ws-stat-info {
  display: flex;
  flex-direction: column;
}

.ws-stat-count {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.ws-stat-label {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  margin-top: 4px;
}

/* Filter Tabs */
.ws-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ws-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}

.ws-tab:hover {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
}

.ws-tab.active {
  background: #818cf8;
  border-color: #818cf8;
  color: #fff;
}

.ws-tab.active .ws-tab-badge {
  background: rgba(255,255,255,.25);
  color: #fff;
}

.ws-tab-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
}

.ws-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.ws-tab-dot.working { background: #34d399; }
.ws-tab-dot.leave { background: #818cf8; }
.ws-tab-dot.absent { background: #f87171; }
.ws-tab-dot.notChecked { background: #94a3b8; }

/* Worker Grid */
.worker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.worker-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-left: 4px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all .2s;
}

.worker-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}

.worker-card.working { border-left-color: #34d399; }
.worker-card.leave { border-left-color: #818cf8; }
.worker-card.absent { border-left-color: #f87171; }
.worker-card.notChecked { border-left-color: #475569; }

.worker-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.worker-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(129,140,248,.15);
  color: #818cf8;
}

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

.worker-name {
  font-weight: 700;
  font-size: .9rem;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-dept {
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  margin-top: 2px;
}

.worker-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.worker-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}

.worker-status-badge.working {
  background: rgba(52,211,153,.1);
  color: #34d399;
}

.worker-status-badge.leave {
  background: rgba(129,140,248,.1);
  color: #818cf8;
}

.worker-status-badge.absent {
  background: rgba(239,68,68,.1);
  color: #f87171;
}

.worker-status-badge.notChecked {
  background: rgba(148,163,184,.1);
  color: #94a3b8;
}

.worker-time {
  font-size: .72rem;
  color: rgba(255,255,255,.35);
  font-family: 'Courier New', monospace;
}

.worker-position {
  font-size: .7rem;
  color: rgba(255,255,255,.35);
  margin-top: 1px;
}

.worker-work-code {
  font-size: .68rem;
  color: rgba(255,255,255,.3);
  margin-left: 6px;
}

/* Empty state */
.worker-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,.35);
  font-size: .9rem;
}

.worker-grid-empty i {
  display: block;
  font-size: 2rem;
  margin-bottom: 12px;
  color: rgba(255,255,255,.15);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
  .ws-summary {
    grid-template-columns: repeat(5, 1fr);
  }
  .worker-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .ws-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  .worker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ws-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .worker-grid {
    grid-template-columns: 1fr;
  }
  .hrm-filter {
    flex-direction: column;
    align-items: stretch;
  }
  .hrm-filter-input[type="date"] {
    width: 100%;
  }
  .hrm-filter-input[type="text"] {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .ws-summary {
    grid-template-columns: 1fr;
  }
  .ws-filter-tabs {
    gap: 6px;
  }
  .ws-tab {
    padding: 6px 12px;
    font-size: .8rem;
  }
  .ws-stat-card {
    padding: 14px 16px;
  }
}
