/* ============================================
   event_log.css — 이벤트 로그 전용 스타일
   원본: mia event-log.html
   접두사: evt-
   ============================================ */

/* application.html.erb <main> override */
main:has(.evt-layout) {
  overflow: hidden !important;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --- Main Layout --- */
.evt-layout {
  flex: 1;
  overflow: hidden;
  display: flex;
  position: relative;
}

/* --- Live Clock --- */
.evt-live-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  color: var(--tertiary);
  font-weight: 500;
}

/* --- Left Filter Panel --- */
.evt-filter-panel {
  width: 240px;
  background: white;
  border-right: 1px solid var(--tint);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.evt-filter-body {
  padding: 16px;
  border-bottom: 1px solid var(--tint);
}

.evt-filter-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 16px;
}

.evt-filter-title i {
  margin-right: 6px;
}

.evt-filter-section {
  margin-bottom: 16px;
}

.evt-filter-section:last-child {
  margin-bottom: 0;
}

.evt-filter-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--tertiary);
  margin-bottom: 6px;
}

/* --- Type Toggle Buttons --- */
.evt-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.evt-type-toggle {
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid var(--tint);
  background: white;
  color: var(--light);
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.evt-type-toggle i {
  font-size: 0.5625rem;
}

.evt-type-toggle.evt-active { border-color: var(--secondary); }
.evt-type-toggle.evt-active.evt-t-qr_scan { background: rgba(34,197,94,0.1); color: #15803D; border-color: #15803D; }
.evt-type-toggle.evt-active.evt-t-work_start { background: rgba(59,130,246,0.1); color: #2563EB; border-color: #2563EB; }
.evt-type-toggle.evt-active.evt-t-work_done { background: rgba(34,197,94,0.1); color: #15803D; border-color: #15803D; }
.evt-type-toggle.evt-active.evt-t-hold { background: rgba(245,158,11,0.1); color: #D97706; border-color: #D97706; }
.evt-type-toggle.evt-active.evt-t-error { background: rgba(239,68,68,0.1); color: #DC2626; border-color: #DC2626; }
.evt-type-toggle.evt-active.evt-t-worker_change { background: rgba(139,92,246,0.1); color: #7C3AED; border-color: #7C3AED; }
.evt-type-toggle.evt-active.evt-t-logout { background: rgba(107,114,128,0.1); color: #6B7280; border-color: #6B7280; }

/* --- Date Range Chips --- */
.evt-date-chips {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.evt-date-chip {
  flex: 1;
  padding: 5px 0;
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid var(--tint);
  background: white;
  color: var(--tertiary);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.evt-date-chip.evt-active {
  background: var(--secondary);
  color: white;
}

/* --- Date Inputs --- */
.evt-date-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evt-date-input-label {
  font-size: 0.625rem;
  color: var(--light);
  margin-bottom: 2px;
}

.evt-date-input {
  width: 100%;
  border: 1px solid var(--tint);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.75rem;
  color: var(--brand);
  outline: none;
  font-family: inherit;
}

/* --- Checkbox Filters --- */
.evt-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--brand);
}

.evt-check input[type="checkbox"] {
  accent-color: var(--secondary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* --- Filter Summary --- */
.evt-filter-summary {
  padding: 16px;
  margin-top: auto;
  border-top: 1px solid var(--tint);
}

.evt-filter-count-label {
  font-size: 0.6875rem;
  color: var(--light);
  margin-bottom: 4px;
}

.evt-filter-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
}

.evt-reset-btn {
  width: 100%;
  margin-top: 12px;
  padding: 7px 0;
  border: 1px solid var(--tint);
  border-radius: 6px;
  background: white;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tertiary);
  cursor: pointer;
  font-family: inherit;
}

.evt-reset-btn:hover {
  background: var(--bg-light);
}

/* --- Right Table Area --- */
.evt-table-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--background);
}

/* --- Table Toolbar --- */
.evt-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border-bottom: 1px solid var(--tint);
}

.evt-toolbar-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
}

.evt-toolbar-title i {
  margin-right: 6px;
}

.evt-toolbar-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.evt-search-input {
  width: 200px;
  border: 1px solid var(--tint);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  color: var(--brand);
  outline: none;
  font-family: inherit;
}

.evt-csv-btn {
  padding: 5px 12px;
  border: 1px solid var(--tint);
  border-radius: 6px;
  background: white;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tertiary);
  cursor: pointer;
  font-family: inherit;
}

.evt-csv-btn:hover {
  background: var(--bg-light);
}

/* --- Tabulator Container --- */
.evt-table-container {
  flex: 1;
  padding: 12px 16px;
  overflow: hidden;
}
