/* ═══════════════════════════════════════════════════════════════
   Storage — Files Administrator v2
   List-only, checkboxes, dropdown menus, search, loading overlay
   ═══════════════════════════════════════════════════════════════ */

/* ─── Loading overlay ────────────────────────── */
.stg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border-radius: var(--gx-radius-lg, 8px);
}
.stg-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.stg-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gx-border-light, #E5E7EB);
  border-top-color: var(--gx-primary, #6366F1);
  border-radius: 50%;
  animation: stg-spin 0.7s linear infinite;
}
@keyframes stg-spin {
  to { transform: rotate(360deg); }
}

/* ─── Quota bar (segmented, macOS-style) ─────── */
.stg-quota {
  padding: var(--gx-sp-4, 16px);
  background: var(--gx-bg-surface, #fff);
  border: 1px solid var(--gx-border-light, #E5E7EB);
  border-radius: var(--gx-radius-lg, 12px);
  margin-bottom: var(--gx-sp-4, 16px);
}
.stg-quota__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--gx-sp-2, 8px);
}
.stg-quota__label {
  font-size: var(--gx-text-xs, 12px);
  font-weight: 600;
  color: var(--gx-text-primary, #111827);
}
.stg-quota__detail {
  font-size: var(--gx-text-xs, 12px);
  color: var(--gx-text-muted, #6B7280);
}
.stg-quota__track {
  height: 12px;
  background: var(--gx-border-light, #E5E7EB);
  border-radius: 9999px;
  overflow: visible;
  margin-bottom: var(--gx-sp-3, 12px);
  display: flex;
}
.stg-quota__segment {
  height: 100%;
  min-width: 3px;
  transition: width 0.5s;
  border-right: 1px solid rgba(255,255,255,0.3);
  position: relative;
  cursor: pointer;
}
.stg-quota__segment:hover { filter: brightness(1.15); }
.stg-quota__segment:last-child { border-right: none; }
.stg-quota__tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1F2937;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.stg-quota__tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1F2937;
}
.stg-quota__segment:hover .stg-quota__tip { display: flex; }
.stg-quota__tip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stg-quota__tip-size { color: rgba(255,255,255,0.7); margin-left: 2px; }
.stg-quota__fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s;
}
.stg-quota__fill--ok   { background: var(--gx-primary, #6366F1); }
.stg-quota__fill--warn { background: #eab308; }
.stg-quota__fill--crit { background: #ef4444; }
.stg-quota__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.stg-quota__legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.stg-quota__legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.stg-quota__legend-name { color: var(--gx-text-primary, #111827); }
.stg-quota__legend-size { color: var(--gx-text-muted, #6B7280); }

/* ─── Toolbar ────────────────────────────────── */
.stg-toolbar {
  display: flex;
  align-items: center;
  gap: var(--gx-sp-2, 8px);
  flex-wrap: wrap;
  margin-bottom: var(--gx-sp-3, 12px);
}
.stg-toolbar__left {
  display: flex;
  gap: var(--gx-sp-2, 8px);
}
.stg-toolbar__right {
  display: flex;
  gap: var(--gx-sp-2, 8px);
  align-items: center;
  margin-left: auto;
}

/* ─── Search ─────────────────────────────────── */
.stg-search {
  position: relative;
  display: flex;
  align-items: center;
}
.stg-search__icon {
  position: absolute;
  left: 10px;
  color: var(--gx-text-muted, #9CA3AF);
  pointer-events: none;
}
.stg-search__input {
  padding: 6px 32px 6px 32px;
  border: 1px solid var(--gx-border-light, #E5E7EB);
  border-radius: var(--gx-radius-md, 6px);
  font-size: 13px;
  background: var(--gx-bg-surface, #fff);
  color: var(--gx-text-primary, #111827);
  width: 300px;
  transition: border-color 0.15s;
  outline: none;
}
.stg-search__input:focus {
  border-color: var(--gx-primary, #6366F1);
}
.stg-search__clear {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gx-text-muted, #9CA3AF);
  padding: 2px;
  display: flex;
}
.stg-search__clear:hover { color: var(--gx-text-primary, #111827); }

/* ─── Bulk actions bar ───────────────────────── */
.stg-bulk {
  display: flex;
  align-items: center;
  gap: var(--gx-sp-2, 8px);
  padding: var(--gx-sp-2, 8px) var(--gx-sp-4, 16px);
  background: var(--gx-primary-light, #EEF2FF);
  border-radius: var(--gx-radius-md, 6px);
  margin-bottom: var(--gx-sp-3, 12px);
}
.stg-bulk__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--gx-primary, #6366F1);
  margin-right: auto;
}

/* ─── Breadcrumbs ────────────────────────────── */
.stg-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--gx-sp-1, 4px);
  font-size: var(--gx-text-sm, 13px);
  color: var(--gx-text-muted, #6B7280);
  margin-bottom: var(--gx-sp-3, 12px);
  flex-wrap: wrap;
}
.stg-breadcrumbs__item {
  cursor: pointer;
  color: var(--gx-primary, #6366F1);
  font-weight: 500;
  transition: color 0.15s;
}
.stg-breadcrumbs__item:hover { text-decoration: underline; }
.stg-breadcrumbs__sep { color: var(--gx-text-disabled, #d1d5db); user-select: none; display: flex; }
.stg-breadcrumbs__current { color: var(--gx-text-primary, #111827); font-weight: 600; }

/* ─── Table ──────────────────────────────────── */
.stg-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gx-border-light, #E5E7EB);
  border-radius: var(--gx-radius-lg, 12px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 120px;
}
.stg-table .stg-row:first-child { border-radius: 12px 12px 0 0; }
.stg-table .stg-row:last-child  { border-radius: 0 0 12px 12px; }
.stg-row {
  display: grid;
  grid-template-columns: 36px 36px 1fr 160px 100px 160px;
  column-gap: 16px;
  align-items: center;
  padding: 0 var(--gx-sp-3, 12px);
  min-height: 48px;
  min-width: 700px;
  background: var(--gx-bg-surface, #fff);
  border-bottom: 1px solid var(--gx-border-light, #E5E7EB);
  cursor: pointer;
  transition: background 0.1s;
}
.stg-row:last-child { border-bottom: none; }
.stg-row:hover { background: var(--gx-bg-surface-hover, #F9FAFB); }
.stg-row.is-selected { background: var(--gx-primary-light, #EEF2FF); }
.stg-row--header {
  font-size: 11px;
  font-weight: 600;
  color: var(--gx-text-muted, #6B7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: default;
  min-height: 36px;
  background: var(--gx-bg-surface, #fff);
}
.stg-row--header:hover { background: var(--gx-bg-surface, #fff); }
.stg-row--trashed { opacity: 0.7; }
.stg-row--trashed:hover { opacity: 1; }

.stg-col { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stg-col--check { display: flex; align-items: center; justify-content: center; }
.stg-col--menu  { display: flex; align-items: center; justify-content: center; position: relative; }
.stg-col--name  { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--gx-text-primary, #111827); }
.stg-col--date  { color: var(--gx-text-primary, #111827); }
.stg-col--user  { color: var(--gx-text-primary, #111827); }
.stg-col--size  { color: var(--gx-text-primary, #111827); }
.stg-col--sortable { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 4px; }
.stg-col--sortable:hover { color: var(--gx-text-primary, #111827); }

.stg-col__icon { flex-shrink: 0; display: flex; align-items: center; }
.stg-col__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stg-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 9999px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(99,102,241,0.1);
  color: var(--gx-primary, #6366F1);
}
.stg-meta-inline {
  font-size: 12px;
  color: var(--gx-text-muted, #6B7280);
  font-weight: 400;
}

/* ─── Checkbox ───────────────────────────────── */
.stg-check {
  width: 16px;
  height: 16px;
  accent-color: var(--gx-primary, #6366F1);
  cursor: pointer;
}

/* ─── 3-dot menu button ──────────────────────── */
.stg-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--gx-radius-sm, 4px);
  color: var(--gx-text-secondary, #4B5563);
  display: flex;
  align-items: center;
  transition: background 0.1s, color 0.1s;
}
.stg-menu-btn:hover {
  background: var(--gx-border-light, #E5E7EB);
  color: var(--gx-text-primary, #111827);
}

/* ─── Dropdown ───────────────────────────────── */
.stg-dropdown {
  display: none;
  position: fixed;
  z-index: 9999;
  background: var(--gx-bg-surface, #fff);
  border: 1px solid var(--gx-border-light, #E5E7EB);
  border-radius: var(--gx-radius-md, 6px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 180px;
  padding: 4px 0;
}
.stg-dropdown.is-open { display: block; }
.stg-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--gx-text-primary, #111827);
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}
.stg-dropdown__item:hover { background: var(--gx-bg-surface-hover, #F9FAFB); }
.stg-dropdown__item--danger { color: #EF4444; }
.stg-dropdown__item--danger:hover { background: #FEF2F2; }
.stg-dropdown__sep {
  height: 1px;
  background: var(--gx-border-light, #E5E7EB);
  margin: 4px 0;
}

/* ─── Upload progress ────────────────────────── */
.stg-upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--gx-bg-surface, #fff);
  border: 1px solid var(--gx-border-light, #E5E7EB);
  border-radius: 6px;
  margin-bottom: 8px;
}
.stg-upload-item__name {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stg-upload-item__bar {
  width: 120px;
  height: 4px;
  background: var(--gx-border-light, #E5E7EB);
  border-radius: 9999px;
  overflow: hidden;
}
.stg-upload-item__progress {
  height: 100%;
  background: var(--gx-primary, #6366F1);
  border-radius: 9999px;
  transition: width 0.3s;
}
.stg-upload-item__status {
  font-size: 12px;
  font-weight: 600;
}
.stg-upload-item__status--fail { color: #ef4444; }

/* ─── Empty state ────────────────────────────── */
.stg-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--gx-text-muted, #6B7280);
}
.stg-empty__icon {
  margin-bottom: 12px;
  opacity: 0.3;
  display: flex;
  justify-content: center;
}
.stg-empty__text { font-size: 14px; }

/* ─── Auto-generate info banner ──────────────── */
.stg-auto-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: var(--gx-info-light, #DBEAFE);
  color: var(--gx-text-primary, #111827);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  border-left: 3px solid var(--gx-info, #3B82F6);
}

/* ─── Trash header ───────────────────────────── */
.stg-trash-header { margin-bottom: 16px; }
.stg-trash-header__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gx-text-primary, #111827);
  margin: 0 0 4px 0;
}
.stg-trash-header__info {
  font-size: 13px;
  color: var(--gx-text-muted, #6B7280);
  margin: 0;
}

/* ─── System Folders modal ───────────────────── */
.stg-sysfolder-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gx-border-light, #E5E7EB);
}
.stg-sysfolder-row:last-child { border-bottom: none; }
.stg-sysfolder-row--child {
  padding-left: 48px;
  font-size: 12px;
}
.stg-sysfolder__name { flex: 1; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stg-sysfolder__badge {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 9999px;
  font-weight: 700;
}
.stg-sysfolder__badge--platform { background: rgba(99,102,241,0.1); color: var(--gx-primary, #6366F1); }
.stg-sysfolder__badge--custom { background: #ecfdf5; color: #065f46; }
.stg-sysfolder__auto { font-size: 12px; color: var(--gx-text-muted, #6B7280); }

/* ─── Drop overlay ───────────────────────────── */
.stg-drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  border: 2.5px dashed var(--gx-primary, #6366F1);
  border-radius: var(--gx-radius-lg, 12px);
  align-items: center;
  justify-content: center;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.stg-drop-overlay.is-visible { display: flex; }
.stg-drop-overlay__content {
  text-align: center;
  animation: stgDropPulse 1.5s ease-in-out infinite;
}
.stg-drop-overlay__icon {
  color: var(--gx-primary, #6366F1);
  margin-bottom: 12px;
}
.stg-drop-overlay__text {
  font-size: 18px;
  font-weight: 600;
  color: var(--gx-primary, #6366F1);
  margin-bottom: 4px;
}
.stg-drop-overlay__hint {
  font-size: 13px;
  color: var(--gx-text-muted, #6B7280);
}
@keyframes stgDropPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* ─── Upload Modal ───────────────────────────── */
.stg-upload-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.stg-upload-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
}
.stg-upload-modal__box {
  position: relative; z-index: 1;
  background: var(--gx-bg-surface, #fff);
  border-radius: var(--gx-radius-xl, 16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 32px; max-width: 480px; width: 92%;
}
.stg-upload-modal__close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; cursor: pointer;
  color: var(--gx-text-muted, #9CA3AF);
  padding: 4px; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.stg-upload-modal__close:hover {
  background: var(--gx-bg-muted, #F3F4F6);
  color: var(--gx-text-primary, #111827);
}
.stg-upload-modal__title {
  font-size: 18px; font-weight: 600;
  color: var(--gx-text-primary, #111827);
  margin: 0 0 4px 0;
}
.stg-upload-modal__subtitle {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gx-text-muted, #6B7280);
  margin: 0 0 20px 0;
}
.stg-upload-modal__dropzone {
  border: 2px dashed var(--gx-border-light, #D1D5DB);
  border-radius: var(--gx-radius-lg, 12px);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.stg-upload-modal__dropzone:hover {
  border-color: var(--gx-primary, #6366F1);
  background: rgba(99,102,241,0.03);
}
.stg-upload-modal__dropzone--active {
  border-color: var(--gx-primary, #6366F1);
  background: rgba(99,102,241,0.06);
  border-style: solid;
}
.stg-upload-modal__dropzone-icon {
  color: var(--gx-text-muted, #9CA3AF);
  margin-bottom: 12px;
  transition: color 0.2s;
}
.stg-upload-modal__dropzone:hover .stg-upload-modal__dropzone-icon,
.stg-upload-modal__dropzone--active .stg-upload-modal__dropzone-icon {
  color: var(--gx-primary, #6366F1);
}
.stg-upload-modal__dropzone-text {
  font-size: 15px; font-weight: 500;
  color: var(--gx-text-primary, #111827);
  margin-bottom: 4px;
}
.stg-upload-modal__dropzone-or {
  font-size: 13px; color: var(--gx-text-muted, #9CA3AF);
  margin: 12px 0;
}
.stg-upload-modal__limit {
  font-size: 12px; color: var(--gx-text-muted, #9CA3AF);
  margin-top: 14px;
}

/* ─── Input Modal (new folder, rename) ───────── */
.stg-input-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.stg-input-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
}
.stg-input-modal__box {
  position: relative; z-index: 1;
  background: var(--gx-bg-surface, #fff);
  border-radius: var(--gx-radius-xl, 16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 32px; max-width: 400px; width: 90%;
  text-align: center;
}
.stg-input-modal__icon { margin-bottom: 12px; }
.stg-input-modal__title {
  font-size: 18px; font-weight: 600;
  color: var(--gx-text-primary, #111827);
  margin: 0 0 20px 0;
}
.stg-input-modal__field {
  width: 100%; box-sizing: border-box;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid var(--gx-border-light, #D1D5DB);
  border-radius: var(--gx-radius-md, 8px);
  background: var(--gx-bg-surface, #fff);
  color: var(--gx-text-primary, #111827);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stg-input-modal__field:focus {
  border-color: var(--gx-primary, #6366F1);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.stg-input-modal__field--error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}
.stg-input-modal__actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 20px;
}

/* ─── ZIP Download Modal ─────────────────────── */
.stg-zip-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.stg-zip-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
}
.stg-zip-modal__box {
  position: relative; z-index: 1;
  background: var(--gx-bg-surface, #fff);
  border-radius: var(--gx-radius-xl, 16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 32px; max-width: 420px; width: 90%;
  text-align: center;
}
.stg-zip-modal__icon { margin-bottom: 12px; }
.stg-zip-modal__title {
  font-size: 18px; font-weight: 600;
  color: var(--gx-text-primary, #111827);
  margin: 0 0 16px 0;
}
.stg-zip-modal__info {
  background: var(--gx-bg-muted, #F9FAFB);
  border-radius: var(--gx-radius-md, 8px);
  padding: 12px 16px; margin-bottom: 16px;
  text-align: left;
}
.stg-zip-modal__row {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 14px;
  color: var(--gx-text-primary, #111827);
}
.stg-zip-modal__row span { color: var(--gx-text-muted, #6B7280); }
.stg-zip-modal__warn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; color: #D97706;
  margin: 0 0 20px 0;
}
.stg-zip-modal__actions {
  display: flex; justify-content: center; gap: 8px;
}
.stg-zip-modal__progress {
  margin-top: 20px;
}
.stg-zip-modal__progress-label {
  font-size: 13px; color: var(--gx-text-muted, #6B7280);
  margin-bottom: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stg-zip-modal__progress-bar {
  height: 8px; background: var(--gx-border-light, #E5E7EB);
  border-radius: 4px; overflow: hidden;
}
.stg-zip-modal__progress-fill {
  height: 100%; background: var(--gx-primary, #6366F1);
  border-radius: 4px;
  transition: width 0.2s ease;
}

/* ─── Scanning files ─────────────────────────── */
.stg-row--scanning {
  background: rgba(99, 102, 241, 0.03);
}
.stg-row--scanning:hover {
  background: rgba(99, 102, 241, 0.06);
}
.stg-row--scanning .stg-col--name .stg-col__text {
  color: var(--gx-text-muted, #6B7280);
}
.stg-scanning-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--gx-primary, #6366F1);
  flex-shrink: 0;
  animation: stg-scanning-pulse 1.5s ease-in-out infinite;
}
@keyframes stg-scanning-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.stg-dropdown__item--muted {
  color: var(--gx-text-muted, #9CA3AF);
  cursor: default;
  pointer-events: none;
}

/* ─── Scan modal ─────────────────────────────── */
.stg-scan-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.stg-scan-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
}
.stg-scan-modal__box {
  position: relative; z-index: 1;
  background: var(--gx-bg-surface, #fff);
  border-radius: var(--gx-radius-xl, 16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 32px; max-width: 440px; width: 90%;
  text-align: center;
}
.stg-scan-modal__icon { margin-bottom: 12px; }
.stg-scan-modal__title {
  font-size: 18px; font-weight: 600;
  margin: 0 0 4px 0;
}
.stg-scan-modal__subtitle {
  font-size: 14px;
  color: var(--gx-text-muted, #6B7280);
  margin: 0 0 16px 0; line-height: 1.5;
}
.stg-scan-modal__progress-bar {
  height: 6px;
  background: var(--gx-border-light, #E5E7EB);
  border-radius: 3px; overflow: hidden;
  margin-bottom: 16px;
}
.stg-scan-modal__progress-fill {
  height: 100%;
  background: var(--gx-primary, #6366F1);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.stg-scan-modal__list {
  text-align: left;
  max-height: 240px; overflow-y: auto;
  margin-bottom: 16px;
}
.stg-scan-modal__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gx-border-light, #F3F4F6);
  font-size: 13px;
}
.stg-scan-modal__item:last-child { border-bottom: none; }
.stg-scan-modal__item-icon { flex-shrink: 0; display: flex; }
.stg-scan-modal__item-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--gx-text-primary, #111827);
}
.stg-scan-modal__item-status {
  flex-shrink: 0; font-size: 12px; font-weight: 500;
  max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stg-scan-modal__warn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; color: #EF4444;
  margin: 0 0 16px 0;
}
.stg-scan-modal__actions {
  display: flex; justify-content: center; gap: 8px;
}
@keyframes stg-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.stg-spin {
  display: inline-flex;
  animation: stg-spin 1.2s linear infinite;
}

/* ─── Infected files ─────────────────────────── */
.stg-row--infected {
  background: rgba(239, 68, 68, 0.04);
}
.stg-row--infected:hover {
  background: rgba(239, 68, 68, 0.08);
}
.stg-row--infected .stg-col--name .stg-col__text {
  color: var(--gx-text-muted, #6B7280);
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.4);
}
.stg-infected-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: #EF4444;
  flex-shrink: 0;
  animation: stg-infected-pulse 2s ease-in-out infinite;
}
@keyframes stg-infected-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.stg-dropdown__item--warn {
  color: #D97706;
}
.stg-dropdown__item--warn:hover {
  background: rgba(217, 119, 6, 0.08);
}
.stg-infected-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.stg-infected-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
}
.stg-infected-modal__box {
  position: relative; z-index: 1;
  background: var(--gx-bg-surface, #fff);
  border-radius: var(--gx-radius-xl, 16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 32px; max-width: 440px; width: 90%;
  text-align: center;
}
.stg-infected-modal__icon { margin-bottom: 12px; }
.stg-infected-modal__title {
  font-size: 18px; font-weight: 600;
  color: #EF4444;
  margin: 0 0 8px 0;
}
.stg-infected-modal__desc {
  font-size: 14px;
  color: var(--gx-text-muted, #6B7280);
  margin: 0 0 16px 0;
  line-height: 1.5;
}
.stg-infected-modal__info {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--gx-radius-md, 8px);
  padding: 12px 16px; margin-bottom: 20px;
  text-align: left;
}
.stg-infected-modal__row {
  display: flex; justify-content: space-between;
  padding: 4px 0; font-size: 13px;
  color: var(--gx-text-primary, #111827);
}
.stg-infected-modal__row span { color: var(--gx-text-muted, #6B7280); }
.stg-infected-modal__row strong {
  text-align: right; max-width: 60%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stg-infected-modal__malware { color: #EF4444; }
.stg-infected-modal__actions {
  display: flex; justify-content: center; gap: 8px;
}

/* ─── Quarantine modal ───────────────────────── */
.stg-quarantine-warn {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: #D97706;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: var(--gx-radius-md, 8px);
  padding: 10px 14px; margin-bottom: 16px;
}
.stg-quarantine-list {
  max-height: 400px; overflow-y: auto;
}
.stg-quarantine-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
  padding: 40px 20px;
  color: var(--gx-text-muted, #9CA3AF);
  font-size: 14px;
}
.stg-quarantine-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gx-border-light, #F3F4F6);
  transition: background 0.15s;
}
.stg-quarantine-row:last-child { border-bottom: none; }
.stg-quarantine-row:hover { background: rgba(239, 68, 68, 0.04); }
.stg-quarantine-row__icon {
  flex-shrink: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.5;
}
.stg-quarantine-row__info { flex: 1; min-width: 0; }
.stg-quarantine-row__name {
  font-size: 14px; font-weight: 500;
  color: var(--gx-text-primary, #111827);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stg-quarantine-row__meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--gx-text-muted, #6B7280);
  margin-top: 2px;
}
.stg-quarantine-row__malware {
  display: inline-flex; align-items: center; gap: 3px;
  color: #EF4444; font-weight: 500;
}
.stg-quarantine-row__actions {
  display: flex; gap: 6px; flex-shrink: 0;
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .stg-search__input { width: 200px; }
}
@media (max-width: 640px) {
  .stg-toolbar { flex-wrap: wrap; }
  .stg-toolbar__left { flex-wrap: wrap; }
  .stg-toolbar__right { margin-left: auto; }
  .stg-search__input { width: 180px; }
}