/* Tabs */

.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 1.5rem;
  background: var(--bg-surface);
  border-radius: 6px;
  padding: 3px;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 0.5rem 0.8rem;
  border: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.tab-btn.active {
  color: var(--text);
  background: var(--bg-raised);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Sections */

.tool-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.tool-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-light);
}

/* Fields */

.field {
  margin-bottom: 1rem;
}

.field label,
.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field select,
.field input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.field select:focus,
.field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* File input */

.file-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.file-input-wrapper:hover {
  border-color: var(--accent-dim);
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-input-wrapper .file-btn {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.75rem;
  pointer-events: none;
  flex-shrink: 0;
}

.file-input-wrapper .file-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-raised);
  color: var(--text);
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-dim);
}

.btn-primary {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-success {
  background: var(--green-dim);
  border-color: var(--green-dim);
  color: #fff;
}

.btn-success:hover {
  background: var(--green);
  border-color: var(--green);
}

.actions {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Results & status */

.results {
  margin-top: 1rem;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.status-bar.pass {
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid var(--green-dim);
  color: var(--green);
}

.status-bar.fail {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid var(--red-dim);
  color: var(--red);
}

.status-bar.info {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
}

.stats-row {
  display: flex;
  gap: 1.5rem;
  padding: 0.6rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stats-row strong {
  color: var(--text);
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  width: 92vw;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.3rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  overflow: auto;
  flex: 1;
}
