*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root,
[data-theme="dark"] {
  
  --bg-app: #09090b;
  --bg-sidebar: #0e0e11;
  --bg-topbar: #0e0e11;
  --bg-card: #131317;
  --bg-card-hover: #18181d;
  --bg-input: #101014;
  --bg-pill: #1c1c22;
  --bg-table-header: #111115;
  --bg-modal: #141418;
  --bg-hover-row: rgba(255, 255, 255, 0.028);

  
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.045);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-dashed: rgba(255, 255, 255, 0.12);
  --border-dashed-hover: rgba(255, 255, 255, 0.25);
  --border-specular: rgba(255, 255, 255, 0.16);

  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-faint: #52525b;

  
  --accent: #9e1c38;
  --accent-hover: #b32242;
  --accent-active: #7d132a;
  --accent-subtle: rgba(158, 28, 56, 0.12);
  --accent-border: rgba(158, 28, 56, 0.28);

  
  --success: #22c55e;
  --success-subtle: rgba(34, 197, 94, 0.10);
  --success-border: rgba(34, 197, 94, 0.22);

  --error: #ef4444;
  --error-subtle: rgba(239, 68, 68, 0.10);
  --error-border: rgba(239, 68, 68, 0.22);

  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.10);
  --warning-border: rgba(245, 158, 11, 0.22);

  --info: #38bdf8;
  --info-subtle: rgba(56, 189, 248, 0.10);
  --info-border: rgba(56, 189, 248, 0.22);

  
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-pill: 9999px;

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: var(--font-ui);
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  
  --shadow-bevel: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-button: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-strong);
  --shadow-input: inset 0 1px 2px rgba(0, 0, 0, 0.25);

  --badge-bg: rgba(255, 255, 255, 0.05);
  --badge-bg-active: rgba(255, 255, 255, 0.12);
  --modal-backdrop: rgba(0, 0, 0, 0.65);
  --bg-dropzone: rgba(255, 255, 255, 0.015);
  --bg-dropzone-hover: rgba(255, 255, 255, 0.035);
  --scrollbar-thumb: rgba(255, 255, 255, 0.10);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.18);
  --radial-glow: transparent;
}

[data-theme="light"] {
  
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-topbar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --bg-pill: #e2e8f0;
  --bg-table-header: #f8fafc;
  --bg-modal: #ffffff;
  --bg-hover-row: rgba(0, 0, 0, 0.02);

  
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-strong: #cbd5e1;
  --border-dashed: #cbd5e1;
  --border-dashed-hover: #94a3b8;
  --border-specular: #cbd5e1;

  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  
  --accent: #9e1c38;
  --accent-hover: #80142b;
  --accent-active: #660e21;
  --accent-subtle: rgba(158, 28, 56, 0.08);
  --accent-border: rgba(158, 28, 56, 0.22);

  
  --success: #16a34a;
  --success-subtle: rgba(22, 163, 74, 0.08);
  --success-border: rgba(22, 163, 74, 0.22);

  --error: #dc2626;
  --error-subtle: rgba(220, 38, 38, 0.08);
  --error-border: rgba(220, 38, 38, 0.22);

  --warning: #d97706;
  --warning-subtle: rgba(217, 119, 6, 0.08);
  --warning-border: rgba(217, 119, 6, 0.22);

  --info: #0284c7;
  --info-subtle: rgba(2, 132, 199, 0.08);
  --info-border: rgba(2, 132, 199, 0.22);

  
  --shadow-bevel: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-button: 0 1px 2px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow-modal: 0 20px 40px rgba(15, 23, 42, 0.08), 0 0 0 1px var(--border);
  --shadow-input: inset 0 1px 2px rgba(15, 23, 42, 0.03);

  --badge-bg: rgba(15, 23, 42, 0.05);
  --badge-bg-active: rgba(15, 23, 42, 0.10);
  --modal-backdrop: rgba(15, 23, 42, 0.35);
  --bg-dropzone: rgba(15, 23, 42, 0.015);
  --bg-dropzone-hover: rgba(15, 23, 42, 0.03);
  --scrollbar-thumb: rgba(15, 23, 42, 0.12);
  --scrollbar-thumb-hover: rgba(15, 23, 42, 0.22);
  --radial-glow: transparent;
}

html, body {
  height: 100%;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
}

.only-mobile {
  display: none !important;
}

.mobile-topbar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
}

.mobile-menu-btn {
  position: relative;
}

.mobile-menu-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0 4px;
  font-weight: 700;
  line-height: 12px;
  min-width: 12px;
  text-align: center;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-topbar-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
}

.mobile-stop-btn {
  background: var(--error);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(244, 63, 94, 0.45);
  transition: transform 0.1s, opacity 0.15s;
}

.mobile-stop-btn:active {
  transform: scale(0.95);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background-color 0.15s;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-pill);
}

.sidebar-mobile-links {
  display: none;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-link-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.sidebar-link-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg-app);
}

.master-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  min-height: 46px;
  padding: 0 16px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 20;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: var(--badge-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.workspace-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  width: 100%;
  position: relative;
}

.sidebar {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 14px 12px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.sidebar-head-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.icon-btn-subtle {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.icon-btn-subtle:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-right: 2px;
}

.sidebar-foot {
  flex-shrink: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  flex-shrink: 0;
  overflow: hidden;
}

[data-theme="light"] .brand-logo {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-fallback-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
  display: block;
}

[data-theme="light"] .brand-fallback-icon {
  color: var(--accent);
}

.brand-logo.sm {
  width: 26px;
  height: 26px;
  border-radius: 5px;
}

.brand-logo.sm .brand-fallback-icon {
  width: 15px;
  height: 15px;
}

.brand-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-weight: 500;
  text-transform: uppercase;
  margin-top: 1px;
}

.side-section {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.side-section.grow {
  flex: 1;
  min-height: 130px;
}

.side-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.side-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.side-hint code {
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
}

.pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.input, .textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-input);
  color: var(--text-primary);
  padding: 8.5px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  font-family: var(--font-ui);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.input::placeholder, .textarea::placeholder {
  color: var(--text-faint);
}

.input:hover, .textarea:hover {
  border-color: var(--border-strong);
}

.input:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 16px -2px rgba(179, 29, 63, 0.35);
  background: var(--bg-card);
}

.input-mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.change-pass-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg-card);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 2px;
}

.change-pass-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.change-pass-tab:hover {
  color: var(--text-primary);
}

.change-pass-tab.active {
  background: var(--bg-input);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.input-with-actions {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-actions .input {
  padding-right: 62px;
}

.input-actions-group {
  position: absolute;
  right: 4px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.input-action-btn {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.input-action-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.input-action-btn.sm {
  width: 22px;
  height: 22px;
}

.random-pass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.random-pass-info-text {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.random-pass-info-text svg {
  color: var(--accent);
  flex-shrink: 0;
}

.random-preview-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.5px;
  word-break: break-all;
}

.new-pass-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.new-pass-badge:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--success);
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.input-error-shake {
  animation: inputShake 0.4s ease-in-out;
  border-color: var(--error) !important;
}

.textarea {
  flex: 1;
  min-height: 120px;
  resize: none;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.drag-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 16, 0.94);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(2px);
}

.drag-overlay.show {
  display: flex;
}

.drag-overlay-text {
  font-weight: 650;
  color: var(--accent);
  font-size: 13px;
}

.dropzone-box {
  border: 1.5px dashed var(--border-dashed);
  border-radius: var(--radius-sm);
  background: var(--bg-dropzone);
  padding: 10px 12px;
  margin-top: 6px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  user-select: none;
  position: relative;
}

.dropzone-box:hover {
  border-color: var(--border-dashed-hover);
  background: var(--bg-dropzone-hover);
}

.dropzone-box.drag-over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.dropzone-idle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropzone-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: color 0.18s, border-color 0.18s;
}

.dropzone-box.drag-over .dropzone-icon {
  color: var(--accent);
  border-color: var(--accent-border);
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dropzone-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.dropzone-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dropzone-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.dropzone-active-state {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  padding: 5px 0;
}

.dropzone-box.drag-over .dropzone-idle {
  display: none;
}

.dropzone-box.drag-over .dropzone-active-state {
  display: flex;
}

.dropzone-box.drag-over .dropzone-file-card {
  display: none !important;
}

.dropzone-box.has-file {
  border: none;
  padding: 0;
  background: transparent;
  cursor: default;
}

.dropzone-box.has-file:hover {
  background: transparent;
  border-color: transparent;
}

.dropzone-file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  box-shadow: none !important;
  transition: border-color 0.18s ease;
}

.dropzone-file-card:hover {
  border-color: var(--accent-border);
}

.loaded-file-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loaded-file-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loaded-file-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
}

.loaded-file-meta {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.loaded-file-meta .remaining-count,
.active-file-rem {
  color: var(--text-secondary);
  font-weight: 500;
}

.loaded-file-remove {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.loaded-file-remove:hover {
  color: var(--error);
  background: var(--error-subtle);
  border-color: rgba(248, 113, 113, 0.25);
}

.btn-group {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
  flex: 1;
  font-family: var(--font-ui);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-sm {
  padding: 7px 11px;
  font-size: 12px;
  flex: none;
  width: 100%;
  margin-top: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, #a61c3c 0%, #80122a 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(166, 28, 60, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #bb2045 0%, #941532 100%);
  box-shadow: 0 4px 14px rgba(166, 28, 60, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  background: linear-gradient(135deg, #80122a 0%, #630c1f 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  transform: translateY(0) scale(0.98);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.06);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 600;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.42);
  color: #fca5a5;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

.btn-danger:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-bevel);
  width: 100%;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

.btn-mini {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-mini:hover {
  color: var(--text-primary);
  background: var(--bg-pill);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg-app);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-topbar);
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-bevel);
  border-radius: var(--radius-sm);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.topbar-link:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

#statEta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-idle {
  background: #22c55e;
}

.dot-running {
  background: var(--info);
}

.dot-stopped {
  background: var(--error);
}

.side-label-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-text-subtle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 1px 7px;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.12s ease;
}

.btn-text-subtle:hover {
  background: var(--bg-pill);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.dropzone-compact {
  margin-top: 6px;
  padding: 8px 12px;
  border: 1px dashed var(--border-dashed);
  border-radius: var(--radius-sm);
  background: var(--bg-dropzone);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  min-height: unset;
}

.dropzone-compact:hover {
  border-color: var(--border-dashed-hover);
  background: var(--bg-dropzone-hover);
  color: var(--text-primary);
}

.dropzone-compact .dropzone-idle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.dropzone-compact .dropzone-text-line b {
  color: var(--text-primary);
}

.dropzone-compact .dropzone-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.btn-run {
  flex: 1 1 auto;
  height: 38px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap !important;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-run:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-stop {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 68px !important;
  height: 38px;
  padding: 0 14px !important;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnSpin 0.65s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes btnSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn.is-loading {
  pointer-events: none !important;
  opacity: 0.85 !important;
  cursor: wait !important;
}

.sidebar-brand-sig {
  text-align: center;
  padding-top: 8px;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.sidebar-brand-sig b {
  color: var(--text-muted);
  font-weight: 600;
}

.results-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-table-header);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .results-toolbar {
    height: auto;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .toolbar-left {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .toolbar-left::-webkit-scrollbar {
    display: none;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.filter-tab * {
  pointer-events: none;
}

.filter-tab:hover {
  color: var(--text-primary);
  background: var(--bg-pill);
}

.filter-tab.active {
  background: var(--bg-pill);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-bevel);
}

.tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tab-dot.hit { background: var(--success); }
.tab-dot.fail { background: var(--error); }
.tab-dot.reload { background: var(--warning); }

.tab-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--badge-bg);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  line-height: 14px;
  display: inline-block;
  min-width: 14px;
  text-align: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.filter-tab.active .tab-badge {
  background: var(--badge-bg-active);
  color: var(--text-primary);
}

.tab-badge.hit { color: var(--success); }
.tab-badge.fail { color: var(--error); }
.tab-badge.reload { color: var(--warning); }

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.run-stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.run-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  display: inline-block;
  min-width: 1ch;
  text-align: right;
}

.stat-unit {
  font-size: 10px;
  color: var(--text-muted);
}

.run-stat-sep {
  color: var(--border-strong);
  font-size: 12px;
}

.toolbar-right #btnExport {
  width: auto !important;
  margin: 0 !important;
  height: 28px !important;
  padding: 0 11px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
  border-radius: var(--radius-sm);
}

.results-wrap {
  flex: 1;
  overflow: auto;
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--bg-app);
  position: relative;
  min-height: 0;
  contain: paint layout;
}

.watermark-canvas {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 0;
  overflow: hidden;
}

.watermark-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.035);
  line-height: 1;
  text-align: center;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .watermark-text {
  color: rgba(0, 0, 0, 0.035);
}

.results-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed; 
}

.row-smooth-in {
  
}

.results-table thead th {
  white-space: nowrap;
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-table-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.results-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
}

.results-table th.col-idx,
.results-table td.col-idx {
  width: 65px !important;
  min-width: 65px !important;
  max-width: 65px !important;
  padding: 7px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  text-align: left;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  border-right: 1px solid var(--border-subtle);
}

.cell-ellipsis {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-table tbody tr {
  transition: background-color 0.08s ease;
}

.results-table tbody tr:hover {
  background: var(--bg-hover-row);
}

.results-table tbody tr:hover td.col-idx {
  color: var(--text-secondary);
}

@keyframes hit-glow {
  0% {
    background-color: rgba(34, 197, 94, 0.15);
  }
  100% {
    background-color: transparent;
  }
}

.row-hit-flash {
  animation: hit-glow 1s ease forwards;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.status-chip::before {
  content: "";
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-success {
  background: rgba(34, 197, 94, 0.10);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.status-error {
  background: rgba(239, 68, 68, 0.10);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.22);
}

.status-reload {
  background: rgba(245, 158, 11, 0.10);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 280px;
  width: 100%;
  color: var(--text-muted);
  gap: 12px;
  padding: 48px 20px;
  font-size: 13px;
  user-select: none;
  box-sizing: border-box;
}

.empty-state.show {
  display: flex !important;
}

.empty-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.empty-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

.empty-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 2px;
}

.empty-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

#btnEmptyOpenSidebar {
  display: none !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px auto 0 !important;
  align-self: center !important;
  padding: 8px 18px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  width: auto !important;
  flex: 0 0 auto !important;
  text-align: center !important;
  cursor: pointer;
}

@keyframes sidebarPulseHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 142, 247, 0.7);
    border-color: var(--accent);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(79, 142, 247, 0.35);
    border-color: var(--accent-light);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 142, 247, 0);
  }
}

.sidebar.sidebar-pulse {
  animation: sidebarPulseHighlight 1.2s ease-out 1;
}

.btn-sample-data {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s ease;
  margin-top: 4px;
  font-family: var(--font-ui);
}

.btn-sample-data:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-sample-data:active {
  transform: scale(0.98);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.modal-backdrop.show .modal {
  transform: scale(1) translateY(0);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-weight: 650;
  font-size: 14px;
  color: var(--text-primary);
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-modal-body {
  padding: 16px 18px;
}

.export-section-label {
  font-size: 11px;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.export-format-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.export-fmt-btn {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-bevel);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s, transform 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.export-fmt-btn:active {
  transform: scale(0.97);
}

.export-fmt-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.export-fmt-btn.active {
  background: var(--bg-pill);
  border-color: var(--accent);
  color: var(--accent);
}

.export-multi-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.export-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.export-type-card {
  padding: 10px 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-bevel);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.export-type-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.export-type-card:active {
  transform: scale(0.98);
}

.export-type-card.selected {
  background: var(--bg-card-hover);
  border-color: var(--accent-border);
}

.export-type-card.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.export-type-card.all-card {
  grid-column: 1 / -1;
}

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

.export-type-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.export-type-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  font-family: var(--font-mono);
}

.check-mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.export-type-card.selected .check-mark {
  background: var(--accent);
  border-color: var(--accent);
}

.export-type-card.selected .check-mark::after {
  content: '✓';
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

.export-confirm-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.btn-copy {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-bevel);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-copy:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

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

.dot-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
}

.dot-mini.c-green { color: var(--success); }
.dot-mini.c-red { color: var(--error); }
.dot-mini.c-yellow { color: var(--warning); }
.dot-mini.c-dim { color: var(--text-muted); }

.session-modal {
  max-width: 440px;
}

.session-modal .modal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.session-modal .modal-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-primary);
  width: auto;
  margin: 0 auto;
}

.session-modal .modal-title svg {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.session-modal-body {
  padding: 16px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.session-modal-intro {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.session-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.session-stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-bevel);
}

.session-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.session-stat-dot.c-green { background: var(--success); }
.session-stat-dot.c-red { background: var(--error); }
.session-stat-dot.c-yellow { background: var(--warning); }
.session-stat-dot.c-info { background: var(--info); }

.session-stat-pill-label {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

.session-stat-pill-val {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.session-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session-opt-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
  position: relative;
  font-family: inherit;
}

.session-opt-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.session-opt-btn.primary {
  border-color: var(--accent-border);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(179, 29, 63, 0.08) 100%);
}

.session-opt-btn.primary:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card-hover) 0%, rgba(179, 29, 63, 0.16) 100%);
}

.session-opt-btn.secondary {
  border-color: var(--border);
  background: var(--bg-card);
}

.session-opt-btn.secondary:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.session-opt-btn.danger {
  border-color: var(--border);
}

.session-opt-btn.danger:hover {
  border-color: var(--error-border);
  background: linear-gradient(135deg, var(--bg-card-hover) 0%, rgba(244, 63, 94, 0.08) 100%);
}

.session-opt-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.session-opt-btn.primary .session-opt-icon {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(179, 29, 63, 0.35);
}

.session-opt-btn.secondary .session-opt-icon {
  background: var(--bg-pill);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.session-opt-btn.secondary:hover .session-opt-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.session-opt-btn.danger .session-opt-icon {
  background: var(--bg-pill);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.session-opt-btn.danger:hover .session-opt-icon {
  background: var(--error-subtle);
  color: var(--error);
  border-color: var(--error-border);
}

.badge-rec {
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35px;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(179, 29, 63, 0.16);
  color: #ff5277;
  border: 1px solid rgba(255, 82, 119, 0.55);
  box-shadow: 0 1px 4px rgba(179, 29, 63, 0.22);
  user-select: none;
  pointer-events: none;
  text-transform: uppercase;
  transition: all 0.16s ease;
}

[data-theme="light"] .badge-rec {
  background: rgba(179, 29, 63, 0.08);
  color: var(--accent);
  border-color: rgba(179, 29, 63, 0.45);
}

.session-opt-btn.primary:hover .badge-rec {
  background: rgba(179, 29, 63, 0.25);
  border-color: rgba(255, 82, 119, 0.85);
  box-shadow: 0 1px 6px rgba(179, 29, 63, 0.35);
}

.session-opt-btn.primary .session-opt-title {
  padding-right: 68px;
}

.session-opt-text {
  flex: 1;
  min-width: 0;
}

.session-opt-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-opt-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 4px;
}

.session-opt-desc b {
  color: var(--text-primary);
  font-weight: 600;
}

.modal-wide { max-width: 540px; }
.modal-tall { max-height: 85vh; }
.guide-body { max-height: 65vh; }
.guide-section { margin-bottom: 16px; }
.guide-section:last-of-type { margin-bottom: 6px; }

.guide-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.guide-num {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: var(--bg-pill);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.guide-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.guide-text b {
  color: var(--text-primary);
}

.guide-text code {
  background: var(--bg-card);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.guide-example {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-status-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

.guide-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.guide-status-item .status-chip {
  flex-shrink: 0;
}

.guide-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.app-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: all;
  user-select: none;
  transition: opacity 0.25s ease, visibility 0.25s;
  visibility: visible;
  opacity: 1;
}

.app-loading-screen.loaded {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.loading-spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--bg-pill);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 13px;
  font-family: var(--font-ui);
  color: var(--text-secondary);
  font-weight: 500;
}

.loading-error-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  text-align: center;
}

.loading-error-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--error);
}

.loading-error-msg {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.loading-error-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 900px) {
  html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-app) !important;
  }

  .only-mobile {
    display: flex !important;
  }

  
  .mobile-topbar {
    display: flex;
    height: 48px;
    padding: 6px 14px;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .mobile-menu-btn {
    width: 36px;
    height: 36px;
    padding: 7px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
  }

  .mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .mobile-topbar-actions .icon-btn {
    width: 32px;
    height: 32px;
    padding: 6px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
  }

  .master-topbar,
  .main .topbar,
  .topbar {
    display: none !important;
  }

  .app {
    height: calc(100% - 48px);
    height: calc(100dvh - 48px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .workspace-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 0;
  }

  .main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
  }

  
  .sidebar {
    position: fixed;
    top: 50%;
    left: 50%;
    bottom: auto;
    width: min(390px, 92vw);
    max-height: min(680px, 90dvh);
    min-width: unset;
    max-width: 92vw;
    z-index: 1000 !important;
    visibility: hidden;
    pointer-events: none;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    transform: translate(-50%, -46%) scale(0.96);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, visibility 0.25s;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .sidebar.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #btnEmptyOpenSidebar {
    display: inline-flex !important;
    align-self: center !important;
    margin: 14px auto 0 !important;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: var(--modal-backdrop);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    display: block;
  }

  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: all;
  }

  .sidebar-head {
    padding: 14px 16px !important;
    margin: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--bg-sidebar) !important;
    flex-shrink: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .sidebar-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 16px 16px 20px !important;
    gap: 14px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .side-section {
    margin-bottom: 0;
    overflow: visible;
  }

  .side-section:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .side-label {
    line-height: 1.4 !important;
    padding-top: 2px;
    padding-bottom: 2px;
    overflow: visible;
  }

  .active-file-card {
    margin-bottom: 6px;
  }

  .side-section.grow {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px;
  }

  
  .textarea {
    flex: 1;
    min-height: 160px;
    height: auto !important;
    max-height: none !important;
    padding: 10px 12px;
    font-size: 12px;
    border-radius: 8px;
  }

  .side-hint {
    font-size: 11px;
    margin: 4px 0 6px;
    line-height: 1.4;
  }

  
  .dropzone-box {
    padding: 9px 12px;
    border: 1.5px dashed var(--border-dashed);
    border-radius: 8px;
    background: var(--bg-dropzone);
    min-height: unset;
    margin-top: 4px;
    cursor: pointer;
  }

  .dropzone-idle {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: center;
  }

  .dropzone-icon {
    margin-bottom: 0;
    color: var(--accent);
  }

  .dropzone-title {
    display: inline;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
  }

  .dropzone-sub {
    display: inline;
    font-size: 12px;
    color: var(--text-muted);
  }

  .dropzone-link {
    display: inline;
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
  }

  .sidebar-foot {
    padding: 12px 16px 14px !important;
    margin: 0 !important;
    background: var(--bg-sidebar) !important;
    border-top: 1px solid var(--border) !important;
    flex-shrink: 0 !important;
  }

  .btn-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  #btnStart {
    flex: 2;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
  }

  #btnStop {
    flex: 1;
    padding: 10px 10px;
    font-size: 12px;
    border-radius: 8px;
  }

  #btnExport {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 8px;
    margin-top: 6px;
    width: 100%;
  }

  .sidebar-mobile-links {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
  }

  .sidebar-link-btn {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 6px;
  }

  
  .filter-bar {
    padding: 6px 10px 4px;
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
  }

  .filter-tabs {
    display: flex;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px;
    box-shadow: var(--shadow-bevel);
  }

  .filter-tab {
    flex: 1;
    justify-content: center;
    padding: 5px 2px;
    font-size: 11px;
    gap: 4px;
    border-radius: 4px;
    border: 1px solid transparent;
  }

  .filter-tab.active {
    background: var(--bg-pill);
    border-color: var(--border-subtle);
  }

  .tab-badge {
    font-size: 11px;
    padding: 1px 4px;
  }

  .search-wrap {
    width: 100%;
    margin-left: 0;
  }

  .search-box {
    width: 100%;
    height: 32px;
    padding: 5px 10px 5px 28px;
    font-size: 12px;
    border-radius: var(--radius-sm);
  }

  .results-wrap {
    flex: 1 1 auto;
    min-height: 0;
    margin: 4px 10px 10px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    position: relative;
    box-shadow: var(--shadow-bevel);
  }

  .results-table {
    min-width: 620px;
    font-size: 12px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
  }

  .results-table thead th {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-table-header);
    border-bottom: 1px solid var(--border);
  }

  .results-table td {
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-subtle);
  }

  .results-table th.col-idx,
  .results-table td.col-idx {
    position: sticky;
    left: 0;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    padding: 7px 4px;
    text-align: center;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    box-shadow: none;
    z-index: 3;
    color: var(--text-muted);
  }

  .results-table thead th.col-idx {
    z-index: 5;
    background: var(--bg-table-header);
    border-right: 1px solid var(--border);
  }

  .cell-ellipsis {
    max-width: 120px;
  }

  .empty-state {
    padding: 32px 14px;
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .btn-group {
    flex-direction: column;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    max-width: 100%;
    max-height: 94vh;
  }

  .export-type-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .export-confirm-bar {
    flex-wrap: wrap;
  }

  .export-confirm-bar button {
    flex: 1 1 45%;
  }
}

@media (max-width: 380px) {
  .results-wrap {
    margin: 4px 6px 6px;
  }
}

@keyframes cellCopiedPulse {
  0% {
    background-color: rgba(16, 185, 129, 0.45);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.6);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

.cell-copied-flash {
  animation: cellCopiedPulse 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#accountSectionWrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  position: relative !important;
  flex: 1;
  min-height: 0;
}
#accounts {
  width: 100% !important;
  flex: 1 1 auto !important;
  min-height: 120px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
#dropZoneBox {
  width: 100% !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  margin-top: 2px !important;
}

.active-file-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  flex: 1 1 auto;
  min-height: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 12px;
  gap: 10px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

[data-theme="light"] .active-file-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
}

.active-file-card.drag-over {
  border-color: var(--accent) !important;
  background: var(--accent-subtle) !important;
}

.file-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.file-card-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="light"] .file-card-badge {
  background: rgba(158, 28, 56, 0.08);
  border-color: rgba(158, 28, 56, 0.2);
  color: #9e1c38;
}

.file-card-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

[data-theme="light"] .file-card-name {
  color: #0f172a;
}

.file-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

[data-theme="light"] .file-card-sub {
  color: #64748b;
}

.file-card-remove {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.file-card-remove:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

.file-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.file-metric-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

[data-theme="light"] .file-metric-box {
  background: #f8fafc;
  border-color: #edf2f7;
}

.file-metric-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

[data-theme="light"] .file-metric-label {
  color: #64748b;
}

.file-metric-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .file-metric-val {
  color: #0f172a;
}

.file-metric-val.highlight {
  color: var(--accent);
}

[data-theme="light"] .file-metric-val.highlight {
  color: #9e1c38;
}

.file-card-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.file-card-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-progress-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

[data-theme="light"] .file-progress-label {
  color: #64748b;
}

.file-progress-percent {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
}

[data-theme="light"] .file-progress-percent {
  color: #64748b;
}

.file-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--bg-input);
  overflow: hidden;
}

[data-theme="light"] .file-progress-track {
  background: #edf2f7;
}

.file-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, #ff4b72 100%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-card-footer {
  display: flex;
  gap: 8px;
  width: 100%;
}

.file-action-btn {
  flex: 1;
  height: 30px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  background: var(--bg-input);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

[data-theme="light"] .file-action-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.file-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

#fileLoadingBackdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  background: rgba(0, 0, 0, 0.72) !important;
  z-index: 50000 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
}

#alertModalBackdrop {
  z-index: 1000005 !important;
}

#fileLoadingBackdrop.show {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: all !important;
  visibility: visible !important;
}

[data-theme="light"] #fileLoadingBackdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}

.file-loading-modal {
  max-width: 320px;
  width: 88%;
  padding: 24px 22px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

[data-theme="light"] .file-loading-modal {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.file-loading-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.file-loading-spinner-wrap {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-loading-spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: fileSpin 0.7s linear infinite;
}

@keyframes fileSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.file-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.file-loading-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.file-loading-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.file-loading-progress-track {
  width: 100%;
  height: 3px;
  background: var(--bg-pill);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
  position: relative;
}

.file-loading-progress-bar {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent) 0%, #ff4b72 100%);
  border-radius: 999px;
  animation: loadingBarIndeterminate 1.4s ease-in-out infinite;
}

@keyframes loadingBarIndeterminate {
  0% { transform: translateX(-100%); width: 25%; }
  50% { transform: translateX(100%); width: 60%; }
  100% { transform: translateX(300%); width: 30%; }
}

.alert-modal {
  max-width: 380px !important;
  background: #141417 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  overflow: hidden !important;
  color: #f4f4f5 !important;
  padding: 0 !important;
}

.alert-modal-head {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 16px 20px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: transparent !important;
}

.alert-modal-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 7px !important;
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.22) !important;
  color: #f87171 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.alert-modal-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #f4f4f5 !important;
  letter-spacing: -0.01em !important;
}

.alert-modal-body {
  padding: 16px 20px 18px !important;
  background: transparent !important;
}

.alert-modal-msg {
  font-size: 13.5px !important;
  font-weight: 400 !important;
  color: #a1a1aa !important;
  line-height: 1.5 !important;
}

.alert-modal-foot {
  padding: 12px 20px 16px !important;
  display: flex !important;
  justify-content: flex-end !important;
  background: rgba(0, 0, 0, 0.15) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.alert-modal-btn {
  width: 100% !important;
  padding: 9px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  background: #27272a !important;
  color: #f4f4f5 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.alert-modal-btn:hover {
  background: #3f3f46 !important;
  color: #ffffff !important;
}

[data-theme="light"] .alert-modal {
  background: #ffffff !important;
  border-color: #e4e4e7 !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
  color: #09090b !important;
}

[data-theme="light"] .alert-modal-head {
  border-bottom-color: #f4f4f5 !important;
}

[data-theme="light"] .alert-modal-title {
  color: #09090b !important;
}

[data-theme="light"] .alert-modal-msg {
  color: #52525b !important;
}

[data-theme="light"] .alert-modal-foot {
  background: #fafafa !important;
  border-top-color: #f4f4f5 !important;
}

[data-theme="light"] .alert-modal-btn {
  background: #f4f4f5 !important;
  color: #18181b !important;
  border-color: #e4e4e7 !important;
}

[data-theme="light"] .alert-modal-btn:hover {
  background: #e4e4e7 !important;
}

#accCount {
  display: none !important;
}
