/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   workTime RFID Management Feature Stylesheet
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.worktime-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* ── Hero / Header ── */
.worktime-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--card-bg, #1a1e29);
  border: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  border-radius: var(--r, 12px);
  padding: 18px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.worktime-hero-info h2 {
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px 0;
  color: #fff;
}

.worktime-hero-info p {
  font-size: 12px;
  color: var(--txt3, #8a94a6);
  margin: 0;
  max-width: 700px;
  line-height: 1.5;
}

.worktime-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── KPI Stat Cards Grid ── */
.worktime-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.worktime-kpi-card {
  background: var(--card-bg, #1a1e29);
  border: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  border-radius: var(--r, 12px);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.worktime-kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.worktime-kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.worktime-kpi-content {
  flex: 1;
  min-width: 0;
}

.worktime-kpi-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--txt3, #8a94a6);
  margin-bottom: 3px;
  font-weight: 600;
}

.worktime-kpi-val {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.worktime-kpi-sub {
  font-size: 11px;
  color: var(--txt3, #8a94a6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 3px;
}

/* ── Section Titles ── */
.worktime-sec-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 2px 0;
}

.worktime-sec-title span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Node Rules Grid ── */
.worktime-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.worktime-node-card {
  background: var(--card-bg, #1a1e29);
  border: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  border-radius: var(--r, 12px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.worktime-node-card.default-rule {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06) 0%, rgba(26, 30, 41, 1) 100%);
}

.worktime-node-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.worktime-node-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.worktime-node-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.worktime-node-mac {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--txt3, #8a94a6);
  margin-top: 2px;
}

.worktime-node-badge {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.badge-default {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-custom {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-kpp {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}

.badge-dept {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-kpp-sm {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-dept-sm {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-ignored-sm {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.worktime-node-card.node-kpp {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.07) 0%, rgba(26, 30, 41, 0.95) 100%);
}

.worktime-node-card.node-ignored {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.06) 0%, rgba(26, 30, 41, 0.95) 100%);
}

.worktime-node-channels {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.worktime-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.worktime-channel-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt2, #c5d1e0);
  display: flex;
  align-items: center;
  gap: 8px;
}

.worktime-channel-select {
  background: #11141c;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  min-width: 135px;
  transition: all 0.15s;
}

.worktime-channel-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.worktime-channel-select option[value="IN"] {
  color: #34d399;
  background: #11141c;
}
.worktime-channel-select option[value="OUT"] {
  color: #f87171;
  background: #11141c;
}
.worktime-channel-select option[value="TOGGLE"] {
  color: #fbbf24;
  background: #11141c;
}
.worktime-channel-select option[value="IGNORE"] {
  color: #f87171;
  background: #11141c;
}

.worktime-node-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* ── Action Buttons ── */
.btn-wt {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.btn-wt:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-wt:active:not(:disabled) {
  transform: translateY(0);
}

.btn-wt:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-wt-primary {
  background: #2563eb;
  border-color: #3b82f6;
  color: #fff;
}
.btn-wt-primary:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #60a5fa;
}

.btn-wt-success {
  background: #059669;
  border-color: #10b981;
  color: #fff;
}
.btn-wt-success:hover:not(:disabled) {
  background: #047857;
  border-color: #34d399;
}

.btn-wt-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}
.btn-wt-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

.btn-wt-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.btn-wt-warning:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
}

.btn-wt-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--txt2, #c5d1e0);
}
.btn-wt-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ── Add Node Rule Box ── */
.worktime-add-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--r, 12px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.worktime-add-card h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Simulator / Tester Section ── */
.worktime-sim-card {
  background: var(--card-bg, #1a1e29);
  border: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  border-radius: var(--r, 12px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.worktime-sim-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

.worktime-field-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.worktime-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--txt3, #8a94a6);
}

.worktime-sim-result {
  background: #11141c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 13px;
  display: none;
}

.worktime-sim-result.active {
  display: flex;
  align-items: center;
  gap: 14px;
}

.worktime-sim-result.success {
  border-left: 4px solid #10b981;
  background: rgba(16, 185, 129, 0.06);
}

.worktime-sim-result.warning {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}

.worktime-sim-result.buffered {
  border-left: 4px solid #3b82f6;
  background: rgba(59, 130, 246, 0.06);
}

.worktime-sim-result.ignored {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* ── Live Swipes Stream Table ── */
.worktime-table-wrap {
  background: var(--card-bg, #1a1e29);
  border: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  border-radius: var(--r, 12px);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.worktime-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.worktime-table-header h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.worktime-table-scroll {
  max-height: 400px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.worktime-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.worktime-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--txt3, #8a94a6);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  position: sticky;
  top: 0;
  z-index: 2;
}

.worktime-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--txt1, #e1e7f0);
}

.worktime-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.tag-in {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-weight: 700;
  font-size: 11px;
}

.tag-out {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-weight: 700;
  font-size: 11px;
}

.tag-status-online {
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-status-buffered {
  color: #60a5fa;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-status-warn {
  color: #f59e0b;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-ignored {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-weight: 700;
  font-size: 11px;
}

.tag-status-ignored {
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Superadmin Auth & Lock Screen ── */
.worktime-lock-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  padding: 40px 20px;
}

.worktime-lock-card {
  background: var(--card-bg, #1a1e29);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(239, 68, 68, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: wtFadeIn 0.3s ease-out;
}

@keyframes wtFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.worktime-lock-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 2px solid rgba(239, 68, 68, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.worktime-lock-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.worktime-lock-desc {
  font-size: 12px;
  color: var(--txt3, #8a94a6);
  line-height: 1.5;
  margin: 0;
}

.worktime-lock-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.worktime-lock-input-group {
  position: relative;
  width: 100%;
}

.worktime-lock-input {
  width: 100%;
  background: #11141c;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 10px 40px 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.15s;
  box-sizing: border-box;
}

.worktime-lock-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.worktime-lock-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--txt3, #8a94a6);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.worktime-lock-eye:hover {
  color: #fff;
}

.worktime-lock-error {
  color: #f87171;
  font-size: 12px;
  font-weight: 500;
  min-height: 18px;
  display: none;
}

.worktime-lock-error.active {
  display: block;
}

.badge-superadmin {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Swipes Search & Filter Bar ── */
.badge-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  animation: livePulseAnim 2s infinite ease-in-out;
}

@keyframes livePulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.96); }
}

.worktime-filter-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wt-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.wt-search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
}

.wt-search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  color: var(--txt3, #8a94a6);
  pointer-events: none;
}

.wt-search-box input {
  width: 100%;
  background: #11141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 34px 8px 34px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.wt-search-box input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.wt-search-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--txt3, #8a94a6);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}

.wt-search-clear-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.wt-filter-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wt-filter-select-group label {
  font-size: 11px;
  color: var(--txt3, #8a94a6);
  font-weight: 600;
  white-space: nowrap;
}

.wt-select-sm {
  background: #11141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--txt1, #e1e7f0);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.wt-select-sm:focus {
  border-color: #3b82f6;
}

.wt-custom-date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.wt-date-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wt-date-item label {
  font-size: 11px;
  color: var(--txt3, #8a94a6);
  font-weight: 600;
}

.wt-date-input {
  background: #11141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  outline: none;
  color-scheme: dark;
}

.wt-date-input:focus {
  border-color: #3b82f6;
}

/* ── Pagination Bar ── */
.worktime-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--brd, rgba(255, 255, 255, 0.08));
  font-size: 12px;
  color: var(--txt2, #c3cad6);
}

.wt-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-wt-page {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-wt-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wt-page-display {
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  padding: 0 4px;
  color: #fff;
}

/* ── Row Highlight Animation for Real-Time Arrival ── */
@keyframes swipeHighlight {
  0% { background: rgba(59, 130, 246, 0.25); }
  100% { background: transparent; }
}

.swipe-row-new {
  animation: swipeHighlight 3s ease-out;
}


