.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 16px 20px;
}
.card h3 {
  font-size: 13px;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.grid div {
  color: #c9d1d9;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-monospace, monospace;
  font-size: 13px;
}
.tbl th,
.tbl td {
  border-bottom: 1px solid #30363d;
  padding: 6px 8px;
  text-align: left;
  color: #c9d1d9;
}
.tbl th {
  color: #8b949e;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #30363d;
}
.modal-header h3 {
  margin: 0;
  font-size: 14px;
  color: #e6edf3;
  text-transform: none;
  letter-spacing: 0;
}
.modal-x {
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-body label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #8b949e;
}
.modal-body input,
.modal-body select {
  background: #0d1117;
  color: #e6edf3;
  border: 1px solid #30363d;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, monospace;
}
.modal-error {
  background: #4f1a1a;
  color: #ff7b72;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid #30363d;
}
.btn {
  background: #21262d;
  color: #e6edf3;
  border: 1px solid #30363d;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.btn-primary {
  background: #238636;
  border-color: #238636;
}
.btn:hover {
  background: #30363d;
}
.btn-primary:hover {
  background: #2ea043;
}

.tbl-inline {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 8px 24px;
  background: var(--bg-2);
}
.tbl-inline th {
  padding: 4px 8px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--bg-3);
}
.tbl-inline td {
  padding: 4px 8px;
  font-size: 12px;
  border-bottom: 1px solid var(--bg-3);
}
.tbl-inline code {
  background: var(--bg);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--success);
}
.btn-aplicar-patron {
  background: var(--success-bg);
  color: white;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  margin-right: 4px;
}
.btn-crear-patron {
  background: var(--primary-bg);
  color: white;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}
.btn-aplicar-patron:hover,
.btn-crear-patron:hover {
  opacity: 0.85;
}
.patrones-resumen td {
  background: var(--bg);
  padding: 0 !important;
}
