#avtoPage {
  --avto-accent: #4f46e5;
  --avto-accent-soft: #eef2ff;
  --avto-border: rgba(15, 23, 42, 0.1);
  font-family: system-ui, -apple-system, "Segoe UI", Calibri, sans-serif;
  color: #0f172a;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 14px 40px;
}

#avtoPage .avto-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

#avtoPage .avto-hero h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#avtoPage .avto-hero p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

#avtoPage .avto-card {
  background: linear-gradient(165deg, #fcfcfd 0%, #f4f6fa 100%);
  border: 1px solid var(--avto-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

#avtoPage .avto-card-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin: 0 0 10px;
}

#avtoPage .avto-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

#avtoPage .avto-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

#avtoPage .avto-field input[type="date"],
#avtoPage .avto-field input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  border: 1px solid var(--avto-border);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
}

#avtoPage .avto-field-anbar {
  grid-column: 1 / -1;
}

#avtoPage .avto-anbar-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

#avtoPage .avto-anbar-row input {
  flex: 1;
}

#avtoPage .avto-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

#avtoPage .avto-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

#avtoPage .avto-btn:active {
  transform: scale(0.98);
}

#avtoPage .avto-btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.28);
}

#avtoPage .avto-btn-soft {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid var(--avto-border);
}

#avtoPage .avto-modules {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#avtoPage .avto-mod {
  border: 1px solid var(--avto-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

#avtoPage .avto-mod-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}

#avtoPage .avto-mod-head:hover {
  background: rgba(79, 70, 229, 0.04);
}

#avtoPage .avto-mod-head input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--avto-accent);
}

#avtoPage .avto-mod-name {
  font-weight: 700;
  font-size: 14px;
  flex: 1;
}

#avtoPage .avto-mod-cat {
  font-size: 11px;
  font-weight: 700;
  color: #6366f1;
  background: var(--avto-accent-soft);
  padding: 3px 8px;
  border-radius: 999px;
}

#avtoPage .avto-mod-parts {
  display: none;
  padding: 0 12px 12px 38px;
  gap: 6px;
  flex-wrap: wrap;
}

#avtoPage .avto-mod.is-open .avto-mod-parts {
  display: flex;
}

#avtoPage .avto-part {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--avto-border);
  background: #fff;
  cursor: pointer;
}

#avtoPage .avto-part input {
  accent-color: var(--avto-accent);
}

#avtoPage .avto-part.is-checked {
  border-color: #a5b4fc;
  background: #eef2ff;
  color: #312e81;
}

#avtoPage .avto-progress {
  margin-top: 12px;
  display: none;
}

#avtoPage .avto-progress.is-active {
  display: block;
}

#avtoPage .avto-progress-bar-wrap {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

#avtoPage .avto-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #22c55e);
  transition: width 0.2s ease;
}

#avtoPage .avto-progress-text {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

#avtoPage .avto-log {
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.45;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
}

#avtoCaptureHost {
  position: fixed;
  left: -10000px;
  top: 0;
  z-index: -1;
  background: #fff;
  padding: 16px;
}

#avtoCaptureHost table {
  border-collapse: collapse;
  font-family: Calibri, Arial, sans-serif;
  font-size: 13px;
}

#avtoCaptureHost th,
#avtoCaptureHost td {
  border: 1px solid #999;
  padding: 6px 10px;
  text-align: center;
}

#avtoCaptureHost thead th {
  background: #ffeb3b;
  font-weight: bold;
}

#avtoCaptureHost caption {
  caption-side: top;
  font-weight: 700;
  font-size: 15px;
  padding: 8px;
  color: #111;
}
