.logfilter-overlay, .logfilter-overlay * {
  box-sizing: border-box;
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.logfilter-overlay {
  position: fixed; inset: 0;
  background: rgba(2, 4, 12, 0.84);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  z-index: 10500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.logfilter-overlay.active { opacity: 1; pointer-events: auto; }
.logfilter-overlay.active .logfilter-panel { transform: translateY(0) scale(1); opacity: 1; }

.logfilter-panel {
  position: relative;
  width: 100%; max-width: 640px;
  max-height: 86vh; max-height: 86dvh;
  background:
    radial-gradient(ellipse 600px 300px at 30% 0%, rgba(192, 132, 252, 0.10), transparent 70%),
    linear-gradient(175deg, #0c0f2a 0%, #08091e 50%, #0a0c28 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.7),
    0 0 120px rgba(139, 158, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(24px) scale(0.96); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.logfilter-panel::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, #c084fc 35%, #5b8cff 65%, transparent 100%);
  opacity: 0.7; z-index: 2;
}

.logfilter-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.logfilter-head-left { display: flex; align-items: center; gap: 12px; }
.logfilter-head-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(139, 158, 255, 0.18), rgba(192, 132, 252, 0.12));
  border: 1px solid rgba(139, 158, 255, 0.32);
  border-radius: 10px;
}
.logfilter-title {
  font-size: 18px; font-weight: 800; letter-spacing: 0.2px;
  background: linear-gradient(120deg, #fff 30%, #c4b5fd 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logfilter-sub {
  font-size: 11px; font-weight: 600;
  color: #9ba3b4; margin-top: 2px;
  letter-spacing: 0.3px;
}
.logfilter-close {
  width: 32px; height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  cursor: pointer; color: #9ba3b4;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.logfilter-close:hover {
  background: rgba(255, 45, 85, 0.15);
  border-color: rgba(255, 45, 85, 0.32);
  color: #ff8fa3;
}

.logfilter-bulk {
  display: flex; gap: 8px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}
.logfilter-bulk-btn {
  flex: 1;
  padding: 9px 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(16, 185, 129, 0.10));
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 10px;
  color: #a3f5c6;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.logfilter-bulk-btn:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.32), rgba(16, 185, 129, 0.18));
  transform: translateY(-1px);
}
.logfilter-bulk-btn.danger {
  background: linear-gradient(135deg, rgba(255, 45, 85, 0.16), rgba(255, 45, 85, 0.08));
  border-color: rgba(255, 45, 85, 0.35);
  color: #ffb4c2;
}
.logfilter-bulk-btn.danger:hover {
  background: linear-gradient(135deg, rgba(255, 45, 85, 0.3), rgba(255, 45, 85, 0.18));
}

.logfilter-body {
  flex: 1; overflow-y: auto;
  padding: 12px 16px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 158, 255, 0.3) transparent;
}
.logfilter-body::-webkit-scrollbar { width: 7px; }
.logfilter-body::-webkit-scrollbar-thumb {
  background: rgba(139, 158, 255, 0.3); border-radius: 4px;
}

.logfilter-section {
  margin-bottom: 16px;
}
.logfilter-section:last-child { margin-bottom: 4px; }
.logfilter-section-head {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 6px;
}
.logfilter-section-icon { font-size: 14px; }
.logfilter-section-title {
  font-size: 11px; font-weight: 800;
  color: #c4b5fd;
  text-transform: uppercase; letter-spacing: 0.6px;
}

.logfilter-section-rows {
  display: flex; flex-direction: column; gap: 4px;
}

.logfilter-row-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}

.logfilter-row-threshold {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px 4px 4px;
  background: linear-gradient(135deg, rgba(20, 24, 56, 0.92), rgba(14, 16, 40, 0.92));
  border: 1px solid rgba(139, 158, 255, 0.28);
  border-radius: 999px;
  font-size: 11px;
  color: var(--art-text-dim, #9ba3b4);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: inset 0 0 12px rgba(139, 158, 255, 0.08);
}
.logfilter-row[aria-checked="true"] .logfilter-row-threshold {
  background: linear-gradient(135deg, rgba(40, 50, 100, 0.92), rgba(56, 36, 104, 0.92));
  border-color: rgba(139, 158, 255, 0.55);
  box-shadow: inset 0 0 14px rgba(139, 158, 255, 0.18), 0 0 12px rgba(139, 158, 255, 0.12);
}

.logfilter-stepper-btn {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(139, 158, 255, 0.16);
  border: 1px solid rgba(139, 158, 255, 0.32);
  border-radius: 50%;
  color: #c4b5fd;
  font-size: 14px; font-weight: 800;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  line-height: 1;
  padding: 0;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logfilter-stepper-btn:hover {
  background: linear-gradient(135deg, rgba(139, 158, 255, 0.4), rgba(192, 132, 252, 0.32));
  border-color: rgba(139, 158, 255, 0.7);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(139, 158, 255, 0.4);
}
.logfilter-stepper-btn:active {
  transform: scale(0.92);
  background: linear-gradient(135deg, rgba(139, 158, 255, 0.55), rgba(192, 132, 252, 0.45));
}

.logfilter-threshold-input {
  width: 52px; height: 26px;
  padding: 0 4px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(139, 158, 255, 0.4);
  border-radius: 8px;
  color: #fff;
  font-size: 14px; font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -moz-appearance: textfield;
  letter-spacing: -0.3px;
}
.logfilter-threshold-input::-webkit-outer-spin-button,
.logfilter-threshold-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.logfilter-threshold-input:hover {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(139, 158, 255, 0.6);
}
.logfilter-threshold-input:focus {
  background: rgba(0, 0, 0, 0.85);
  border-color: rgba(192, 132, 252, 0.85);
  box-shadow: 0 0 14px rgba(139, 158, 255, 0.45), inset 0 0 6px rgba(192, 132, 252, 0.18);
}

.logfilter-threshold-suffix {
  font-weight: 700;
  color: #c4b5fd;
  letter-spacing: 0.2px;
  white-space: nowrap;
  margin-left: 4px;
}
.logfilter-row[aria-checked="true"] .logfilter-threshold-suffix {
  color: #e2d4ff;
}

.logfilter-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.logfilter-row:hover {
  background: rgba(139, 158, 255, 0.06);
  border-color: rgba(139, 158, 255, 0.2);
}
.logfilter-row[aria-checked="false"] {
  opacity: 0.55;
}
.logfilter-row[aria-checked="false"]:hover { opacity: 0.85; }

.logfilter-row-text {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-width: 0;
}
.logfilter-row-label {
  font-size: 13px; font-weight: 700;
  color: #e8ecf3;
  letter-spacing: 0.1px;
}
.logfilter-row-hint {
  font-size: 10.5px; color: #6b7280;
  font-weight: 500;
  letter-spacing: 0.1px;
}

.logfilter-toggle {
  flex-shrink: 0;
  display: inline-flex;
  margin-left: 12px;
}
.logfilter-toggle-track {
  position: relative;
  display: inline-block;
  width: 38px; height: 20px;
  background: rgba(20, 22, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.logfilter-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: linear-gradient(180deg, #d8dde8, #8b95a5);
  border-radius: 50%;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.logfilter-row[aria-checked="true"] .logfilter-toggle-track {
  background: linear-gradient(135deg, #5b8cff, #a855f7);
  border-color: rgba(139, 158, 255, 0.55);
  box-shadow: 0 0 12px rgba(139, 158, 255, 0.45), inset 0 0 6px rgba(255, 255, 255, 0.18);
}
.logfilter-row[aria-checked="true"] .logfilter-toggle-thumb {
  transform: translateX(18px);
  background: linear-gradient(180deg, #fff, #d4d8e6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55), 0 0 8px rgba(255, 255, 255, 0.2);
}

.logfilter-launch-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.16), rgba(91, 140, 255, 0.08));
  border: 1px solid rgba(192, 132, 252, 0.32);
  border-radius: 8px;
  color: #c4b5fd;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.logfilter-launch-btn:hover {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.28), rgba(91, 140, 255, 0.16));
  border-color: rgba(192, 132, 252, 0.55);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(192, 132, 252, 0.25);
}
.logfilter-launch-btn svg { width: 12px; height: 12px; flex-shrink: 0; }

@media (max-width: 700px) {
  .logfilter-panel { max-width: 94vw; max-height: 90vh; }
  .logfilter-head { padding: 14px 16px 10px; }
  .logfilter-bulk { padding: 10px 16px; }
  .logfilter-body { padding: 10px 12px 14px; }
}
